agentleFS
dandyedandye/ai-runbooks/skills/respond-ransomware/SKILL.md

respond-ransomware

Skill127 starsChanged 4 months agoApache-2.0View on GitHub

Respond to a ransomware incident following PICERL methodology. Use when ransomware is detected or suspected. Orchestrates identification, containment, eradication, and recovery phases. Requires CASE_ID and initial indicators.

The file

Show its rules and text

We split this skill into the rules it gives an agent

16 rules. About 0 are common, 8 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use /check-duplicates to verify this isn't already under investigation.

    line 78
  2. Distinctive:

    If file hash available:

    line 82
  3. Distinctive:

    If name/family known:

    line 87
  4. Distinctive:

    Search SIEM for activity BEFORE encryption:

    line 96
  5. Very specific:

    Use /find-relevant-case with affected entities.

    line 120
  6. Very specific:

    Use /document-in-case with identification findings.

    line 124
  7. Distinctive:

    If confirmed, trigger endpoint isolation (via EDR or network).

    line 139
  8. Distinctive:

    If confirmed, implement blocks.

    line 148
  9. Very specific:

    If compromised user identified: → Trigger /respond-compromised-account

    line 152
  10. Very specific:

    Use /document-in-case with containment status.

    line 165
  11. Very specific:

    Use /document-in-case with eradication actions.

    line 192
  12. Distinctive:

    Use decryptor if available

    line 208
  13. Distinctive:

    Verify backup integrity before restore

    line 215
  14. Very specific:

    Use /document-in-case with recovery status.

    line 225
  15. Very specific:

    Use /generate-report with comprehensive incident report.

    line 231
  16. Distinctive:

    DO check for lateral movement: before closing

    line 246

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Ransomware Incident Response Skill

Structured workflow for responding to suspected ransomware incidents using the PICERL model.

Inputs

  • CASE_ID - SOAR case ID for the incident
  • ALERT_GROUP_IDENTIFIERS - Alert group identifiers from SOAR
  • INITIAL_INDICATORS - Initial detection info:
    • Affected endpoint(s)
    • File hashes observed
    • Ransom note details (handle carefully)
    • Suspicious network connections

Required Outputs

After completing each phase, you MUST report these outputs:

Identification Phase

OutputDescription
AFFECTED_SYSTEMSSystems confirmed infected with ransomware
RANSOMWARE_VARIANTRansomware family/variant identified
ENCRYPTION_STATUSCurrent encryption state of affected systems
RANSOMWARE_IOCSFile hashes, ransom note patterns, malicious files

Containment Phase

OutputDescription
ISOLATED_SYSTEMSSystems successfully isolated from network
BLOCKED_IOCSIOCs blocked at firewall/proxy
C2_INDICATORSC2 domains/IPs discovered during containment

Eradication Phase

OutputDescription
CLEANED_SYSTEMSSystems with malware/persistence removed
REMOVED_PERSISTENCEPersistence mechanisms identified and removed

Recovery Phase

OutputDescription
RESTORED_SYSTEMSSystems restored to operational state
VALIDATION_STATUSPost-recovery validation results

PICERL Phases

Phase 1: Preparation (Ongoing)

Prerequisites - verify before proceeding:

  • Tool connectivity (SIEM, SOAR, GTI, EDR)
  • Backup availability and status
  • Communication/escalation plans

Phase 2: Identification

Step 2.1: Get Context

secops-soar.get_case_full_details(case_id=CASE_ID)

Use /check-duplicates to verify this isn't already under investigation.

Step 2.2: Identify Ransomware Strain

If file hash available:

gti-mcp.get_file_report(hash=FILE_HASH)

If name/family known:

gti-mcp.search_threats(query="LockBit ransomware", collection_type="malware-family")

Document: IDENTIFIED_STRAIN

Step 2.3: Investigate Initial Access & Lateral Movement

Search SIEM for activity BEFORE encryption:

