重要提示:本站仅作 Skill 资源导航与收录,正文以 GitHub 原仓库为准,版权归原项目所有。
以下为摘要预览,完整内容请查看 GitHub 原文。
Detecting DLL Sideloading Attacks
When to Use
- When investigating potential DLL hijacking in enterprise environments
- After EDR alerts on unsigned DLLs loaded by signed applications
- When hunting for APT persistence using legitimate application wrappers
- During incident response to identify trojanized applications
- When threat intel indicates DLL sideloading campaigns targeting specific software
Prerequisites
- EDR with DLL load monitoring (CrowdStrike, MDE, SentinelOne)
- Sysmon Event ID 7 (Image Loaded) with hash verification
- Application whitelisting or DLL integrity monitoring
- Software inventory of legitimate applications and expected DLL paths
- Code signing verification capabilities
Workflow
- Identify Sideloading Targets: Research known vulnerable applications that load DLLs without full path qualification (LOLBAS, DLL-sideload databases).
- Monitor DLL Load Events: Query Sysmon Event ID 7 for DLL loads where the DLL path differs from the application's expected directory.
- Check DLL Signatures: Flag unsigned or untrusted DLLs loaded by signed executables.
- Detect Path Anomalies: Identify legitimate executables running from unusu…
以下为摘要预览,完整内容请查看 GitHub 原文。
检测 DLL 侧加载攻击
使用时机
- 在企业环境中调查潜在的 DLL 劫持时
- 在 EDR 针对已签名应用程序所加载的未签名 DLL 发出告警之后
- 在追踪使用合法应用程序包装器实现 APT 持久化时
- 在事件响应过程中识别特洛伊化的应用程序时
- 当威胁情报表明存在针对特定软件的 DLL 侧加载活动时
先决条件
- 支持 DLL 加载监控的 EDR(CrowdStrike、MDE、SentinelOne)
- 启用哈希校验的 Sysmon Event ID 7(Image Loaded)
- 应用程序白名单或 DLL 完整性监控
- 合法应用程序及其预期 DLL 路径的软件清单
- 代码签名验证能力
工作流程
- 识别侧加载目标:研究已知的、在加载 DLL 时未使用完整路径限定的易受攻击应用程序(LOLBAS、DLL-sideload 数据库)。
- 监控 DLL 加载事件:查询 Sysmon Event ID 7,查找 DLL 路径与应用程序预期目录不符的 DLL 加载行为。
- 检查 DLL 签名:标记由已签名可执行文件加载的未签名或不受信任的 DLL。
- 检测路径异常:识别从异常位置(Temp、AppData、Public)运行的合法可执行文件,这些可能是诱饵包装器。
- 哈希校验:将加载的 DLL 哈希与已知良好版本及威胁情报源进行比对。
- 与进程行为关联分析:检查宿主进程在加载可疑 DLL 后是否表现出异常行为(网络连接、子进程)。
- 记录与处置:上报侧加载事件,隔离恶意 DLL,并更新检测规则。
核心概念
| 概念 | 描述 |
|---|
| T1574.002 | DLL 侧加载 |
| T1574.001 | DLL 搜索顺序劫持 |
| T1574.006 | 动态链接器劫持 |
| T1574.008 | 通过搜索顺序劫持进行路径拦截 |
| DLL Search Order | Windows DLL 加载优先级路径 |
| Side-Loading | 将恶意 DLL 放置于合法应用程序加载它的位置 |
| Phantom DLL | 合法应用程序尝试加载但不存在的 DLL |
| DLL Proxying | 恶意 DLL 将调用转发给合法 DLL |
工具与系统
| 工具 | 用途 |
|---|
| Sysmon | Event ID 7 DLL 加载监控 |
| CrowdStrike Falcon | 带进程上下文的 DLL 加载检测 |
| Microsoft Defender for Endpoint | DLL 加… |