T1574.013: KernelCallbackTable
摘要
攻击者可能滥用进程的 <code>KernelCallbackTable</code> 来劫持其执行流程,以运行自己的载荷。(Citation: Lazarus APT January 2022)(Citation: FinFisher exposed ) <code>KernelCallbackTable</code> 可在进程环境块(PEB)中找到,并在加载 <code>user32.dll</code> 后初始化为一个可用于 GUI 进程的图形函数数组。(Citation: Windows Process Injection KernelCallbackTable) 攻击者可能通过用恶意载荷替换原始回调函数,利用 <code>KernelCallbackTable</code> 劫持进程的执行流程。修改回调函数可以通过各种方式实现,涉及相关行为,例如[反射代码加载](https://attack.mitre.org/techniques/T1620)或[进程注入](https://attack.mitre.org/techniques/T1055)到另一个进程。 可以通过定位 PEB(例如通过调用 <code>NtQueryInformationProcess()</code> [原生 API](https://attack.mitre.org/techniques/T1106) 函数)来获取指向 <code>KernelCallbackTable</code> 内存地址的指针。(Citation: NtQueryInformationProcess) 一旦定位到指针,就可以复制 <code>KernelCallbackTable</code>,并将表中的一个函数(例如 <code>fnCOPYDATA</code>)设置为恶意载荷的地址(例如通过 <code>WriteProcessMemory()</code>)。然后用该表的新地址更新 PEB。一旦被篡改的函数被调用,恶意载荷就会被触发。(Citation: Lazarus APT January 2022) 被篡改的函数通常通过 Windows 消息调用。在进程被劫持并执行恶意代码后,<code>KernelCallbackTable</code> 也可能被恶意载荷的其余部分恢复为原始状态。(Citation: Lazarus APT January 2022) 使用 <code>KernelCallbackTable</code> 劫持执行流程可能逃避安全产品的检测,因为执行可以掩盖在合法进程之下。
来源归属
来源:MITRE ATT&CK · 置信度:high
平台
- Windows
战术
Stealth
参考来源
- https://attack.mitre.org/techniques/T1574/013
- https://www.microsoft.com/security/blog/2018/03/01/finfisher-exposed-a-researchers-tale-of-defeating-traps-tricks-and-complex-virtual-machines/
- https://docs.microsoft.com/en-us/windows/win32/api/winternl/nf-winternl-ntqueryinformationprocess
- https://modexp.wordpress.com/2019/05/25/windows-injection-finspy/
- https://blog.malwarebytes.com/threat-intelligence/2022/01/north-koreas-lazarus-apt-leverages-windows-update-client-github-in-latest-campaign/