costrict-plugins-repo/mukul975-anthropic-cybersecurity-skills-cybersecurity-skills/analyzing-ransomware-encryption-mechanisms
Claude Code and agent skill by costrict-plugins-repo/mukul975-anthropic-cybersecurity-skills-cybersecurity-skills
- community
Checking that the SKILL.md file is still in the repository.
'Analyzes encryption algorithms, key management, and file encryption
Install
npx vskill@latest install costrict-plugins-repo/mukul975-anthropic-cybersecurity-skills-cybersecurity-skills/analyzing-ransomware-encryption-mechanismsSKILL.md
The same SKILL.md was published earlier as costrict-plugins-repo/mukul975-anthropic-cybersecurity-skills-cybersecurity-skills/analyzing-ransomware-encryption-mechanisms.
Analyzing Ransomware Encryption Mechanisms
When to Use
- A ransomware infection has occurred and recovery requires understanding the encryption scheme used
- Assessing whether decryption is possible without paying the ransom (implementation flaws, known decryptors)
- Reverse engineering ransomware to identify the encryption algorithm, key derivation, and key storage mechanism
- Developing a decryptor tool when a weakness in the ransomware's cryptographic implementation is identified
- Classifying a ransomware sample by its encryption approach to attribute it to a known family
Do not use for production data recovery operations without first verifying the decryption method on test copies of encrypted files.
Prerequisites
- Ghidra or IDA Pro for reverse engineering the ransomware binary
- Python 3.8+ with
pycryptodomelibrary for testing encryption/decryption routines - Sample encrypted files and their corresponding plaintext originals (known-plaintext pairs)
- Access to the ransomware binary (unpacked if applicable)
- Familiarity with symmetric (AES, ChaCha20) and asymmetric (RSA) cryptographic algorithms
- NoMoreRansom.org database for checking existing free decryptors
Workflow
Step 1: Identify the Encryption Algorithm
Determine which cryptographic algorithm the ransomware uses:
Step 2: Analyze Key Generation and Management
Reverse engineer how encryption keys are generated and stored:
Step 3: Examine File Encryption Routine
Reverse engineer the file processing logic:
Step 4: Check for Cryptographic Weaknesses
Test the implementation for exploitable flaws:
Step 5: Attempt Key Recovery
Use identified weaknesses for key recovery:
Step 6: Document Encryption Analysis
Compile findings into a structured report:
Key Concepts
| Term | Definition | |
|---|---|---|
| Hybrid Encryption | Combining symmetric (AES) for fast file encryption with asymmetric (RSA) for secure key wrapping; the standard ransomware approach | |
| Key Wrapping | Encrypting the per-file symmetric key with the attacker's RSA public key so only the attacker's private key can decrypt it | |
| ECB Mode | Electronic Codebook mode encrypts each block independently; preserves patterns in plaintext, a critical weakness enabling partial recovery | |
| Known-Plaintext Attack | Using a known original file and its encrypted version to derive the encryption key; effective against XOR and weak stream ciphers | |
| Key Schedule | The expanded form of an AES key in memory; scannable in memory dumps to recover encryption keys before they are erased | |
| CSPRNG | Cryptographically Secure Pseudo-Random Number Generator; ransomware using CryptGenRandom produces unpredictable keys | |
| Partial Encryption | Some ransomware only encrypts the first N bytes or every Nth block for speed; unencrypted portions may aid recovery |
Tools & Systems
- Ghidra: Reverse engineering suite for analyzing ransomware encryption routines at the assembly level
- PyCryptodome: Python cryptographic library for implementing and testing decryption routines
- NoMoreRansom.org: Free decryption tool repository maintained by Europol and security vendors for known ransomware families
- Volatility: Memory forensics framework for extracting encryption keys from RAM dumps of infected systems
- CryptoTester: Tool for identifying cryptographic algorithms based on constants and code patterns
Common Scenarios
Scenario: Assessing Decryption Feasibility for a Ransomware Incident
Context: An organization is hit with ransomware encrypting file servers. Management needs to know if decryption is possible without paying the ransom before making a recovery decision.
Approach:
- Identify the ransomware family from ransom note, file extension, and sample hash (check ID Ransomware)
- Check NoMoreRansom.org for existing free decryptors for this family
- Reverse engineer the encryption routine in Ghidra to identify the algorithm and key management
- Test for implementation weaknesses (key reuse, predictable seeds, ECB mode)
- Check if PCAP from the incident captured the key transmission to C2 (if key was sent before encryption)
- Scan memory dumps from affected machines for AES key schedules in RAM
- Report findings: decryption possible/impossible with specific technical justification
Pitfalls:
- Testing decryption methods on the only copy of encrypted files (always work on copies)
- Assuming all files use the same key without verifying (some ransomware uses per-file keys)
- Not checking for volume shadow copies (vssadmin) which ransomware may have failed to delete
- Confusing the file encryption algorithm with the key wrapping algorithm in reports
Output Format
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/analyzing-ransomware-encryption-mechanisms/SKILL.md
Popularity
- Repository stars
- 72
- Repository forks
- 11
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/costrict-plugins-repo/mukul975-anthropic-cybersecurity-skills-cybersecurity-skills/analyzing-ransomware-encryption-mechanisms)