简单恢复NtOpenProcess函数驱动源码

简单恢复NtOpenProcess函数驱动源码

ID:37790842

大小:37.00 KB

页数:5页

时间:2019-05-31

简单恢复NtOpenProcess函数驱动源码_第1页
简单恢复NtOpenProcess函数驱动源码_第2页
简单恢复NtOpenProcess函数驱动源码_第3页
简单恢复NtOpenProcess函数驱动源码_第4页
简单恢复NtOpenProcess函数驱动源码_第5页
资源描述:

《简单恢复NtOpenProcess函数驱动源码》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、#include#includetypedefstruct_SERVICE_DESCRIPTOR_TABLE{PVOIDServiceTableBase;PULONGServiceCounterTableBase;ULONGNumberTableBase;ULONGParamTableBase;}SERVICE_DESCRIPTOR_TABLE,*PSERVICE_DESCRIPTOR_TABLE;externPSERVICE_DESCRIPTOR_TABLEKeSe

2、rviceDescriptorTable;typedefNTSTATUS(*NTOPENTHREAD)(OUTPHANDLEThreadHandle,INACCESS_MASKDesiredAccess,INPOBJECT_ATTRIBUTESObjectAttributes,INPCLIENT_IDClientId);typedefNTSTATUS(*ZWOPENPROCESS)(OUTPHANDLEProcessHandle,INACCESS_MASKAccessMask,INPOBJECT_ATTR

3、IBUTESObjectAttributes,INPCLIENT_IDClientId);typedefNTSTATUS(*NTREADVIRTUALMEMORY)(INHANDLEProcessHandle,INPVOIDBaseAddress,OUTPVOIDBuffer,INULONGBufferLength,OUTPULONGReturnLengthOPTIONAL);typedefNTSTATUS(*NTWRITEVIRTUALMEMORY)(INHANDLEProcessHandle,INPV

4、OIDBaseAddress,INPVOIDBuffer,INULONGBufferLength,OUTPULONGReturnLengthOPTIONAL);NTOPENTHREADRealNtOpenThread;ZWOPENPROCESSRealZwOpenProcess;NTREADVIRTUALMEMORYRealNtReadVirtualMemory;NTWRITEVIRTUALMEMORYRealNtWriteVirtualMemory;VOIDHook();VOIDUnHook();VOI

5、DTD_DRIVER_UNLOAD(PDRIVER_OBJECTDriverObject);NTSTATUSreturnvalue;ULONGNtOpenProcess_15;ULONGNtOpenThread_15;ULONGNtReadVirtualMemory_12;ULONGNtWriteVirtualMemory_12;ULONGOldServiceAddress1,OldServiceAddress2,OldServiceAddress3,OldServiceAddress4;__declsp

6、ec(naked)NTSTATUS__stdcallMy_NtReadVirtualMemory(HANDLEProcessHandle,PVOIDBaseAddress,PVOIDBuffer,ULONGBufferLength,ULONGReturnLength){returnvalue=(NTSTATUS)(NTREADVIRTUALMEMORY)RealNtReadVirtualMemory(ProcessHandle,BaseAddress,Buffer,BufferLength,ReturnL

7、ength);__asm{push1Chpush804DA4E0hmoveax,80538FB0hcalleaxjmp[NtReadVirtualMemory_12]}}__declspec(naked)NTSTATUS__stdcallMy_NtWriteVirtualMemory(HANDLEProcessHandle,PVOIDBaseAddress,PVOIDBuffer,ULONGBufferLength,PULONGReturnLength){returnvalue=(NTSTATUS)(NT

8、WRITEVIRTUALMEMORY)RealNtWriteVirtualMemory(ProcessHandle,BaseAddress,Buffer,BufferLength,ReturnLength);__asm{push1Chpush804DA4F8hmoveax,80538FB0hcalleaxjmp[NtWriteVirtualMemory_12]}}__declspec(naked)NTSTATUS__stdca

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。