feat get PsResumeProcess func
This commit is contained in:
@@ -1,9 +1,11 @@
|
|||||||
#include "kernel_api.h"
|
#include "kernel_api.h"
|
||||||
struct imported_ imported { 0 };
|
|
||||||
|
|
||||||
|
|
||||||
namespace kernel_api
|
namespace kernel_api
|
||||||
{
|
{
|
||||||
|
imported_ imported{ 0 };
|
||||||
|
|
||||||
auto kernel_api_init() -> void
|
auto kernel_api_init() -> void
|
||||||
{
|
{
|
||||||
UNICODE_STRING unFuncName{ 0 };
|
UNICODE_STRING unFuncName{ 0 };
|
||||||
@@ -28,6 +30,10 @@ namespace kernel_api
|
|||||||
|
|
||||||
RtlInitUnicodeString(&unFuncName, L"ObOpenObjectByName");
|
RtlInitUnicodeString(&unFuncName, L"ObOpenObjectByName");
|
||||||
imported.ob_open_object_by_name = (ULONG64)MmGetSystemRoutineAddress(&unFuncName);
|
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)
|
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)>
|
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);
|
(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);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,11 +21,12 @@ struct imported_
|
|||||||
ULONG64 se_locateprocess_imagename;
|
ULONG64 se_locateprocess_imagename;
|
||||||
ULONG64 nt_open_thread;
|
ULONG64 nt_open_thread;
|
||||||
ULONG64 ob_open_object_by_name;
|
ULONG64 ob_open_object_by_name;
|
||||||
|
ULONG64 ps_resume_process;
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace kernel_api
|
namespace kernel_api
|
||||||
{
|
{
|
||||||
//extern struct imported_ imported;
|
extern struct imported_ imported;
|
||||||
|
|
||||||
auto kernel_api_init() -> void;
|
auto kernel_api_init() -> void;
|
||||||
|
|
||||||
@@ -53,4 +54,7 @@ namespace kernel_api
|
|||||||
PVOID ParseContext,
|
PVOID ParseContext,
|
||||||
PHANDLE Handle
|
PHANDLE Handle
|
||||||
);
|
);
|
||||||
|
|
||||||
|
NTSTATUS psresumeprocess(PEPROCESS Process);
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user