Skip to content
Skillv1.0.0

hunting-for-registry-run-key-persistence

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.

by mukul975(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from mukul975/anthropic-cybersecurity-skills (skills/hunting-for-registry-run-key-persistence/SKILL.md). Install upstream with npx skills add mukul975/anthropic-cybersecurity-skills --skill hunting-for-registry-run-key-persistence. Copyright stays with the author (Apache-2.0).

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.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/mukul975-anthropic-cybersecurity-skills-hunting-for-regi-f84f0a/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

mukul975-anthropic-cybersecurity-skills-hunting-for-regi-f84f0a.ocm.jsonjson
{
  "ocm": "1",
  "id": "mukul975-anthropic-cybersecurity-skills-hunting-for-regi-f84f0a",
  "kind": "skill",
  "name": "hunting-for-registry-run-key-persistence",
  "description": "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.",
  "publisher": "mukul975",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "persistence",
      "registry-run-keys",
      "t1547-001",
      "sysmon",
      "threat-hunting",
      "windows-forensics",
      "mitre-attack",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "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."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/mukul975/anthropic-cybersecurity-skills",
      "path": "skills/hunting-for-registry-run-key-persistence/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/mukul975/anthropic-cybersecurity-skills/blob/HEAD/skills/hunting-for-registry-run-key-persistence/SKILL.md",
      "key": "mukul975/anthropic-cybersecurity-skills/skills/hunting-for-registry-run-key-persistence/SKILL.md"
    },
    "license": "Apache-2.0"
  },
  "instructions": "# Hunting for Registry Run Key Persistence\n\n## Overview\n\nRegistry 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",
  "cost": {
    "context_tokens": 669
  }
}

Fetch it by URL: GET /api/v1/registry/mukul975-anthropic-cybersecurity-skills-hunting-for-regi-f84f0a/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.