T1055.015: 列表控件注植
摘要
攻击者可能滥用列表视图控件将恶意代码注入被劫持的进程,以规避基于进程的防御,并可能提升权限。ListPlanting 是一种在另一个活动进程的地址空间中执行任意代码的方法。(Citation: Hexacorn Listplanting) 通过 ListPlanting 执行的代码也可能规避安全产品的检测,因为执行被掩盖在合法进程之下。 列表视图控件是用于显示项目集合的用户界面窗口。(Citation: Microsoft List View Controls) 有关应用程序列表视图设置的信息存储在进程内存中的 <code>SysListView32</code> 控件内。 ListPlanting(一种消息传递式 "shatter attack")可以通过以下方式执行:将代码复制到使用列表视图控件的进程的虚拟地址空间,然后将该代码用作排序所列项目的自定义回调。(Citation: Modexp Windows Process Injection) 攻击者必须先将代码复制到目标进程的内存空间,这可以通过多种方式完成,包括直接获取受害进程窗口的 <code>SysListView32</code> 子控件的句柄(通过诸如 <code>FindWindow</code> 和/或 <code>EnumWindows</code> 的 Windows API 调用)或其他 [Process Injection](https://attack.mitre.org/techniques/T1055) 方法。 ListPlanting 的某些变体可能会在目标进程中分配内存,然后使用窗口消息复制载荷,以避免使用受高度监控的 <code>WriteProcessMemory</code> 函数。例如,攻击者可以使用 <code>PostMessage</code> 和/或 <code>SendMessage</code> API 函数发送 <code>LVM_SETITEMPOSITION</code> 和 <code>LVM_GETITEMPOSITION</code> 消息,从而以每次 2 字节的方式将载荷复制到所分配的内存中。(Citation: ESET InvisiMole June 2020) 最后,通过向进程窗口的 <code>SysListView32</code> 子控件发送 <code>LVM_SORTITEMS</code> 消息来触发载荷,新分配缓冲区中的载荷将作为 <code>ListView_SortItems</code> 回调被传递并执行。
来源归属
来源:MITRE ATT&CK · 置信度:high
平台
- Windows
战术
Stealth
参考来源
- https://attack.mitre.org/techniques/T1055/015
- https://www.hexacorn.com/blog/2019/04/25/listplanting-yet-another-code-injection-trick/
- https://www.welivesecurity.com/wp-content/uploads/2020/06/ESET_InvisiMole.pdf
- https://docs.microsoft.com/windows/win32/controls/list-view-controls-overview
- https://modexp.wordpress.com/2019/04/25/seven-window-injection-methods/