Skip to main content
Dr.Semu monitors process and thread operations to track process creation, manipulation, and memory operations. Access controls prevent unauthorized process interactions.

Process Creation

NtCreateUserProcess

Creates a new user-mode process.
ProcessHandle
PHANDLE
Receives a handle to the new process
ThreadHandle
PHANDLE
Receives a handle to the initial thread
ProcessDesiredAccess
ACCESS_MASK
Desired access for the process
ThreadDesiredAccess
ACCESS_MASK
Desired access for the thread
ProcessParameters
PRTL_USER_PROCESS_PARAMETERS
Process parameters including image path and command line
CreateInfo
PPS_CREATE_INFO
Process creation information
Logged Information:
  • Image path
  • Command line
  • Architecture (x86/x64)
  • Suspended state
  • Process ID (after creation)
  • Thread ID (after creation)
  • Operation success status
Special Handling:
  • File paths are redirected to virtual filesystem
  • Cross-architecture execution is blocked
  • Child processes are automatically whitelisted
  • Injected with Dr.Semu for monitoring

NtCreateProcess

Creates a new process (legacy API).
ProcessHandle
PHANDLE
Receives a handle to the new process
DesiredAccess
ACCESS_MASK
Desired access for the process
ParentProcess
HANDLE
Handle to the parent process
SectionHandle
HANDLE
Optional handle to section object
Access Control: Returns STATUS_NOT_IMPLEMENTED. Use NtCreateUserProcess instead.

NtCreateProcessEx

Extended version of NtCreateProcess.
ProcessHandle
PHANDLE
Receives a handle to the new process
DesiredAccess
ACCESS_MASK
Desired access for the process
ParentProcess
HANDLE
Handle to the parent process
Flags
ULONG
Process creation flags
Access Control: Returns STATUS_NOT_IMPLEMENTED.

Process Access

NtOpenProcess

Opens an existing process.
ProcessHandle
PHANDLE
Receives a handle to the process
DesiredAccess
ACCESS_MASK
Desired access rights
ObjectAttributes
POBJECT_ATTRIBUTES
Object attributes
ClientId
PCLIENT_ID
Process and thread IDs
Logged Information:
  • Desired access
  • Process ID
  • Thread ID
  • Process handle (after successful operation)
  • Operation success status
Access Control:
  • Only whitelisted processes can be opened
  • Attempts to open fake explorer are redirected to real explorer
  • Access to other processes is denied with STATUS_ACCESS_DENIED

NtSuspendProcess

Suspends all threads in a process.
ProcessHandle
HANDLE
Handle to the process to suspend
Logged Information:
  • Process handle
  • Process image path
  • Operation success status

Thread Operations

NtOpenThread

Opens an existing thread.
ThreadHandle
PHANDLE
Receives a handle to the thread
DesiredAccess
ACCESS_MASK
Desired access rights
ObjectAttributes
POBJECT_ATTRIBUTES
Object attributes (ObjectName must be NULL)
ClientId
PCLIENT_ID
Process and thread IDs
Logged Information:
  • Process ID
  • Thread ID
  • Thread handle (after successful operation)
Access Control:
  • Only threads from whitelisted processes can be opened
  • Access attempts to other threads are denied

NtDelayExecution

Delays execution of the current thread.
Alertable
BOOLEAN
Whether the delay is alertable
DelayInterval
PLARGE_INTEGER
Delay duration in 100-nanosecond intervals
Logged Information:
  • Delay interval

NtSetContextThread

Sets the context of a thread.
ThreadHandle
HANDLE
Handle to the thread
ThreadContext
PCONTEXT
Thread context to set
Note: Currently passes through without modification.

NtContinue

Continues execution after an exception.
ContextRecord
PCONTEXT
Context to continue with
TestAlert
BOOLEAN
Whether to test for alerts
Note: Currently passes through without modification.

Memory Operations

NtWriteVirtualMemory

Writes data to the virtual memory of a process.
ProcessHandle
HANDLE
Handle to the target process
BaseAddress
PVOID
Base address to write to
Buffer
PVOID
Buffer containing data to write
BufferSize
SIZE_T
Number of bytes to write
NumberOfBytesWritten
PSIZE_T
Receives number of bytes actually written
Logged Information:
  • Process ID
  • Target process image path
  • Operation success status
Access Control:
  • Only whitelisted processes can be written to
  • Attempts to write to fake explorer are redirected
  • Other attempts are denied with STATUS_ACCESS_DENIED

NtProtectVirtualMemory

Changes memory protection for a region of virtual memory.
ProcessHandle
HANDLE
Handle to the process
BaseAddress
PVOID*
Pointer to base address of the region
RegionSize
PSIZE_T
Pointer to size of the region
NewProtect
ULONG
New protection flags (PAGE_EXECUTE, PAGE_READWRITE, etc.)
OldProtect
PULONG
Receives the old protection flags
Logged Information:
  • Process handle
  • Base address
  • New protection flags
  • Operation success status

NtQueryVirtualMemory

Retrieves information about virtual memory.
ProcessHandle
HANDLE
Handle to the process
BaseAddress
PVOID
Base address to query
MemoryInformationClass
MEMORY_INFORMATION_CLASS
Type of information to retrieve
Note: Currently passes through without modification.

Process Information

NtQueryInformationProcess

Retrieves information about a process.
ProcessHandle
HANDLE
Handle to the process
ProcessInformationClass
PROCESSINFOCLASS
Type of information to retrieve
ProcessInformation
PVOID
Buffer to receive the information
ProcessInformationLength
ULONG
Size of the buffer
ReturnLength
PULONG
Receives the size of data returned
Logged Information:
  • Process handle
  • Process name
  • Information class (e.g., ProcessBasicInformation, ProcessImageFileName)
Special Handling:
  • Fake explorer paths are hidden and replaced with real explorer path
  • Parent process ID is masked for fake explorer processes
  • Supports various information classes:
    • ProcessBasicInformation
    • ProcessImageFileName
    • ProcessImageFileNameWin32
    • ProcessWow64Information
    • ProcessMitigationPolicy
    • ProcessDebugPort
    • And more

NtSetInformationProcess

Sets information for a process.
ProcessHandle
HANDLE
Handle to the process
ProcessInformationClass
PROCESSINFOCLASS
Type of information to set
ProcessInformation
PVOID
Buffer containing the information
ProcessInformationLength
ULONG
Size of the buffer
Note: Currently passes through without modification.

Build docs developers (and LLMs) love