Ransomware

Ransomware

One-liner: Malware that encrypts files or locks systems and demands payment for restoration.

🎯 What Is It?

Ransomware is malicious software that prevents users from accessing their systems or data by encrypting files or locking the screen, then demanding a ransom (typically in cryptocurrency) for decryption keys. It's one of the most financially damaging cyber threats.

🔐 Types of Ransomware

1. Crypto Ransomware (File Encryption)

Encrypts files and demands payment for decryption key.

Examples:

Behavior:

1. Infection (email, exploit, RDP)
2. Privilege escalation
3. Disable backups / shadow copies
4. Encrypt files (.doc, .pdf, .jpg, databases)
5. Drop ransom note (README.txt, HOW_TO_DECRYPT.html)
6. Demand payment (Bitcoin, Monero)

2. Locker Ransomware (Screen Lock)

Locks the entire system, preventing access.

Examples:

Less common since crypto ransomware is more effective.

3. Double Extortion

Encrypts AND exfiltrates data, threatening to leak it.

Examples:

Tactic:

Encrypt files + Steal sensitive data + Threaten public leak

Victim must pay to:

  1. Get decryption key
  2. Prevent data leak

4. Ransomware-as-a-Service (RaaS)

Ransomware sold/rented to affiliates (profit-sharing model).

Examples:

Business Model:

Developer creates ransomware → Affiliate deploys it → Split ransom

⛓️ Ransomware Kill Chain

1. Initial Access
   • Phishing emails with malicious attachments
   • EternalBlue)
   • [[Brute-force]] RDP credentials
   • Compromised websites (drive-by download)

2. Execution
   • Macro-enabled Office docs
   • HTA files
   • JavaScript downloaders

3. Persistence
   • Registry keys (Run, RunOnce)
   • Scheduled tasks
   • [[Rootkits]]

4. Privilege Escalation
   • Exploit local vulnerabilities
   • Credential theft ([[NTLM]])

5. Defense Evasion
   • Disable antivirus
   • Delete shadow copies: `vssadmin delete shadows /all`
   • Stop backup services

6. Lateral Movement (for targeted attacks)
   • Spread via network shares (SMB)
   • Use Lateral Movement techniques

7. Impact
   • Encrypt files with strong crypto (AES + RSA)
   • Delete backups
   • Drop ransom note

🔍 Detection Indicators

Behavioral IOCs

Sysmon Detection Example

Process: vssadmin.exe
CommandLine: delete shadows /all /quiet

Process: wbadmin.exe  
CommandLine: delete catalog -quiet

Process: bcdedit.exe
CommandLine: /set {default} recoveryenabled No

Network IOCs

🛡️ Prevention & Mitigation

1. Backups (3-2-1 Rule)

3 copies of data
2 different media types
1 offsite/offline backup

2. Email Security

3. Patch Management

4. Endpoint Protection

5. Network Segmentation

6. Least Privilege

7. Monitor for Indicators

📊 Notable Ransomware Attacks

Attack Year Impact Notes
WannaCry 2017 300K+ systems, 150 countries Used EternalBlue, NHS crippled
NotPetya 2017 $10B+ damages Disguised as ransomware, actually wiper
Colonial Pipeline 2021 US fuel shortage DarkSide RaaS, $4.4M ransom paid
JBS Foods 2021 Meat supply disruption REvil, $11M paid
Kaseya 2021 1,500+ businesses REvil supply chain attack
CryptoLocker 2013-2014 $3M+ extorted First major crypto ransomware

💸 Ransom Payment Considerations

Should You Pay?

Arguments Against:

Reality:

If You Must Pay

  1. Engage ransomware negotiation firm
  2. Document everything (legal, insurance)
  3. Report to FBI (IC3.gov)
  4. Get legal advice (sanctions compliance)

🎤 Interview Angles

Q: How would you detect ransomware in your environment?

STAR Example:
Situation: Need to detect ransomware before mass encryption.
Task: Build early-warning detection.
Action:

Q: What's the best defense against ransomware?

Q: What's double extortion?