USB File Blocking

This is a discussion on USB File Blocking within the C++ Programming forums, part of the General Programming Boards category; Hi Has anyone or is there a way of creating a program that will detect a USB device and then ...

  1. #1
    Is Trying to Learn
    Join Date
    Mar 2006
    Location
    Hutton, Preston
    Posts
    215

    USB File Blocking

    Hi

    Has anyone or is there a way of creating a program that will detect a USB device and then check for any .exe files and stop them from running or make the invisible?

    Thanks

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    There are probably commercial products that do this.

    It is non-trivial to do, because you will need to basicly interface into the file-system stack, and in that "know" if a drive is a USB drive or not - and at the filesystem level, you don't implicitly know what the media where the data comes from. There may be a "run-filter-hook" that you could use, but you still need to understand what the drive is.

    Is this an attempt to prevent people from installing/running "unapproved" software on some group of machines? If so, and it's important that it always works, you probably want to use a commercial product.

    If you are just doing this as a toy, have a go at it. But you haven't exactly shown me that you are capable of writing kernel mode driver filters.

    Also consider that you can always put an executable in a .zip file and load the zip file and then execute from a temporary directory, so unless you use a commercial product, that's probably the "easy way around it".

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Is Trying to Learn
    Join Date
    Mar 2006
    Location
    Hutton, Preston
    Posts
    215
    yeah it was to stop people from doing so on computer - if you think it would be better to get a commercial one then ill do that - is kernel Linux programming?

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    By kernel I mean the OS kernel - there is one in Linux, Windows and all other "large" operating systems. Although I suppose I use the term loosely, in this case, to means "kernel mode" programming, which is where you are on the "kernel side" rather than user-mode side. User-mode is where applications run, kernel-mode is where most drivers run, along with the kernel itself, and probably also a few "kernel services" or "kernel processes", which would be tasks that run on behalf of the kernel [such as the swapper process that takes care of loading/unloading pages when you use virtual memory].

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #5
    Is Trying to Learn
    Join Date
    Mar 2006
    Location
    Hutton, Preston
    Posts
    215
    ah right i see thanks for the advice and info

  6. #6
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,680
    For those interested:

    http://www.osr.com/toolkits_fddk.shtml

    gg

  7. #7
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Yes, the nice people at OSR do good stuff.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Encryption program
    By zeiffelz in forum C Programming
    Replies: 1
    Last Post: 06-15-2005, 03:39 AM
  2. archive format
    By Nor in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 08-05-2003, 07:01 PM
  3. Making a LIB file from a DEF file for a DLL
    By JMPACS in forum C++ Programming
    Replies: 0
    Last Post: 08-02-2003, 08:19 PM
  4. Hmm....help me take a look at this: File Encryptor
    By heljy in forum C Programming
    Replies: 3
    Last Post: 03-23-2002, 09:57 AM
  5. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 01:58 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21