From 61499981d3bb06a5ef9177ac44b3a50586f54205 Mon Sep 17 00:00:00 2001 From: maowenrui <3505719167@qq.com> Date: Thu, 8 Oct 2026 10:05:00 +0800 Subject: [PATCH] feat get PsResumeProcess func --- Anti-Cheat_Driver/kernel_api.cpp | 14 +++++++++++++- Anti-Cheat_Driver/kernel_api.h | 6 +++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Anti-Cheat_Driver/kernel_api.cpp b/Anti-Cheat_Driver/kernel_api.cpp index 0590162..d28b55b 100644 --- a/Anti-Cheat_Driver/kernel_api.cpp +++ b/Anti-Cheat_Driver/kernel_api.cpp @@ -1,9 +1,11 @@ #include "kernel_api.h" -struct imported_ imported { 0 }; + namespace kernel_api { + imported_ imported{ 0 }; + auto kernel_api_init() -> void { UNICODE_STRING unFuncName{ 0 }; @@ -28,6 +30,10 @@ namespace kernel_api RtlInitUnicodeString(&unFuncName, L"ObOpenObjectByName"); imported.ob_open_object_by_name = (ULONG64)MmGetSystemRoutineAddress(&unFuncName); + + RtlInitUnicodeString(&unFuncName, L"PsResumeProcess"); + imported.ps_resume_process = (ULONG64)MmGetSystemRoutineAddress(&unFuncName); + } NTSTATUS ntquerysysteminformation(ULONG SystemInformationClass, PVOID SystemInformation, ULONG SystemInformationLength, PULONG ReturnLength) @@ -68,5 +74,11 @@ namespace kernel_api return reinterpret_cast (imported.ob_open_object_by_name)(ObjectAttributes, ObjectType, AccessMode, AccessState, DesiredAccess, ParseContext, Handle); } + + NTSTATUS psresumeprocess(PEPROCESS Process) + { + return reinterpret_cast(imported.ps_resume_process)(Process); + } + } \ No newline at end of file diff --git a/Anti-Cheat_Driver/kernel_api.h b/Anti-Cheat_Driver/kernel_api.h index dad09b7..d6eb373 100644 --- a/Anti-Cheat_Driver/kernel_api.h +++ b/Anti-Cheat_Driver/kernel_api.h @@ -21,11 +21,12 @@ struct imported_ ULONG64 se_locateprocess_imagename; ULONG64 nt_open_thread; ULONG64 ob_open_object_by_name; + ULONG64 ps_resume_process; }; namespace kernel_api { - //extern struct imported_ imported; + extern struct imported_ imported; auto kernel_api_init() -> void; @@ -53,4 +54,7 @@ namespace kernel_api PVOID ParseContext, PHANDLE Handle ); + + NTSTATUS psresumeprocess(PEPROCESS Process); + } \ No newline at end of file