|
远程线程注入版获取SYSTEM权限(3) USHORT MaximumLength; PWSTR Buffer; } UNICODE_STRING, *PUNICODE_STRING; typedef enum _SYSTEM_INFORMATION_CLASS { SystemProcessesAndThreadsInformation = 5 } SYSTEM_INFORMATION_CLASS; typedef struct _SYSTEM_PROCESSES { ULONG NextEntryDelta; ULONG ThreadCount; ULONG Reserved1[6]; LARGE_INTEGER CreateTime; LARGE_INTEGER UserTime; LARGE_INTEGER KernelTime; UNICODE_STRING ProcessName; KPRIORITY BasePriority; ULONG ProcessId; ULONG InheritedFromProcessId; } SYSTEM_PROCESSES, *PSYSTEM_PROCESSES; typedef ULONG ( __stdcall *RTLNTSTATUSTODOSERROR ) ( IN NTSTATUS Status ); typedef NTSTATUS ( __stdcall *ZWQUERYSYSTEMINFORMATION ) ( IN SYSTEM_INFORMATION_CLASS SystemInformationClass, IN OUT PVOID SystemInformation, IN ULONG SystemInformationLength, OUT PULONG ReturnLength OPTIONAL ); /************************************************************************ * * * Function Prototype * * * ************************************************************************/ static size_t bufencode ( unsigned char *src, unsigned char *dst, size_t srclen ); static BOOL DisableCurrentProcessDebugPrivilege ( void ); static BOOL EnableCurrentProcessDebugPrivilege ( void ); static DWord GetPidFromProcessName ( wchar_t *ProcessName ); static BOOL LocateNtdllEntry ( void ); static DWORD __stdcall PnameToPid ( char *ProcessName
|