#T1574.013 KernelCallbackTable
Technique
- Tactics: Persistence, Privilege Escalation, Defense Evasion
- Description:
Adversaries may abuse the
KernelCallbackTableof a process to hijack its execution flow in order to run their own payloads.(Citation: Lazarus APT January 2022)(Citation: FinFisher exposed ) TheKernelCallbackTablecan be found in the Process Environment Block (PEB) and is initialized to an array of graphic functions available to a GUI process onceuser32.dllis loaded.(Citation: Windows Process Injection KernelCallbackTable)An adversary may hijack the execution flow of a process using the
KernelCallbackTableby replacing an original callback function with a malicious payload. Modifying callback functions can be achieved in various ways involving related behaviors such as Reflective Code Loading or Process Injection into another process.A pointer to the memory address of the
KernelCallbackTablecan be obtained by locating the PEB (ex: via a call to theNtQueryInformationProcess()Native API function).(Citation: NtQueryInformationProcess) Once the pointer is located, theKernelCallbackTablecan be duplicated, and a function in the table (e.g.,fnCOPYDATA) set to the address of a malicious payload (ex: viaWriteProcessMemory()). The PEB is then updated with the new address of the table. Once the tampered function is invoked, the malicious payload will be triggered.(Citation: Lazarus APT January 2022)The tampered function is typically invoked using a Windows message. After the process is hijacked and malicious code is executed, the
KernelCallbackTablemay also be restored to its original state by the rest of the malicious payload.(Citation: Lazarus APT January 2022) Use of theKernelCallbackTableto hijack execution flow may evade detection from security products since the execution can be masked under a legitimate process. - First Seen: APT Profile: Who is Lazarus Group? • 2021-12-02
-
3
Tagged Reports
-
3
Unique Authors
-
1,417
Active Days