New to Claude Skills? Learn how to install them →

mukul975 on GitHub

Analyzing Malware Persistence

Free

Systematically analyze malware persistence on Windows.

Get this skill

Free · Opens the source repo

What Analyzing Malware Persistence does

The Analyzing Malware Persistence skill utilizes Sysinternals Autoruns to help cybersecurity professionals identify and analyze malware persistence mechanisms on Windows systems. By scanning over 18 categories of Auto-Start Extensibility Points (ASEPs), including registry run keys, scheduled tasks, and services, this skill provides a comprehensive view of potential malware autostart entries. It is particularly useful during incident response scenarios, allowing analysts to triage compromised endpoints effectively and ensure that all malware persistence mechanisms have been identified and addressed.

This skill automates the process of persistence scanning using Python, enabling users to extract data from Autoruns and analyze it for suspicious entries. The integration with VirusTotal allows for hash reputation checks, while the offline analysis feature supports forensic investigations by examining disk images. The workflow includes automated scanning, parsing results, and flagging suspicious entries based on criteria such as unsigned binaries and known malicious launch strings.

Designed for security operations center (SOC) analysts, incident responders, and threat hunters, this skill provides structured procedures for analyzing malware persistence. It supports the development of detection rules and threat hunting queries, ensuring that security monitoring is effective against related attack techniques. With the ability to compare against a clean baseline export, users can easily identify new persistence mechanisms introduced by malware.

Overall, this skill is an essential tool for anyone involved in cybersecurity, particularly those focused on incident response and malware analysis. Its systematic approach and automation capabilities streamline the process of identifying and mitigating malware threats on Windows systems.

When to use it

Use this skill when investigating security incidents that involve malware persistence or when validating security monitoring coverage.

When not to use it

This skill may not be suitable for environments without Windows systems or for users unfamiliar with Sysinternals tools.

What you can build with it

Incident Response Investigation

Use this skill to analyze a compromised Windows endpoint for malware persistence mechanisms during an incident response investigation.

Threat Hunting

Employ the skill to build detection rules and queries that help identify malware persistence techniques in your environment.

Forensic Analysis

Utilize the offline analysis capabilities to examine disk images for malware autostart entries without needing a live system.

How to install Analyzing Malware Persistence

View source

1. Install with the skills CLI

npx skills add mukul975/anthropic-cybersecurity-skills/analyzing-malware-persistence-with-autoruns --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by mukul975

Analyzing Malware Persistence with Autoruns

Overview

Sysinternals Autoruns extracts data from hundreds of Auto-Start Extensibility Points (ASEPs) on Windows, scanning 18+ categories including Run/RunOnce keys, services, scheduled tasks, drivers, Winlogon entries, LSA providers, print monitors, WMI subscriptions, and AppInit DLLs. Digital signature verification filters Microsoft-signed entries. The compare function identifies newly added persistence via baseline diffing. VirusTotal integration checks hash reputation. Offline analysis via -z flag enables forensic disk image examination.

When to Use

  • When investigating security incidents that require analyzing malware persistence with autoruns
  • 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

  • Sysinternals Autoruns (GUI) and Autorunsc (CLI)
  • Administrative privileges on target system
  • Python 3.9+ for automated analysis
  • VirusTotal API key for reputation checks
  • Clean baseline export for comparison

Workflow

Step 1: Automated Persistence Scanning

#!/usr/bin/env python3
"""Automate Autoruns-based persistence analysis."""
import subprocess
import csv
import json
import sys


def scan_and_analyze(autorunsc_path="autorunsc64.exe", csv_path="scan.csv"):
    cmd = [autorunsc_path, "-a", "*", "-c", "-h", "-s", "-nobanner", "*"]
    result = subprocess.run(cmd, capture_output=True, text=True, timeout=600)
    with open(csv_path, 'w') as f:
        f.write(result.stdout)
    return parse_and_flag(csv_path)


def parse_and_flag(csv_path):
    suspicious = []
    with open(csv_path, 'r', errors='replace') as f:
        for row in csv.DictReader(f):
            reasons = []
            signer = row.get("Signer", "")
            if not signer or signer == "(Not verified)":
                reasons.append("Unsigned binary")
            if not row.get("Description") and not row.get("Company"):
                reasons.append("Missing metadata")
            path = row.get("Image Path", "").lower()
            for sp in ["\temp\\", "\appdata\local\temp", "\users\public\\"]:
                if sp in path:
                    reasons.append(f"Suspicious path")
            launch = row.get("Launch String", "").lower()
            for kw in ["powershell", "cmd /c", "wscript", "mshta", "regsvr32"]:
                if kw in launch:
                    reasons.append(f"LOLBin: {kw}")
            if reasons:
                row["reasons"] = reasons
                suspicious.append(row)
    return suspicious


if __name__ == "__main__":
    if len(sys.argv) > 1:
        results = parse_and_flag(sys.argv[1])
        print(f"[!] {len(results)} suspicious entries")
        for r in results:
            print(f"  {r.get('Entry','')} - {r.get('Image Path','')}")
            for reason in r.get('reasons', []):
                print(f"    - {reason}")

Validation Criteria

  • All ASEP categories scanned and cataloged
  • Unsigned entries flagged for investigation
  • Suspicious paths and LOLBin launch strings highlighted
  • Baseline comparison identifies new persistence mechanisms

References

Frequently asked questions about Analyzing Malware Persistence

Similar skills