利用汇编,直接引用 SysCall
本帖最后由 ramonliu 于 2013-10-26 01:12 编辑#include <Windows.h>
#include <stdio.h>
LONG __declspec(naked) NtCall(DWORD FunctionIndex,DWORD ClassIndex,...)
{
__asm
{
push ebp
mov ebp,esp
mov eax,FunctionIndex
mov ecx,ClassIndex
lea edx,
call fs:
add esp,0x4
leave
retn
}
}
#define NtTerminateProcess(ProcessHandle,ExitStatus) NtCall(0x29,0x0,ProcessHandle,ExitStatus)
#define NtUserSendInput(nInputs,pInput,cbSize) NtCall(0x1082,0x0,nInputs,pInput,cbSize)
System call index 查找:
http://j00ru.vexillium.org/win32k_x64/
再補上 Native API函数原型查询:
http://www.m5home.com/bbs/thread-7210-1-1.html
希望對各位有所幫助~ {:soso_e106:} 谢谢分享
页:
[1]