hunting-for-registry-run-key-persistence
通过分析 Sysmon 事件 ID 13 日志和注册表查询,检测 MITRE ATT&CK T1547.001 注册表 Run 键持久化,识别恶意自动启动条目。
Best use case
hunting-for-registry-run-key-persistence is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
通过分析 Sysmon 事件 ID 13 日志和注册表查询,检测 MITRE ATT&CK T1547.001 注册表 Run 键持久化,识别恶意自动启动条目。
Teams using hunting-for-registry-run-key-persistence 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/hunting-for-registry-run-key-persistence/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How hunting-for-registry-run-key-persistence Compares
| Feature / Agent | hunting-for-registry-run-key-persistence | 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?
通过分析 Sysmon 事件 ID 13 日志和注册表查询,检测 MITRE ATT&CK T1547.001 注册表 Run 键持久化,识别恶意自动启动条目。
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
# 狩猎注册表 Run 键持久化 ## 概述 注册表 Run 键(T1547.001)是攻击者最常用的持久化机制之一。当程序被添加到 Windows 注册表的 Run 键时,它会在用户登录时自动执行。攻击者滥用 `HKLM\Software\Microsoft\Windows\CurrentVersion\Run`、`HKCU\Software\Microsoft\Windows\CurrentVersion\Run` 及其 RunOnce 对应键来维持持久化。Sysmon 事件 ID 13(RegistryEvent - Value Set)捕获注册表值修改,包括目标对象路径、进行修改的进程以及新值。检测方法包括:监控这些事件中指向临时目录的可疑可执行文件、编码的 PowerShell 命令、LOLBin 路径,以及通常不会创建 Run 键条目的进程。将事件 13 与事件 1(进程创建)和事件 11(文件创建)串联分析,可通过确认载荷的创建和执行来强化检测。 ## 前置条件 - 安装并配置 Sysmon 以记录事件 ID 13 的 Windows 系统 - 配置了 Run/RunOnce 键 RegistryEvent 规则的 Sysmon 配置 - Python 3.9+ 及 `json`、`xml.etree.ElementTree`、`re` 模块 - 收集 Sysmon 日志的 SIEM 或日志聚合器(Splunk、Elastic、Sentinel) - 了解合法自动启动程序的知识,用于基线对比 ## 步骤 1. 收集经 Run/RunOnce 键路径过滤的 Sysmon 事件 ID 13 日志 2. 解析事件 XML/JSON,提取 TargetObject、Details(写入值)、Image(修改进程) 3. 标记值指向临时目录、AppData 或 ProgramData 的条目 4. 检测注册表值中的编码 PowerShell 命令或脚本解释器 5. 识别 LOLBin 滥用(mshta.exe、rundll32.exe、regsvr32.exe、wscript.exe) 6. 与合法自动启动条目的已知正常基线对比 7. 检查修改进程(Image)是否异常(cmd.exe、powershell.exe、python.exe) 8. 与事件 ID 1 串联,验证注册的二进制文件是否为近期创建 9. 生成包含 MITRE ATT&CK 映射和严重性评分的检测报告 10. 从发现结果生成 Sigma/Splunk 检测规则 ## 预期输出 JSON 报告,列出可疑的 Run 键条目,包含注册表路径、写入值、修改进程、时间戳、MITRE 技术映射、严重性评级和建议的 Sigma 检测规则。
Related Skills
securing-container-registry-with-harbor
Harbor 是一个开源容器镜像仓库,提供安全功能包括漏洞扫描(集成 Trivy)、镜像签名(Notary/Cosign)、RBAC、内容信任策略(Content Trust)、复制和审计日志。配置这些功能以强制执行镜像来源验证、防止有漏洞镜像部署并维护仓库访问控制。
securing-container-registry-images
通过使用 Trivy 和 Grype 实施漏洞扫描、使用 Cosign 和 Sigstore 强制执行镜像签名、配置镜像仓库访问控制,以及构建阻止部署未扫描或未签名镜像的 CI/CD 流水线,来保护容器仓库(Container Registry)中的镜像安全。
performing-threat-hunting-with-yara-rules
使用 YARA 模式匹配规则在文件系统和内存转储中狩猎恶意软件、可疑文件和入侵指标。 涵盖规则编写、yara-python 扫描以及与威胁情报源的集成。
performing-threat-hunting-with-elastic-siem
使用 KQL/EQL 查询、检测规则和 Timeline 调查在 Elastic Security SIEM 中执行主动威胁狩猎, 识别绕过自动检测的威胁。适用于 SOC 团队针对特定 ATT&CK 技术进行狩猎、调查异常行为, 或使用 Elasticsearch 和 Kibana Security 验证检测覆盖缺口。
performing-malware-persistence-investigation
系统性地调查 Windows 和 Linux 系统上的所有持久化机制,以识别恶意软件如何在重启后存活并维持访问。
hunting-living-off-the-land-binaries
检测 Windows 事件日志和 Sysmon 遥测数据中对离地攻击(Living Off The Land Binaries,LOLBAS)的滥用, 包括 certutil、wmic、mshta、regsvr32 和 rundll32 等工具。 通过将进程创建事件与 LOLBAS 项目数据库交叉比对来构建检测规则。 适用于针对无文件攻击技术的威胁狩猎或构建 SIEM 检测规则的场景。
hunting-for-webshells-in-web-servers
通过扫描高熵值文件、可疑的 PHP/JSP/ASP 模式(eval、base64_decode、system、passthru)、 Web 根目录中近期修改的文件以及异常文件大小,检测植入 Web 服务器的 Webshell(网页后门)。 使用香农熵(Shannon entropy)计算标记混淆载荷,并通过正则表达式模式匹配已知 Webshell 特征。
hunting-for-webshell-activity
通过分析 Web 目录中的文件创建行为、Web 服务器异常进程派生以及异常 HTTP 模式,狩猎面向互联网服务器上的 Webshell 部署。
hunting-for-unusual-service-installations
通过解析系统事件日志中的事件 ID 7045、分析服务二进制路径并识别持久化机制指标,检测可疑 Windows 服务安装(MITRE ATT&CK T1543.003)。
hunting-for-unusual-network-connections
通过分析出站流量模式、稀有目标地址、非标准端口和终端异常连接频率,狩猎异常网络连接。
hunting-for-supply-chain-compromise
狩猎供应链入侵指标,包括木马化软件更新、受损依赖项、未授权代码修改和被篡改的构建产物。
hunting-for-startup-folder-persistence
通过监控 Windows 启动目录中的可疑文件创建、分析 autoruns 条目以及使用 Python watchdog 进行实时文件系统监控,检测 T1547.001 启动文件夹持久化。