Skip to content
Skillpedia
Analysis & spreadsheets35k · #5806

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

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/hunting-for-registry-run-key-persistence/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/hunting-for-registry-run-key-persistence/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
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-persistence

Or 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.md
Technical 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, re modules
  • SIEM or log aggregator collecting Sysmon logs (Splunk, Elastic, Sentinel)
  • Knowledge of legitimate auto-start programs for baseline comparison

Steps

  1. Collect Sysmon Event ID 13 logs filtered for Run/RunOnce key paths
  2. Parse event XML/JSON for TargetObject, Details (value written), Image (modifying process)
  3. Flag entries where the value points to temp directories, AppData, or ProgramData
  4. Detect encoded PowerShell commands or script interpreters in registry values
  5. Identify LOLBin abuse (mshta.exe, rundll32.exe, regsvr32.exe, wscript.exe)
  6. Compare against known-good baseline of legitimate auto-start entries
  7. Check if the modifying process (Image) is unusual (cmd.exe, powershell.exe, python.exe)
  8. Chain with Event ID 1 to verify if the registered binary was recently created
  9. Generate detection report with MITRE ATT&CK mapping and severity scores
  10. 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.

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularity

GitHub stars
35k
Ranking position
#5806
License
Apache-2.0
Updated
8/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills