ZwContinue
ZwContinue is a low-level Windows system call found in ntdll.dll. It is used to continue the execution of a thread after an exception, and it's often associated with structured exception handling (SEH) and context switching.
Key details:
-
Prototype (roughly):
NTSTATUS ZwContinue(PCONTEXT ContextRecord, BOOLEAN TestAlert);-
ContextRecord: A pointer to aCONTEXTstructure that defines the processor state to resume. -
TestAlert: If TRUE, the system checks for pending alerts (e.g., APCs) before continuing.
-
-
ZwContinueis usually called during:-
Exception handling (
NtContinueis often used interchangeably). -
Thread context spoofing (common in malware).
-
Control flow redirection (e.g., after a VEH or SEH handler wants to resume execution elsewhere).
-
In reverse engineering:
If you see ZwContinue, you might be dealing with:
-
Obfuscation techniques: where control flow is intentionally scrambled and resumed with crafted
CONTEXTstructures. -
Shellcode loaders or malware: often use
ZwContinueafter setting up a fake exception or modifying a context to jump to shellcode.
Red flags:
-
Manual context setup just before
ZwContinue. -
Execution resuming in non-module memory (e.g., heap, RWX sections).
-
Usage without a real exception trigger.
Comments
Post a Comment