能力值:
( LV9,RANK:210 )
|
-
-
2 楼
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
//让进程自己关闭
//////////////////////////////////////////////////////////////////
//系统普通API
//SendMessage
01:SendMessage(hWnd, WM_CLOSE, 0, 0);
//SendMessage(hWnd, WM_QUIT, 0, 0);//这个消息是发送不成功的
02:SendMessage(hWnd, WM_COMMAND, IDOK, 0);
03:SendMessage(hWnd, WM_SYSCOMMAND, SC_CLOSE, 0);
04:SendMessage(hWnd, WM_KEYDOWN, VK_ESCAPE, 0);
//PostMessage
05:PostMessage(hWnd, WM_CLOSE, 0, 0);
06:PostMessage(hWnd, WM_QUIT, 0, 0);
07:PostMessage(hWnd, WM_COMMAND, IDOK, 0);
08:PostMessage(hWnd, WM_SYSCOMMAND, SC_CLOSE, 0);
09:PostMessage(hWnd, WM_KEYDOWN, VK_ESCAPE, 0);
//PostThreadMessage
//PostThreadMessage(dwThread, WM_CLOSE, 0, 0);//这个消息不会成功
10:PostThreadMessage(dwThread, WM_QUIT, 0, 0);
//PostThreadMessage(dwThread, WM_COMMAND, IDOK, 0);//这个消息不会成功
//PostThreadMessage(dwThread, WM_SYSCOMMAND, SC_CLOSE, 0);//这个消息不会成功
//PostThreadMessage(dwThread, WM_KEYDOWN, VK_ESCAPE, 0);//这个消息不会成功
//SendMessageCallback
//SendNotifyMessage
11:SendNotifyMessage(hWnd, WM_CLOSE, 0, 0);
//SendNotifyMessage(hWnd, WM_QUIT, 0, 0);
12:SendNotifyMessage(hWnd, WM_COMMAND, IDOK, 0);
13:SendNotifyMessage(hWnd, WM_SYSCOMMAND, SC_CLOSE, 0);
//SendNotifyMessage(hWnd, WM_KEYDOWN, VK_ESCAPE, 0);
//SendMessageTimeout
14:SendMessageTimeout(hWnd, WM_CLOSE, 0, 0);
SendMessageTimeout(hWnd, WM_QUIT, 0, 0);
15:SendMessageTimeout(hWnd, WM_COMMAND, IDOK, 0);
16:SendMessageTimeout(hWnd, WM_SYSCOMMAND, SC_CLOSE, 0);
SendMessageTimeout(hWnd, WM_KEYDOWN, VK_ESCAPE, 0);
//keybd_event & SendInput
17:keybd_event:Escape
18:keybd_event:Alt+F4
//mouse_event//实现比较复杂//不写了
//SendInput:Escape//=17
//SendInput:Alt+F4//=18
//SendInput:mouse_event//
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
//强行关闭
//Process or Thread
19:CreateToolhelp32Snapshot/Thread32First/Thread32Next/OpenThread/TerminateThread
//HOOK获取句柄信息
//SetWindowsHookEx
//进程内部自行关闭
20: ExitProcess(0)
21: TerminateProcess(GetCurrentProcess(), 0);
22: PostQuitMessage(0);
//进程外部
//需要句柄了
//DeviceIoControl(...);后得到句柄//进程不再受保护
23: OpenProcess/TerminateProcess
24: DebugActiveProcess(dwThreadId);
25: CreateJobObject/AssignProcessToJobObject/TerminateJobObject
26: VirtualAllocEx/CreateRemoteThread/ExitProcess
27: DbgUiConnectToDbg/DbgUiDebugActiveProcess(hProcess);
暂时知道这儿, 下面接着贴。周六没时间,周日看情况,可能会有时间,Native Api和驱动还没开始呢@@
|
能力值:
( LV9,RANK:210 )
|
-
-
4 楼
增加四种不同的方法:
//DuplicateHandle(...);后得到句柄//进程仍然受保护
28: TerminateProcess(
29: CreateJobObject/AssignProcessToJobObject/TerminateJobObject
30: VirtualAllocEx/CreateRemoteThread/ExitProcess
31: DbgUiConnectToDbg/DbgUiDebugActiveProcess(hProcess); (说明:20_31.rar, 其中20_27是修正DLL中的一点bug, 写程序不小心给掉了, 直接解压覆盖掉旧原来的就好了)
|