STEAL FILES FROM OTHER PC VIA USB
Here is something illegal but only for educational propose. This only demonstrates how you can copy files from your friend’s PC as soon as you plug in your flash drive or any removable storage media. How you can do this from batch file with the help of autorun.inf file?
When you plug in your Pen drive, system will look up for autorun.inf (incase if auto run is not disabled for your drive from the system).
Then we’ll input some command in autorun.inf in such a way that it will load the batch file that does the magic of copying all the files from your PC. In this demonstration batch file is copying only the files and folders in My Documents.
Here goes the batch code:
What it actually does is in first case, CHECK it checks if your removable storage have Copied_files folder or not. If it doesn’t have then it creates one by using MD (Make Directory) command. Again it checks if you have documents and settings folder then it will assume that you are using windows XP. Otherwise it will return an error and exits.
This happens because; in Windows XP the user’s documents are usually stored in %systemroot%\Documents and Settings folder. Now I’ve defined another two cases after the first case CHECK, that is COPIER case and ERROR case.
Case COPIER will execute when the program recognizes it is Windows XP, where the real copying work going on. Case ERROR will execute when the Documents and Settings, if doesn’t exists in your system root. This is just a simple use of Batch programming. Copy the above code and paste it in notepad and save it as Filename.bat.
Now let’s create a file that will load it automatically.
The above code goes in file. Open notepad and copy it and paste it and save as autorun.inf. Copy the two files, autorun.inf and in your flash drive.