hunting-for-registry-run-key-persistence
它能做什么
这个工具用来搜索在你的 Windows 电脑上设置为自动启动的恶意程序。它会分析系统注册表项,找出攻击者可能添加的可疑配置。
适用场景
- ✓当你怀疑有不需要的软件在自行启动时。
- ✓调查异常的电脑活动时。
- ✓检查在启动时运行的隐藏程序。
技能链接
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/hunting-for-registry-run-key-persistence/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“查找在 Windows 注册表中自动启动的程序。”
每周 5 个新技能,1 分钟读完。
工作原理
工具会检查记录注册表变更的 Windows 事件日志(Sysmon 事件 ID 13)。它会查找已知的恶意程序模式,或从可疑位置启动的条目。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Hunting for Registry Run Key Persistence
Overview
Registry Run keys (T1547.001) are one of the most commonly used persistence mechanisms by adversaries. When a program is added to a Run key in the Windows registry, it executes automatically when a user logs in. Attackers abuse keys under HKLM\Software\Microsoft\Windows\CurrentVersion\Run, HKCU\Software\Microsoft\Windows\CurrentVersion\Run, and their RunOnce counterparts to maintain persistence. Sysmon Event ID 13 (RegistryEvent - Value Set) captures registry value modifications including the target object path, the process that made the change, and the new value. Detection involves monitoring these events for suspicious executables in temp directories, encoded PowerShell commands, LOLBin paths, and processes that do not normally create Run key entries. Chaining Event 13 with Event 1 (Process Creation) and Event 11 (FileCreate) strengthens detection by confirming payload creation and execution.
When to Use
- When investigating security incidents that require hunting for registry run key persistence
- When building detection rules or threat hunting queries for this domain
- When SOC analysts need structured procedures for this analysis type
- When validating security monitoring coverage for related attack techniques
Prerequisites
- Windows systems with Sysmon installed and configured to log Event ID 13
- Sysmon config with RegistryEvent rules for Run/RunOnce keys
- Python 3.9+ with
json,xml.etree.ElementTree,remodules - SIEM or log aggregator collecting Sysmon logs (Splunk, Elastic, Sentinel)
- Knowledge of legitimate auto-start programs for baseline comparison
Steps
- Collect Sysmon Event ID 13 logs filtered for Run/RunOnce key paths
- Parse event XML/JSON for TargetObject, Details (value written), Image (modifying process)
- Flag entries where the value points to temp directories, AppData, or ProgramData
- Detect encoded PowerShell commands or script interpreters in registry values
- Identify LOLBin abuse (mshta.exe, rundll32.exe, regsvr32.exe, wscript.exe)
- Compare against known-good baseline of legitimate auto-start entries
- Check if the modifying process (Image) is unusual (cmd.exe, powershell.exe, python.exe)
- Chain with Event ID 1 to verify if the registered binary was recently created
- Generate detection report with MITRE ATT&CK mapping and severity scores
- Produce Sigma/Splunk detection rules from findings
Expected Output
A JSON report listing suspicious Run key entries with the registry path, value written, modifying process, timestamp, MITRE technique mapping, severity rating, and recommended Sigma detection rules.
常见问题
什么是“Registry Run 键”?
这是 Windows 注册表中的特殊位置,程序可以列在其中,从而在每次电脑启动或用户登录时自动运行。
什么是 Sysmon 事件 ID 13?
这是一种 Windows 事件日志,用来监控注册表是否被修改,比如把程序添加到“Run 键”中。
什么是 LOLBins?
这些是合法的 Windows 程序(比如 mshta.exe、powershell.exe),攻击者可能滥用它们来运行代码,而无需带入新工具。
详情
作者的原始描述
Detect MITRE ATT&CK T1547.001 registry Run key persistence by analyzing Sysmon Event ID 13 logs and registry queries to identify malicious auto-start entries.
热度
- GitHub 星标
- 35k
- 排名
- #7969
- 许可证
- Apache-2.0
- 更新时间
- 2026/8/31
评论
- …
同一仓库的更多技能
abusing-dpapi-for-credential-access
35k为你的 AI 智能体提供针对特定任务的现成指令,让它完成得更好、更快。
abusing-shadow-credentials-for-privesc
35k教你的 AI 智能体写出清晰、结构良好的文本。
achieving-cmmc-level-2-compliance
35k帮助你的智能体搭建符合 CMMC Level 2 合规要求的环境。它会落实安全要求,并管理必要的文档。
acquiring-disk-image-with-dd-and-dcfldd
35k帮助你的智能体创建硬盘的精确副本。这能确保调查过程中信息不丢失、不被篡改。