Skip to content
Skillpedia
Misc35k · #6183

recovering-from-ransomware-attack

Helps your agent follow a structured plan to recover from ransomware attacks. It focuses on isolating the environment, preserving data, and securely restoring systems. It's useful for minimizing damage after an attack.

What it does

This agent helps recover systems from a ransomware attack. It follows a step-by-step plan to isolate the network, save evidence, rebuild infrastructure, and restore data from reliable backups.

When to use it

  • ✓After a ransomware attack has encrypted your systems.
  • ✓When testing a recovery plan before an actual incident.
  • ✓When needing to restore important data after an attack.

Example of what to ask your AI

“How can I use this agent to recover from a ransomware attack?”

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/recovering-from-ransomware-attack/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/recovering-from-ransomware-attack/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

The agent first isolates the network to prevent further damage. Then, it rebuilds the infrastructure using clean copies and restores your data from secure backups, following a specific order to ensure essential systems are back online first.

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 recovering-from-ransomware-attack

Or download just the file:

curl -L https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/main/skills/recovering-from-ransomware-attack/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Recovering from Ransomware Attack

When to Use

  • After ransomware has encrypted production systems and the decision has been made to recover from backups
  • When building or validating a ransomware recovery runbook before an actual incident
  • After receiving a decryption key (paid ransom or law enforcement provided) and needing to safely decrypt
  • When partial recovery is needed alongside decryption of remaining systems
  • Conducting a recovery drill to validate RTO commitments

Do not use before completing containment and forensic scoping. Premature recovery without understanding the attacker's access and persistence mechanisms risks re-infection.

Prerequisites

  • Incident declared and containment phase completed (all attacker access severed)
  • Forensic evidence preserved (disk images, memory dumps, network captures)
  • Backup integrity verified (immutable/air-gapped copies confirmed clean)
  • Clean build media available (OS installation media, golden images)
  • Recovery environment prepared (clean network segment isolated from compromised infrastructure)
  • Recovery priority list documented (Tier 1/2/3 systems in dependency order)

Workflow

Step 1: Establish Clean Recovery Environment

Build recovery infrastructure isolated from the compromised network:

# Create isolated recovery VLAN
# No connectivity to compromised network segments
# Dedicated internet access for patch downloads only (via proxy)

# Recovery network architecture:
# VLAN 999 (Recovery) - 10.99.0.0/24
#   - Recovery workstations (10.99.0.10-20)
#   - Recovered DCs (10.99.0.50-55)
#   - Recovered servers (10.99.0.100+)
#   - Proxy for internet (10.99.0.1) - patches and updates only

# Firewall rules: DENY all from recovery VLAN to production VLANs
# Allow: Recovery VLAN -> Internet (HTTPS only, via proxy)
# Allow: Recovery VLAN -> Backup infrastructure (restore traffic only)

Step 2: Recover Identity Infrastructure First

Active Directory must be recovered before any domain-joined systems:

# AD Recovery Procedure
# Step 2a: Restore AD from known-good backup
# Use DSRM (Directory Services Restore Mode) boot

# 1. Build clean Windows Server from ISO
# 2. Promote as DC using AD restore
# 3. Restore System State from immutable backup

# Verify AD backup is pre-compromise
# Check backup timestamp against earliest known compromise date
wbadmin get versions -backuptarget:E: -machine:DC01

# Restore system state in DSRM
wbadmin start systemstaterecovery -version:02/15/2026-04:00 -backuptarget:E: -machine:DC01 -quiet

# After restore, reset critical accounts
# Reset krbtgt password TWICE (invalidates all Kerberos tickets)
# This prevents Golden Ticket persistence
Import-Module ActiveDirectory
Set-ADAccountPassword -Identity krbtgt -Reset -NewPassword (ConvertTo-SecureString "NewKrbtgt2026!Complex#1" -AsPlainText -Force)
# Wait for replication (minimum 12 hours), then reset again
Set-ADAccountPassword -Identity krbtgt -Reset -NewPassword (ConvertTo-SecureString "NewKrbtgt2026!Complex#2" -AsPlainText -Force)

# Reset all privileged account passwords
$privilegedGroups = @("Domain Admins", "Enterprise Admins", "Schema Admins", "Administrators")
foreach ($group in $privilegedGroups) {
    Get-ADGroupMember -Identity $group -Recursive | ForEach-Object {
        Set-ADAccountPassword -Identity $_.SamAccountName -Reset `
            -NewPassword (ConvertTo-SecureString (New-Guid).Guid -AsPlainText -Force)
        Set-ADUser -Identity $_.SamAccountName -ChangePasswordAtLogon $true
    }
}

# Validate AD health
dcdiag /v /c /d /e /s:DC01
repadmin /showrepl

Step 3: Validate Backup Integrity Before Restoration

# Scan backup files for ransomware artifacts before restoring
# Use offline antivirus scanning on backup mount

# Mount backup as read-only
mount -o ro,noexec /dev/backup_lv /mnt/backup_verify

# Scan with ClamAV
clamscan -r --infected --log=/var/log/backup_scan.log /mnt/backup_verify

# Check for known ransomware indicators
find /mnt/backup_verify -name "*.encrypted" -o -name "*.locked" \
    -o -name "*.lockbit" -o -name "DECRYPT_*" -o -name "readme.txt" \
    -o -name "RECOVER-*" -o -name "HOW_TO_*" | tee /var/log/ransomware_check.log

# Verify database consistency (SQL Server example)
# Restore database to temporary instance for validation
RESTORE VERIFYONLY FROM DISK = '/mnt/backup_verify/databases/erp_db.bak'
    WITH CHECKSUM

Step 4: Restore Systems in Priority Order

…

FAQ

What is ransomware?

Ransomware is a type of malware that locks access to your files or systems, demanding a payment (ransom) to release them.

Why is it important to isolate the network?

Isolating the network prevents the ransomware from spreading to other systems and allows experts to work safely on recovery.

What are 'reliable backups'?

These are copies of your data that were made before the attack and have been verified to ensure they were not infected by the ransomware.

Details

Original description by the author

Executes structured ransomware incident recovery following NIST/CISA frameworks: environment isolation, forensic evidence preservation, clean infrastructure rebuild, prioritized restoration from verified backups, credential reset, and Active Directory/database recovery in dependency order. Use when recovering from a ransomware attack, performing post-encryption restoration, or executing disaster r

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularity

GitHub stars
35k
Ranking position
#6183
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