Windows API reference

SetThreadContext

Sets the register context of a thread, including the instruction pointer.

Library
Kernel32.dll
Suspicion
high

Detection summary

Thread execution hijacking or hollowing: suspend a thread, set RIP to shellcode or a new entry point, then resume; detect ETW-TI context-change events, SuspendThread/SetThreadContext/ResumeThread sequences, a new RIP in private executable memory, and Sysmon 25 image tampering. No direct Sysmon event exists for context changes.

Sources and documentation

Not yet human-reviewed. Page metadata generated .

Legitimate use

Debuggers, crash handlers, profilers, sandbox/EDR instrumentation and runtime exception handling.

Open SetThreadContext in the interactive atlas