Can not disable USB stick - ubuntu 10.04

Discussion in 'Java' started by nescafe, Mar 20, 2012.

  1. nescafe

    nescafe Guest

    For security reasons i have to block all USB mass storage ports.

    I have try :

    -------------------------------------------------------
    /etc/modprobe.d/blacklist.conf - blacklist usb_storage
    -------------------------------------------------------
    # ls /lib/modules/$(uname -r)/kernel/drivers/usb/storage/usb-storage.ko
    # mv /lib/modules/$(uname -r)/kernel/drivers/usb/storage/usb-storage.ko
    /root
    -------------------------------------------------------
    sudo rmmod usb_storage
    sudo modprobe -r usb_storage
    -------------------------------------------------------
    None of this is working.

    The only thing that is working is automount option. If i disable this (
    in gconf ) it will not load USB auto start, but when you start nautilus
    you can still see "Verbatim USB storage" and you can access it.

    How to block usb mass storage ?
    nescafe, Mar 20, 2012
    #1
    1. Advertising

  2. nescafe

    Lew Guest

    nescafe wrote:
    > For security reasons i have to block all USB mass storage ports.
    >
    > I have try :
    >
    > -------------------------------------------------------
    > /etc/modprobe.d/blacklist.conf - blacklist usb_storage
    > -------------------------------------------------------
    > # ls /lib/modules/$(uname -r)/kernel/drivers/usb/storage/usb-storage.ko
    > # mv /lib/modules/$(uname -r)/kernel/drivers/usb/storage/usb-storage.ko /root
    > -------------------------------------------------------
    > sudo rmmod usb_storage
    > sudo modprobe -r usb_storage
    > -------------------------------------------------------
    > None of this is working.
    >
    > The only thing that is working is automount option. If i [sic] disable this ( in
    > gconf ) it will not load USB auto start, but when you start nautilus [sic] you can
    > still see "Verbatim USB storage" and you can access it.
    >
    > How to block usb [sic] mass storage ?


    I don't believe that Java has the ability to do that.

    This is a rather OS-specific matter. Perhaps something in the OS docs might
    help you?

    --
    Lew
    Honi soit qui mal y pense.
    http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg
    Lew, Mar 20, 2012
    #2
    1. Advertising

  3. nescafe

    Roedy Green Guest

    On Tue, 20 Mar 2012 14:12:19 +0100, nescafe <> wrote, quoted
    or indirectly quoted someone who said :

    >
    >The only thing that is working is automount option. If i disable this (
    >in gconf ) it will not load USB auto start, but when you start nautilus
    >you can still see "Verbatim USB storage" and you can access it.


    is there a way to uninstall the driver or to turn it off in bios?
    --
    Roedy Green Canadian Mind Products
    http://mindprod.com
    It is almost impossible to keep things in synch manually. Instead:
    -Keep each fact in only one central database (not necessarily SQL),
    and access it as needed. Since there is only one copy of each fact,
    there is nothing to get out of synch.
    -Use some automated tool so that if you change a fact is one place,
    it automatically updates the others.
    -Write a sanity checker you run periodically to ensure all is consistent.
    This is the strategy compilers use.
    -Document the procedures needed to keep all in synch if you change
    something and rigidly and mechanically follow them.
    Roedy Green, Mar 20, 2012
    #3
  4. nescafe

    nescafe Guest

    On 03/20/2012 07:29 PM, Roedy Green wrote:
    > On Tue, 20 Mar 2012 14:12:19 +0100, nescafe<> wrote, quoted
    > or indirectly quoted someone who said :
    >
    >>
    >> The only thing that is working is automount option. If i disable this (
    >> in gconf ) it will not load USB auto start, but when you start nautilus
    >> you can still see "Verbatim USB storage" and you can access it.

    >
    > is there a way to uninstall the driver or to turn it off in bios?


    If i turn it off in bios then i have to shut down all usb ports.
    On the other side this is not good solution becuse i must be able to
    start it when ever i need to, without rebooting.
    I have one small verification program. If you enter correct username and
    password , you get jdialog where you can choose to start or to stop usb
    drive.

    Like lew has wrote it's not directly java question but nevertheless
    there must be some answer to this.

    Maybe to find and block loading of usb driver ?
    Maybe i can set java program to load on system startup and to block all
    usb ports. But then again, none of upper commands are working.

    Damn !
    What to do. I can not be the first one with this kind of problem :)
    nescafe, Mar 20, 2012
    #4
  5. nescafe

    Lew Guest

    nescafe wrote:
    > Roedy Green wrote:
    >> nescafe wrote:
    >>> The only thing that is working is automount option. If i disable this (
    >>> in gconf ) it will not load USB auto start, but when you start nautilus
    >>> you can still see "Verbatim USB storage" and you can access it.

    >>
    >> is there a way to uninstall the driver or to turn it off in bios?

    >
    > If i [sic] turn it off in bios then i [sic] have to shut down all usb [sic] ports.
    > On the other side this is not good solution becuse i [sic] must be able to
    > start it when ever i [sic] need to, without rebooting.
    > I have one small verification program. If you enter correct username and
    > password , you get jdialog [sic] where you can choose to start or to stop usb [sic]
    > drive.
    >
    > Like lew [sic] has wrote it's not directly java question but nevertheless
    > there must be some answer to this.


    Not in Java.

    This is not a Java question.

    > Maybe to find and block loading of usb [sic] driver ?
    > Maybe i [sic] can set java [sic] program to load on system startup and to block all
    > usb [sic] ports. But then again, none of upper commands are working.


    I'm sorry, "upper commands"?

    What are those?

    > Damn !
    > What to do. I can not be the first one with this kind of problem :)


    Ask in an appropriate forum.

    Do a web search (e.g., Google).

    Check out stackoverflow.

    You want to do something spectacularly non-portable. Java is very likely the wrong tool for this.

    Ask somewhere appropriate. This isn't that place. This is comp.lang.java.programmer, a forum for discussion of Java programming issues.

    *Java* programming issues.

    --
    Lew
    Lew, Mar 20, 2012
    #5
  6. nescafe

    Roedy Green Guest

    On Tue, 20 Mar 2012 21:08:22 +0100, nescafe <> wrote,
    quoted or indirectly quoted someone who said :

    >Maybe to find and block loading of usb driver ?


    You experiment with rename it so the OS can't find it temporarily. But
    then you have to find a way to ensure it gets unloaded. Drivers don't
    normally unload do they? Otherwise you should be able to swap drivers
    without rebooting.

    Perhaps you have to find the official driver and insert a back door it
    is that can be used to deny access. In the DOS days that would have
    been quite easy. Is there as 32- bit or 64-bit disassembler available?

    In the olden days I dissassembled all kinds of things I was curious
    about with Vtech 16-bit disassembler.
    --
    Roedy Green Canadian Mind Products
    http://mindprod.com
    When you were a child, if you did your own experiment
    to see if it was better to put to cocoa into your cup first
    or the hot milk first, then you likely have the programmer gene..
    Roedy Green, Mar 28, 2012
    #6
  7. nescafe

    Roedy Green Guest

    On Tue, 20 Mar 2012 14:12:19 +0100, nescafe <> wrote, quoted
    or indirectly quoted someone who said :

    >How to block usb mass storage ?


    Another approach would be to look for a brand of USB stick that let
    you turn it on and off programmatically.

    See http://mindprod.com/bgloss/usbflashdrive.html for places to start
    looking. Look at ones with security features that might be used for
    purposes other than initially intended.

    In crude way you could enable/disable by the presence of some magic
    file on the USB (perhaps with encrypted timestamp contents) that the
    software that accesses it checks.
    --
    Roedy Green Canadian Mind Products
    http://mindprod.com
    When you were a child, if you did your own experiment
    to see if it was better to put to cocoa into your cup first
    or the hot milk first, then you likely have the programmer gene..
    Roedy Green, Mar 28, 2012
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joe Macarony

    USB 2.0 Memory Stick

    Joe Macarony, Dec 14, 2005, in forum: C++
    Replies:
    10
    Views:
    496
  2. Baron Samedi
    Replies:
    2
    Views:
    869
    Alexander Block
    Mar 26, 2007
  3. bussiere maillist
    Replies:
    0
    Views:
    488
    bussiere maillist
    Dec 7, 2007
  4. Tim Chase
    Replies:
    0
    Views:
    575
    Tim Chase
    Dec 7, 2007
  5. Thomas Tundor
    Replies:
    1
    Views:
    763
    Philip Semanchuk
    Jul 14, 2010
Loading...

Share This Page