Best use case
detecting-dll-sideloading-attacks is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
检测 DLL 侧加载攻击,攻击者将恶意 DLL 放置在合法应用程序旁以劫持执行流程,实现防御规避。
Teams using detecting-dll-sideloading-attacks should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/detecting-dll-sideloading-attacks/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How detecting-dll-sideloading-attacks Compares
| Feature / Agent | detecting-dll-sideloading-attacks | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
检测 DLL 侧加载攻击,攻击者将恶意 DLL 放置在合法应用程序旁以劫持执行流程,实现防御规避。
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 检测 DLL 侧加载攻击 ## 适用场景 - 调查企业环境中潜在的 DLL 劫持时 - EDR 告警显示已签名应用程序加载未签名 DLL 后 - 狩猎使用合法应用程序包装器进行 APT 持久化时 - 事件响应期间识别木马化应用程序时 - 威胁情报表明 DLL 侧加载活动针对特定软件时 ## 前置条件 - 具备 DLL 加载监控功能的 EDR(CrowdStrike、MDE、SentinelOne) - 带哈希验证的 Sysmon 事件 ID 7(镜像加载) - 应用程序白名单或 DLL 完整性监控 - 合法应用程序及预期 DLL 路径的软件清单 - 代码签名验证能力 ## 工作流程 1. **识别侧加载目标**:研究已知存在漏洞的、不使用完整路径限定加载 DLL 的应用程序(LOLBAS、DLL 侧加载数据库)。 2. **监控 DLL 加载事件**:查询 Sysmon 事件 ID 7,查找 DLL 路径与应用程序预期目录不同的 DLL 加载。 3. **检查 DLL 签名**:标记由已签名可执行文件加载的未签名或不受信任的 DLL。 4. **检测路径异常**:识别从异常位置(Temp、AppData、Public)运行的合法可执行文件,这些可能是诱饵包装器。 5. **哈希验证**:将加载的 DLL 哈希与已知良好版本和威胁情报 feeds 进行比对。 6. **与进程行为关联**:检查宿主进程在加载可疑 DLL 后是否表现出异常行为(网络连接、子进程)。 7. **记录与修复**:报告侧加载实例,隔离恶意 DLL,并更新检测规则。 ## 核心概念 | 概念 | 描述 | |------|------| | T1574.002 | DLL 侧加载(DLL Side-Loading) | | T1574.001 | DLL 搜索顺序劫持 | | T1574.006 | 动态链接器劫持 | | T1574.008 | 通过搜索顺序劫持进行路径拦截 | | DLL 搜索顺序 | Windows DLL 加载优先级路径 | | 侧加载 | 将恶意 DLL 放置在合法应用程序加载的位置 | | 幻影 DLL | 合法应用程序尝试加载但不存在的 DLL | | DLL 代理 | 恶意 DLL 将调用转发给合法 DLL | ## 工具与系统 | 工具 | 用途 | |------|------| | Sysmon | 事件 ID 7 DLL 加载监控 | | CrowdStrike Falcon | 带进程上下文的 DLL 加载检测 | | Microsoft Defender for Endpoint | DLL 加载异常检测 | | Process Monitor | 实时 DLL 加载跟踪 | | DLL Export Viewer | 验证 DLL 导出函数 | | Sigcheck | 数字签名验证 | | pe-sieve | 代理 DLL 的 PE 分析 | ## 常见场景 1. **合法应用程序包装器**:攻击者将已签名应用程序(如 OneDrive 更新程序)复制到临时文件夹,并在旁边放置与预期依赖项同名的恶意 DLL。 2. **幻影 DLL 利用**:恶意 DLL 被放置在 PATH 路径中,合法应用程序在此处搜索不存在的 DLL。 3. **DLL 代理加载**:恶意 version.dll 将所有导出代理到真实的 version.dll,同时在 DllMain 中执行恶意代码。 4. **软件更新劫持**:攻击者在合法更新程序加载之前,替换更新暂存目录中的 DLL。 ## 输出格式 ``` Hunt ID: TH-SIDELOAD-[DATE]-[SEQ] Technique: T1574.002 Host Application: [合法已签名可执行文件] Sideloaded DLL: [恶意 DLL 名称和路径] Expected DLL Path: [DLL 应合法所在的位置] DLL Signed: [是/否] App Location: [预期/异常] Host: [主机名] Risk Level: [Critical/High/Medium/Low] ```
Related Skills
hunting-for-ntlm-relay-attacks
通过分析 Windows 事件 4624 中的 NTLMSSP 认证、IP 与主机名不匹配、Responder 流量签名、SMB 签名状态及跨域可疑认证模式,检测 NTLM 中继攻击。
hunting-for-dcsync-attacks
通过分析 Windows 事件 ID 4662,检测非域控制器账户发起的未授权 DS-Replication-Get-Changes 请求,从而发现 DCSync 攻击。
hunting-credential-stuffing-attacks
通过分析认证日志中的登录速率异常、ASN 多样性、密码喷洒(password spray)模式和失败登录的地理分布,检测凭据填充(credential stuffing)攻击。对 Splunk 或原始日志数据进行统计分析。适用于调查账户接管活动或为认证滥用构建检测规则。
detecting-wmi-persistence
通过分析 Sysmon 事件 ID 19、20 和 21 中的恶意 EventFilter、EventConsumer 和 FilterToConsumerBinding 创建,检测 WMI 事件订阅持久化。
detecting-t1548-abuse-elevation-control-mechanism
通过监控注册表修改、进程提升标志和异常的父子进程关系,检测提升控制机制滥用,包括 UAC 绕过、sudo 利用和 setuid/setgid 操纵。
detecting-t1055-process-injection-with-sysmon
通过分析 Sysmon 事件中的跨进程内存操作、远程线程创建和异常 DLL 加载模式,检测进程注入技术(T1055),包括经典 DLL 注入、进程镂空和 APC 注入。
detecting-t1003-credential-dumping-with-edr
利用 EDR 遥测数据、Sysmon 进程访问监控和 Windows 安全事件关联,检测针对 LSASS 内存、SAM 数据库、NTDS.dit 和缓存凭据的 OS 凭据转储技术。
detecting-suspicious-powershell-execution
检测可疑的 PowerShell 执行模式,包括编码命令、下载器(download cradles)、AMSI 绕过尝试以及受限语言模式规避。
detecting-suspicious-oauth-application-consent
使用 Microsoft Graph API、审计日志和权限分析,检测 Azure AD / Microsoft Entra ID 中的高风险 OAuth 应用授权同意,识别非法同意授权攻击。
detecting-supply-chain-attacks-in-ci-cd
扫描 GitHub Actions 工作流和 CI/CD 流水线配置,检测供应链攻击(Supply Chain Attack)向量, 包括未固定的 Action 版本、通过表达式的脚本注入、依赖混淆(Dependency Confusion)和密钥泄露。 使用 PyGithub 和 YAML 解析进行自动化审计。适用于加固 CI/CD 流水线或调查被攻击的构建系统。
detecting-stuxnet-style-attacks
本技能涵盖检测遵循Stuxnet攻击模式的复杂网络物理攻击——在修改PLC逻辑的同时欺骗传感器读数以向操作员隐藏操控行为。内容涉及PLC逻辑完整性监控、基于物理的过程异常检测、工程师工作站入侵指标、USB传播攻击向量,以及从IT到OT横向移动直至过程操控的多阶段攻击链检测。
detecting-sql-injection-via-waf-logs
分析 WAF(Web 应用防火墙,ModSecurity/AWS WAF/Cloudflare)日志,检测 SQL 注入(SQL Injection)攻击活动。 解析 ModSecurity 审计日志和 JSON WAF 事件日志,识别 SQLi 模式(UNION SELECT、OR 1=1、SLEEP()、BENCHMARK()), 追踪攻击源,关联多阶段注入尝试,并生成带 OWASP 分类的事件报告。