Making a Talking Thumb Drive to "protect" Your Data.

by inchman in Circuits > Software

6000 Views, 23 Favorites, 0 Comments

Making a Talking Thumb Drive to "protect" Your Data.

thumb-drive.gif

First off, I need to make a caveat before I start this ‘ilbe.  This concept is, in NO WAY, a means of securing or protecting your data on a thumb drive (which is why I put “protect” in quotes in the title.)   If you are looking to secure data, encryption is what you need and not a part of the scope of this ‘ilbe.

Now, on to the fun part…

What this ‘ilbe does, is start a small VB script in which you can edit the text you want spoken when a person puts the thumb drive in their computer.  I got this idea when I read a fellow deployed Soldier’s instructable on how to copy all the files from a computer to your thumb drive.  He actually did most of the work for this ‘ilbe.  I just came up with using this talking script for fun.
Here is a link to his ‘ilbe…

https://www.instructables.com/id/How_to_make_flash_drive_that_copys_users_files_si/

Some Background on Autorunning a Thumb Drive

Here is the hardest part of this instructable.  There are many ways a WinXX machine will react when a thumb drive is inserted.  It depends on the local computer’s settings and OS, the thumb drive itself, and what is on the drive.  I’ll give a quick breakdown of each of these.  Note that this information is not comprehensive.  There is a ton of info available on the web if you want to do more reading.

Local machines may or may not have the “autorun” feature turned on.  This feature only works on drives that are recognized by the OS as “non removable” drives.  Apparently there is a way to make thumb drives get recognized as a CDROM drive, but I can’t find out how.  If you know, please email me how!  There is software out there to do this, but I’m not interested in buying software, (or downloading viruses) to do this little trick.

Of course, OS versions make a huge difference.  XP makes this trick harder while Vista and Win7 make it progressively easier.  This ‘ilbe will work on ANY of these OS’s (and Apple as far as I can tell, but I can’t test it here.)

Some thumb drives have a CDROM “partition” that acts as a CDROM.  These drives are labeled as having “U3” software on them.  I have one of these thumb drives, but I have been unable to modify the CDROM partition to make this work.  Again, if you know how to do this, please let me know!

So that leaves the final option, what files that are on the thumb drive itself as our option to autorun our little application.  The BEST that I can do here is to have the user hit enter, once.  There is no way (that I have found) to make this completely autonomous.  Finally, if you know how, email me.

So it requires a little social engineering on our part.
 

What You Need

files.gif

All you need to make this work is a thumb drive, and a text editor.  That’s it.  No fancy software, no need to download questionable code, no need to add more bloated code to your PC. 
One note, for the text editor, I would use notepad.exe if you are on a winXX box.  But feel free to use whatever you like.  Note that using Word.exe or Wordpad.exe will not generate the files we need unless you actively save as a text file.

Below is the list of all the files that you will create.  (don’t get scared, they are all very small and you can cut and paste right from this ‘ible.)
 

The Autorun.inf File

autorun.gif

OK, open notepad, cut and paste the bolded text only, and save the file as “Autorun.inf” in the root of your thumbdrive. The italicized text can be edited to whatever you want, but I think this is a good start for social engineering the person to click on the action.
 Step one, DONE!

[autorun]
icon=drive.ico
open=launch.bat
action=Click "OK" to access this drive
shell\open\command=launch.bat


If you want to know what each line does, here is a quick summary…

[autorun] --->sets this as an autorun file
icon=drive.ico  --->sets the icon for this application in the autoplay menu (more on this later)
open=launch.bat ---> sets the file to launch when this action is selected
action=Click "OK" to access this drive --->This is the text that will appear in the Autoplay menu
shell\open\command=launch.bat --->again, sets the file to launch when selected
 

The Drive.ico File

us_army.gif

This one is up to you.  Pick a small graphic be the icon to represent your “application.”  Since I’m in the Army, and I use this drive for official business, I used the Army logo.  If you want it, you can d/l it from this ‘ilbe.  By right clicking on this logo here and saving it locally with the name “drive.ico.”

Just find whatever graphic you want to be your icon, save it as “drive.ico” and place it on the root of your thumb drive.  Step Two, DONE!
 

The File.bat File

file_bat.gif

OK, open notepad, cut and paste the bolded text only, and save the file as “file.bat” in the root of your thumbdrive.  Step three, DONE!

@echo off
warn.vbs
@echo off
cls

If you want to know what each line does, here is a quick summary…

@echo off --->Prevents the computer from displaying the following instructions
warn.vbs --->Runs our text reader application
@echo off ---> Prevents the computer from displaying the following instructions
Cls --->Clears the screen

 

invis.gif

OK, open notepad, cut and paste the bolded text only, and save the file as “invisible.vbs” in the root of your thumbdrive.  Step four, DONE!

CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False

This will run our other VB script hidden.
 

launch.gif

OK, open notepad, cut and paste the bolded text only, and save the file as “Lauch.bat” in the root of your thumbdrive.  Step five, DONE!

wscript.exe \invisible.vbs file.bat

This will run our other VB script using the other VB script so it runs hidden.

 

warn.gif

OK, now the FUN part…  As in all the other steps, open notepad, cut and paste the bolded text only, and save the file as “warn.vbs” in the root of your thumbdrive.  Step six, DONE!

Note, the italicized text is the message you want your computer to “read” out loud.  Have fun with it!

Dim userInput
userInput = ("This THUMB drive is the property of Moose of the united states army.  It is for official use only.  Unauthorized use of this thumb drive will result in arrest and prosecution to the fullest extend of the law.  I repeat, This Thumb drive is the property of Moose of the united states army.  It is for official use only.  Unauthorized use of this thumb drive will result in arrest and prosecution to the fullest extend of the law")
Set Sapi = Wscript.CreateObject("SAPI.SpVoice")
Sapi.speak userInput

autoplay.gif

That’s it!  You are done!

Now when you place your thumb drive into any computer, it will come up with the Autoplay menu.  Your option will be on the top and highlighted by default.  Once the user clicks on the action, the computer will “read” your warning.

HAVE FUN, Stay safe, and remember us Soldier’s stuck in weird parts of the world!

If you like this ‘ilbe, SMILE.

If you don’t like it, SMILE anyway!