|
Process Hacker
|
Go to the source code of this file.
Macros | |
| #define | PH_DEVICE_PREFIX_LENGTH 64 |
| #define | PH_DEVICE_MUP_PREFIX_MAX_COUNT 16 |
| #define | PEB_OFFSET_CASE(Enum, Field) |
Typedefs | |
| typedef BOOLEAN(NTAPI * | PPHP_ENUM_PROCESS_MODULES_CALLBACK )(_In_ HANDLE ProcessHandle, _In_ PLDR_DATA_TABLE_ENTRY Entry, _In_ PVOID AddressOfEntry, _In_opt_ PVOID Context1, _In_opt_ PVOID Context2) |
| typedef BOOLEAN(NTAPI * | PPHP_ENUM_PROCESS_MODULES32_CALLBACK )(_In_ HANDLE ProcessHandle, _In_ PLDR_DATA_TABLE_ENTRY32 Entry, _In_ ULONG AddressOfEntry, _In_opt_ PVOID Context1, _In_opt_ PVOID Context2) |
| typedef struct _OPEN_DRIVER_BY_BASE_ADDRESS_CONTEXT | OPEN_DRIVER_BY_BASE_ADDRESS_CONTEXT |
| typedef struct _OPEN_DRIVER_BY_BASE_ADDRESS_CONTEXT * | POPEN_DRIVER_BY_BASE_ADDRESS_CONTEXT |
| typedef struct _SET_PROCESS_MODULE_LOAD_COUNT_CONTEXT | SET_PROCESS_MODULE_LOAD_COUNT_CONTEXT |
| typedef struct _SET_PROCESS_MODULE_LOAD_COUNT_CONTEXT * | PSET_PROCESS_MODULE_LOAD_COUNT_CONTEXT |
| typedef struct _GET_PROCEDURE_ADDRESS_REMOTE_CONTEXT | GET_PROCEDURE_ADDRESS_REMOTE_CONTEXT |
| typedef struct _GET_PROCEDURE_ADDRESS_REMOTE_CONTEXT * | PGET_PROCEDURE_ADDRESS_REMOTE_CONTEXT |
| typedef struct _ENUM_GENERIC_PROCESS_MODULES_CONTEXT | ENUM_GENERIC_PROCESS_MODULES_CONTEXT |
| typedef struct _ENUM_GENERIC_PROCESS_MODULES_CONTEXT * | PENUM_GENERIC_PROCESS_MODULES_CONTEXT |
Functions | |
| NTSTATUS | PhOpenProcess (_Out_ PHANDLE ProcessHandle, _In_ ACCESS_MASK DesiredAccess, _In_ HANDLE ProcessId) |
| Opens a process. | |
| NTSTATUS | PhOpenThread (_Out_ PHANDLE ThreadHandle, _In_ ACCESS_MASK DesiredAccess, _In_ HANDLE ThreadId) |
| Opens a thread. | |
| NTSTATUS | PhOpenThreadProcess (_Out_ PHANDLE ProcessHandle, _In_ ACCESS_MASK DesiredAccess, _In_ HANDLE ThreadHandle) |
| NTSTATUS | PhOpenProcessToken (_Out_ PHANDLE TokenHandle, _In_ ACCESS_MASK DesiredAccess, _In_ HANDLE ProcessHandle) |
| Opens a process token. | |
| NTSTATUS | PhOpenThreadToken (_Out_ PHANDLE TokenHandle, _In_ ACCESS_MASK DesiredAccess, _In_ HANDLE ThreadHandle, _In_ BOOLEAN OpenAsSelf) |
| Opens a thread token. | |
| NTSTATUS | PhGetObjectSecurity (_In_ HANDLE Handle, _In_ SECURITY_INFORMATION SecurityInformation, _Out_ PSECURITY_DESCRIPTOR *SecurityDescriptor) |
| NTSTATUS | PhSetObjectSecurity (_In_ HANDLE Handle, _In_ SECURITY_INFORMATION SecurityInformation, _In_ PSECURITY_DESCRIPTOR SecurityDescriptor) |
| NTSTATUS | PhTerminateProcess (_In_ HANDLE ProcessHandle, _In_ NTSTATUS ExitStatus) |
| Terminates a process. | |
| NTSTATUS | PhSuspendProcess (_In_ HANDLE ProcessHandle) |
| Suspends a process' threads. | |
| NTSTATUS | PhResumeProcess (_In_ HANDLE ProcessHandle) |
| Resumes a process' threads. | |
| NTSTATUS | PhTerminateThread (_In_ HANDLE ThreadHandle, _In_ NTSTATUS ExitStatus) |
| Terminates a thread. | |
| NTSTATUS | PhSuspendThread (_In_ HANDLE ThreadHandle, _Out_opt_ PULONG PreviousSuspendCount) |
| Suspends a thread. | |
| NTSTATUS | PhResumeThread (_In_ HANDLE ThreadHandle, _Out_opt_ PULONG PreviousSuspendCount) |
| Resumes a thread. | |
| NTSTATUS | PhGetThreadContext (_In_ HANDLE ThreadHandle, _Inout_ PCONTEXT Context) |
| Gets the processor context of a thread. | |
| NTSTATUS | PhSetThreadContext (_In_ HANDLE ThreadHandle, _In_ PCONTEXT Context) |
| Sets the processor context of a thread. | |
| NTSTATUS | PhReadVirtualMemory (_In_ HANDLE ProcessHandle, _In_ PVOID BaseAddress, _Out_writes_bytes_(BufferSize) PVOID Buffer, _In_ SIZE_T BufferSize, _Out_opt_ PSIZE_T NumberOfBytesRead) |
| Copies memory from another process into the current process. | |
| NTSTATUS | PhWriteVirtualMemory (_In_ HANDLE ProcessHandle, _In_ PVOID BaseAddress, _In_reads_bytes_(BufferSize) PVOID Buffer, _In_ SIZE_T BufferSize, _Out_opt_ PSIZE_T NumberOfBytesWritten) |
| Copies memory from the current process into another process. | |
| NTSTATUS | PhpQueryProcessVariableSize (_In_ HANDLE ProcessHandle, _In_ PROCESSINFOCLASS ProcessInformationClass, _Out_ PVOID *Buffer) |
| Queries variable-sized information for a process. | |
| NTSTATUS | PhGetProcessImageFileName (_In_ HANDLE ProcessHandle, _Out_ PPH_STRING *FileName) |
| Gets the file name of the process' image. | |
| NTSTATUS | PhGetProcessImageFileNameWin32 (_In_ HANDLE ProcessHandle, _Out_ PPH_STRING *FileName) |
| Gets the Win32 file name of the process' image. | |
| NTSTATUS | PhGetProcessPebString (_In_ HANDLE ProcessHandle, _In_ PH_PEB_OFFSET Offset, _Out_ PPH_STRING *String) |
| Gets a string stored in a process' parameters structure. | |
| NTSTATUS | PhGetProcessCommandLine (_In_ HANDLE ProcessHandle, _Out_ PPH_STRING *CommandLine) |
| Gets a process' command line. | |
| NTSTATUS | PhGetProcessWindowTitle (_In_ HANDLE ProcessHandle, _Out_ PULONG WindowFlags, _Out_ PPH_STRING *WindowTitle) |
| Gets the window flags and window title of a process. | |
| NTSTATUS | PhGetProcessIsPosix (_In_ HANDLE ProcessHandle, _Out_ PBOOLEAN IsPosix) |
| Gets whether the process is running under the POSIX subsystem. | |
| NTSTATUS | PhGetProcessExecuteFlags (_In_ HANDLE ProcessHandle, _Out_ PULONG ExecuteFlags) |
| Gets a process' no-execute status. | |
| NTSTATUS | PhGetProcessDepStatus (_In_ HANDLE ProcessHandle, _Out_ PULONG DepStatus) |
| NTSTATUS | PhGetProcessPosixCommandLine (_In_ HANDLE ProcessHandle, _Out_ PPH_STRING *CommandLine) |
| Gets the POSIX command line of a process. | |
| NTSTATUS | PhGetProcessEnvironment (_In_ HANDLE ProcessHandle, _In_ ULONG Flags, _Out_ PVOID *Environment, _Out_ PULONG EnvironmentLength) |
| Gets a process' environment block. | |
| BOOLEAN | PhEnumProcessEnvironmentVariables (_In_ PVOID Environment, _In_ ULONG EnvironmentLength, _Inout_ PULONG EnumerationKey, _Out_ PPH_ENVIRONMENT_VARIABLE Variable) |
| NTSTATUS | PhGetProcessMappedFileName (_In_ HANDLE ProcessHandle, _In_ PVOID BaseAddress, _Out_ PPH_STRING *FileName) |
| Gets the file name of a mapped section. | |
| NTSTATUS | PhGetProcessWorkingSetInformation (_In_ HANDLE ProcessHandle, _Out_ PMEMORY_WORKING_SET_INFORMATION *WorkingSetInformation) |
| Gets working set information for a process. | |
| NTSTATUS | PhGetProcessWsCounters (_In_ HANDLE ProcessHandle, _Out_ PPH_PROCESS_WS_COUNTERS WsCounters) |
| Gets working set counters for a process. | |
| NTSTATUS | PhSetProcessIoPriority (_In_ HANDLE ProcessHandle, _In_ ULONG IoPriority) |
| Sets a process' I/O priority. | |
| NTSTATUS | PhSetProcessExecuteFlags (_In_ HANDLE ProcessHandle, _In_ ULONG ExecuteFlags) |
| Sets a process' no-execute status. | |
| NTSTATUS | PhSetProcessDepStatus (_In_ HANDLE ProcessHandle, _In_ ULONG DepStatus) |
| NTSTATUS | PhSetProcessDepStatusInvasive (_In_ HANDLE ProcessHandle, _In_ ULONG DepStatus, _In_opt_ PLARGE_INTEGER Timeout) |
| NTSTATUS | PhInjectDllProcess (_In_ HANDLE ProcessHandle, _In_ PWSTR FileName, _In_opt_ PLARGE_INTEGER Timeout) |
| Causes a process to load a DLL. | |
| NTSTATUS | PhUnloadDllProcess (_In_ HANDLE ProcessHandle, _In_ PVOID BaseAddress, _In_opt_ PLARGE_INTEGER Timeout) |
| Causes a process to unload a DLL. | |
| NTSTATUS | PhSetThreadIoPriority (_In_ HANDLE ThreadHandle, _In_ ULONG IoPriority) |
| Sets a thread's I/O priority. | |
| NTSTATUS | PhGetJobProcessIdList (_In_ HANDLE JobHandle, _Out_ PJOBOBJECT_BASIC_PROCESS_ID_LIST *ProcessIdList) |
| NTSTATUS | PhpQueryTokenVariableSize (_In_ HANDLE TokenHandle, _In_ TOKEN_INFORMATION_CLASS TokenInformationClass, _Out_ PVOID *Buffer) |
| Queries variable-sized information for a token. | |
| NTSTATUS | PhQueryTokenVariableSize (_In_ HANDLE TokenHandle, _In_ TOKEN_INFORMATION_CLASS TokenInformationClass, _Out_ PVOID *Buffer) |
| Queries variable-sized information for a token. | |
| NTSTATUS | PhGetTokenUser (_In_ HANDLE TokenHandle, _Out_ PTOKEN_USER *User) |
| Gets a token's user. | |
| NTSTATUS | PhGetTokenOwner (_In_ HANDLE TokenHandle, _Out_ PTOKEN_OWNER *Owner) |
| Gets a token's owner. | |
| NTSTATUS | PhGetTokenPrimaryGroup (_In_ HANDLE TokenHandle, _Out_ PTOKEN_PRIMARY_GROUP *PrimaryGroup) |
| Gets a token's primary group. | |
| NTSTATUS | PhGetTokenGroups (_In_ HANDLE TokenHandle, _Out_ PTOKEN_GROUPS *Groups) |
| Gets a token's groups. | |
| NTSTATUS | PhGetTokenPrivileges (_In_ HANDLE TokenHandle, _Out_ PTOKEN_PRIVILEGES *Privileges) |
| Gets a token's privileges. | |
| NTSTATUS | PhSetTokenSessionId (_In_ HANDLE TokenHandle, _In_ ULONG SessionId) |
| BOOLEAN | PhSetTokenPrivilege (_In_ HANDLE TokenHandle, _In_opt_ PWSTR PrivilegeName, _In_opt_ PLUID PrivilegeLuid, _In_ ULONG Attributes) |
| Modifies a token privilege. | |
| BOOLEAN | PhSetTokenPrivilege2 (_In_ HANDLE TokenHandle, _In_ LONG Privilege, _In_ ULONG Attributes) |
| NTSTATUS | PhSetTokenIsVirtualizationEnabled (_In_ HANDLE TokenHandle, _In_ BOOLEAN IsVirtualizationEnabled) |
| Sets whether virtualization is enabled for a token. | |
| NTSTATUS | PhGetTokenIntegrityLevel (_In_ HANDLE TokenHandle, _Out_opt_ PMANDATORY_LEVEL IntegrityLevel, _Out_opt_ PWSTR *IntegrityString) |
| Gets a token's integrity level. | |
| NTSTATUS | PhpQueryFileVariableSize (_In_ HANDLE FileHandle, _In_ FILE_INFORMATION_CLASS FileInformationClass, _Out_ PVOID *Buffer) |
| NTSTATUS | PhGetFileSize (_In_ HANDLE FileHandle, _Out_ PLARGE_INTEGER Size) |
| NTSTATUS | PhSetFileSize (_In_ HANDLE FileHandle, _In_ PLARGE_INTEGER Size) |
| NTSTATUS | PhpQueryTransactionManagerVariableSize (_In_ HANDLE TransactionManagerHandle, _In_ TRANSACTIONMANAGER_INFORMATION_CLASS TransactionManagerInformationClass, _Out_ PVOID *Buffer) |
| NTSTATUS | PhGetTransactionManagerBasicInformation (_In_ HANDLE TransactionManagerHandle, _Out_ PTRANSACTIONMANAGER_BASIC_INFORMATION BasicInformation) |
| NTSTATUS | PhGetTransactionManagerLogFileName (_In_ HANDLE TransactionManagerHandle, _Out_ PPH_STRING *LogFileName) |
| NTSTATUS | PhpQueryTransactionVariableSize (_In_ HANDLE TransactionHandle, _In_ TRANSACTION_INFORMATION_CLASS TransactionInformationClass, _Out_ PVOID *Buffer) |
| NTSTATUS | PhGetTransactionBasicInformation (_In_ HANDLE TransactionHandle, _Out_ PTRANSACTION_BASIC_INFORMATION BasicInformation) |
| NTSTATUS | PhGetTransactionPropertiesInformation (_In_ HANDLE TransactionHandle, _Out_opt_ PLARGE_INTEGER Timeout, _Out_opt_ TRANSACTION_OUTCOME *Outcome, _Out_opt_ PPH_STRING *Description) |
| NTSTATUS | PhpQueryResourceManagerVariableSize (_In_ HANDLE ResourceManagerHandle, _In_ RESOURCEMANAGER_INFORMATION_CLASS ResourceManagerInformationClass, _Out_ PVOID *Buffer) |
| NTSTATUS | PhGetResourceManagerBasicInformation (_In_ HANDLE ResourceManagerHandle, _Out_opt_ PGUID Guid, _Out_opt_ PPH_STRING *Description) |
| NTSTATUS | PhGetEnlistmentBasicInformation (_In_ HANDLE EnlistmentHandle, _Out_ PENLISTMENT_BASIC_INFORMATION BasicInformation) |
| BOOLEAN NTAPI | PhpOpenDriverByBaseAddressCallback (_In_ PPH_STRINGREF Name, _In_ PPH_STRINGREF TypeName, _In_opt_ PVOID Context) |
| NTSTATUS | PhOpenDriverByBaseAddress (_Out_ PHANDLE DriverHandle, _In_ PVOID BaseAddress) |
| Opens a driver object using a base address. | |
| NTSTATUS | PhpQueryDriverVariableSize (_In_ HANDLE DriverHandle, _In_ DRIVER_INFORMATION_CLASS DriverInformationClass, _Out_ PVOID *Buffer) |
| Queries variable-sized information for a driver. | |
| NTSTATUS | PhGetDriverName (_In_ HANDLE DriverHandle, _Out_ PPH_STRING *Name) |
| Gets the object name of a driver. | |
| NTSTATUS | PhGetDriverServiceKeyName (_In_ HANDLE DriverHandle, _Out_ PPH_STRING *ServiceKeyName) |
| Gets the service key name of a driver. | |
| NTSTATUS | PhpUnloadDriver (_In_ PPH_STRING ServiceKeyName) |
| NTSTATUS | PhUnloadDriver (_In_opt_ PVOID BaseAddress, _In_opt_ PWSTR Name) |
| Unloads a driver. | |
| NTSTATUS | PhDuplicateObject (_In_ HANDLE SourceProcessHandle, _In_ HANDLE SourceHandle, _In_opt_ HANDLE TargetProcessHandle, _Out_opt_ PHANDLE TargetHandle, _In_ ACCESS_MASK DesiredAccess, _In_ ULONG HandleAttributes, _In_ ULONG Options) |
| Duplicates a handle. | |
| NTSTATUS | PhpEnumProcessModules (_In_ HANDLE ProcessHandle, _In_ PPHP_ENUM_PROCESS_MODULES_CALLBACK Callback, _In_opt_ PVOID Context1, _In_opt_ PVOID Context2) |
| BOOLEAN NTAPI | PhpEnumProcessModulesCallback (_In_ HANDLE ProcessHandle, _In_ PLDR_DATA_TABLE_ENTRY Entry, _In_ PVOID AddressOfEntry, _In_opt_ PVOID Context1, _In_opt_ PVOID Context2) |
| NTSTATUS | PhEnumProcessModules (_In_ HANDLE ProcessHandle, _In_ PPH_ENUM_PROCESS_MODULES_CALLBACK Callback, _In_opt_ PVOID Context) |
| Enumerates the modules loaded by a process. | |
| NTSTATUS | PhEnumProcessModulesEx (_In_ HANDLE ProcessHandle, _In_ PPH_ENUM_PROCESS_MODULES_PARAMETERS Parameters) |
| Enumerates the modules loaded by a process. | |
| BOOLEAN NTAPI | PhpSetProcessModuleLoadCountCallback (_In_ HANDLE ProcessHandle, _In_ PLDR_DATA_TABLE_ENTRY Entry, _In_ PVOID AddressOfEntry, _In_opt_ PVOID Context1, _In_opt_ PVOID Context2) |
| NTSTATUS | PhSetProcessModuleLoadCount (_In_ HANDLE ProcessHandle, _In_ PVOID BaseAddress, _In_ ULONG LoadCount) |
| Sets the load count of a process module. | |
| NTSTATUS | PhpEnumProcessModules32 (_In_ HANDLE ProcessHandle, _In_ PPHP_ENUM_PROCESS_MODULES32_CALLBACK Callback, _In_opt_ PVOID Context1, _In_opt_ PVOID Context2) |
| BOOLEAN NTAPI | PhpEnumProcessModules32Callback (_In_ HANDLE ProcessHandle, _In_ PLDR_DATA_TABLE_ENTRY32 Entry, _In_ ULONG AddressOfEntry, _In_opt_ PVOID Context1, _In_opt_ PVOID Context2) |
| NTSTATUS | PhEnumProcessModules32 (_In_ HANDLE ProcessHandle, _In_ PPH_ENUM_PROCESS_MODULES_CALLBACK Callback, _In_opt_ PVOID Context) |
| Enumerates the 32-bit modules loaded by a process. | |
| NTSTATUS | PhEnumProcessModules32Ex (_In_ HANDLE ProcessHandle, _In_ PPH_ENUM_PROCESS_MODULES_PARAMETERS Parameters) |
| Enumerates the 32-bit modules loaded by a process. | |
| BOOLEAN NTAPI | PhpSetProcessModuleLoadCount32Callback (_In_ HANDLE ProcessHandle, _In_ PLDR_DATA_TABLE_ENTRY32 Entry, _In_ ULONG AddressOfEntry, _In_opt_ PVOID Context1, _In_opt_ PVOID Context2) |
| NTSTATUS | PhSetProcessModuleLoadCount32 (_In_ HANDLE ProcessHandle, _In_ PVOID BaseAddress, _In_ ULONG LoadCount) |
| Sets the load count of a 32-bit process module. | |
| NTSTATUS | PhGetProcedureAddressRemote (_In_ HANDLE ProcessHandle, _In_ PWSTR FileName, _In_opt_ PSTR ProcedureName, _In_opt_ ULONG ProcedureNumber, _Out_ PVOID *ProcedureAddress, _Out_opt_ PVOID *DllBase) |
| Gets the address of a procedure in a process. | |
| NTSTATUS | PhEnumKernelModules (_Out_ PRTL_PROCESS_MODULES *Modules) |
| Enumerates the modules loaded by the kernel. | |
| NTSTATUS | PhEnumKernelModulesEx (_Out_ PRTL_PROCESS_MODULE_INFORMATION_EX *Modules) |
| Enumerates the modules loaded by the kernel. | |
| PPH_STRING | PhGetKernelFileName (VOID) |
| Gets the file name of the kernel image. | |
| NTSTATUS | PhEnumProcesses (_Out_ PVOID *Processes) |
| Enumerates the running processes. | |
| NTSTATUS | PhEnumProcessesEx (_Out_ PVOID *Processes, _In_ SYSTEM_INFORMATION_CLASS SystemInformationClass) |
| Enumerates the running processes. | |
| NTSTATUS | PhEnumProcessesForSession (_Out_ PVOID *Processes, _In_ ULONG SessionId) |
| Enumerates the running processes for a session. | |
| PSYSTEM_PROCESS_INFORMATION | PhFindProcessInformation (_In_ PVOID Processes, _In_ HANDLE ProcessId) |
| Finds the process information structure for a specific process. | |
| PSYSTEM_PROCESS_INFORMATION | PhFindProcessInformationByImageName (_In_ PVOID Processes, _In_ PPH_STRINGREF ImageName) |
| Finds the process information structure for a specific process. | |
| NTSTATUS | PhEnumHandles (_Out_ PSYSTEM_HANDLE_INFORMATION *Handles) |
| Enumerates all open handles. | |
| NTSTATUS | PhEnumHandlesEx (_Out_ PSYSTEM_HANDLE_INFORMATION_EX *Handles) |
| Enumerates all open handles. | |
| NTSTATUS | PhEnumPagefiles (_Out_ PVOID *Pagefiles) |
| Enumerates all pagefiles. | |
| NTSTATUS | PhGetProcessImageFileNameByProcessId (_In_ HANDLE ProcessId, _Out_ PPH_STRING *FileName) |
| Gets the file name of a process' image. | |
| NTSTATUS | PhGetProcessIsDotNet (_In_ HANDLE ProcessId, _Out_ PBOOLEAN IsDotNet) |
| Determines if a process is managed. | |
| BOOLEAN NTAPI | PhpIsDotNetEnumProcessModulesCallback (_In_ PLDR_DATA_TABLE_ENTRY Module, _In_opt_ PVOID Context) |
| NTSTATUS | PhGetProcessIsDotNetEx (_In_ HANDLE ProcessId, _In_opt_ HANDLE ProcessHandle, _In_ ULONG InFlags, _Out_opt_ PBOOLEAN IsDotNet, _Out_opt_ PULONG Flags) |
| Determines if a process is managed. | |
| NTSTATUS | PhEnumDirectoryObjects (_In_ HANDLE DirectoryHandle, _In_ PPH_ENUM_DIRECTORY_OBJECTS Callback, _In_opt_ PVOID Context) |
| Enumerates the objects in a directory object. | |
| NTSTATUS | PhEnumDirectoryFile (_In_ HANDLE FileHandle, _In_opt_ PUNICODE_STRING SearchPattern, _In_ PPH_ENUM_DIRECTORY_FILE Callback, _In_opt_ PVOID Context) |
| NTSTATUS | PhEnumFileStreams (_In_ HANDLE FileHandle, _Out_ PVOID *Streams) |
| VOID | PhInitializeDevicePrefixes (VOID) |
| Initializes the device prefixes module. | |
| VOID | PhUpdateMupDevicePrefixes (VOID) |
| VOID | PhUpdateDosDevicePrefixes (VOID) |
| Updates the DOS device names array. | |
| PPH_STRING | PhResolveDevicePrefix (_In_ PPH_STRING Name) |
| Resolves a NT path into a Win32 path. | |
| PPH_STRING | PhGetFileName (_In_ PPH_STRING FileName) |
| Converts a file name into Win32 format. | |
| VOID | PhpRtlModulesToGenericModules (_In_ PRTL_PROCESS_MODULES Modules, _In_ PPH_ENUM_GENERIC_MODULES_CALLBACK Callback, _In_opt_ PVOID Context, _In_ PPH_HASHTABLE BaseAddressHashtable) |
| VOID | PhpRtlModulesExToGenericModules (_In_ PRTL_PROCESS_MODULE_INFORMATION_EX Modules, _In_ PPH_ENUM_GENERIC_MODULES_CALLBACK Callback, _In_opt_ PVOID Context, _In_ PPH_HASHTABLE BaseAddressHashtable) |
| BOOLEAN | PhpCallbackMappedFileOrImage (_In_ PVOID AllocationBase, _In_ SIZE_T AllocationSize, _In_ ULONG Type, _In_ PPH_STRING FileName, _In_ PPH_ENUM_GENERIC_MODULES_CALLBACK Callback, _In_opt_ PVOID Context, _In_ PPH_HASHTABLE BaseAddressHashtable) |
| VOID | PhpEnumGenericMappedFilesAndImages (_In_ HANDLE ProcessHandle, _In_ ULONG Flags, _In_ PPH_ENUM_GENERIC_MODULES_CALLBACK Callback, _In_opt_ PVOID Context, _In_ PPH_HASHTABLE BaseAddressHashtable) |
| BOOLEAN NTAPI | PhpBaseAddressHashtableCompareFunction (_In_ PVOID Entry1, _In_ PVOID Entry2) |
| ULONG NTAPI | PhpBaseAddressHashtableHashFunction (_In_ PVOID Entry) |
| NTSTATUS | PhEnumGenericModules (_In_ HANDLE ProcessId, _In_opt_ HANDLE ProcessHandle, _In_ ULONG Flags, _In_ PPH_ENUM_GENERIC_MODULES_CALLBACK Callback, _In_opt_ PVOID Context) |
| Enumerates the modules loaded by a process. | |
| VOID | PhpInitializePredefineKeys (VOID) |
| Initializes usage of predefined keys. | |
| NTSTATUS | PhpInitializeKeyObjectAttributes (_In_opt_ HANDLE RootDirectory, _In_ PUNICODE_STRING ObjectName, _In_ ULONG Attributes, _Out_ POBJECT_ATTRIBUTES ObjectAttributes, _Out_ PHANDLE NeedsClose) |
| Initializes the attributes of a key object for creating/opening. | |
| NTSTATUS | PhCreateKey (_Out_ PHANDLE KeyHandle, _In_ ACCESS_MASK DesiredAccess, _In_opt_ HANDLE RootDirectory, _In_ PPH_STRINGREF ObjectName, _In_ ULONG Attributes, _In_ ULONG CreateOptions, _Out_opt_ PULONG Disposition) |
| Creates or opens a registry key. | |
| NTSTATUS | PhOpenKey (_Out_ PHANDLE KeyHandle, _In_ ACCESS_MASK DesiredAccess, _In_opt_ HANDLE RootDirectory, _In_ PPH_STRINGREF ObjectName, _In_ ULONG Attributes) |
| Opens a registry key. | |
| #define PEB_OFFSET_CASE | ( | Enum, | |
| Field | |||
| ) |
| typedef struct _ENUM_GENERIC_PROCESS_MODULES_CONTEXT ENUM_GENERIC_PROCESS_MODULES_CONTEXT |
| typedef struct _GET_PROCEDURE_ADDRESS_REMOTE_CONTEXT GET_PROCEDURE_ADDRESS_REMOTE_CONTEXT |
| typedef struct _OPEN_DRIVER_BY_BASE_ADDRESS_CONTEXT OPEN_DRIVER_BY_BASE_ADDRESS_CONTEXT |
| typedef struct _ENUM_GENERIC_PROCESS_MODULES_CONTEXT * PENUM_GENERIC_PROCESS_MODULES_CONTEXT |
| typedef struct _GET_PROCEDURE_ADDRESS_REMOTE_CONTEXT * PGET_PROCEDURE_ADDRESS_REMOTE_CONTEXT |
| typedef struct _OPEN_DRIVER_BY_BASE_ADDRESS_CONTEXT * POPEN_DRIVER_BY_BASE_ADDRESS_CONTEXT |
| typedef BOOLEAN(NTAPI * PPHP_ENUM_PROCESS_MODULES32_CALLBACK)(_In_ HANDLE ProcessHandle, _In_ PLDR_DATA_TABLE_ENTRY32 Entry, _In_ ULONG AddressOfEntry, _In_opt_ PVOID Context1, _In_opt_ PVOID Context2) |
| typedef BOOLEAN(NTAPI * PPHP_ENUM_PROCESS_MODULES_CALLBACK)(_In_ HANDLE ProcessHandle, _In_ PLDR_DATA_TABLE_ENTRY Entry, _In_ PVOID AddressOfEntry, _In_opt_ PVOID Context1, _In_opt_ PVOID Context2) |
| typedef struct _SET_PROCESS_MODULE_LOAD_COUNT_CONTEXT * PSET_PROCESS_MODULE_LOAD_COUNT_CONTEXT |
| typedef struct _SET_PROCESS_MODULE_LOAD_COUNT_CONTEXT SET_PROCESS_MODULE_LOAD_COUNT_CONTEXT |
| NTSTATUS PhCreateKey | ( | _Out_ PHANDLE | KeyHandle, |
| _In_ ACCESS_MASK | DesiredAccess, | ||
| _In_opt_ HANDLE | RootDirectory, | ||
| _In_ PPH_STRINGREF | ObjectName, | ||
| _In_ ULONG | Attributes, | ||
| _In_ ULONG | CreateOptions, | ||
| _Out_opt_ PULONG | Disposition | ||
| ) |
Creates or opens a registry key.
| KeyHandle | A variable which receives a handle to the key. |
| DesiredAccess | The desired access to the key. |
| RootDirectory | A handle to a root key, or one of the following predefined keys:
|
| ObjectName | The path to the key. |
| Attributes | Additional object flags. |
| CreateOptions | The options to apply when creating or opening the key. |
| Disposition | A variable which receives a value indicating whether a new key was created or an existing key was opened:
|
| NTSTATUS PhDuplicateObject | ( | _In_ HANDLE | SourceProcessHandle, |
| _In_ HANDLE | SourceHandle, | ||
| _In_opt_ HANDLE | TargetProcessHandle, | ||
| _Out_opt_ PHANDLE | TargetHandle, | ||
| _In_ ACCESS_MASK | DesiredAccess, | ||
| _In_ ULONG | HandleAttributes, | ||
| _In_ ULONG | Options | ||
| ) |
Duplicates a handle.
| SourceProcessHandle | A handle to the source process. The handle must have PROCESS_DUP_HANDLE access. |
| SourceHandle | The handle to duplicate from the source process. |
| TargetProcessHandle | A handle to the target process. If DUPLICATE_CLOSE_SOURCE is specified in the Options parameter, this parameter can be NULL. |
| TargetHandle | A variable which receives the new handle in the target process. If DUPLICATE_CLOSE_SOURCE is specified in the Options parameter, this parameter can be NULL. |
| DesiredAccess | The desired access to the object referenced by the source handle. |
| HandleAttributes | The attributes to apply to the new handle. |
| Options | The options to use when duplicating the handle. |
| NTSTATUS PhEnumDirectoryFile | ( | _In_ HANDLE | FileHandle, |
| _In_opt_ PUNICODE_STRING | SearchPattern, | ||
| _In_ PPH_ENUM_DIRECTORY_FILE | Callback, | ||
| _In_opt_ PVOID | Context | ||
| ) |
| NTSTATUS PhEnumDirectoryObjects | ( | _In_ HANDLE | DirectoryHandle, |
| _In_ PPH_ENUM_DIRECTORY_OBJECTS | Callback, | ||
| _In_opt_ PVOID | Context | ||
| ) |
Enumerates the objects in a directory object.
| DirectoryHandle | A handle to a directory. The handle must have DIRECTORY_QUERY access. |
| Callback | A callback function which is executed for each object. |
| Context | A user-defined value to pass to the callback function. |
| NTSTATUS PhEnumFileStreams | ( | _In_ HANDLE | FileHandle, |
| _Out_ PVOID * | Streams | ||
| ) |
| NTSTATUS PhEnumGenericModules | ( | _In_ HANDLE | ProcessId, |
| _In_opt_ HANDLE | ProcessHandle, | ||
| _In_ ULONG | Flags, | ||
| _In_ PPH_ENUM_GENERIC_MODULES_CALLBACK | Callback, | ||
| _In_opt_ PVOID | Context | ||
| ) |
Enumerates the modules loaded by a process.
| ProcessId | The ID of a process. If SYSTEM_PROCESS_ID is specified the function enumerates the kernel modules. |
| ProcessHandle | A handle to the process. |
| Flags | Flags controlling the information to retrieve.
|
| Callback | A callback function which is executed for each module. |
| Context | A user-defined value to pass to the callback function. |
| NTSTATUS PhEnumHandles | ( | _Out_ PSYSTEM_HANDLE_INFORMATION * | Handles | ) |
Enumerates all open handles.
| Handles | A variable which receives a pointer to a structure containing information about all opened handles. You must free the structure using PhFree() when you no longer need it. |
| STATUS_INSUFFICIENT_RESOURCES | The handle information returned by the kernel is too large. |
| NTSTATUS PhEnumHandlesEx | ( | _Out_ PSYSTEM_HANDLE_INFORMATION_EX * | Handles | ) |
Enumerates all open handles.
| Handles | A variable which receives a pointer to a structure containing information about all opened handles. You must free the structure using PhFree() when you no longer need it. |
| STATUS_INSUFFICIENT_RESOURCES | The handle information returned by the kernel is too large. |
| NTSTATUS PhEnumKernelModules | ( | _Out_ PRTL_PROCESS_MODULES * | Modules | ) |
| NTSTATUS PhEnumKernelModulesEx | ( | _Out_ PRTL_PROCESS_MODULE_INFORMATION_EX * | Modules | ) |
| NTSTATUS PhEnumPagefiles | ( | _Out_ PVOID * | Pagefiles | ) |
Enumerates all pagefiles.
| Pagefiles | A variable which receives a pointer to a buffer containing information about all active pagefiles. You must free the structure using PhFree() when you no longer need it. |
| STATUS_INSUFFICIENT_RESOURCES | The handle information returned by the kernel is too large. |
| BOOLEAN PhEnumProcessEnvironmentVariables | ( | _In_ PVOID | Environment, |
| _In_ ULONG | EnvironmentLength, | ||
| _Inout_ PULONG | EnumerationKey, | ||
| _Out_ PPH_ENVIRONMENT_VARIABLE | Variable | ||
| ) |
| NTSTATUS PhEnumProcesses | ( | _Out_ PVOID * | Processes | ) |
Enumerates the running processes.
| Processes | A variable which receives a pointer to a buffer containing process information. You must free the buffer using PhFree() when you no longer need it. |
| NTSTATUS PhEnumProcessesEx | ( | _Out_ PVOID * | Processes, |
| _In_ SYSTEM_INFORMATION_CLASS | SystemInformationClass | ||
| ) |
Enumerates the running processes.
| Processes | A variable which receives a pointer to a buffer containing process information. You must free the buffer using PhFree() when you no longer need it. |
| NTSTATUS PhEnumProcessesForSession | ( | _Out_ PVOID * | Processes, |
| _In_ ULONG | SessionId | ||
| ) |
Enumerates the running processes for a session.
| Processes | A variable which receives a pointer to a buffer containing process information. You must free the buffer using PhFree() when you no longer need it. |
| SessionId | A session ID. |
| NTSTATUS PhEnumProcessModules | ( | _In_ HANDLE | ProcessHandle, |
| _In_ PPH_ENUM_PROCESS_MODULES_CALLBACK | Callback, | ||
| _In_opt_ PVOID | Context | ||
| ) |
Enumerates the modules loaded by a process.
| ProcessHandle | A handle to a process. The handle must have PROCESS_QUERY_LIMITED_INFORMATION and PROCESS_VM_READ access. |
| Callback | A callback function which is executed for each process module. |
| Context | A user-defined value to pass to the callback function. |
| NTSTATUS PhEnumProcessModules32 | ( | _In_ HANDLE | ProcessHandle, |
| _In_ PPH_ENUM_PROCESS_MODULES_CALLBACK | Callback, | ||
| _In_opt_ PVOID | Context | ||
| ) |
Enumerates the 32-bit modules loaded by a process.
| ProcessHandle | A handle to a process. The handle must have PROCESS_QUERY_LIMITED_INFORMATION and PROCESS_VM_READ access. |
| Callback | A callback function which is executed for each process module. |
| Context | A user-defined value to pass to the callback function. |
| STATUS_NOT_SUPPORTED | The process is not running under WOW64. |
| NTSTATUS PhEnumProcessModules32Ex | ( | _In_ HANDLE | ProcessHandle, |
| _In_ PPH_ENUM_PROCESS_MODULES_PARAMETERS | Parameters | ||
| ) |
Enumerates the 32-bit modules loaded by a process.
| ProcessHandle | A handle to a process. The handle must have PROCESS_QUERY_LIMITED_INFORMATION and PROCESS_VM_READ access. If PH_ENUM_PROCESS_MODULES_TRY_MAPPED_FILE_NAME is specified in Parameters, the handle should have PROCESS_QUERY_INFORMATION access. |
| Parameters | The enumeration parameters. |
| STATUS_NOT_SUPPORTED | The process is not running under WOW64. |
| NTSTATUS PhEnumProcessModulesEx | ( | _In_ HANDLE | ProcessHandle, |
| _In_ PPH_ENUM_PROCESS_MODULES_PARAMETERS | Parameters | ||
| ) |
Enumerates the modules loaded by a process.
| ProcessHandle | A handle to a process. The handle must have PROCESS_QUERY_LIMITED_INFORMATION and PROCESS_VM_READ access. If PH_ENUM_PROCESS_MODULES_TRY_MAPPED_FILE_NAME is specified in Parameters, the handle should have PROCESS_QUERY_INFORMATION access. |
| Parameters | The enumeration parameters. |
| PSYSTEM_PROCESS_INFORMATION PhFindProcessInformation | ( | _In_ PVOID | Processes, |
| _In_ HANDLE | ProcessId | ||
| ) |
Finds the process information structure for a specific process.
| Processes | A pointer to a buffer returned by PhEnumProcesses(). |
| ProcessId | The ID of the process. |
| PSYSTEM_PROCESS_INFORMATION PhFindProcessInformationByImageName | ( | _In_ PVOID | Processes, |
| _In_ PPH_STRINGREF | ImageName | ||
| ) |
Finds the process information structure for a specific process.
| Processes | A pointer to a buffer returned by PhEnumProcesses(). |
| ImageName | The image name to search for. |
| NTSTATUS PhGetDriverName | ( | _In_ HANDLE | DriverHandle, |
| _Out_ PPH_STRING * | Name | ||
| ) |
Gets the object name of a driver.
| DriverHandle | A handle to a driver. |
| Name | A variable which receives a pointer to a string containing the object name. You must free the string using PhDereferenceObject() when you no longer need it. |
| NTSTATUS PhGetDriverServiceKeyName | ( | _In_ HANDLE | DriverHandle, |
| _Out_ PPH_STRING * | ServiceKeyName | ||
| ) |
Gets the service key name of a driver.
| DriverHandle | A handle to a driver. |
| ServiceKeyName | A variable which receives a pointer to a string containing the service key name. You must free the string using PhDereferenceObject() when you no longer need it. |
| NTSTATUS PhGetEnlistmentBasicInformation | ( | _In_ HANDLE | EnlistmentHandle, |
| _Out_ PENLISTMENT_BASIC_INFORMATION | BasicInformation | ||
| ) |
| PPH_STRING PhGetFileName | ( | _In_ PPH_STRING | FileName | ) |
Converts a file name into Win32 format.
| FileName | A string containing a file name. |
| NTSTATUS PhGetFileSize | ( | _In_ HANDLE | FileHandle, |
| _Out_ PLARGE_INTEGER | Size | ||
| ) |
| NTSTATUS PhGetJobProcessIdList | ( | _In_ HANDLE | JobHandle, |
| _Out_ PJOBOBJECT_BASIC_PROCESS_ID_LIST * | ProcessIdList | ||
| ) |
| PPH_STRING PhGetKernelFileName | ( | VOID | ) |
Gets the file name of the kernel image.
| NTSTATUS PhGetObjectSecurity | ( | _In_ HANDLE | Handle, |
| _In_ SECURITY_INFORMATION | SecurityInformation, | ||
| _Out_ PSECURITY_DESCRIPTOR * | SecurityDescriptor | ||
| ) |
| NTSTATUS PhGetProcedureAddressRemote | ( | _In_ HANDLE | ProcessHandle, |
| _In_ PWSTR | FileName, | ||
| _In_opt_ PSTR | ProcedureName, | ||
| _In_opt_ ULONG | ProcedureNumber, | ||
| _Out_ PVOID * | ProcedureAddress, | ||
| _Out_opt_ PVOID * | DllBase | ||
| ) |
Gets the address of a procedure in a process.
| ProcessHandle | A handle to a process. The handle must have PROCESS_QUERY_LIMITED_INFORMATION and PROCESS_VM_READ access. |
| FileName | The file name of the DLL containing the procedure. |
| ProcedureName | The name of the procedure. |
| ProcedureNumber | The ordinal of the procedure. |
| ProcedureAddress | A variable which receives the address of the procedure in the address space of the process. |
| DllBase | A variable which receives the base address of the DLL containing the procedure. |
| NTSTATUS PhGetProcessCommandLine | ( | _In_ HANDLE | ProcessHandle, |
| _Out_ PPH_STRING * | CommandLine | ||
| ) |
Gets a process' command line.
| ProcessHandle | A handle to a process. The handle must have PROCESS_QUERY_LIMITED_INFORMATION. Before Windows 8.1, the handle must also have PROCESS_VM_READ access. |
| String | A variable which receives a pointer to a string containing the command line. You must free the string using PhDereferenceObject() when you no longer need it. |
| NTSTATUS PhGetProcessDepStatus | ( | _In_ HANDLE | ProcessHandle, |
| _Out_ PULONG | DepStatus | ||
| ) |
| NTSTATUS PhGetProcessEnvironment | ( | _In_ HANDLE | ProcessHandle, |
| _In_ ULONG | Flags, | ||
| _Out_ PVOID * | Environment, | ||
| _Out_ PULONG | EnvironmentLength | ||
| ) |
Gets a process' environment block.
| ProcessHandle | A handle to a process. The handle must have PROCESS_QUERY_INFORMATION and PROCESS_VM_READ access. |
| Flags | A combination of flags.
|
| Environment | A variable which will receive a pointer to the environment block copied from the process. You must free the block using PhFreePage() when you no longer need it. |
| EnvironmentLength | A variable which will receive the length of the environment block, in bytes. |
| NTSTATUS PhGetProcessExecuteFlags | ( | _In_ HANDLE | ProcessHandle, |
| _Out_ PULONG | ExecuteFlags | ||
| ) |
| NTSTATUS PhGetProcessImageFileName | ( | _In_ HANDLE | ProcessHandle, |
| _Out_ PPH_STRING * | FileName | ||
| ) |
Gets the file name of the process' image.
| ProcessHandle | A handle to a process. The handle must have PROCESS_QUERY_LIMITED_INFORMATION access. |
| FileName | A variable which receives a pointer to a string containing the file name. You must free the string using PhDereferenceObject() when you no longer need it. |
| NTSTATUS PhGetProcessImageFileNameByProcessId | ( | _In_ HANDLE | ProcessId, |
| _Out_ PPH_STRING * | FileName | ||
| ) |
Gets the file name of a process' image.
| ProcessId | The ID of the process. |
| FileName | A variable which receives a pointer to a string containing the file name. You must free the string using PhDereferenceObject() when you no longer need it. |
| NTSTATUS PhGetProcessImageFileNameWin32 | ( | _In_ HANDLE | ProcessHandle, |
| _Out_ PPH_STRING * | FileName | ||
| ) |
Gets the Win32 file name of the process' image.
| ProcessHandle | A handle to a process. The handle must have PROCESS_QUERY_LIMITED_INFORMATION access. |
| FileName | A variable which receives a pointer to a string containing the file name. You must free the string using PhDereferenceObject() when you no longer need it. |
| NTSTATUS PhGetProcessIsDotNet | ( | _In_ HANDLE | ProcessId, |
| _Out_ PBOOLEAN | IsDotNet | ||
| ) |
| NTSTATUS PhGetProcessIsDotNetEx | ( | _In_ HANDLE | ProcessId, |
| _In_opt_ HANDLE | ProcessHandle, | ||
| _In_ ULONG | InFlags, | ||
| _Out_opt_ PBOOLEAN | IsDotNet, | ||
| _Out_opt_ PULONG | Flags | ||
| ) |
Determines if a process is managed.
| ProcessId | The ID of the process. |
| ProcessHandle | An optional handle to the process. The handle must have PROCESS_QUERY_LIMITED_INFORMATION and PROCESS_VM_READ access. |
| InFlags | A combination of flags.
|
| IsDotNet | A variable which receives a boolean indicating whether the process is managed. |
| Flags | A variable which receives additional flags. |
| NTSTATUS PhGetProcessIsPosix | ( | _In_ HANDLE | ProcessHandle, |
| _Out_ PBOOLEAN | IsPosix | ||
| ) |
Gets whether the process is running under the POSIX subsystem.
| ProcessHandle | A handle to a process. The handle must have PROCESS_QUERY_LIMITED_INFORMATION and PROCESS_VM_READ access. |
| IsPosix | A variable which receives a boolean indicating whether the process is running under the POSIX subsystem. |
| NTSTATUS PhGetProcessMappedFileName | ( | _In_ HANDLE | ProcessHandle, |
| _In_ PVOID | BaseAddress, | ||
| _Out_ PPH_STRING * | FileName | ||
| ) |
Gets the file name of a mapped section.
| ProcessHandle | A handle to a process. The handle must have PROCESS_QUERY_INFORMATION access. |
| BaseAddress | The base address of the section view. |
| FileName | A variable which receives a pointer to a string containing the file name of the section. You must free the string using PhDereferenceObject() when you no longer need it. |
| NTSTATUS PhGetProcessPebString | ( | _In_ HANDLE | ProcessHandle, |
| _In_ PH_PEB_OFFSET | Offset, | ||
| _Out_ PPH_STRING * | String | ||
| ) |
Gets a string stored in a process' parameters structure.
| ProcessHandle | A handle to a process. The handle must have PROCESS_QUERY_LIMITED_INFORMATION and PROCESS_VM_READ access. |
| Offset | The string to retrieve. |
| String | A variable which receives a pointer to the requested string. You must free the string using PhDereferenceObject() when you no longer need it. |
| STATUS_INVALID_PARAMETER_2 | An invalid value was specified in the Offset parameter. |
| NTSTATUS PhGetProcessPosixCommandLine | ( | _In_ HANDLE | ProcessHandle, |
| _Out_ PPH_STRING * | CommandLine | ||
| ) |
Gets the POSIX command line of a process.
| ProcessHandle | A handle to a process. The handle must have PROCESS_QUERY_LIMITED_INFORMATION and PROCESS_VM_READ access. |
| CommandLine | A variable which receives a pointer to a string containing the POSIX command line. You must free the string using PhDereferenceObject() when you no longer need it. |
| STATUS_UNSUCCESSFUL | The command line of the process could not be retrieved because it is too large. |
| NTSTATUS PhGetProcessWindowTitle | ( | _In_ HANDLE | ProcessHandle, |
| _Out_ PULONG | WindowFlags, | ||
| _Out_ PPH_STRING * | WindowTitle | ||
| ) |
Gets the window flags and window title of a process.
| ProcessHandle | A handle to a process. The handle must have PROCESS_QUERY_LIMITED_INFORMATION. Before Windows 7 SP1, the handle must also have PROCESS_VM_READ access. |
| WindowFlags | A variable which receives the window flags. |
| WindowTitle | A variable which receives a pointer to the window title. You must free the string using PhDereferenceObject() when you no longer need it. |
| NTSTATUS PhGetProcessWorkingSetInformation | ( | _In_ HANDLE | ProcessHandle, |
| _Out_ PMEMORY_WORKING_SET_INFORMATION * | WorkingSetInformation | ||
| ) |
Gets working set information for a process.
| ProcessHandle | A handle to a process. The handle must have PROCESS_QUERY_INFORMATION access. |
| WorkingSetInformation | A variable which receives a pointer to the information. You must free the buffer using PhFree() when you no longer need it. |
| NTSTATUS PhGetProcessWsCounters | ( | _In_ HANDLE | ProcessHandle, |
| _Out_ PPH_PROCESS_WS_COUNTERS | WsCounters | ||
| ) |
| NTSTATUS PhGetResourceManagerBasicInformation | ( | _In_ HANDLE | ResourceManagerHandle, |
| _Out_opt_ PGUID | Guid, | ||
| _Out_opt_ PPH_STRING * | Description | ||
| ) |
| NTSTATUS PhGetThreadContext | ( | _In_ HANDLE | ThreadHandle, |
| _Inout_ PCONTEXT | Context | ||
| ) |
| NTSTATUS PhGetTokenGroups | ( | _In_ HANDLE | TokenHandle, |
| _Out_ PTOKEN_GROUPS * | Groups | ||
| ) |
Gets a token's groups.
| TokenHandle | A handle to a token. The handle must have TOKEN_QUERY access. |
| Groups | A variable which receives a pointer to a structure containing the token's groups. You must free the structure using PhFree() when you no longer need it. |
| NTSTATUS PhGetTokenIntegrityLevel | ( | _In_ HANDLE | TokenHandle, |
| _Out_opt_ PMANDATORY_LEVEL | IntegrityLevel, | ||
| _Out_opt_ PWSTR * | IntegrityString | ||
| ) |
Gets a token's integrity level.
| TokenHandle | A handle to a token. The handle must have TOKEN_QUERY access. |
| IntegrityLevel | A variable which receives the integrity level of the token. |
| IntegrityString | A variable which receives a pointer to a string containing a string representation of the integrity level. |
| NTSTATUS PhGetTokenOwner | ( | _In_ HANDLE | TokenHandle, |
| _Out_ PTOKEN_OWNER * | Owner | ||
| ) |
Gets a token's owner.
| TokenHandle | A handle to a token. The handle must have TOKEN_QUERY access. |
| Owner | A variable which receives a pointer to a structure containing the token's owner. You must free the structure using PhFree() when you no longer need it. |
| NTSTATUS PhGetTokenPrimaryGroup | ( | _In_ HANDLE | TokenHandle, |
| _Out_ PTOKEN_PRIMARY_GROUP * | PrimaryGroup | ||
| ) |
Gets a token's primary group.
| TokenHandle | A handle to a token. The handle must have TOKEN_QUERY access. |
| PrimaryGroup | A variable which receives a pointer to a structure containing the token's primary group. You must free the structure using PhFree() when you no longer need it. |
| NTSTATUS PhGetTokenPrivileges | ( | _In_ HANDLE | TokenHandle, |
| _Out_ PTOKEN_PRIVILEGES * | Privileges | ||
| ) |
Gets a token's privileges.
| TokenHandle | A handle to a token. The handle must have TOKEN_QUERY access. |
| Privileges | A variable which receives a pointer to a structure containing the token's privileges. You must free the structure using PhFree() when you no longer need it. |
| NTSTATUS PhGetTokenUser | ( | _In_ HANDLE | TokenHandle, |
| _Out_ PTOKEN_USER * | User | ||
| ) |
Gets a token's user.
| TokenHandle | A handle to a token. The handle must have TOKEN_QUERY access. |
| User | A variable which receives a pointer to a structure containing the token's user. You must free the structure using PhFree() when you no longer need it. |
| NTSTATUS PhGetTransactionBasicInformation | ( | _In_ HANDLE | TransactionHandle, |
| _Out_ PTRANSACTION_BASIC_INFORMATION | BasicInformation | ||
| ) |
| NTSTATUS PhGetTransactionManagerBasicInformation | ( | _In_ HANDLE | TransactionManagerHandle, |
| _Out_ PTRANSACTIONMANAGER_BASIC_INFORMATION | BasicInformation | ||
| ) |
| NTSTATUS PhGetTransactionManagerLogFileName | ( | _In_ HANDLE | TransactionManagerHandle, |
| _Out_ PPH_STRING * | LogFileName | ||
| ) |
| NTSTATUS PhGetTransactionPropertiesInformation | ( | _In_ HANDLE | TransactionHandle, |
| _Out_opt_ PLARGE_INTEGER | Timeout, | ||
| _Out_opt_ TRANSACTION_OUTCOME * | Outcome, | ||
| _Out_opt_ PPH_STRING * | Description | ||
| ) |
| NTSTATUS PhInjectDllProcess | ( | _In_ HANDLE | ProcessHandle, |
| _In_ PWSTR | FileName, | ||
| _In_opt_ PLARGE_INTEGER | Timeout | ||
| ) |
Causes a process to load a DLL.
| ProcessHandle | A handle to a process. The handle must have PROCESS_QUERY_LIMITED_INFORMATION, PROCESS_CREATE_THREAD, PROCESS_VM_OPERATION, PROCESS_VM_READ and PROCESS_VM_WRITE access. |
| FileName | The file name of the DLL to inject. |
| Timeout | The timeout, in milliseconds, for the process to load the DLL. |
| NTSTATUS PhOpenDriverByBaseAddress | ( | _Out_ PHANDLE | DriverHandle, |
| _In_ PVOID | BaseAddress | ||
| ) |
Opens a driver object using a base address.
| DriverHandle | A variable which receives a handle to the driver object. |
| BaseAddress | The base address of the driver to open. |
| STATUS_OBJECT_NAME_NOT_FOUND | The driver could not be found. |
| NTSTATUS PhOpenKey | ( | _Out_ PHANDLE | KeyHandle, |
| _In_ ACCESS_MASK | DesiredAccess, | ||
| _In_opt_ HANDLE | RootDirectory, | ||
| _In_ PPH_STRINGREF | ObjectName, | ||
| _In_ ULONG | Attributes | ||
| ) |
Opens a registry key.
| KeyHandle | A variable which receives a handle to the key. |
| DesiredAccess | The desired access to the key. |
| RootDirectory | A handle to a root key, or one of the predefined keys. See PhCreateKey() for details. |
| ObjectName | The path to the key. |
| Attributes | Additional object flags. |
| NTSTATUS PhOpenProcess | ( | _Out_ PHANDLE | ProcessHandle, |
| _In_ ACCESS_MASK | DesiredAccess, | ||
| _In_ HANDLE | ProcessId | ||
| ) |
| NTSTATUS PhOpenProcessToken | ( | _Out_ PHANDLE | TokenHandle, |
| _In_ ACCESS_MASK | DesiredAccess, | ||
| _In_ HANDLE | ProcessHandle | ||
| ) |
| NTSTATUS PhOpenThread | ( | _Out_ PHANDLE | ThreadHandle, |
| _In_ ACCESS_MASK | DesiredAccess, | ||
| _In_ HANDLE | ThreadId | ||
| ) |
| NTSTATUS PhOpenThreadProcess | ( | _Out_ PHANDLE | ProcessHandle, |
| _In_ ACCESS_MASK | DesiredAccess, | ||
| _In_ HANDLE | ThreadHandle | ||
| ) |
| NTSTATUS PhOpenThreadToken | ( | _Out_ PHANDLE | TokenHandle, |
| _In_ ACCESS_MASK | DesiredAccess, | ||
| _In_ HANDLE | ThreadHandle, | ||
| _In_ BOOLEAN | OpenAsSelf | ||
| ) |
Opens a thread token.
| TokenHandle | A variable which receives a handle to the token. |
| DesiredAccess | The desired access to the token. |
| ThreadHandle | A handle to a thread. |
| OpenAsSelf | TRUE to use the primary token for access checks, FALSE to use the impersonation token. |
| BOOLEAN NTAPI PhpBaseAddressHashtableCompareFunction | ( | _In_ PVOID | Entry1, |
| _In_ PVOID | Entry2 | ||
| ) |
| ULONG NTAPI PhpBaseAddressHashtableHashFunction | ( | _In_ PVOID | Entry | ) |
| BOOLEAN PhpCallbackMappedFileOrImage | ( | _In_ PVOID | AllocationBase, |
| _In_ SIZE_T | AllocationSize, | ||
| _In_ ULONG | Type, | ||
| _In_ PPH_STRING | FileName, | ||
| _In_ PPH_ENUM_GENERIC_MODULES_CALLBACK | Callback, | ||
| _In_opt_ PVOID | Context, | ||
| _In_ PPH_HASHTABLE | BaseAddressHashtable | ||
| ) |
| VOID PhpEnumGenericMappedFilesAndImages | ( | _In_ HANDLE | ProcessHandle, |
| _In_ ULONG | Flags, | ||
| _In_ PPH_ENUM_GENERIC_MODULES_CALLBACK | Callback, | ||
| _In_opt_ PVOID | Context, | ||
| _In_ PPH_HASHTABLE | BaseAddressHashtable | ||
| ) |
| NTSTATUS PhpEnumProcessModules | ( | _In_ HANDLE | ProcessHandle, |
| _In_ PPHP_ENUM_PROCESS_MODULES_CALLBACK | Callback, | ||
| _In_opt_ PVOID | Context1, | ||
| _In_opt_ PVOID | Context2 | ||
| ) |
| NTSTATUS PhpEnumProcessModules32 | ( | _In_ HANDLE | ProcessHandle, |
| _In_ PPHP_ENUM_PROCESS_MODULES32_CALLBACK | Callback, | ||
| _In_opt_ PVOID | Context1, | ||
| _In_opt_ PVOID | Context2 | ||
| ) |
| BOOLEAN NTAPI PhpEnumProcessModules32Callback | ( | _In_ HANDLE | ProcessHandle, |
| _In_ PLDR_DATA_TABLE_ENTRY32 | Entry, | ||
| _In_ ULONG | AddressOfEntry, | ||
| _In_opt_ PVOID | Context1, | ||
| _In_opt_ PVOID | Context2 | ||
| ) |
| BOOLEAN NTAPI PhpEnumProcessModulesCallback | ( | _In_ HANDLE | ProcessHandle, |
| _In_ PLDR_DATA_TABLE_ENTRY | Entry, | ||
| _In_ PVOID | AddressOfEntry, | ||
| _In_opt_ PVOID | Context1, | ||
| _In_opt_ PVOID | Context2 | ||
| ) |
| NTSTATUS PhpInitializeKeyObjectAttributes | ( | _In_opt_ HANDLE | RootDirectory, |
| _In_ PUNICODE_STRING | ObjectName, | ||
| _In_ ULONG | Attributes, | ||
| _Out_ POBJECT_ATTRIBUTES | ObjectAttributes, | ||
| _Out_ PHANDLE | NeedsClose | ||
| ) |
Initializes the attributes of a key object for creating/opening.
| RootDirectory | A handle to a root key, or one of the predefined keys. See PhCreateKey() for details. |
| ObjectName | The path to the key. |
| Attributes | Additional object flags. |
| ObjectAttributes | The OBJECT_ATTRIBUTES structure to initialize. |
| NeedsClose | A variable which receives a handle that must be closed when the create/open operation is finished. The variable may be set to NULL if no handle needs to be closed. |
| BOOLEAN NTAPI PhpIsDotNetEnumProcessModulesCallback | ( | _In_ PLDR_DATA_TABLE_ENTRY | Module, |
| _In_opt_ PVOID | Context | ||
| ) |
| BOOLEAN NTAPI PhpOpenDriverByBaseAddressCallback | ( | _In_ PPH_STRINGREF | Name, |
| _In_ PPH_STRINGREF | TypeName, | ||
| _In_opt_ PVOID | Context | ||
| ) |
| NTSTATUS PhpQueryDriverVariableSize | ( | _In_ HANDLE | DriverHandle, |
| _In_ DRIVER_INFORMATION_CLASS | DriverInformationClass, | ||
| _Out_ PVOID * | Buffer | ||
| ) |
Queries variable-sized information for a driver.
The function allocates a buffer to contain the information.
| DriverHandle | A handle to a driver. The access required depends on the information class specified. |
| DriverInformationClass | The information class to retrieve. |
| Buffer | A variable which receives a pointer to a buffer containing the information. You must free the buffer using PhFree() when you no longer need it. |
| NTSTATUS PhpQueryFileVariableSize | ( | _In_ HANDLE | FileHandle, |
| _In_ FILE_INFORMATION_CLASS | FileInformationClass, | ||
| _Out_ PVOID * | Buffer | ||
| ) |
| NTSTATUS PhpQueryProcessVariableSize | ( | _In_ HANDLE | ProcessHandle, |
| _In_ PROCESSINFOCLASS | ProcessInformationClass, | ||
| _Out_ PVOID * | Buffer | ||
| ) |
Queries variable-sized information for a process.
The function allocates a buffer to contain the information.
| ProcessHandle | A handle to a process. The access required depends on the information class specified. |
| ProcessInformationClass | The information class to retrieve. |
| Buffer | A variable which receives a pointer to a buffer containing the information. You must free the buffer using PhFree() when you no longer need it. |
| NTSTATUS PhpQueryResourceManagerVariableSize | ( | _In_ HANDLE | ResourceManagerHandle, |
| _In_ RESOURCEMANAGER_INFORMATION_CLASS | ResourceManagerInformationClass, | ||
| _Out_ PVOID * | Buffer | ||
| ) |
| NTSTATUS PhpQueryTokenVariableSize | ( | _In_ HANDLE | TokenHandle, |
| _In_ TOKEN_INFORMATION_CLASS | TokenInformationClass, | ||
| _Out_ PVOID * | Buffer | ||
| ) |
Queries variable-sized information for a token.
The function allocates a buffer to contain the information.
| TokenHandle | A handle to a token. The access required depends on the information class specified. |
| TokenInformationClass | The information class to retrieve. |
| Buffer | A variable which receives a pointer to a buffer containing the information. You must free the buffer using PhFree() when you no longer need it. |
| NTSTATUS PhpQueryTransactionManagerVariableSize | ( | _In_ HANDLE | TransactionManagerHandle, |
| _In_ TRANSACTIONMANAGER_INFORMATION_CLASS | TransactionManagerInformationClass, | ||
| _Out_ PVOID * | Buffer | ||
| ) |
| NTSTATUS PhpQueryTransactionVariableSize | ( | _In_ HANDLE | TransactionHandle, |
| _In_ TRANSACTION_INFORMATION_CLASS | TransactionInformationClass, | ||
| _Out_ PVOID * | Buffer | ||
| ) |
| VOID PhpRtlModulesExToGenericModules | ( | _In_ PRTL_PROCESS_MODULE_INFORMATION_EX | Modules, |
| _In_ PPH_ENUM_GENERIC_MODULES_CALLBACK | Callback, | ||
| _In_opt_ PVOID | Context, | ||
| _In_ PPH_HASHTABLE | BaseAddressHashtable | ||
| ) |
| VOID PhpRtlModulesToGenericModules | ( | _In_ PRTL_PROCESS_MODULES | Modules, |
| _In_ PPH_ENUM_GENERIC_MODULES_CALLBACK | Callback, | ||
| _In_opt_ PVOID | Context, | ||
| _In_ PPH_HASHTABLE | BaseAddressHashtable | ||
| ) |
| BOOLEAN NTAPI PhpSetProcessModuleLoadCount32Callback | ( | _In_ HANDLE | ProcessHandle, |
| _In_ PLDR_DATA_TABLE_ENTRY32 | Entry, | ||
| _In_ ULONG | AddressOfEntry, | ||
| _In_opt_ PVOID | Context1, | ||
| _In_opt_ PVOID | Context2 | ||
| ) |
| BOOLEAN NTAPI PhpSetProcessModuleLoadCountCallback | ( | _In_ HANDLE | ProcessHandle, |
| _In_ PLDR_DATA_TABLE_ENTRY | Entry, | ||
| _In_ PVOID | AddressOfEntry, | ||
| _In_opt_ PVOID | Context1, | ||
| _In_opt_ PVOID | Context2 | ||
| ) |
| NTSTATUS PhpUnloadDriver | ( | _In_ PPH_STRING | ServiceKeyName | ) |
| NTSTATUS PhQueryTokenVariableSize | ( | _In_ HANDLE | TokenHandle, |
| _In_ TOKEN_INFORMATION_CLASS | TokenInformationClass, | ||
| _Out_ PVOID * | Buffer | ||
| ) |
Queries variable-sized information for a token.
The function allocates a buffer to contain the information.
| TokenHandle | A handle to a token. The access required depends on the information class specified. |
| TokenInformationClass | The information class to retrieve. |
| Buffer | A variable which receives a pointer to a buffer containing the information. You must free the buffer using PhFree() when you no longer need it. |
| NTSTATUS PhReadVirtualMemory | ( | _In_ HANDLE | ProcessHandle, |
| _In_ PVOID | BaseAddress, | ||
| _Out_writes_bytes_(BufferSize) PVOID | Buffer, | ||
| _In_ SIZE_T | BufferSize, | ||
| _Out_opt_ PSIZE_T | NumberOfBytesRead | ||
| ) |
Copies memory from another process into the current process.
| ProcessHandle | A handle to a process. The handle must have PROCESS_VM_READ access. |
| BaseAddress | The address from which memory is to be copied. |
| Buffer | A buffer which receives the copied memory. |
| BufferSize | The number of bytes to copy. |
| NumberOfBytesRead | A variable which receives the number of bytes copied to the buffer. |
| PPH_STRING PhResolveDevicePrefix | ( | _In_ PPH_STRING | Name | ) |
Resolves a NT path into a Win32 path.
| Name | A string containing the path to resolve. |
| NTSTATUS PhResumeProcess | ( | _In_ HANDLE | ProcessHandle | ) |
| NTSTATUS PhResumeThread | ( | _In_ HANDLE | ThreadHandle, |
| _Out_opt_ PULONG | PreviousSuspendCount | ||
| ) |
| NTSTATUS PhSetFileSize | ( | _In_ HANDLE | FileHandle, |
| _In_ PLARGE_INTEGER | Size | ||
| ) |
| NTSTATUS PhSetObjectSecurity | ( | _In_ HANDLE | Handle, |
| _In_ SECURITY_INFORMATION | SecurityInformation, | ||
| _In_ PSECURITY_DESCRIPTOR | SecurityDescriptor | ||
| ) |
| NTSTATUS PhSetProcessDepStatus | ( | _In_ HANDLE | ProcessHandle, |
| _In_ ULONG | DepStatus | ||
| ) |
| NTSTATUS PhSetProcessDepStatusInvasive | ( | _In_ HANDLE | ProcessHandle, |
| _In_ ULONG | DepStatus, | ||
| _In_opt_ PLARGE_INTEGER | Timeout | ||
| ) |
| NTSTATUS PhSetProcessExecuteFlags | ( | _In_ HANDLE | ProcessHandle, |
| _In_ ULONG | ExecuteFlags | ||
| ) |
| NTSTATUS PhSetProcessIoPriority | ( | _In_ HANDLE | ProcessHandle, |
| _In_ ULONG | IoPriority | ||
| ) |
| NTSTATUS PhSetProcessModuleLoadCount | ( | _In_ HANDLE | ProcessHandle, |
| _In_ PVOID | BaseAddress, | ||
| _In_ ULONG | LoadCount | ||
| ) |
Sets the load count of a process module.
| ProcessHandle | A handle to a process. The handle must have PROCESS_QUERY_LIMITED_INFORMATION, PROCESS_VM_READ and PROCESS_VM_WRITE access. |
| BaseAddress | The base address of a module. |
| LoadCount | The new load count of the module. |
| STATUS_DLL_NOT_FOUND | The module was not found. |
| NTSTATUS PhSetProcessModuleLoadCount32 | ( | _In_ HANDLE | ProcessHandle, |
| _In_ PVOID | BaseAddress, | ||
| _In_ ULONG | LoadCount | ||
| ) |
Sets the load count of a 32-bit process module.
| ProcessHandle | A handle to a process. The handle must have PROCESS_QUERY_LIMITED_INFORMATION, PROCESS_VM_READ and PROCESS_VM_WRITE access. |
| BaseAddress | The base address of a module. |
| LoadCount | The new load count of the module. |
| STATUS_DLL_NOT_FOUND | The module was not found. |
| STATUS_NOT_SUPPORTED | The process is not running under WOW64. |
| NTSTATUS PhSetThreadContext | ( | _In_ HANDLE | ThreadHandle, |
| _In_ PCONTEXT | Context | ||
| ) |
| NTSTATUS PhSetThreadIoPriority | ( | _In_ HANDLE | ThreadHandle, |
| _In_ ULONG | IoPriority | ||
| ) |
| NTSTATUS PhSetTokenIsVirtualizationEnabled | ( | _In_ HANDLE | TokenHandle, |
| _In_ BOOLEAN | IsVirtualizationEnabled | ||
| ) |
| BOOLEAN PhSetTokenPrivilege | ( | _In_ HANDLE | TokenHandle, |
| _In_opt_ PWSTR | PrivilegeName, | ||
| _In_opt_ PLUID | PrivilegeLuid, | ||
| _In_ ULONG | Attributes | ||
| ) |
Modifies a token privilege.
| TokenHandle | A handle to a token. The handle must have TOKEN_ADJUST_PRIVILEGES access. |
| PrivilegeName | The name of the privilege to modify. If this parameter is NULL, you must specify a LUID in the PrivilegeLuid parameter. |
| PrivilegeLuid | The LUID of the privilege to modify. If this parameter is NULL, you must specify a name in the PrivilegeName parameter. |
| Attributes | The new attributes of the privilege. |
| BOOLEAN PhSetTokenPrivilege2 | ( | _In_ HANDLE | TokenHandle, |
| _In_ LONG | Privilege, | ||
| _In_ ULONG | Attributes | ||
| ) |
| NTSTATUS PhSetTokenSessionId | ( | _In_ HANDLE | TokenHandle, |
| _In_ ULONG | SessionId | ||
| ) |
| NTSTATUS PhSuspendProcess | ( | _In_ HANDLE | ProcessHandle | ) |
| NTSTATUS PhSuspendThread | ( | _In_ HANDLE | ThreadHandle, |
| _Out_opt_ PULONG | PreviousSuspendCount | ||
| ) |
| NTSTATUS PhTerminateProcess | ( | _In_ HANDLE | ProcessHandle, |
| _In_ NTSTATUS | ExitStatus | ||
| ) |
| NTSTATUS PhTerminateThread | ( | _In_ HANDLE | ThreadHandle, |
| _In_ NTSTATUS | ExitStatus | ||
| ) |
| NTSTATUS PhUnloadDllProcess | ( | _In_ HANDLE | ProcessHandle, |
| _In_ PVOID | BaseAddress, | ||
| _In_opt_ PLARGE_INTEGER | Timeout | ||
| ) |
Causes a process to unload a DLL.
| ProcessHandle | A handle to a process. The handle must have PROCESS_QUERY_LIMITED_INFORMATION, PROCESS_CREATE_THREAD, PROCESS_VM_OPERATION, PROCESS_VM_READ and PROCESS_VM_WRITE access. |
| BaseAddress | The base address of the DLL to unload. |
| Timeout | The timeout, in milliseconds, for the process to unload the DLL. |
| NTSTATUS PhUnloadDriver | ( | _In_opt_ PVOID | BaseAddress, |
| _In_opt_ PWSTR | Name | ||
| ) |
Unloads a driver.
| BaseAddress | The base address of the driver. This parameter can be NULL if a value is specified in Name. |
| Name | The base name of the driver. This parameter can be NULL if a value is specified in BaseAddress and KProcessHacker is loaded. |
| STATUS_INVALID_PARAMETER_MIX | Both BaseAddress and Name were null, or Name was not specified and KProcessHacker is not loaded. |
| STATUS_OBJECT_NAME_NOT_FOUND | The driver could not be found. |
| NTSTATUS PhWriteVirtualMemory | ( | _In_ HANDLE | ProcessHandle, |
| _In_ PVOID | BaseAddress, | ||
| _In_reads_bytes_(BufferSize) PVOID | Buffer, | ||
| _In_ SIZE_T | BufferSize, | ||
| _Out_opt_ PSIZE_T | NumberOfBytesWritten | ||
| ) |
Copies memory from the current process into another process.
| ProcessHandle | A handle to a process. The handle must have PROCESS_VM_WRITE access. |
| BaseAddress | The address to which memory is to be copied. |
| Buffer | A buffer which contains the memory to copy. |
| BufferSize | The number of bytes to copy. |
| NumberOfBytesWritten | A variable which receives the number of bytes copied from the buffer. |