|
Process Hacker
|
Go to the source code of this file.
Macros | |
| #define | KERNEL_HANDLE_BIT (0xffffffff80000000) |
| #define | IsKernelHandle(Handle) ((LONG_PTR)(Handle) < 0) |
| #define | MakeKernelHandle(Handle) ((HANDLE)((ULONG_PTR)(Handle) | KERNEL_HANDLE_BIT)) |
Typedefs | |
| typedef struct _KPHP_ENUMERATE_PROCESS_HANDLES_CONTEXT | KPHP_ENUMERATE_PROCESS_HANDLES_CONTEXT |
| typedef struct _KPHP_ENUMERATE_PROCESS_HANDLES_CONTEXT * | PKPHP_ENUMERATE_PROCESS_HANDLES_CONTEXT |
Functions | |
| BOOLEAN | KphpEnumerateProcessHandlesEnumCallback61 (__inout PHANDLE_TABLE_ENTRY HandleTableEntry, __in HANDLE Handle, __in PVOID Context) |
| BOOLEAN | KphpEnumerateProcessHandlesEnumCallback (__in PHANDLE_TABLE HandleTable, __inout PHANDLE_TABLE_ENTRY HandleTableEntry, __in HANDLE Handle, __in PVOID Context) |
| POBJECT_TYPE | KphGetObjectType (__in PVOID Object) |
| Gets the type of an object. | |
| PHANDLE_TABLE | KphReferenceProcessHandleTable (__in PEPROCESS Process) |
| Gets a pointer to the handle table of a process. | |
| VOID | KphDereferenceProcessHandleTable (__in PEPROCESS Process) |
| Dereferences the handle table of a process. | |
| VOID | KphUnlockHandleTableEntry (__in PHANDLE_TABLE HandleTable, __in PHANDLE_TABLE_ENTRY HandleTableEntry) |
| NTSTATUS | KpiEnumerateProcessHandles (__in HANDLE ProcessHandle, __out_bcount(BufferLength) PVOID Buffer, __in_opt ULONG BufferLength, __out_opt PULONG ReturnLength, __in KPROCESSOR_MODE AccessMode) |
| Enumerates the handles of a process. | |
| NTSTATUS | KphQueryNameObject (__in PVOID Object, __out_bcount(BufferLength) POBJECT_NAME_INFORMATION Buffer, __in ULONG BufferLength, __out PULONG ReturnLength) |
| Queries the name of an object. | |
| NTSTATUS | KphQueryNameFileObject (__in PFILE_OBJECT FileObject, __out_bcount(BufferLength) POBJECT_NAME_INFORMATION Buffer, __in ULONG BufferLength, __out PULONG ReturnLength) |
| Queries the name of a file object. | |
| NTSTATUS | KpiQueryInformationObject (__in HANDLE ProcessHandle, __in HANDLE Handle, __in KPH_OBJECT_INFORMATION_CLASS ObjectInformationClass, __out_bcount(ObjectInformationLength) PVOID ObjectInformation, __in ULONG ObjectInformationLength, __out_opt PULONG ReturnLength, __in KPROCESSOR_MODE AccessMode) |
| Queries object information. | |
| NTSTATUS | KpiSetInformationObject (__in HANDLE ProcessHandle, __in HANDLE Handle, __in KPH_OBJECT_INFORMATION_CLASS ObjectInformationClass, __in_bcount(ObjectInformationLength) PVOID ObjectInformation, __in ULONG ObjectInformationLength, __in KPROCESSOR_MODE AccessMode) |
| Sets object information. | |
| NTSTATUS | KphDuplicateObject (__in PEPROCESS SourceProcess, __in_opt PEPROCESS TargetProcess, __in HANDLE SourceHandle, __out_opt PHANDLE TargetHandle, __in ACCESS_MASK DesiredAccess, __in ULONG HandleAttributes, __in ULONG Options, __in KPROCESSOR_MODE AccessMode) |
| Re-opens an object. | |
| NTSTATUS | KpiDuplicateObject (__in HANDLE SourceProcessHandle, __in HANDLE SourceHandle, __in_opt HANDLE TargetProcessHandle, __out_opt PHANDLE TargetHandle, __in ACCESS_MASK DesiredAccess, __in ULONG HandleAttributes, __in ULONG Options, __in KPROCESSOR_MODE AccessMode) |
| Re-opens an object. | |
| NTSTATUS | KphOpenNamedObject (__out PHANDLE ObjectHandle, __in ACCESS_MASK DesiredAccess, __in POBJECT_ATTRIBUTES ObjectAttributes, __in POBJECT_TYPE ObjectType, __in KPROCESSOR_MODE AccessMode) |
| #define MakeKernelHandle | ( | Handle | ) | ((HANDLE)((ULONG_PTR)(Handle) | KERNEL_HANDLE_BIT)) |
| typedef struct _KPHP_ENUMERATE_PROCESS_HANDLES_CONTEXT KPHP_ENUMERATE_PROCESS_HANDLES_CONTEXT |
| typedef struct _KPHP_ENUMERATE_PROCESS_HANDLES_CONTEXT * PKPHP_ENUMERATE_PROCESS_HANDLES_CONTEXT |
| VOID KphDereferenceProcessHandleTable | ( | __in PEPROCESS | Process | ) |
| NTSTATUS KphDuplicateObject | ( | __in PEPROCESS | SourceProcess, |
| __in_opt PEPROCESS | TargetProcess, | ||
| __in HANDLE | SourceHandle, | ||
| __out_opt PHANDLE | TargetHandle, | ||
| __in ACCESS_MASK | DesiredAccess, | ||
| __in ULONG | HandleAttributes, | ||
| __in ULONG | Options, | ||
| __in KPROCESSOR_MODE | AccessMode | ||
| ) |
Re-opens an object.
| SourceProcess | The source process from which the object will be referenced. |
| TargetProcess | The target process to which the object handle will be duplicated. |
| SourceHandle | The source handle, present in SourceProcess. |
| TargetHandle | A variable which receives the new handle. |
| DesiredAccess | The desired access to the object for the new handle. |
| HandleAttributes | The attributes of the new handle. |
| Options | A combination of the following:
|
| AccessMode | The mode in which access checks will be performed. |
| POBJECT_TYPE KphGetObjectType | ( | __in PVOID | Object | ) |
| NTSTATUS KphOpenNamedObject | ( | __out PHANDLE | ObjectHandle, |
| __in ACCESS_MASK | DesiredAccess, | ||
| __in POBJECT_ATTRIBUTES | ObjectAttributes, | ||
| __in POBJECT_TYPE | ObjectType, | ||
| __in KPROCESSOR_MODE | AccessMode | ||
| ) |
| BOOLEAN KphpEnumerateProcessHandlesEnumCallback | ( | __in PHANDLE_TABLE | HandleTable, |
| __inout PHANDLE_TABLE_ENTRY | HandleTableEntry, | ||
| __in HANDLE | Handle, | ||
| __in PVOID | Context | ||
| ) |
| BOOLEAN KphpEnumerateProcessHandlesEnumCallback61 | ( | __inout PHANDLE_TABLE_ENTRY | HandleTableEntry, |
| __in HANDLE | Handle, | ||
| __in PVOID | Context | ||
| ) |
| NTSTATUS KphQueryNameFileObject | ( | __in PFILE_OBJECT | FileObject, |
| __out_bcount(BufferLength) POBJECT_NAME_INFORMATION | Buffer, | ||
| __in ULONG | BufferLength, | ||
| __out PULONG | ReturnLength | ||
| ) |
Queries the name of a file object.
| FileObject | A pointer to a file object. |
| Buffer | The buffer in which the object name will be stored. |
| BufferLength | The number of bytes available in Buffer. |
| ReturnLength | A variable which receives the number of bytes required to be available in Buffer. |
| NTSTATUS KphQueryNameObject | ( | __in PVOID | Object, |
| __out_bcount(BufferLength) POBJECT_NAME_INFORMATION | Buffer, | ||
| __in ULONG | BufferLength, | ||
| __out PULONG | ReturnLength | ||
| ) |
Queries the name of an object.
| Object | A pointer to an object. |
| Buffer | The buffer in which the object name will be stored. |
| BufferLength | The number of bytes available in Buffer. |
| ReturnLength | A variable which receives the number of bytes required to be available in Buffer. |
| PHANDLE_TABLE KphReferenceProcessHandleTable | ( | __in PEPROCESS | Process | ) |
Gets a pointer to the handle table of a process.
| Process | A process object. |
| VOID KphUnlockHandleTableEntry | ( | __in PHANDLE_TABLE | HandleTable, |
| __in PHANDLE_TABLE_ENTRY | HandleTableEntry | ||
| ) |
| NTSTATUS KpiDuplicateObject | ( | __in HANDLE | SourceProcessHandle, |
| __in HANDLE | SourceHandle, | ||
| __in_opt HANDLE | TargetProcessHandle, | ||
| __out_opt PHANDLE | TargetHandle, | ||
| __in ACCESS_MASK | DesiredAccess, | ||
| __in ULONG | HandleAttributes, | ||
| __in ULONG | Options, | ||
| __in KPROCESSOR_MODE | AccessMode | ||
| ) |
Re-opens an object.
| SourceProcessHandle | A handle to the source process from which the object will be referenced. |
| SourceHandle | The source handle, present in SourceProcess. |
| TargetProcessHandle | A handle to the target process to which the object handle will be duplicated. |
| TargetHandle | A variable which receives the new handle. |
| DesiredAccess | The desired access to the object for the new handle. |
| HandleAttributes | The attributes of the new handle. |
| Options | A combination of the following:
|
| AccessMode | The mode in which access checks will be performed. |
| NTSTATUS KpiEnumerateProcessHandles | ( | __in HANDLE | ProcessHandle, |
| __out_bcount(BufferLength) PVOID | Buffer, | ||
| __in_opt ULONG | BufferLength, | ||
| __out_opt PULONG | ReturnLength, | ||
| __in KPROCESSOR_MODE | AccessMode | ||
| ) |
Enumerates the handles of a process.
| ProcessHandle | A handle to a process. |
| Buffer | The buffer in which the handle information will be stored. |
| BufferLength | The number of bytes available in Buffer. |
| ReturnLength | A variable which receives the number of bytes required to be available in Buffer. |
| AccessMode | The mode in which to perform access checks. |
| NTSTATUS KpiQueryInformationObject | ( | __in HANDLE | ProcessHandle, |
| __in HANDLE | Handle, | ||
| __in KPH_OBJECT_INFORMATION_CLASS | ObjectInformationClass, | ||
| __out_bcount(ObjectInformationLength) PVOID | ObjectInformation, | ||
| __in ULONG | ObjectInformationLength, | ||
| __out_opt PULONG | ReturnLength, | ||
| __in KPROCESSOR_MODE | AccessMode | ||
| ) |
Queries object information.
| ProcessHandle | A handle to a process. |
| Handle | A handle which is present in the process referenced by ProcessHandle. |
| ObjectInformationClass | The type of information to retrieve. |
| ObjectInformation | The buffer in which the information will be stored. |
| ObjectInformationLength | The number of bytes available in ObjectInformation. |
| ReturnLength | A variable which receives the number of bytes required to be available in ObjectInformation. |
| AccessMode | The mode in which to perform access checks. |
| NTSTATUS KpiSetInformationObject | ( | __in HANDLE | ProcessHandle, |
| __in HANDLE | Handle, | ||
| __in KPH_OBJECT_INFORMATION_CLASS | ObjectInformationClass, | ||
| __in_bcount(ObjectInformationLength) PVOID | ObjectInformation, | ||
| __in ULONG | ObjectInformationLength, | ||
| __in KPROCESSOR_MODE | AccessMode | ||
| ) |
Sets object information.
| ProcessHandle | A handle to a process. |
| Handle | A handle which is present in the process referenced by ProcessHandle. |
| ObjectInformationClass | The type of information to set. |
| ObjectInformation | A buffer which contains the information to set. |
| ObjectInformationLength | The number of bytes present in ObjectInformation. |
| AccessMode | The mode in which to perform access checks. |