feat get PsResumeProcess func
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user