| name | analyzing-ransomware-encryption-mechanisms |
| description | Use when analyzing encryption algorithms, key management, and file encryption routines used by ransomware families to assess decryption feasibility, identify implementation weaknesses, and support recovery efforts. Covers AES, RSA, ChaCha20, and hybrid encryption schemes. Activates for requests involving ransomware cryptanalysis, encryption analysis, key recovery assessment, or ransomware decryption feasibility. |
| domain | cybersecurity |
| tags | ["malware","ransomware","encryption","cryptanalysis","reverse-engineering"] |
| subdomain | malware-analysis |
| version | 1.0.0 |
| author | oyi77 |
| license | Apache-2.0 |
| nist_csf | ["DE.AE-02","RS.AN-03","ID.RA-01","DE.CM-01"] |
Analyzing Ransomware Encryption Mechanisms
Overview
Cybersecurity skill for analyzing ransomware encryption mechanisms. Follows industry best practices and security standards.
When to Use
Trigger phrases:
-
"analyzing ransomware encryption mechanisms"
-
"Analyzes encryption algorithms, key management, and file encryption routines 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.
When NOT to Use
- When you lack proper authorization for testing
- For production systems without change management
- When the task requires legal or compliance expertise beyond technical scope
Prerequisites
- Ghidra or IDA Pro for reverse engineering the ransomware binary
- Python 3.8+ with
pycryptodome library 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
import re
IOC_PATTERNS = {
"ip": r"\b(?:\d{1,3}\.){3}\d{1,3}\b",
"domain": r"\b[a-z0-9-]+\.[a-z]{2,}\b",
"hash_md5": r"\b[a-f0-9]{32}\b",
"hash_sha256": r"\b[a-f0-9]{64}\b",
}
() -> :
{k: re.findall(v, text) k, v IOC_PATTERNS.items()}