hunting-for-registry-run-key-persistence
Lets your agent identify programs that start with Windows using registry keys. It helps find and remove software that activates itself.
What it does
This tool searches for malicious programs that are set to start automatically on your Windows computer. It analyzes system registry entries to find suspicious configurations that might have been added by attackers.
When to use it
- ✓When you suspect unwanted software is starting on its own.
- ✓When investigating unusual computer activity.
- ✓To check for hidden programs that launch at startup.
Example of what to ask your AI
“Look for programs that auto-start in the Windows registry.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
The tool examines Windows event logs (Sysmon Event ID 13) that record registry changes. It looks for known patterns of malicious programs or entries starting from suspicious locations.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill hunting-for-registry-run-key-persistenceOr download just the file:
curl -L https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/main/skills/hunting-for-registry-run-key-persistence/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from 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.
FAQ
What are 'Registry Run keys'?
These are special locations in the Windows registry where programs can be listed to automatically start every time the computer boots or a user logs in.
What is Sysmon Event ID 13?
It's a type of Windows event log that monitors when something in the registry is modified, such as adding a program to the 'Run keys'.
What are 'LOLBins'?
These are legitimate Windows programs (like mshta.exe, powershell.exe) that attackers might misuse to run code without bringing in new tools.
Details
Original description by the author
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.
Popularity
- GitHub stars
- 35k
- Ranking position
- #5806
- License
- Apache-2.0
- Updated
- 8/31/2026
Comments
- …
More skills from this repository
abusing-dpapi-for-credential-access
Gives your AI agent ready-made instructions for a specific task, so it does it better and faster.
mukul975/Anthropic-Cybersecurity-Skills
abusing-shadow-credentials-for-privesc
Teaches your AI agent to write clear, well-structured text.
mukul975/Anthropic-Cybersecurity-Skills
achieving-cmmc-level-2-compliance
Helps your agent prepare an environment for CMMC Level 2 compliance. It implements security requirements and manages necessary documentation.
mukul975/Anthropic-Cybersecurity-Skills
acquiring-disk-image-with-dd-and-dcfldd
Helps your agent create exact copies of hard drives. This is useful for ensuring no information is lost or altered during investigations.
mukul975/Anthropic-Cybersecurity-Skills
Similar skills
data-throughput-accelerator
Makes your agent speed up the movement of large data volumes. It finds bottlenecks and ensures data is transferred quickly and correctly.
affaan-m/ECC
inventory-demand-planning
Helps your agent predict product demand in stores. It optimizes stock and plans when to run promotions to sell more.
affaan-m/ECC
market-research
Helps your agent conduct market research and competitive analysis. Provides summaries with source attribution.
affaan-m/ECC