CG
SkillsHunting for Persistence Mechanisms in Windows
Start Free
Back to Skills Library
Threat Hunting🟡 Intermediate

Hunting for Persistence Mechanisms in Windows

Systematically hunt for adversary persistence mechanisms across Windows endpoints including registry, services, startup folders, and WMI subscriptions.

3 min read1 code examples2 MITRE techniques

Prerequisites

  • Sysmon deployed with Event IDs 12/13/14 (Registry), 19/20/21 (WMI), 1 (Process Creation)
  • Windows Security Event forwarding for 4697 (Service Install), 4698 (Scheduled Task)
  • EDR with registry and file monitoring capabilities
  • PowerShell script block logging enabled (Event ID 4104)
  • Autoruns or equivalent baseline of legitimate persistent entries

MITRE ATT&CK Coverage

T1547.001T1543

Hunting for Persistence Mechanisms in Windows

When to Use

  • During periodic proactive threat hunts for dormant backdoors
  • After an incident to identify all persistence mechanisms an attacker planted
  • When investigating unusual services, scheduled tasks, or startup entries
  • When threat intel reports describe new persistence techniques in the wild
  • During security posture assessments to identify unauthorized persistent software

Prerequisites

  • Sysmon deployed with Event IDs 12/13/14 (Registry), 19/20/21 (WMI), 1 (Process Creation)
  • Windows Security Event forwarding for 4697 (Service Install), 4698 (Scheduled Task)
  • EDR with registry and file monitoring capabilities
  • PowerShell script block logging enabled (Event ID 4104)
  • Autoruns or equivalent baseline of legitimate persistent entries

Workflow

  1. Enumerate Known Persistence Locations: Build a comprehensive list of Windows persistence points (Run keys, services, scheduled tasks, WMI, startup folder, DLL search order, COM hijacks, AppInit DLLs, Image File Execution Options).
  2. Collect Endpoint Data: Use EDR, Sysmon, or Velociraptor to collect current persistence artifacts from endpoints across the environment.
  3. Baseline Legitimate Persistence: Compare collected data against known-good baselines (Autoruns snapshots, GPO-deployed entries, SCCM configurations).
  4. Identify Anomalies: Flag new, unsigned, or unknown entries in persistence locations that deviate from the baseline.
  5. Investigate Suspicious Entries: For each anomaly, examine the binary it points to, its digital signature, file hash, and creation timestamp.
  6. Correlate with Process Activity: Link persistence entries to process execution, network activity, and user login events.
  7. Document and Remediate: Record findings, remove malicious persistence, and update detection rules.

Key Concepts

ConceptDescription
T1547.001Registry Run Keys / Startup Folder
T1543.003Windows Service (Create or Modify)
T1053.005Scheduled Task
T1546.003WMI Event Subscription
T1546.015Component Object Model (COM) Hijacking
T1546.012Image File Execution Options Injection
T1546.010AppInit DLLs
T1547.004Winlogon Helper DLL
T1547.005Security Support Provider
T1574.001DLL Search Order Hijacking
TA0003Persistence Tactic
AutorunsSysinternals tool showing persistent entries

Tools & Systems

ToolPurpose
Sysinternals AutorunsComprehensive persistence enumeration
VelociraptorEndpoint-wide persistence artifact collection
CrowdStrike FalconReal-time persistence monitoring
SysmonRegistry and WMI event monitoring
OSQuerySQL-based persistence queries
RECmdRegistry Explorer for forensic analysis
SplunkSIEM correlation of persistence events

Common Scenarios

  1. Registry Run Key Backdoor: Malware adds HKCU\Software\Microsoft\Windows\CurrentVersion\Run entry pointing to payload in %APPDATA%.
  2. WMI Event Subscription: Adversary creates WMI consumer/filter pair that executes PowerShell on system boot.
  3. Malicious Service: Attacker creates Windows service with sc create pointing to a backdoor binary.
  4. COM Object Hijack: Legitimate COM CLSID InprocServer32 path replaced with malicious DLL.
  5. IFEO Debugger Injection: Image File Execution Options key set with debugger pointing to implant for common utilities.