secops-mcp.search_security_events(
    text="Suspicious logins, RDP, exploit attempts for affected endpoints",
    hours_back=168
)

Look for:

  • Suspicious logins to affected endpoints
  • Lateral movement tools (PsExec, Cobalt Strike)
  • Credential dumping activity
  • Network connections from affected endpoints

Identify: INITIAL_ACCESS_VECTOR, POTENTIAL_ADDITIONAL_SYSTEMS

Step 2.4: Initial Scope Assessment

Compile:

  • AFFECTED_ENDPOINTS - Confirmed infected systems
  • MALICIOUS_IOCs - Network IOCs (C2 domains/IPs)

Step 2.5: Check Related Cases

Use /find-relevant-case with affected entities.

Step 2.6: Document

Use /document-in-case with identification findings.


Phase 3: Containment

CRITICAL: Speed is essential. Contain first, investigate deeper later.

Step 3.1: Isolate Affected Endpoints

For each endpoint in AFFECTED_ENDPOINTS and POTENTIAL_ADDITIONAL_SYSTEMS:

Use /confirm-action:

"Isolate endpoint [HOSTNAME] from network?"

If confirmed, trigger endpoint isolation (via EDR or network).

Step 3.2: Block Network IOCs

For each IOC in MALICIOUS_IOCs:

Use /confirm-action:

"Block IOC [VALUE] at firewall/proxy?"

If confirmed, implement blocks.

Step 3.3: Contain User Accounts

If compromised user identified: → Trigger /respond-compromised-account

Step 3.4: Verify Containment

Monitor SIEM for continued activity:

secops-mcp.search_security_events(
    text="Activity from contained systems or IOCs",
    hours_back=1
)

Use /document-in-case with containment status.


Phase 4: Eradication

Step 4.1: Identify Persistence

Review GTI reports for known persistence TTPs of IDENTIFIED_STRAIN.

Common mechanisms:

  • Scheduled tasks
  • Services
  • Registry run keys
  • WMI subscriptions

Step 4.2: Remove Malware & Persistence

(Requires EDR/endpoint tools)

  • Remove ransomware executables
  • Delete persistence mechanisms
  • Note: Re-imaging often preferred over cleaning

Step 4.3: Scan Systems

Perform thorough AV/EDR scans on affected systems.

Use /document-in-case with eradication actions.


Phase 5: Recovery

Step 5.1: Check Decryptor Availability

Based on IDENTIFIED_STRAIN, check:

  • NoMoreRansom.org
  • Security vendor decryptor tools

Step 5.2: Determine Recovery Strategy

Options:

  1. Restore from clean backups (most common)
  2. Use decryptor if available
  3. Rebuild systems from scratch

Step 5.3: Execute Recovery

(Involves IT Ops/System Admins)

  • Rebuild/restore systems
  • Verify backup integrity before restore
  • Patch and harden before reconnecting
  • Restore data from clean backups

Step 5.4: Monitor & Lift Containment

  • Monitor recovered systems closely
  • Gradually remove isolation measures
  • Watch for signs of residual infection

Use /document-in-case with recovery status.


Phase 6: Lessons Learned

Use /generate-report with comprehensive incident report.

Conduct post-incident review:

  • Initial access vector analysis
  • Detection timeline review
  • Response effectiveness
  • Recovery success
  • Recommendations for prevention

Critical Warnings

  • DO NOT delay containment to perform deep analysis
  • DO NOT restore without verifying backups/cleaning
  • DO check for lateral movement before closing
  • ALWAYS confirm isolation actions with analyst

Quick Reference

PhaseKey ActionsSkills Used
IdentificationStrain ID, scope/check-duplicates, /find-relevant-case
ContainmentIsolate, block/confirm-action, /document-in-case
EradicationRemove persistenceEDR tools
RecoveryRestore systemsIT Ops coordination
Lessons LearnedReport, review/generate-report

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.