Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

For security purposes I need to locate a additional hidden partition on USB flash drive. The USB drive contains a security application that will check (in code) if the hidden partition exists. If not I will assume that the application is a non valid copy.

Any ideas about it?

There is already a programmed secure method to check if the USB drive is correct using the WMI Win32_drive class. The idea is to locate the drive info into the hidden partition and to check if it correct for anti-tampering procedures.

share|improve this question

3 Answers 3

Mmm as an Idea, you can use TrueCrypt. It has a portable option for installing also, and you can create a hidden partition on a file

share|improve this answer
    
Or you could use bitlocker –  ephilip Aug 19 '09 at 16:47

It sounds like you are using this to support an application that you wish to deploy on a flash drive?

This might be a question for stackoverflow, and the Windows API. You can create a partition through "gparted" for example, from a Linux LiveCD such as openSUSE. These tools allow you to specify a "partition type" of "hidden FAT".

Once you have the second partition, there is probably an API to query the partition table, but I don't know of it, and if your application would need Administrative privileges to run.

Even if the app did secure Admin privileges, is it likely or possible that a group policy at large (think domain accounts) may be preventing access to the partition table?

share|improve this answer

The important thing to note is that 'hidden' doesn't really mean 'hidden'. It means 'hidden from the average Joe'. Anyone who can run fdisk will be able to see that there is a partition there, and might get curious as to what it's for.

If your purpose is just to do application keying (it only runs with the special USB drive), then I'd suggest not creating a hidden partition, but instead making the main partition a few K short of the end of the USB drive. Then use the windows raw access APIs to directly access the USB drive and look for special data (that you will have already written) at the end of the physical device.

This is slightly sneakier and slightly less noticeable than an extra partition. Unfortunately, it's still quite susceptible to whole-drive copying, and may not actually accomplish your goals.

I suggest elaborating on what you actually want to do, and let us try to help you achieve that end result.

share|improve this answer
    
It is just a secondary method to reenforce the one that is reading the PNPDeviceID of the USB device. The idea is to locate this ID into the hidden partition for a double checking procedure. –  backslash17 Aug 19 '09 at 22:49
    
@backslash17 I'm assuming that you're doing this to effectively turn the usb memory stick into a hardware dongle. By writing some special info onto the stick you get hardware protection, and then by copying the device serial number from the PNPDeviceID you get protection against someone simply doing a byte for byte copy of one stick to another as the serial number in your partition won't match what is stored in the new sticks PNPDeviceID. Is that right? –  Mokubai Jun 7 '10 at 12:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.