Output Format

Hunt ID: TH-PERSIST-[DATE]-[SEQ]
Persistence Type: [Registry/Service/Task/WMI/COM/Other]
MITRE Technique: T1547.xxx / T1543.xxx / T1053.xxx
Location: [Full registry key / service name / task path]
Value: [Binary path / command line]
Host(s): [Affected endpoints]
Signed: [Yes/No]
Hash: [SHA256]
Creation Time: [Timestamp]
Risk Level: [Critical/High/Medium/Low]
Verdict: [Malicious/Suspicious/Benign]

Verification Criteria

Confirm successful execution by validating:

  • [ ] All prerequisite tools and access requirements are satisfied
  • [ ] Each workflow step completed without errors
  • [ ] Output matches expected format and contains expected data
  • [ ] No security warnings or misconfigurations detected
  • [ ] Results are documented and evidence is preserved for audit

Compliance Framework Mapping

This skill supports compliance evidence collection across multiple frameworks:

  • SOC 2: CC7.2 (Anomaly Detection), CC7.3 (Incident Identification)
  • ISO 27001: A.12.4 (Logging & Monitoring), A.16.1 (Security Incident Management)
  • NIST 800-53: SI-4 (System Monitoring), IR-4 (Incident Handling), RA-5 (Vulnerability Scanning)
  • NIST CSF: DE.AE (Anomalies & Events), DE.CM (Continuous Monitoring), DE.DP (Detection Processes)

Claw GRC Tip: When this skill is executed by a registered agent, compliance evidence is automatically captured and mapped to the relevant controls in your active frameworks.

Deploying This Skill with Claw GRC

Agent Execution

Register this skill with your Claw GRC agent for automated execution:

# Install via CLI
npx claw-grc skills add hunting-for-persistence-mechanisms-in-windows

# Or load dynamically via MCP
grc.load_skill("hunting-for-persistence-mechanisms-in-windows")

Audit Trail Integration

When executed through Claw GRC, every step of this skill generates tamper-evident audit records:

  • SHA-256 chain hashing ensures no step can be modified after execution
  • Evidence artifacts (configs, scan results, logs) are automatically attached to relevant controls
  • Trust score impact — successful execution increases your agent's trust score

Continuous Compliance

Schedule this skill for recurring execution to maintain continuous compliance posture. Claw GRC monitors for drift and alerts when re-execution is needed.

Use with Claw GRC Agents

This skill is fully compatible with Claw GRC's autonomous agent system. Deploy it to any registered agent via MCP, and every execution will be logged in the tamper-evident audit trail.

// Load this skill in your agent
npx claw-grc skills add hunting-for-persistence-mechanisms-in-windows
// Or via MCP
grc.load_skill("hunting-for-persistence-mechanisms-in-windows")

Tags

threat-huntingmitre-attackpersistencewindowsregistrysiemproactive-detection

Related Skills

Threat Hunting

Hunting for Registry Persistence Mechanisms

3m·intermediate
Threat Hunting

Detecting Email Forwarding Rules Attack

3m·intermediate
Threat Hunting

Detecting Lateral Movement with Splunk

3m·intermediate
Threat Hunting

Detecting Wmi Persistence

3m·intermediate
Threat Hunting

Hunting for Living Off the Land Binaries

3m·intermediate
Threat Hunting

Hunting for Scheduled Task Persistence

3m·intermediate

Skill Details

Domain
Threat Hunting
Difficulty
intermediate
Read Time
3 min
Code Examples
1
MITRE IDs
2

On This Page

When to UsePrerequisitesWorkflowKey ConceptsTools & SystemsCommon ScenariosOutput FormatVerification CriteriaCompliance Framework MappingDeploying This Skill with Claw GRC

Deploy This Skill

Add this skill to your Claw GRC agent and start automating.

Get Started Free →