feat get PsResumeProcess func

This commit is contained in:
2026-10-08 10:05:00 +08:00
parent 76f00a9312
commit 61499981d3
2 changed files with 18 additions and 2 deletions
+13 -1
View File
@@ -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<NTSTATUS(*)(POBJECT_ATTRIBUTES, POBJECT_TYPE, KPROCESSOR_MODE, PACCESS_STATE, ACCESS_MASK, PVOID, PHANDLE)>
(imported.ob_open_object_by_name)(ObjectAttributes, ObjectType, AccessMode, AccessState, DesiredAccess, ParseContext, Handle);
}
NTSTATUS psresumeprocess(PEPROCESS Process)
{
return reinterpret_cast<NTSTATUS(*)(PEPROCESS)>(imported.ps_resume_process)(Process);
}
}
+5 -1
View File
@@ -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);
}