Ring0上调用未导出Zw函数通用函数

前段时间写的一段无聊代码,可能对大家有点用。用于在驱动里调用一些没有直接导出的Zw函数,如ZwProtectVirtualMemory。在此感谢alpha提供思路。

BOOLEAN CallZwFunction(CONST CHAR *FunctionName,PVOID pCallRet,ULONG ArgNum,...)
{
 char *vl;
 BOOLEAN retval = FALSE;
 ULONG FunctionIndex;
 ULONG CallRet;
 ULONG Argv[20],temp;
 LONG i;
 ULONG FunctionAddr;
 BYTE Sign[]="\xb8\x44\x00\x00\x00";
 BYTE *p;

...

分页:[«]1[»]

Powered By Z-Blog 2.0 bate Build Theme by toboku

Copyright langouster. Some Rights Reserved.   苏ICP备06046736号