Skip to main content

Overview

SysWhispers4 provides comprehensive process and thread management via direct syscalls, bypassing user-mode hooks on functions like CreateRemoteThread, OpenProcess, etc.

Process Functions

NtOpenProcess

Opens a handle to an existing process.

Parameters

ProcessHandle
PHANDLE
required
Pointer to a variable that receives the process handle.
DesiredAccess
ACCESS_MASK
required
Access rights. Common values:
  • PROCESS_ALL_ACCESS (0x1FFFFF)
  • PROCESS_VM_READ (0x0010)
  • PROCESS_VM_WRITE (0x0020)
  • PROCESS_VM_OPERATION (0x0008)
  • PROCESS_CREATE_THREAD (0x0002)
ObjectAttributes
POBJECT_ATTRIBUTES
required
Pointer to OBJECT_ATTRIBUTES structure. Use {sizeof(OBJECT_ATTRIBUTES)} for default.
ClientId
PCLIENT_ID
required
Pointer to CLIENT_ID structure identifying the process:

Example


NtCreateProcess

Creates a new process (legacy function, rarely used).

NtCreateProcessEx

Extended process creation (preferred over NtCreateProcess).

NtCreateUserProcess

Comprehensive process creation (Windows Vista+).
NtCreateUserProcess is complex and requires extensive setup. For most use cases, use CreateProcess from Win32 or perform process hollowing via NtCreateSection + NtMapViewOfSection.

NtTerminateProcess

Terminates a process.

Parameters

ProcessHandle
HANDLE
Handle to process. Use NULL or GetCurrentProcess() to terminate current process.
ExitStatus
NTSTATUS
required
Exit code for the process.

Example


NtSuspendProcess

Suspends all threads in a process (Windows Vista+).

Example


NtResumeProcess

Resumes all threads in a suspended process.

NtQueryInformationProcess

Retrieves information about a process.

Common Information Classes

Example: Get PEB Address


NtSetInformationProcess

Sets process information.

Example: Set Critical Process


Thread Functions

NtCreateThreadEx

Creates a thread in a process.

Parameters

ThreadHandle
PHANDLE
required
Receives the thread handle.
DesiredAccess
ACCESS_MASK
required
Access rights (use THREAD_ALL_ACCESS or 0x1FFFFF).
ObjectAttributes
POBJECT_ATTRIBUTES
Usually NULL.
ProcessHandle
HANDLE
required
Target process handle (use GetCurrentProcess() for local thread).
StartRoutine
PVOID
required
Thread entry point address.
Argument
PVOID
Argument passed to thread function.
CreateFlags
ULONG
required
Creation flags:
  • 0 — Start immediately
  • 0x00000001 — Create suspended
  • 0x00000004 — Hide from debugger

Example: Remote Thread Injection


NtOpenThread

Opens a handle to an existing thread.

Example


NtSuspendThread

Suspends a thread.

Example


NtResumeThread

Resumes a suspended thread.

NtTerminateThread

Terminates a thread.

NtGetContextThread

Retrieves a thread’s CPU context (registers).

Example


NtSetContextThread

Sets a thread’s CPU context.

Example: Thread Hijacking


NtQueueApcThread

Queues an APC (Asynchronous Procedure Call) to a thread.

Example: APC Injection


NtQueueApcThreadEx

Extended APC queuing (Windows 7+).

NtTestAlert

Tests if APCs are pending for the current thread and executes them.

NtAlertThread

Alerts a thread (forces APC delivery).

NtAlertResumeThread

Alerts and resumes a thread in one operation.

NtQueryInformationThread

Retrieves thread information.

Example: Check if Thread is in Alertable State


NtSetInformationThread

Sets thread information.

Example: Hide Thread from Debugger


Synchronization Functions

NtWaitForSingleObject

Waits for an object to be signaled.

Parameters

Handle
HANDLE
required
Handle to wait on (thread, process, event, etc.).
Alertable
BOOLEAN
required
If TRUE, function returns when an APC is queued.
Timeout
PLARGE_INTEGER
Timeout in 100-nanosecond intervals. Use NULL for infinite wait.

Example


NtWaitForMultipleObjects

Waits for multiple objects.

Parameters

WaitType
WAIT_TYPE
required
  • WaitAll (0) — Wait for all objects
  • WaitAny (1) — Wait for any object

NtSignalAndWaitForSingleObject

Signals one object and waits for another in one atomic operation.

NtClose

Closes a handle.
Always close handles when done to avoid handle leaks.

Example


NtDuplicateObject

Duplicates a handle.

Complete Example: Process Injection

Combining process and thread functions:

Next Steps

File Functions

NT file I/O operations

Token Functions

Token manipulation and privilege escalation