[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EW8WFT2DG085GFTB8EEYQC":3,"skill-same:01M6EW8WFT2DG085GFTB8EEYQC":119},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":68,"commitSha":69,"skillDirectory":70,"forksCount":14,"repositoryHtmlUrl":71,"repositoryHomepageUrl":72,"ownerHtmlUrl":73,"ownerBlogUrl":6,"ownerDescription":74,"updatedAt":75,"install":76,"resources":89},"01M6EW8WFT2DG085GFTB8EEYQC","recovering-from-ransomware-attack",null,"Executes structured recovery from a ransomware incident following NIST and CISA frameworks, including environment isolation, forensic evidence preservation, clean infrastructure rebuild, prioritized system restoration from verified backups, credential reset, and validation against re-infection. Covers Active Directory recovery, database restoration, and application stack rebuild in dependency order. Activates for requests involving ransomware recovery, post-encryption restoration, or disaster recovery from ransomware.","henriquescastilho\u002Fmy-claude","henriquescastilho","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F153296945?v=4","01M6ESH7EXPXTH9CVQ4K16SRG8","Henrique Scheer","01M6ESH7JHEK2PTNNH4HEH787Z",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frecovering-from-ransomware-attack\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"ransomware","recovering from ransomware attack","isolation","directory","reset","infection","active","incident","clean","rebuild","dependency","stack","t1078","t1003","defense","NIST","CISA","encryption","database","cybersecurity","2026-11-10 10:12:30",false,"---\nname: recovering-from-ransomware-attack\ndescription: 'Executes structured recovery from a ransomware incident following NIST\n  and CISA frameworks, including environment isolation, forensic evidence preservation,\n  clean infrastructure rebuild, prioritized system restoration from verified backups,\n  credential reset, and validation against re-infection. Covers Active Directory recovery,\n  database restoration, and application stack rebuild in dependency order. Activates\n  for requests involving ransomware recovery, post-encryption restoration, or disaster\n  recovery from ransomware.\n\n  '\ndomain: cybersecurity\nsubdomain: ransomware-defense\ntags:\n- ransomware\n- recovery\n- incident-response\n- backup\n- defense\nversion: 1.0.0\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- PR.DS-11\n- RS.MA-01\n- RC.RP-01\n- PR.IR-01\nmitre_attack:\n- T1078\n- T1190\n- T1059\n- T1003\n- T1110\n---\n# Recovering from Ransomware Attack\n\n## When to Use\n\n- After ransomware has encrypted production systems and the decision has been made to recover from backups\n- When building or validating a ransomware recovery runbook before an actual incident\n- After receiving a decryption key (paid ransom or law enforcement provided) and needing to safely decrypt\n- When partial recovery is needed alongside decryption of remaining systems\n- Conducting a recovery drill to validate RTO commitments\n\n**Do not use** before completing containment and forensic scoping. Premature recovery without understanding the attacker's access and persistence mechanisms risks re-infection.\n\n## Prerequisites\n\n- Incident declared and containment phase completed (all attacker access severed)\n- Forensic evidence preserved (disk images, memory dumps, network captures)\n- Backup integrity verified (immutable\u002Fair-gapped copies confirmed clean)\n- Clean build media available (OS installation media, golden images)\n- Recovery environment prepared (clean network segment isolated from compromised infrastructure)\n- Recovery priority list documented (Tier 1\u002F2\u002F3 systems in dependency order)\n\n## Workflow\n\n### Step 1: Establish Clean Recovery Environment\n\nBuild recovery infrastructure isolated from the compromised network:\n\n```bash\n# Create isolated recovery VLAN\n# No connectivity to compromised network segments\n# Dedicated internet access for patch downloads only (via proxy)\n\n# Recovery network architecture:\n# VLAN 999 (Recovery) - 10.99.0.0\u002F24\n#   - Recovery workstations (10.99.0.10-20)\n#   - Recovered DCs (10.99.0.50-55)\n#   - Recovered servers (10.99.0.100+)\n#   - Proxy for internet (10.99.0.1) - patches and updates only\n\n# Firewall rules: DENY all from recovery VLAN to production VLANs\n# Allow: Recovery VLAN -> Internet (HTTPS only, via proxy)\n# Allow: Recovery VLAN -> Backup infrastructure (restore traffic only)\n```\n\n### Step 2: Recover Identity Infrastructure First\n\nActive Directory must be recovered before any domain-joined systems:\n\n```powershell\n# AD Recovery Procedure\n# Step 2a: Restore AD from known-good backup\n# Use DSRM (Directory Services Restore Mode) boot\n\n# 1. Build clean Windows Server from ISO\n# 2. Promote as DC using AD restore\n# 3. Restore System State from immutable backup\n\n# Verify AD backup is pre-compromise\n# Check backup timestamp against earliest known compromise date\nwbadmin get versions -backuptarget:E: -machine:DC01\n\n# Restore system state in DSRM\nwbadmin start systemstaterecovery -version:02\u002F15\u002F2026-04:00 -backuptarget:E: -machine:DC01 -quiet\n\n# After restore, reset critical accounts\n# Reset krbtgt password TWICE (invalidates all Kerberos tickets)\n# This prevents Golden Ticket persistence\nImport-Module ActiveDirectory\nSet-ADAccountPassword -Identity krbtgt -Reset -NewPassword (ConvertTo-SecureString \"NewKrbtgt2026!Complex#1\" -AsPlainText -Force)\n# Wait for replication (minimum 12 hours), then reset again\nSet-ADAccountPassword -Identity krbtgt -Reset -NewPassword (ConvertTo-SecureString \"NewKrbtgt2026!Complex#2\" -AsPlainText -Force)\n\n# Reset all privileged account passwords\n$privilegedGroups = @(\"Domain Admins\", \"Enterprise Admins\", \"Schema Admins\", \"Administrators\")\nforeach ($group in $privilegedGroups) {\n    Get-ADGroupMember -Identity $group -Recursive | ForEach-Object {\n        Set-ADAccountPassword -Identity $_.SamAccountName -Reset `\n            -NewPassword (ConvertTo-SecureString (New-Guid).Guid -AsPlainText -Force)\n        Set-ADUser -Identity $_.SamAccountName -ChangePasswordAtLogon $true\n    }\n}\n\n# Validate AD health\ndcdiag \u002Fv \u002Fc \u002Fd \u002Fe \u002Fs:DC01\nrepadmin \u002Fshowrepl\n```\n\n### Step 3: Validate Backup Integrity Before Restoration\n\n```bash\n# Scan backup files for ransomware artifacts before restoring\n# Use offline antivirus scanning on backup mount\n\n# Mount backup as read-only\nmount -o ro,noexec \u002Fdev\u002Fbackup_lv \u002Fmnt\u002Fbackup_verify\n\n# Scan with ClamAV\nclamscan -r --infected --log=\u002Fvar\u002Flog\u002Fbackup_scan.log \u002Fmnt\u002Fbackup_verify\n\n# Check for known ransomware indicators\nfind \u002Fmnt\u002Fbackup_verify -name \"*.encrypted\" -o -name \"*.locked\" \\\n    -o -name \"*.lockbit\" -o -name \"DECRYPT_*\" -o -name \"readme.txt\" \\\n    -o -name \"RECOVER-*\" -o -name \"HOW_TO_*\" | tee \u002Fvar\u002Flog\u002Fransomware_check.log\n\n# Verify database consistency (SQL Server example)\n# Restore database to temporary instance for validation\nRESTORE VERIFYONLY FROM DISK = '\u002Fmnt\u002Fbackup_verify\u002Fdatabases\u002Ferp_db.bak'\n    WITH CHECKSUM\n```\n\n### Step 4: Restore Systems in Priority Order\n\nFollow dependency-based recovery sequence:\n\n```\nRecovery Order:\nPhase 1 (Hours 0-4): Identity & Infrastructure\n  1. Domain Controllers (AD, DNS, DHCP)\n  2. Certificate Authority (if applicable)\n  3. Core network services (DHCP, NTP)\n\nPhase 2 (Hours 4-12): Critical Business Systems\n  4. Database servers (SQL, Oracle, PostgreSQL)\n  5. Core business applications (ERP, CRM)\n  6. Email (Exchange, M365 hybrid)\n\nPhase 3 (Hours 12-24): Important Systems\n  7. File servers\n  8. Web applications\n  9. Monitoring and security tools (SIEM, EDR)\n\nPhase 4 (Hours 24-48): Remaining Systems\n  10. Development environments\n  11. Archive systems\n  12. Non-critical applications\n```\n\n```powershell\n# Veeam Instant Recovery - fastest restore for VMware\u002FHyper-V\n# Boots VM directly from backup file, then migrates to production storage\n\n# Instant recovery for Tier 1 system\nStart-VBRInstantRecovery -RestorePoint (Get-VBRRestorePoint -Name \"DC01\" |\n    Sort-Object CreationTime -Descending | Select-Object -First 1) `\n    -VMName \"DC01-Recovered\" `\n    -Server (Get-VBRServer -Name \"esxi01.recovery.local\") `\n    -Datastore \"recovery-datastore\"\n\n# After validation, migrate to production storage\nStart-VBRQuickMigration -VM \"DC01-Recovered\" `\n    -Server (Get-VBRServer -Name \"esxi01.prod.local\") `\n    -Datastore \"production-datastore\"\n```\n\n### Step 5: Validate Recovered Systems and Harden\n\nBefore connecting recovered systems to production:\n\n```powershell\n# Check for persistence mechanisms\n# Scheduled Tasks\nGet-ScheduledTask | Where-Object {$_.State -ne \"Disabled\"} |\n    Select-Object TaskName, TaskPath, State, Author |\n    Export-Csv C:\\recovery\\scheduled_tasks.csv\n\n# Services\nGet-Service | Where-Object {$_.StartType -eq \"Automatic\"} |\n    Select-Object Name, DisplayName, StartType, Status |\n    Export-Csv C:\\recovery\\auto_services.csv\n\n# Startup items\nGet-CimInstance Win32_StartupCommand |\n    Select-Object Name, Command, Location, User |\n    Export-Csv C:\\recovery\\startup_items.csv\n\n# WMI event subscriptions (common persistence)\nGet-WmiObject -Namespace root\\subscription -Class __EventFilter\nGet-WmiObject -Namespace root\\subscription -Class __EventConsumer\n\n# Registry run keys\nGet-ItemProperty \"HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\"\nGet-ItemProperty \"HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce\"\nGet-ItemProperty \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\"\n\n# Verify no unauthorized admin accounts\nGet-LocalGroupMember -Group \"Administrators\"\nGet-ADGroupMember -Identity \"Domain Admins\"\n\n# Apply latest patches before connecting to production\nInstall-WindowsUpdate -AcceptAll -AutoReboot\n```\n\n### Step 6: Phased Network Reconnection\n\n```\nPhase 1: Reconnect identity infrastructure\n  - DCs online in production VLAN\n  - Validate replication and authentication\n  - Monitor for suspicious authentication patterns\n\nPhase 2: Reconnect Tier 1 systems\n  - One system at a time\n  - Monitor EDR for 1 hour before proceeding to next\n  - Validate application functionality\n\nPhase 3: Reconnect remaining systems\n  - Groups of 5-10 systems\n  - Continue monitoring for re-infection indicators\n\nThroughout: SOC monitoring on high alert\n  - EDR in aggressive blocking mode\n  - All previous IOCs loaded in detection rules\n  - Canary files deployed on recovered systems\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **DSRM** | Directory Services Restore Mode: special boot mode for domain controllers that allows AD database restoration |\n| **krbtgt Reset** | Resetting the krbtgt account password twice invalidates all Kerberos tickets, defeating Golden Ticket persistence |\n| **Instant Recovery** | Backup technology that boots a VM directly from backup storage for immediate availability while migrating data in background |\n| **Evidence Preservation** | Maintaining forensic images and logs before recovery begins, required for law enforcement and insurance claims |\n| **Clean Build** | Rebuilding systems from trusted installation media rather than attempting to clean infected systems |\n| **Dependency Chain** | The order in which systems must be recovered based on service dependencies (e.g., AD before domain members) |\n\n## Tools & Systems\n\n- **Veeam Instant Recovery**: Boots VMs directly from backup with near-zero RTO, then live-migrates to production\n- **Microsoft DSRM**: AD-specific recovery mode for restoring domain controllers from backup\n- **DSInternals PowerShell Module**: Validates AD database integrity and identifies compromised credentials post-recovery\n- **Rubrik Instant Recovery**: Mounts backup as live VM in seconds for rapid recovery validation\n- **ClamAV**: Open-source antivirus for scanning backup files before restoration\n\n## Common Scenarios\n\n### Scenario: Manufacturing Company Full Recovery After LockBit Attack\n\n**Context**: A manufacturer with 300 servers has 80% of infrastructure encrypted by LockBit. Immutable backups from 48 hours ago are verified clean. Production lines are down, costing $500K\u002Fday.\n\n**Approach**:\n1. Establish recovery VLAN (10.99.0.0\u002F24) isolated from compromised network\n2. Restore 2 domain controllers from immutable backup using Veeam Instant Recovery (2 hours)\n3. Reset krbtgt password twice with 12-hour gap, reset all admin passwords\n4. Validate AD with dcdiag, scan for Golden Ticket indicators with DSInternals\n5. Restore ERP database (SAP) and verify data consistency (4 hours)\n6. Restore MES (Manufacturing Execution System) and SCADA historians (3 hours)\n7. Bring production line controllers online in isolated OT network first\n8. Phased reconnection over 48 hours with continuous EDR monitoring\n9. Total recovery: 72 hours (within 96-hour RTO commitment)\n\n**Pitfalls**:\n- Rushing to reconnect systems without validating absence of persistence mechanisms, causing re-infection\n- Restoring from the most recent backup without verifying it predates the compromise (attacker may have poisoned recent backups)\n- Not resetting the krbtgt password twice, allowing attackers to maintain Golden Ticket access\n- Restoring systems in the wrong order (application servers before their database dependencies)\n\n## Output Format\n\n```\n## Ransomware Recovery Status Report\n\n**Incident ID**: [ID]\n**Recovery Start**: [Timestamp]\n**Current Phase**: [1-4]\n**Estimated Completion**: [Timestamp]\n\n### Recovery Progress\n| Phase | Systems | Status | Started | Completed | RTO Target |\n|-------|---------|--------|---------|-----------|------------|\n| 1 - Identity | DC01, DC02, DNS | Complete | HH:MM | HH:MM | 4 hours |\n| 2 - Critical | ERP, DB01, DB02 | In Progress | HH:MM | -- | 12 hours |\n| 3 - Important | FS01, Email, Web | Pending | -- | -- | 24 hours |\n| 4 - Remaining | Dev, Archive | Pending | -- | -- | 48 hours |\n\n### Validation Checklist\n- [ ] AD integrity verified (dcdiag, repadmin)\n- [ ] krbtgt password reset (2x with interval)\n- [ ] All admin passwords reset\n- [ ] Persistence mechanisms scanned\n- [ ] EDR deployed and active on recovered systems\n- [ ] IOCs loaded in detection rules\n- [ ] Canary files deployed\n```\n","# Recovering from Ransomware Attack\n\n## When to Use\n\n- After ransomware has encrypted production systems and the decision has been made to recover from backups\n- When building or validating a ransomware recovery runbook before an actual incident\n- After receiving a decryption key (paid ransom or law enforcement provided) and needing to safely decrypt\n- When partial recovery is needed alongside decryption of remaining systems\n- Conducting a recovery drill to validate RTO commitments\n\n**Do not use** before completing containment and forensic scoping. Premature recovery without understanding the attacker's access and persistence mechanisms risks re-infection.\n\n## Prerequisites\n\n- Incident declared and containment phase completed (all attacker access severed)\n- Forensic evidence preserved (disk images, memory dumps, network captures)\n- Backup integrity verified (immutable\u002Fair-gapped copies confirmed clean)\n- Clean build media available (OS installation media, golden images)\n- Recovery environment prepared (clean network segment isolated from compromised infrastructure)\n- Recovery priority list documented (Tier 1\u002F2\u002F3 systems in dependency order)\n\n## Workflow\n\n### Step 1: Establish Clean Recovery Environment\n\nBuild recovery infrastructure isolated from the compromised network:\n\n```bash\n# Create isolated recovery VLAN\n# No connectivity to compromised network segments\n# Dedicated internet access for patch downloads only (via proxy)\n\n# Recovery network architecture:\n# VLAN 999 (Recovery) - 10.99.0.0\u002F24\n#   - Recovery workstations (10.99.0.10-20)\n#   - Recovered DCs (10.99.0.50-55)\n#   - Recovered servers (10.99.0.100+)\n#   - Proxy for internet (10.99.0.1) - patches and updates only\n\n# Firewall rules: DENY all from recovery VLAN to production VLANs\n# Allow: Recovery VLAN -> Internet (HTTPS only, via proxy)\n# Allow: Recovery VLAN -> Backup infrastructure (restore traffic only)\n```\n\n### Step 2: Recover Identity Infrastructure First\n\nActive Directory must be recovered before any domain-joined systems:\n\n```powershell\n# AD Recovery Procedure\n# Step 2a: Restore AD from known-good backup\n# Use DSRM (Directory Services Restore Mode) boot\n\n# 1. Build clean Windows Server from ISO\n# 2. Promote as DC using AD restore\n# 3. Restore System State from immutable backup\n\n# Verify AD backup is pre-compromise\n# Check backup timestamp against earliest known compromise date\nwbadmin get versions -backuptarget:E: -machine:DC01\n\n# Restore system state in DSRM\nwbadmin start systemstaterecovery -version:02\u002F15\u002F2026-04:00 -backuptarget:E: -machine:DC01 -quiet\n\n# After restore, reset critical accounts\n# Reset krbtgt password TWICE (invalidates all Kerberos tickets)\n# This prevents Golden Ticket persistence\nImport-Module ActiveDirectory\nSet-ADAccountPassword -Identity krbtgt -Reset -NewPassword (ConvertTo-SecureString \"NewKrbtgt2026!Complex#1\" -AsPlainText -Force)\n# Wait for replication (minimum 12 hours), then reset again\nSet-ADAccountPassword -Identity krbtgt -Reset -NewPassword (ConvertTo-SecureString \"NewKrbtgt2026!Complex#2\" -AsPlainText -Force)\n\n# Reset all privileged account passwords\n$privilegedGroups = @(\"Domain Admins\", \"Enterprise Admins\", \"Schema Admins\", \"Administrators\")\nforeach ($group in $privilegedGroups) {\n    Get-ADGroupMember -Identity $group -Recursive | ForEach-Object {\n        Set-ADAccountPassword -Identity $_.SamAccountName -Reset `\n            -NewPassword (ConvertTo-SecureString (New-Guid).Guid -AsPlainText -Force)\n        Set-ADUser -Identity $_.SamAccountName -ChangePasswordAtLogon $true\n    }\n}\n\n# Validate AD health\ndcdiag \u002Fv \u002Fc \u002Fd \u002Fe \u002Fs:DC01\nrepadmin \u002Fshowrepl\n```\n\n### Step 3: Validate Backup Integrity Before Restoration\n\n```bash\n# Scan backup files for ransomware artifacts before restoring\n# Use offline antivirus scanning on backup mount\n\n# Mount backup as read-only\nmount -o ro,noexec \u002Fdev\u002Fbackup_lv \u002Fmnt\u002Fbackup_verify\n\n# Scan with ClamAV\nclamscan -r --infected --log=\u002Fvar\u002Flog\u002Fbackup_scan.log \u002Fmnt\u002Fbackup_verify\n\n# Check for known ransomware indicators\nfind \u002Fmnt\u002Fbackup_verify -name \"*.encrypted\" -o -name \"*.locked\" \\\n    -o -name \"*.lockbit\" -o -name \"DECRYPT_*\" -o -name \"readme.txt\" \\\n    -o -name \"RECOVER-*\" -o -name \"HOW_TO_*\" | tee \u002Fvar\u002Flog\u002Fransomware_check.log\n\n# Verify database consistency (SQL Server example)\n# Restore database to temporary instance for validation\nRESTORE VERIFYONLY FROM DISK = '\u002Fmnt\u002Fbackup_verify\u002Fdatabases\u002Ferp_db.bak'\n    WITH CHECKSUM\n```\n\n### Step 4: Restore Systems in Priority Order\n\nFollow dependency-based recovery sequence:\n\n```\nRecovery Order:\nPhase 1 (Hours 0-4): Identity & Infrastructure\n  1. Domain Controllers (AD, DNS, DHCP)\n  2. Certificate Authority (if applicable)\n  3. Core network services (DHCP, NTP)\n\nPhase 2 (Hours 4-12): Critical Business Systems\n  4. Database servers (SQL, Oracle, PostgreSQL)\n  5. Core business applications (ERP, CRM)\n  6. Email (Exchange, M365 hybrid)\n\nPhase 3 (Hours 12-24): Important Systems\n  7. File servers\n  8. Web applications\n  9. Monitoring and security tools (SIEM, EDR)\n\nPhase 4 (Hours 24-48): Remaining Systems\n  10. Development environments\n  11. Archive systems\n  12. Non-critical applications\n```\n\n```powershell\n# Veeam Instant Recovery - fastest restore for VMware\u002FHyper-V\n# Boots VM directly from backup file, then migrates to production storage\n\n# Instant recovery for Tier 1 system\nStart-VBRInstantRecovery -RestorePoint (Get-VBRRestorePoint -Name \"DC01\" |\n    Sort-Object CreationTime -Descending | Select-Object -First 1) `\n    -VMName \"DC01-Recovered\" `\n    -Server (Get-VBRServer -Name \"esxi01.recovery.local\") `\n    -Datastore \"recovery-datastore\"\n\n# After validation, migrate to production storage\nStart-VBRQuickMigration -VM \"DC01-Recovered\" `\n    -Server (Get-VBRServer -Name \"esxi01.prod.local\") `\n    -Datastore \"production-datastore\"\n```\n\n### Step 5: Validate Recovered Systems and Harden\n\nBefore connecting recovered systems to production:\n\n```powershell\n# Check for persistence mechanisms\n# Scheduled Tasks\nGet-ScheduledTask | Where-Object {$_.State -ne \"Disabled\"} |\n    Select-Object TaskName, TaskPath, State, Author |\n    Export-Csv C:\\recovery\\scheduled_tasks.csv\n\n# Services\nGet-Service | Where-Object {$_.StartType -eq \"Automatic\"} |\n    Select-Object Name, DisplayName, StartType, Status |\n    Export-Csv C:\\recovery\\auto_services.csv\n\n# Startup items\nGet-CimInstance Win32_StartupCommand |\n    Select-Object Name, Command, Location, User |\n    Export-Csv C:\\recovery\\startup_items.csv\n\n# WMI event subscriptions (common persistence)\nGet-WmiObject -Namespace root\\subscription -Class __EventFilter\nGet-WmiObject -Namespace root\\subscription -Class __EventConsumer\n\n# Registry run keys\nGet-ItemProperty \"HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\"\nGet-ItemProperty \"HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce\"\nGet-ItemProperty \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\"\n\n# Verify no unauthorized admin accounts\nGet-LocalGroupMember -Group \"Administrators\"\nGet-ADGroupMember -Identity \"Domain Admins\"\n\n# Apply latest patches before connecting to production\nInstall-WindowsUpdate -AcceptAll -AutoReboot\n```\n\n### Step 6: Phased Network Reconnection\n\n```\nPhase 1: Reconnect identity infrastructure\n  - DCs online in production VLAN\n  - Validate replication and authentication\n  - Monitor for suspicious authentication patterns\n\nPhase 2: Reconnect Tier 1 systems\n  - One system at a time\n  - Monitor EDR for 1 hour before proceeding to next\n  - Validate application functionality\n\nPhase 3: Reconnect remaining systems\n  - Groups of 5-10 systems\n  - Continue monitoring for re-infection indicators\n\nThroughout: SOC monitoring on high alert\n  - EDR in aggressive blocking mode\n  - All previous IOCs loaded in detection rules\n  - Canary files deployed on recovered systems\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **DSRM** | Directory Services Restore Mode: special boot mode for domain controllers that allows AD database restoration |\n| **krbtgt Reset** | Resetting the krbtgt account password twice invalidates all Kerberos tickets, defeating Golden Ticket persistence |\n| **Instant Recovery** | Backup technology that boots a VM directly from backup storage for immediate availability while migrating data in background |\n| **Evidence Preservation** | Maintaining forensic images and logs before recovery begins, required for law enforcement and insurance claims |\n| **Clean Build** | Rebuilding systems from trusted installation media rather than attempting to clean infected systems |\n| **Dependency Chain** | The order in which systems must be recovered based on service dependencies (e.g., AD before domain members) |\n\n## Tools & Systems\n\n- **Veeam Instant Recovery**: Boots VMs directly from backup with near-zero RTO, then live-migrates to production\n- **Microsoft DSRM**: AD-specific recovery mode for restoring domain controllers from backup\n- **DSInternals PowerShell Module**: Validates AD database integrity and identifies compromised credentials post-recovery\n- **Rubrik Instant Recovery**: Mounts backup as live VM in seconds for rapid recovery validation\n- **ClamAV**: Open-source antivirus for scanning backup files before restoration\n\n## Common Scenarios\n\n### Scenario: Manufacturing Company Full Recovery After LockBit Attack\n\n**Context**: A manufacturer with 300 servers has 80% of infrastructure encrypted by LockBit. Immutable backups from 48 hours ago are verified clean. Production lines are down, costing $500K\u002Fday.\n\n**Approach**:\n1. Establish recovery VLAN (10.99.0.0\u002F24) isolated from compromised network\n2. Restore 2 domain controllers from immutable backup using Veeam Instant Recovery (2 hours)\n3. Reset krbtgt password twice with 12-hour gap, reset all admin passwords\n4. Validate AD with dcdiag, scan for Golden Ticket indicators with DSInternals\n5. Restore ERP database (SAP) and verify data consistency (4 hours)\n6. Restore MES (Manufacturing Execution System) and SCADA historians (3 hours)\n7. Bring production line controllers online in isolated OT network first\n8. Phased reconnection over 48 hours with continuous EDR monitoring\n9. Total recovery: 72 hours (within 96-hour RTO commitment)\n\n**Pitfalls**:\n- Rushing to reconnect systems without validating absence of persistence mechanisms, causing re-infection\n- Restoring from the most recent backup without verifying it predates the compromise (attacker may have poisoned recent backups)\n- Not resetting the krbtgt password twice, allowing attackers to maintain Golden Ticket access\n- Restoring systems in the wrong order (application servers before their database dependencies)\n\n## Output Format\n\n```\n## Ransomware Recovery Status Report\n\n**Incident ID**: [ID]\n**Recovery Start**: [Timestamp]\n**Current Phase**: [1-4]\n**Estimated Completion**: [Timestamp]\n\n### Recovery Progress\n| Phase | Systems | Status | Started | Completed | RTO Target |\n|-------|---------|--------|---------|-----------|------------|\n| 1 - Identity | DC01, DC02, DNS | Complete | HH:MM | HH:MM | 4 hours |\n| 2 - Critical | ERP, DB01, DB02 | In Progress | HH:MM | -- | 12 hours |\n| 3 - Important | FS01, Email, Web | Pending | -- | -- | 24 hours |\n| 4 - Remaining | Dev, Archive | Pending | -- | -- | 48 hours |\n\n### Validation Checklist\n- [ ] AD integrity verified (dcdiag, repadmin)\n- [ ] krbtgt password reset (2x with interval)\n- [ ] All admin passwords reset\n- [ ] Persistence mechanisms scanned\n- [ ] EDR deployed and active on recovered systems\n- [ ] IOCs loaded in detection rules\n- [ ] Canary files deployed\n```\n",{"name":5,"tags":49,"author":53,"domain":43,"license":15,"version":54,"nist_csf":55,"subdomain":60,"description":61,"mitre_attack":62},[24,50,51,52,38],"recovery","incident-response","backup","mahipal","1.0.0",[56,57,58,59],"PR.DS-11","RS.MA-01","RC.RP-01","PR.IR-01","ransomware-defense","Executes structured recovery from a ransomware incident following NIST and CISA frameworks, including environment isolation, forensic evidence preservation, clean infrastructure rebuild, prioritized system restoration from verified backups, credential reset, and validation against re-infection. Covers Active Directory recovery, database restoration, and application stack rebuild in dependency order. Activates for requests involving ransomware recovery, post-encryption restoration, or disaster recovery from ransomware.\n",[63,64,65,66,67],"T1078","T1190","T1059","T1003","T1110","main","7925716f065257435fdb12e97f7e52842147d5ad",".claude\u002Fskills\u002Frecovering-from-ransomware-attack","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude","https:\u002F\u002Fclaude.com\u002Fclaude-code","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho","Software · Applied AI · Quantitative Modeling · Building with Claude.","2026-06-10 12:24:46",{"source":8,"skillName":5,"commands":77,"prompt":87,"zipAvailable":88},[78,81,84],{"tool":79,"command":80},"npx","npx skills add henriquescastilho\u002Fmy-claude --skill recovering-from-ransomware-attack",{"tool":82,"command":83},"bunx","bunx skills add henriquescastilho\u002Fmy-claude --skill recovering-from-ransomware-attack",{"tool":85,"command":86},"pnpm","pnpm dlx skills add henriquescastilho\u002Fmy-claude --skill recovering-from-ransomware-attack","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frecovering-from-ransomware-attack\u002FSKILL.md",true,[90,95,101,105,109,115],{"path":91,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":93,"sourceHtmlUrl":94},"LICENSE","许可证",11255,"https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frecovering-from-ransomware-attack\u002FLICENSE",{"path":96,"resourceType":97,"resourceTypeDesc":98,"sizeBytes":99,"sourceHtmlUrl":100},"references\u002Fapi-reference.md","REFERENCE","参考文档",1726,"https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frecovering-from-ransomware-attack\u002Freferences\u002Fapi-reference.md",{"path":102,"resourceType":97,"resourceTypeDesc":98,"sizeBytes":103,"sourceHtmlUrl":104},"references\u002Fstandards.md",1069,"https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frecovering-from-ransomware-attack\u002Freferences\u002Fstandards.md",{"path":106,"resourceType":97,"resourceTypeDesc":98,"sizeBytes":107,"sourceHtmlUrl":108},"references\u002Fworkflows.md",1403,"https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frecovering-from-ransomware-attack\u002Freferences\u002Fworkflows.md",{"path":110,"resourceType":111,"resourceTypeDesc":112,"sizeBytes":113,"sourceHtmlUrl":114},"scripts\u002Fagent.py","SCRIPT","脚本",6735,"https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frecovering-from-ransomware-attack\u002Fscripts\u002Fagent.py",{"path":116,"resourceType":111,"resourceTypeDesc":112,"sizeBytes":117,"sourceHtmlUrl":118},"scripts\u002Fprocess.py",11115,"https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frecovering-from-ransomware-attack\u002Fscripts\u002Fprocess.py",[120,161,170,179,201,227],{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":124,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":141,"publishedAt":44},"01M6F0B6XPQ65AX2X0DWK8KT3E","markitdown","Convert files and office documents to Markdown. Supports PDF, DOCX, PPTX, XLSX, images (with OCR), audio (with transcription), HTML, CSV, JSON, XML, ZIP, YouTube URLs, EPubs and more.","MIT","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-writer\u002Fskills\u002Fmarkitdown\u002FSKILL.md",[127,130,133,136],{"categoryNo":128,"categoryName":129,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000002","文档处理",{"categoryNo":131,"categoryName":132,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000003","演示文稿",{"categoryNo":134,"categoryName":135,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000004","电子表格",{"categoryNo":137,"categoryName":138,"taxonomyType":139,"taxonomyTypeDesc":140},"01JBSEEDCAT000000000000034","行政与办公人员","PROFESSION","适用职业",[122,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160],"docx","PDF","pptx","xlsx","documents","csv","ocr","Audio","Bash","markdown","convert","read","write","edit","html","images","files","youtube","with",{"skillNo":162,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":124,"licenseFileUrl":6,"sourceHtmlUrl":163,"categories":164,"keywords":169,"publishedAt":44},"01M6F06SBHR9F0SDWE282Y8075","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-writer\u002Fscientific_writer\u002F.claude\u002Fskills\u002Fmarkitdown\u002FSKILL.md",[165,166,167,168],{"categoryNo":128,"categoryName":129,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":131,"categoryName":132,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":134,"categoryName":135,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":137,"categoryName":138,"taxonomyType":139,"taxonomyTypeDesc":140},[122,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160],{"skillNo":171,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":124,"licenseFileUrl":6,"sourceHtmlUrl":172,"categories":173,"keywords":178,"publishedAt":44},"01M6F02D4R14EJAPBWVDF9J9VQ","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-writer\u002F.claude\u002Fskills\u002Fmarkitdown\u002FSKILL.md",[174,175,176,177],{"categoryNo":128,"categoryName":129,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":131,"categoryName":132,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":134,"categoryName":135,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":137,"categoryName":138,"taxonomyType":139,"taxonomyTypeDesc":140},[122,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160],{"skillNo":180,"name":181,"nameZh":6,"description":182,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":124,"licenseFileUrl":6,"sourceHtmlUrl":183,"categories":184,"keywords":185,"publishedAt":44},"01M6F000KS6YB4MKS774G4R8ND","zarr-python","Chunked N-D arrays for cloud storage. Compressed arrays, parallel I\u002FO, S3\u002FGCS integration, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-skills\u002Fscientific-skills\u002Fzarr-python\u002FSKILL.md",[],[186,187,188,189,190,191,192,193,194,195,196,197,198,199,200],"python","zarr python","storage","integration","s3","gcs","cloud","dask","parallel","pipelines","arrays","numpy","scientific computing","scale","scientific",{"skillNo":202,"name":203,"nameZh":6,"description":204,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":124,"licenseFileUrl":6,"sourceHtmlUrl":205,"categories":206,"keywords":208,"publishedAt":44},"01M6EZZJWFXM1GR78KTW6J0DN8","what-if-oracle","Run structured What-If scenario analysis with multi-branch possibility exploration. Use this skill when the user asks speculative questions like \"what if...\", \"what would happen if...\", \"what are the possibilities\", \"explore scenarios\", \"scenario analysis\", \"possibility space\", \"what could go wrong\", \"best case \u002F worst case\", \"risk analysis\", \"contingency planning\", \"strategic options\", or any question about uncertain futures. Also trigger when the user faces a fork-in-the-road decision, wants to stress-test an idea, or needs to think through consequences before committing.","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-skills\u002Fscientific-skills\u002Fwhat-if-oracle\u002FSKILL.md",[207],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[209,210,211,212,213,214,215,216,217,218,219,153,154,220,221,222,223,224,225,226],"oracle","what if oracle","go","run","ux","futures","analysis","explore","decision","branch","question","idea","exploration","options","stress-test","strategies","scenario","stress",{"skillNo":228,"name":229,"nameZh":6,"description":230,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":124,"licenseFileUrl":6,"sourceHtmlUrl":231,"categories":232,"keywords":243,"publishedAt":44},"01M6EZZCXAEB49RXGQCJX5E8GB","venue-templates","Access comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-skills\u002Fscientific-skills\u002Fvenue-templates\u002FSKILL.md",[233,236,239,240],{"categoryNo":234,"categoryName":235,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":237,"categoryName":238,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000021","资料检索与研究",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":241,"categoryName":242,"taxonomyType":139,"taxonomyTypeDesc":140},"01JBSEEDCAT000000000000036","内容创作者",[244,245,246,247,248,249,250,251,150,252,153,154,155,253,254,255,256,257,200,258],"templates","venue templates","research","guidelines","NeurIPS","ICML","LaTeX","science","access","proposals","Academic","requirements","formatting","journal","chi"]