[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DGDJBQDZAPYXZS0QATFN24":3,"skill-same:01M7DGDJBQDZAPYXZS0QATFN24":50},{"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":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":14,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M7DGDJBQDZAPYXZS0QATFN24","reverser-ransomware-analysis",null,"Ransomware family identification and analysis — encryption scheme identification, key recovery techniques, ransom note parsing, shadow copy\u002Frecovery inhibition analysis, decryptor availability check, and IOC extraction for common ransomware families.","Akapi895\u002Fraptix","Akapi895","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F83953516?v=4","01M7DEGNDGERR4F4YETDFVA512","Phạm Anh Tuấn","01M7DEGNEHYZNA920AYM5EH7H8",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Freverser\u002Fransomware-analysis\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: reverser-ransomware-analysis\ndescription: \"Ransomware family identification and analysis — encryption scheme identification, key recovery techniques, ransom note parsing, shadow copy\u002Frecovery inhibition analysis, decryptor availability check, and IOC extraction for common ransomware families.\"\nallowed-tools: Bash Read Write\nmetadata:\n  when_to_use: \"ransomware encrypted files ransom note decrypt recovery key lockbit revil conti blackcat alphv encryption crypto aes rsa chacha payment bitcoin\"\n  subdomain: reverser\n  tags: \"ransomware, encryption, decryptor, key recovery, incident response\"\n  mitre_attack: \"T1486, T1490, T1489\"\n---\n\n# Ransomware Analysis\n\nIdentify ransomware families, analyze encryption implementations, attempt key recovery, and extract IOCs for threat intelligence and incident response.\n\n## Quick Reference\n\n```bash\n# Identify ransomware family from ransom note\n# Upload to: id-ransomware.malwarehunterteam.com\n# Or match locally:\nstrings ransom_note.txt | head -20\n\n# Check encrypted file extension\nls -la \u002Fpath\u002Fto\u002Fencrypted\u002F | head -20\n# Common: .lockbit, .revil, .conti, .blackcat, .encrypted, .crypt\n\n# Check for shadow copy deletion (recovery inhibition)\nstrings \u003CTARGET> | grep -iE 'vssadmin|wmic.*shadowcopy|bcdedit|wbadmin'\n\n# Entropy analysis on encrypted files\npython3 -c \"\nimport math\ndata=open('encrypted_file','rb').read()\nc=[data.count(bytes([b])) for b in range(256)]\nt=len(data)\ne=-sum((x\u002Ft)*math.log2(x\u002Ft) for x in c if x)\nprint(f'Entropy: {e:.3f}\u002F8 — {\\\"fully encrypted\\\" if e > 7.9 else \\\"partial\u002Fheader encryption\\\" if e > 7.0 else \\\"not encrypted\\\"}')\"\n\n# Check Emsisoft\u002FNoMoreRansom for free decryptors\n# https:\u002F\u002Fwww.nomoreransom.org\u002Fen\u002Fdecryption-tools.html\n# https:\u002F\u002Fwww.emsisoft.com\u002Fen\u002Fransomware-decryption\u002F\n```\n\n## MITRE ATT&CK Mapping\n\n| Technique | ID | How It Appears |\n|---|---|---|\n| Data Encrypted for Impact | T1486 | File encryption using AES\u002FChaCha20 + RSA key wrap |\n| Inhibit System Recovery | T1490 | vssadmin delete shadows, bcdedit, wbadmin delete catalog |\n| Service Stop | T1489 | Stopping SQL, Exchange, backup services before encryption |\n| System Shutdown\u002FReboot | T1529 | Forced reboot after encryption; bootlocker ransomware |\n| Data Destruction | T1485 | Wiper variants masquerading as ransomware |\n| Exfiltration Over C2 | T1041 | Double extortion: data exfil before encryption |\n| Defacement: Internal | T1491.001 | Desktop wallpaper change to ransom note |\n\n## 1. Family Identification\n\nDetermine which ransomware family you're dealing with.\n\n```bash\n# Method 1: Ransom note analysis\ncat ransom_note.txt\n# Key identifiers:\n# - Tor .onion URL → payment portal (extract for IOC)\n# - Bitcoin\u002FMonero wallet address\n# - Unique victim ID \u002F personal key\n# - File extension mentioned in note\n\n# Method 2: Encrypted file extension mapping\n# .lockbit → LockBit 2.0\u002F3.0\n# .revil \u002F .sodinokibi → REvil\u002FSodinokibi\n# .CONTI → Conti\n# .blackcat \u002F random 6-7 char → BlackCat\u002FALPHV\n# .royal → Royal\n# .akira → Akira\n# .play → Play\n# .8base → 8Base (Phobos variant)\n# .\u003Crandom base64> → often Phobos family\n\n# Method 3: ID Ransomware (web-based)\n# Upload: ransom note + encrypted file sample\n# https:\u002F\u002Fid-ransomware.malwarehunterteam.com\u002F\n\n# Method 4: Binary analysis\nstrings \u003CTARGET> | grep -iE 'lockbit\\|revil\\|conti\\|blackcat\\|phobos\\|dharma\\|stop\\|djvu'\nyara -r \u002Fopt\u002Fyara-rules\u002Fransomware\u002F \u003CTARGET>\n\n# Method 5: Mutex \u002F named pipe identification\nstrings \u003CTARGET> | grep -iE 'Global\\\\|mutex\\|pipe'\n# Known mutexes: \"Global\\LockBit\" → LockBit\n```\n\n## 2. Encryption Scheme Analysis\n\nReverse the crypto implementation to assess recoverability.\n\n```bash\n# Identify crypto libraries \u002F APIs used\nstrings \u003CTARGET> | grep -iE 'CryptEncrypt\\|CryptGenKey\\|CryptImportKey\\|CryptAcquireContext'\nstrings \u003CTARGET> | grep -iE 'AES\\|RSA\\|ChaCha\\|Salsa\\|Blowfish\\|RC4\\|ECDH\\|Curve25519'\nstrings \u003CTARGET> | grep -iE 'BCrypt\\|NCrypt\\|OpenSSL\\|mbedtls\\|sodium\\|libcrypto'\n\n# Common ransomware crypto patterns:\n# Pattern A: RSA-2048 master key + AES-256-CBC per file (LockBit, Conti)\n# Pattern B: Curve25519 + XSalsa20 (BlackCat\u002FALPHV — Rust-based)\n# Pattern C: RSA-2048 + ChaCha20 per file (REvil, Hive)\n# Pattern D: Hardcoded AES key (weak — decryptable!) (older Dharma, STOP\u002FDjvu offline)\n\n# Check import table for crypto APIs\npython3 \u003C\u003C 'EOF'\nimport pefile\npe = pefile.PE(\"\u003CTARGET>\")\nfor entry in pe.DIRECTORY_ENTRY_IMPORT:\n    dll = entry.dll.decode()\n    for imp in entry.imports:\n        name = imp.name.decode() if imp.name else f\"ord_{imp.ordinal}\"\n        if any(k in name.lower() for k in ['crypt', 'rsa', 'aes', 'key', 'encrypt', 'hash', 'rand']):\n            print(f\"  {dll}: {name}\")\nEOF\n\n# Analyze encrypted file structure\npython3 \u003C\u003C 'EOF'\nimport struct\nwith open(\"encrypted_file.lockbit\", \"rb\") as f:\n    # Many ransomware families append metadata to encrypted files\n    f.seek(-256, 2)  # Read last 256 bytes\n    trailer = f.read()\n    print(\"Trailer hex:\", trailer.hex())\n    # Look for:\n    # - Encrypted AES key (RSA-encrypted, typically 128\u002F256 bytes)\n    # - Original file size\n    # - IV \u002F nonce\n    # - File marker \u002F magic bytes\n\n    # Check file header\n    f.seek(0)\n    header = f.read(64)\n    print(\"Header hex:\", header.hex())\n    # Full-file encryption: high entropy from byte 0\n    # Partial encryption: original header partially intact\nEOF\n```\n\n## 3. Key Recovery Techniques\n\n```bash\n# Technique 1: Weak\u002FHardcoded Key (STOP\u002FDjvu offline key, older variants)\n# If ransomware uses CryptGenRandom but falls back on failure:\nstrings \u003CTARGET> | grep -c \"CryptGenRandom\"\n# If absent → may use deterministic key derivation (time-based, PID-based)\n\n# Technique 2: Memory forensics — extract key from process memory\nvol3 -f memory.raw windows.memmap --pid \u003CRANSOMWARE_PID> --dump\n# Search dump for AES key schedule patterns\npython3 \u003C\u003C 'EOF'\nimport re\ndata = open(\"pid.\u003CPID>.dmp\", \"rb\").read()\n# AES-256 key schedule: 240 bytes with specific expansion pattern\n# Search for high-entropy 32-byte sequences near CryptoAPI structures\ncandidates = []\nfor i in range(len(data) - 32):\n    block = data[i:i+32]\n    # Quick entropy check\n    unique = len(set(block))\n    if unique > 28:  # High byte diversity suggests key material\n        candidates.append((i, block.hex()))\nprint(f\"Found {len(candidates)} candidates\")\nfor off, h in candidates[:20]:\n    print(f\"  0x{off:08x}: {h}\")\nEOF\n\n# Technique 3: Known-plaintext attack\n# If you have the original unencrypted file AND the encrypted version:\npython3 \u003C\u003C 'EOF'\norig = open(\"original.docx\", \"rb\").read()\nenc = open(\"original.docx.encrypted\", \"rb\").read()\n# XOR to recover keystream (if XOR\u002Fstream cipher was used)\nkeystream = bytes(a ^ b for a, b in zip(orig, enc))\nprint(\"First 64 bytes of keystream:\", keystream[:64].hex())\n# If keystream repeats → short key XOR → trivially breakable\nEOF\n\n# Technique 4: Flawed PRNG \u002F implementation bugs\n# WannaCry: CryptGenRandom not called → primes recoverable from memory\n# Some Dharma: PID + timestamp as seed → predictable key\n# GandCrab v1: RSA key generation flaw → Bitdefender decryptor\n\n# Technique 5: Check for existing decryptors\n# NoMoreRansom project: nomoreransom.org\n# Emsisoft: emsisoft.com\u002Fransomware-decryption\n# Kaspersky: noransom.kaspersky.com\n# Avast: avast.com\u002Fransomware-decryption-tools\n```\n\n## 4. Recovery Inhibition Analysis\n\n```bash\n# Shadow copy deletion\nstrings \u003CTARGET> | grep -iE 'vssadmin\\s+delete\\|shadows\\s*\u002Fall'\nstrings \u003CTARGET> | grep -iE 'wmic\\s+shadowcopy\\s+delete'\nstrings \u003CTARGET> | grep -iE 'Get-WmiObject.*ShadowCopy.*Delete'\n\n# Boot recovery disabling\nstrings \u003CTARGET> | grep -iE 'bcdedit.*recoveryenabled.*no'\nstrings \u003CTARGET> | grep -iE 'bcdedit.*bootstatuspolicy.*ignoreallfailures'\n\n# Backup catalog deletion\nstrings \u003CTARGET> | grep -iE 'wbadmin\\s+delete\\s+catalog'\nstrings \u003CTARGET> | grep -iE 'delete\\s+systemstatebackup'\n\n# Service stopping (databases, backups, AV)\nstrings \u003CTARGET> | grep -iE 'net\\s+stop\\|sc\\s+stop\\|taskkill\\|Stop-Service'\n# Common targets: MSSQLSERVER, SQLAgent, MySQL, oracle, veeam, backup, sophos, defender\n\n# Attempt shadow copy recovery (if deletion failed or was partial)\nvssadmin list shadows\n# If shadows exist → mount and recover files\n\n# Check for Volume Shadow Copy remnants in raw disk\n# Even after vssadmin delete, data may persist until overwritten\n```\n\n## 5. Ransom Note Parsing and IOC Extraction\n\n```bash\n# Extract IOCs from ransom note\npython3 \u003C\u003C 'EOF'\nimport re\n\nwith open(\"ransom_note.txt\", \"r\", errors=\"ignore\") as f:\n    note = f.read()\n\n# Extract Tor onion URLs\nonions = re.findall(r'[a-z2-7]{16,56}\\.onion', note)\nprint(\"Tor URLs:\", onions)\n\n# Extract Bitcoin addresses (P2PKH, P2SH, Bech32)\nbtc = re.findall(r'\\b[13][a-km-zA-HJ-NP-Z1-9]{25,34}\\b', note)\nbtc += re.findall(r'\\bbc1[a-zA-HJ-NP-Z0-9]{25,90}\\b', note)\nprint(\"BTC addresses:\", btc)\n\n# Extract Monero addresses\nxmr = re.findall(r'\\b4[0-9AB][1-9A-HJ-NP-Za-km-z]{93}\\b', note)\nprint(\"XMR addresses:\", xmr)\n\n# Extract email addresses\nemails = re.findall(r'[\\w.+-]+@[\\w-]+\\.[\\w.]+', note)\nprint(\"Emails:\", emails)\n\n# Extract victim\u002Fpersonal IDs\nvictim_ids = re.findall(r'(?:ID|key|token|code)\\s*[:=]\\s*([A-Za-z0-9+\u002F=\\-]{16,})', note, re.I)\nprint(\"Victim IDs:\", victim_ids)\nEOF\n\n# Trace Bitcoin wallet for attribution\n# blockchain.com\u002Fexplorer or blockchair.com\n# Check if wallet is tagged in ransomwhere.re database\n```\n\n## 6. Binary-Level Behavioral Analysis\n\n```bash\n# File enumeration logic\nstrings \u003CTARGET> | grep -iE '\\.doc\\|\\.xls\\|\\.pdf\\|\\.jpg\\|\\.png\\|\\.sql\\|\\.mdb\\|\\.zip'\n# Ransomware typically targets specific file extensions and skips system files\n\n# Exclusion list (files\u002Fdirs ransomware avoids to keep OS bootable)\nstrings \u003CTARGET> | grep -iE 'windows\\|system32\\|boot\\|ntldr\\|bootmgr\\|\\.exe\\|\\.dll\\|\\.sys'\n# Skipping these is characteristic of ransomware (vs wipers)\n\n# Network enumeration (worm-like propagation)\nstrings \u003CTARGET> | grep -iE 'NetShareEnum\\|WNetOpenEnum\\|GetAdaptersInfo\\|IcmpSendEcho'\n# SMB scanning → lateral movement before encryption\n\n# Process\u002Fservice termination commands\nstrings \u003CTARGET> | grep -iE 'taskkill.*sql\\|taskkill.*oracle\\|taskkill.*backup'\n\n# Privilege escalation\nstrings \u003CTARGET> | grep -iE 'SeDebugPrivilege\\|AdjustTokenPrivileges\\|runas\\|ShellExecute.*admin'\n\n# Anti-analysis checks\nstrings \u003CTARGET> | grep -iE 'IsDebuggerPresent\\|CheckRemoteDebugger\\|GetSystemDefaultLangID\\|GetKeyboardLayout'\n# Language check: many ransomware families skip CIS countries (Russian keyboard = exit)\n```\n\n## Tools & Resources\n\n| Tool | Purpose | Install |\n|---|---|---|\n| ID Ransomware | Family identification from note\u002Fsample | id-ransomware.malwarehunterteam.com |\n| CyberChef | Crypto analysis, encoding\u002Fdecoding | gchq.github.io\u002FCyberChef |\n| Emsisoft Decryptors | Free decryption tools | emsisoft.com\u002Fransomware-decryption |\n| NoMoreRansom | Decryptor repository | nomoreransom.org |\n| ransomwhe.re | Ransomware payment tracking | ransomwhe.re |\n| Volatility 3 | Memory forensics for key recovery | github.com\u002Fvolatilityfoundation\u002Fvolatility3 |\n| YARA | Ransomware family signatures | github.com\u002FYara-Rules\u002Frules |\n| vssadmin | Shadow copy management | Built into Windows |\n| Raccine | Ransomware vaccine (VSS protection) | github.com\u002FNeo23x0\u002FRaccine |\n\n## Detection Signatures\n\n| Indicator | Description | Detection |\n|---|---|---|\n| Mass file rename with new extension | Bulk encryption in progress | Sysmon File Create (Event 11) burst |\n| `vssadmin delete shadows \u002Fall \u002Fquiet` | Shadow copy deletion | Sysmon Event ID 1 + command line |\n| `bcdedit \u002Fset recoveryenabled no` | Recovery disabling | Sysmon Event ID 1 |\n| Ransom note dropped in every directory | Encryption complete signal | File create events for `README.txt`, `DECRYPT.txt` |\n| High-entropy file writes | Active encryption | I\u002FO monitoring: write entropy > 7.9 |\n| Services stopped in rapid succession | Pre-encryption service kill | Windows Event Log 7036 burst |\n| Network share enumeration | Lateral movement \u002F spread | NetShareEnum API calls, SMB traffic |\n| Mutex creation with known names | Family identification | Sysmon Event ID 17 |\n\n## Error Handling & Edge Cases\n\n| Issue | Resolution |\n|---|---|\n| Ransomware sample won't run (anti-VM) | Patch anti-analysis checks; use bare-metal analysis host |\n| No ransom note found | Check alternate locations: Desktop, every drive root, C:\\Users\\Public |\n| Encrypted file has zero additional bytes | Header-only encryption — may be partially recoverable |\n| Wiper disguised as ransomware | Check if decryption key actually exists; analyze if key is generated but never saved |\n| Double-encrypted (two families) | Decrypt in reverse order; identify families by extension stacking |\n| Network-propagating variant | Isolate host immediately; analyze SMB\u002FRDP lateral movement code |\n| Key deleted from memory | Cold boot attack; check pagefile.sys, hiberfil.sys for key remnants |\n\n## Decision Gate\n\n```\nIF ransom note present:\n  → Upload to ID Ransomware for family identification\n  → Check NoMoreRansom \u002F Emsisoft for free decryptor\n  → Extract IOCs (onion URLs, BTC wallets, emails)\n  → If decryptor exists → decrypt and recover\nIF no decryptor available:\n  → Analyze encryption implementation in binary\n  → Check for crypto weaknesses (hardcoded key, weak PRNG, implementation bugs)\n  → Attempt memory forensics for key material\n  → Check for intact shadow copies \u002F backup catalog\nIF wiper suspected (no real key):\n  → Document as destructive attack, not ransomware\n  → Focus on IOC extraction and attribution\n  → File recovery via disk carving (PhotoRec, foremost)\n```\n","# Ransomware Analysis\n\nIdentify ransomware families, analyze encryption implementations, attempt key recovery, and extract IOCs for threat intelligence and incident response.\n\n## Quick Reference\n\n```bash\n# Identify ransomware family from ransom note\n# Upload to: id-ransomware.malwarehunterteam.com\n# Or match locally:\nstrings ransom_note.txt | head -20\n\n# Check encrypted file extension\nls -la \u002Fpath\u002Fto\u002Fencrypted\u002F | head -20\n# Common: .lockbit, .revil, .conti, .blackcat, .encrypted, .crypt\n\n# Check for shadow copy deletion (recovery inhibition)\nstrings \u003CTARGET> | grep -iE 'vssadmin|wmic.*shadowcopy|bcdedit|wbadmin'\n\n# Entropy analysis on encrypted files\npython3 -c \"\nimport math\ndata=open('encrypted_file','rb').read()\nc=[data.count(bytes([b])) for b in range(256)]\nt=len(data)\ne=-sum((x\u002Ft)*math.log2(x\u002Ft) for x in c if x)\nprint(f'Entropy: {e:.3f}\u002F8 — {\\\"fully encrypted\\\" if e > 7.9 else \\\"partial\u002Fheader encryption\\\" if e > 7.0 else \\\"not encrypted\\\"}')\"\n\n# Check Emsisoft\u002FNoMoreRansom for free decryptors\n# https:\u002F\u002Fwww.nomoreransom.org\u002Fen\u002Fdecryption-tools.html\n# https:\u002F\u002Fwww.emsisoft.com\u002Fen\u002Fransomware-decryption\u002F\n```\n\n## MITRE ATT&CK Mapping\n\n| Technique | ID | How It Appears |\n|---|---|---|\n| Data Encrypted for Impact | T1486 | File encryption using AES\u002FChaCha20 + RSA key wrap |\n| Inhibit System Recovery | T1490 | vssadmin delete shadows, bcdedit, wbadmin delete catalog |\n| Service Stop | T1489 | Stopping SQL, Exchange, backup services before encryption |\n| System Shutdown\u002FReboot | T1529 | Forced reboot after encryption; bootlocker ransomware |\n| Data Destruction | T1485 | Wiper variants masquerading as ransomware |\n| Exfiltration Over C2 | T1041 | Double extortion: data exfil before encryption |\n| Defacement: Internal | T1491.001 | Desktop wallpaper change to ransom note |\n\n## 1. Family Identification\n\nDetermine which ransomware family you're dealing with.\n\n```bash\n# Method 1: Ransom note analysis\ncat ransom_note.txt\n# Key identifiers:\n# - Tor .onion URL → payment portal (extract for IOC)\n# - Bitcoin\u002FMonero wallet address\n# - Unique victim ID \u002F personal key\n# - File extension mentioned in note\n\n# Method 2: Encrypted file extension mapping\n# .lockbit → LockBit 2.0\u002F3.0\n# .revil \u002F .sodinokibi → REvil\u002FSodinokibi\n# .CONTI → Conti\n# .blackcat \u002F random 6-7 char → BlackCat\u002FALPHV\n# .royal → Royal\n# .akira → Akira\n# .play → Play\n# .8base → 8Base (Phobos variant)\n# .\u003Crandom base64> → often Phobos family\n\n# Method 3: ID Ransomware (web-based)\n# Upload: ransom note + encrypted file sample\n# https:\u002F\u002Fid-ransomware.malwarehunterteam.com\u002F\n\n# Method 4: Binary analysis\nstrings \u003CTARGET> | grep -iE 'lockbit\\|revil\\|conti\\|blackcat\\|phobos\\|dharma\\|stop\\|djvu'\nyara -r \u002Fopt\u002Fyara-rules\u002Fransomware\u002F \u003CTARGET>\n\n# Method 5: Mutex \u002F named pipe identification\nstrings \u003CTARGET> | grep -iE 'Global\\\\|mutex\\|pipe'\n# Known mutexes: \"Global\\LockBit\" → LockBit\n```\n\n## 2. Encryption Scheme Analysis\n\nReverse the crypto implementation to assess recoverability.\n\n```bash\n# Identify crypto libraries \u002F APIs used\nstrings \u003CTARGET> | grep -iE 'CryptEncrypt\\|CryptGenKey\\|CryptImportKey\\|CryptAcquireContext'\nstrings \u003CTARGET> | grep -iE 'AES\\|RSA\\|ChaCha\\|Salsa\\|Blowfish\\|RC4\\|ECDH\\|Curve25519'\nstrings \u003CTARGET> | grep -iE 'BCrypt\\|NCrypt\\|OpenSSL\\|mbedtls\\|sodium\\|libcrypto'\n\n# Common ransomware crypto patterns:\n# Pattern A: RSA-2048 master key + AES-256-CBC per file (LockBit, Conti)\n# Pattern B: Curve25519 + XSalsa20 (BlackCat\u002FALPHV — Rust-based)\n# Pattern C: RSA-2048 + ChaCha20 per file (REvil, Hive)\n# Pattern D: Hardcoded AES key (weak — decryptable!) (older Dharma, STOP\u002FDjvu offline)\n\n# Check import table for crypto APIs\npython3 \u003C\u003C 'EOF'\nimport pefile\npe = pefile.PE(\"\u003CTARGET>\")\nfor entry in pe.DIRECTORY_ENTRY_IMPORT:\n    dll = entry.dll.decode()\n    for imp in entry.imports:\n        name = imp.name.decode() if imp.name else f\"ord_{imp.ordinal}\"\n        if any(k in name.lower() for k in ['crypt', 'rsa', 'aes', 'key', 'encrypt', 'hash', 'rand']):\n            print(f\"  {dll}: {name}\")\nEOF\n\n# Analyze encrypted file structure\npython3 \u003C\u003C 'EOF'\nimport struct\nwith open(\"encrypted_file.lockbit\", \"rb\") as f:\n    # Many ransomware families append metadata to encrypted files\n    f.seek(-256, 2)  # Read last 256 bytes\n    trailer = f.read()\n    print(\"Trailer hex:\", trailer.hex())\n    # Look for:\n    # - Encrypted AES key (RSA-encrypted, typically 128\u002F256 bytes)\n    # - Original file size\n    # - IV \u002F nonce\n    # - File marker \u002F magic bytes\n\n    # Check file header\n    f.seek(0)\n    header = f.read(64)\n    print(\"Header hex:\", header.hex())\n    # Full-file encryption: high entropy from byte 0\n    # Partial encryption: original header partially intact\nEOF\n```\n\n## 3. Key Recovery Techniques\n\n```bash\n# Technique 1: Weak\u002FHardcoded Key (STOP\u002FDjvu offline key, older variants)\n# If ransomware uses CryptGenRandom but falls back on failure:\nstrings \u003CTARGET> | grep -c \"CryptGenRandom\"\n# If absent → may use deterministic key derivation (time-based, PID-based)\n\n# Technique 2: Memory forensics — extract key from process memory\nvol3 -f memory.raw windows.memmap --pid \u003CRANSOMWARE_PID> --dump\n# Search dump for AES key schedule patterns\npython3 \u003C\u003C 'EOF'\nimport re\ndata = open(\"pid.\u003CPID>.dmp\", \"rb\").read()\n# AES-256 key schedule: 240 bytes with specific expansion pattern\n# Search for high-entropy 32-byte sequences near CryptoAPI structures\ncandidates = []\nfor i in range(len(data) - 32):\n    block = data[i:i+32]\n    # Quick entropy check\n    unique = len(set(block))\n    if unique > 28:  # High byte diversity suggests key material\n        candidates.append((i, block.hex()))\nprint(f\"Found {len(candidates)} candidates\")\nfor off, h in candidates[:20]:\n    print(f\"  0x{off:08x}: {h}\")\nEOF\n\n# Technique 3: Known-plaintext attack\n# If you have the original unencrypted file AND the encrypted version:\npython3 \u003C\u003C 'EOF'\norig = open(\"original.docx\", \"rb\").read()\nenc = open(\"original.docx.encrypted\", \"rb\").read()\n# XOR to recover keystream (if XOR\u002Fstream cipher was used)\nkeystream = bytes(a ^ b for a, b in zip(orig, enc))\nprint(\"First 64 bytes of keystream:\", keystream[:64].hex())\n# If keystream repeats → short key XOR → trivially breakable\nEOF\n\n# Technique 4: Flawed PRNG \u002F implementation bugs\n# WannaCry: CryptGenRandom not called → primes recoverable from memory\n# Some Dharma: PID + timestamp as seed → predictable key\n# GandCrab v1: RSA key generation flaw → Bitdefender decryptor\n\n# Technique 5: Check for existing decryptors\n# NoMoreRansom project: nomoreransom.org\n# Emsisoft: emsisoft.com\u002Fransomware-decryption\n# Kaspersky: noransom.kaspersky.com\n# Avast: avast.com\u002Fransomware-decryption-tools\n```\n\n## 4. Recovery Inhibition Analysis\n\n```bash\n# Shadow copy deletion\nstrings \u003CTARGET> | grep -iE 'vssadmin\\s+delete\\|shadows\\s*\u002Fall'\nstrings \u003CTARGET> | grep -iE 'wmic\\s+shadowcopy\\s+delete'\nstrings \u003CTARGET> | grep -iE 'Get-WmiObject.*ShadowCopy.*Delete'\n\n# Boot recovery disabling\nstrings \u003CTARGET> | grep -iE 'bcdedit.*recoveryenabled.*no'\nstrings \u003CTARGET> | grep -iE 'bcdedit.*bootstatuspolicy.*ignoreallfailures'\n\n# Backup catalog deletion\nstrings \u003CTARGET> | grep -iE 'wbadmin\\s+delete\\s+catalog'\nstrings \u003CTARGET> | grep -iE 'delete\\s+systemstatebackup'\n\n# Service stopping (databases, backups, AV)\nstrings \u003CTARGET> | grep -iE 'net\\s+stop\\|sc\\s+stop\\|taskkill\\|Stop-Service'\n# Common targets: MSSQLSERVER, SQLAgent, MySQL, oracle, veeam, backup, sophos, defender\n\n# Attempt shadow copy recovery (if deletion failed or was partial)\nvssadmin list shadows\n# If shadows exist → mount and recover files\n\n# Check for Volume Shadow Copy remnants in raw disk\n# Even after vssadmin delete, data may persist until overwritten\n```\n\n## 5. Ransom Note Parsing and IOC Extraction\n\n```bash\n# Extract IOCs from ransom note\npython3 \u003C\u003C 'EOF'\nimport re\n\nwith open(\"ransom_note.txt\", \"r\", errors=\"ignore\") as f:\n    note = f.read()\n\n# Extract Tor onion URLs\nonions = re.findall(r'[a-z2-7]{16,56}\\.onion', note)\nprint(\"Tor URLs:\", onions)\n\n# Extract Bitcoin addresses (P2PKH, P2SH, Bech32)\nbtc = re.findall(r'\\b[13][a-km-zA-HJ-NP-Z1-9]{25,34}\\b', note)\nbtc += re.findall(r'\\bbc1[a-zA-HJ-NP-Z0-9]{25,90}\\b', note)\nprint(\"BTC addresses:\", btc)\n\n# Extract Monero addresses\nxmr = re.findall(r'\\b4[0-9AB][1-9A-HJ-NP-Za-km-z]{93}\\b', note)\nprint(\"XMR addresses:\", xmr)\n\n# Extract email addresses\nemails = re.findall(r'[\\w.+-]+@[\\w-]+\\.[\\w.]+', note)\nprint(\"Emails:\", emails)\n\n# Extract victim\u002Fpersonal IDs\nvictim_ids = re.findall(r'(?:ID|key|token|code)\\s*[:=]\\s*([A-Za-z0-9+\u002F=\\-]{16,})', note, re.I)\nprint(\"Victim IDs:\", victim_ids)\nEOF\n\n# Trace Bitcoin wallet for attribution\n# blockchain.com\u002Fexplorer or blockchair.com\n# Check if wallet is tagged in ransomwhere.re database\n```\n\n## 6. Binary-Level Behavioral Analysis\n\n```bash\n# File enumeration logic\nstrings \u003CTARGET> | grep -iE '\\.doc\\|\\.xls\\|\\.pdf\\|\\.jpg\\|\\.png\\|\\.sql\\|\\.mdb\\|\\.zip'\n# Ransomware typically targets specific file extensions and skips system files\n\n# Exclusion list (files\u002Fdirs ransomware avoids to keep OS bootable)\nstrings \u003CTARGET> | grep -iE 'windows\\|system32\\|boot\\|ntldr\\|bootmgr\\|\\.exe\\|\\.dll\\|\\.sys'\n# Skipping these is characteristic of ransomware (vs wipers)\n\n# Network enumeration (worm-like propagation)\nstrings \u003CTARGET> | grep -iE 'NetShareEnum\\|WNetOpenEnum\\|GetAdaptersInfo\\|IcmpSendEcho'\n# SMB scanning → lateral movement before encryption\n\n# Process\u002Fservice termination commands\nstrings \u003CTARGET> | grep -iE 'taskkill.*sql\\|taskkill.*oracle\\|taskkill.*backup'\n\n# Privilege escalation\nstrings \u003CTARGET> | grep -iE 'SeDebugPrivilege\\|AdjustTokenPrivileges\\|runas\\|ShellExecute.*admin'\n\n# Anti-analysis checks\nstrings \u003CTARGET> | grep -iE 'IsDebuggerPresent\\|CheckRemoteDebugger\\|GetSystemDefaultLangID\\|GetKeyboardLayout'\n# Language check: many ransomware families skip CIS countries (Russian keyboard = exit)\n```\n\n## Tools & Resources\n\n| Tool | Purpose | Install |\n|---|---|---|\n| ID Ransomware | Family identification from note\u002Fsample | id-ransomware.malwarehunterteam.com |\n| CyberChef | Crypto analysis, encoding\u002Fdecoding | gchq.github.io\u002FCyberChef |\n| Emsisoft Decryptors | Free decryption tools | emsisoft.com\u002Fransomware-decryption |\n| NoMoreRansom | Decryptor repository | nomoreransom.org |\n| ransomwhe.re | Ransomware payment tracking | ransomwhe.re |\n| Volatility 3 | Memory forensics for key recovery | github.com\u002Fvolatilityfoundation\u002Fvolatility3 |\n| YARA | Ransomware family signatures | github.com\u002FYara-Rules\u002Frules |\n| vssadmin | Shadow copy management | Built into Windows |\n| Raccine | Ransomware vaccine (VSS protection) | github.com\u002FNeo23x0\u002FRaccine |\n\n## Detection Signatures\n\n| Indicator | Description | Detection |\n|---|---|---|\n| Mass file rename with new extension | Bulk encryption in progress | Sysmon File Create (Event 11) burst |\n| `vssadmin delete shadows \u002Fall \u002Fquiet` | Shadow copy deletion | Sysmon Event ID 1 + command line |\n| `bcdedit \u002Fset recoveryenabled no` | Recovery disabling | Sysmon Event ID 1 |\n| Ransom note dropped in every directory | Encryption complete signal | File create events for `README.txt`, `DECRYPT.txt` |\n| High-entropy file writes | Active encryption | I\u002FO monitoring: write entropy > 7.9 |\n| Services stopped in rapid succession | Pre-encryption service kill | Windows Event Log 7036 burst |\n| Network share enumeration | Lateral movement \u002F spread | NetShareEnum API calls, SMB traffic |\n| Mutex creation with known names | Family identification | Sysmon Event ID 17 |\n\n## Error Handling & Edge Cases\n\n| Issue | Resolution |\n|---|---|\n| Ransomware sample won't run (anti-VM) | Patch anti-analysis checks; use bare-metal analysis host |\n| No ransom note found | Check alternate locations: Desktop, every drive root, C:\\Users\\Public |\n| Encrypted file has zero additional bytes | Header-only encryption — may be partially recoverable |\n| Wiper disguised as ransomware | Check if decryption key actually exists; analyze if key is generated but never saved |\n| Double-encrypted (two families) | Decrypt in reverse order; identify families by extension stacking |\n| Network-propagating variant | Isolate host immediately; analyze SMB\u002FRDP lateral movement code |\n| Key deleted from memory | Cold boot attack; check pagefile.sys, hiberfil.sys for key remnants |\n\n## Decision Gate\n\n```\nIF ransom note present:\n  → Upload to ID Ransomware for family identification\n  → Check NoMoreRansom \u002F Emsisoft for free decryptor\n  → Extract IOCs (onion URLs, BTC wallets, emails)\n  → If decryptor exists → decrypt and recover\nIF no decryptor available:\n  → Analyze encryption implementation in binary\n  → Check for crypto weaknesses (hardcoded key, weak PRNG, implementation bugs)\n  → Attempt memory forensics for key material\n  → Check for intact shadow copies \u002F backup catalog\nIF wiper suspected (no real key):\n  → Document as destructive attack, not ransomware\n  → Focus on IOC extraction and attribution\n  → File recovery via disk carving (PhotoRec, foremost)\n```\n",{"name":5,"metadata":24,"description":7,"allowed-tools":29},{"tags":25,"subdomain":26,"when_to_use":27,"mitre_attack":28},"ransomware, encryption, decryptor, key recovery, incident response","reverser","ransomware encrypted files ransom note decrypt recovery key lockbit revil conti blackcat alphv encryption crypto aes rsa chacha payment bitcoin","T1486, T1490, T1489","Bash Read Write","master","8e5d356b795eae2edd4a26509a4b8968e2c4c251","packages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Freverser\u002Fransomware-analysis","https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix","https:\u002F\u002Fgithub.com\u002FAkapi895","2026-11-06 17:46:09",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add Akapi895\u002Fraptix --skill reverser-ransomware-analysis",{"tool":42,"command":43},"bunx","bunx skills add Akapi895\u002Fraptix --skill reverser-ransomware-analysis",{"tool":45,"command":46},"pnpm","pnpm dlx skills add Akapi895\u002Fraptix --skill reverser-ransomware-analysis","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Freverser\u002Fransomware-analysis\u002FSKILL.md",true,[],[51,58,65,72,79,86],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":19},"01M7DGM32SRP4FZSPYWY621BKQ","wps-pixie-dust","WPS Pixie-Dust offline nonce attack (reaver -K \u002F pixiewps) and fallback online PIN brute (bully) to recover the AP's WPA PSK without capturing a handshake.","https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Fwireless\u002Fwps-pixie-dust\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M7DGKXXVDTY0KBZZR83VFPZX","wpa3-sae","WPA3-SAE transition-mode downgrade (DragonShift), SSID Confusion CVE-2023-52424, Dragonblood side-channels, and SAE captive-portal credential recovery against WPA3-Personal networks.","https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Fwireless\u002Fwpa3-sae\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7DGKSV77ENX3D6TG2HQX9MK","wpa2-psk","WPA\u002FWPA2-PSK handshake capture via targeted deauth + PMKID (no deauth required) + offline hashcat cracking. The most common consumer\u002FSMB encryption mode in 2026.","https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Fwireless\u002Fwpa2-psk\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7DGKJ9R6YTFRFBSEAJRGGKF","wpa-enterprise-eap","WPA\u002FWPA2\u002FWPA3-Enterprise (802.1X\u002FEAP) rogue-RADIUS evil-twin for MSCHAPv2 capture, GTC downgrade, and PEAP relay. MSCHAPv2 capture equals a NetNTLM hash — the primary wireless on-ramp to Active Directory.","https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Fwireless\u002Fwpa-enterprise-eap\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7DGKCFZGKK2EQMWZM1A18S8","krack-fragattacks","KRACK key-reinstallation (CVE-2017-13077..13082) and FragAttacks fragmentation\u002Faggregation flaws (CVE-2020-24586..24588, CVE-2020-26139..26147) against legacy or embedded 802.11 supplicants with poor patch cadence.","https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Fwireless\u002Fkrack-fragattacks\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7DGK76MKZQWBXTZN82W7214","evil-twin-karma","Evil-twin rogue AP with KARMA\u002FMana PNL-probe response, captive-portal credential capture, and post-association MITM for PSK\u002Fopen networks. Distinct from wpa-enterprise-eap which targets 802.1X.","https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Fwireless\u002Fevil-twin-karma\u002FSKILL.md",[],[]]