Analyzing Ransomware Network Indicators
Overview
Before and during ransomware execution, adversaries establish C2 channels, exfiltrate data, and download encryption keys. This skill analyzes Zeek conn.log and NetFlow data to detect beaconing patterns (regular-interval callbacks), connections to known TOR exit nodes, large outbound data transfers, and suspicious DNS activity associated with ransomware families.
When to Use
Trigger phrases:
"analyzing ransomware network indicators"
"Identify ransomware network indicators including C2 beaconing patterns, TOR exit"
When investigating security incidents that require analyzing ransomware network indicators
When building detection rules or threat hunting queries for this domain
When SOC analysts need structured procedures for this analysis type
When validating security monitoring coverage for related attack techniques
Prerequisites
- Zeek conn.log files or NetFlow CSV/JSON exports
- Python 3.8+ with standard library
- TOR exit node list (fetched from Tor Project or threat intel feeds)
- Optional: Known ransomware C2 IOC list
Steps
# Example: IOC detection
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",
}
def extract_iocs(text: str) -> dict:
return {k: re.findall(v, text) for k, v in IOC_PATTERNS.items()}
- Parse Connection Logs — Ingest Zeek conn.log (TSV) or NetFlow records into structured format
- Detect Beaconing Patterns — Calculate connection interval statistics (mean, stddev, coefficient of variation) to identify periodic callbacks
- Check TOR Exit Node Connections — Cross-reference destination IPs against current TOR exit node list
- Identify Data Exfiltration — Flag connections with unusually high outbound byte ratios to external IPs
- Analyze DNS Patterns — Detect DGA-like domain queries and high-entropy subdomains
- Score and Correlate — Apply composite risk scoring across all indicator types
- Generate Report — Produce structured report with timeline and MITRE ATT&CK mapping
Expected Output
- JSON report with beaconing detections and interval statistics
- TOR exit node connection alerts
- Data exfiltration flow analysis
- Composite ransomware risk score with MITRE mapping (T1071, T1573, T1041)
When NOT to Use
- You need to perform the attack, not analyze it (use performing-* skills)
- Task is about detection, not analysis (use detecting-* skills)
- You need to implement controls (use implementing-* skills)
- Task is about threat hunting, not post-incident analysis (use hunting-* skills)
- You don't have access to the artifacts/logs to analyze
- Task requires real-time monitoring (use SOC tools)
Red Flags
- Performing actions without explicit written authorization from the asset owner
- Testing against production systems without a defined scope and rules of engagement
- Capturing traffic on networks without authorization or privacy considerations
- Leaving packet captures containing sensitive data unencrypted on disk
- Deploying inline blocking rules without testing for false positives first
Process
- Scope — Define research questions, identify data sources, set time boundaries
- Gather — Collect data from primary sources, APIs, and public records
- Synthesize — Analyze findings, identify patterns, produce actionable report
Verification
- All steps executed successfully against a test environment before production use
- Output documented with screenshots or logs demonstrating expected behavior
- Captures verified as complete with no dropped packets
- Detection rules tested against known-benign traffic for false positive rate
- Alert thresholds validated and tuned to reduce noise
Anti-Rationalization Table
| Rationalization |
Reality |
| "We are too small to be targeted" |
Automated attacks target everyone. Size does not matter. |
| "Security slows us down" |
A breach slows you down 100x more. Build security in from the start. |
| "We will fix it after launch" |
Vulnerabilities in production are exploited within hours. Fix before deploy. |
1---2name: analyzing-ransomware-network-indicators3description: Use when identify ransomware network indicators including C2 beaconing patterns, TOR exit node connections, data exfiltration flows, and encryption key exchange via Zeek conn.log and NetFlow analysis. Use when working with analyzing ransomware network indicators.4license: Apache-2.05---678# Analyzing Ransomware Network Indicators910## Overview1112Before and during ransomware execution, adversaries establish C2 channels, exfiltrate data, and download encryption keys. This skill analyzes Zeek conn.log and NetFlow data to detect beaconing patterns (regular-interval callbacks), connections to known TOR exit nodes, large outbound data transfers, and suspicious DNS activity associated with ransomware families.131415## When to Use16**Trigger phrases:**17- "analyzing ransomware network indicators"18- "Identify ransomware network indicators including C2 beaconing patterns, TOR exit"192021- When investigating security incidents that require analyzing ransomware network indicators22- When building detection rules or threat hunting queries for this domain23- When SOC analysts need structured procedures for this analysis type24- When validating security monitoring coverage for related attack techniques2526## Prerequisites2728- Zeek conn.log files or NetFlow CSV/JSON exports29- Python 3.8+ with standard library30- TOR exit node list (fetched from Tor Project or threat intel feeds)31- Optional: Known ransomware C2 IOC list3233## Steps3435```python36# Example: IOC detection37import re3839IOC_PATTERNS = {40 "ip": r"\b(?:\d{1,3}\.){3}\d{1,3}\b",41 "domain": r"\b[a-z0-9-]+\.[a-z]{2,}\b",42 "hash_md5": r"\b[a-f0-9]{32}\b",43 "hash_sha256": r"\b[a-f0-9]{64}\b",44}4546def extract_iocs(text: str) -> dict:47 return {k: re.findall(v, text) for k, v in IOC_PATTERNS.items()}48```49501. **Parse Connection Logs** — Ingest Zeek conn.log (TSV) or NetFlow records into structured format512. **Detect Beaconing Patterns** — Calculate connection interval statistics (mean, stddev, coefficient of variation) to identify periodic callbacks523. **Check TOR Exit Node Connections** — Cross-reference destination IPs against current TOR exit node list534. **Identify Data Exfiltration** — Flag connections with unusually high outbound byte ratios to external IPs545. **Analyze DNS Patterns** — Detect DGA-like domain queries and high-entropy subdomains556. **Score and Correlate** — Apply composite risk scoring across all indicator types567. **Generate Report** — Produce structured report with timeline and MITRE ATT&CK mapping5758## Expected Output5960- JSON report with beaconing detections and interval statistics61- TOR exit node connection alerts62- Data exfiltration flow analysis63- Composite ransomware risk score with MITRE mapping (T1071, T1573, T1041)64## When NOT to Use6566- You need to perform the attack, not analyze it (use performing-* skills)67- Task is about detection, not analysis (use detecting-* skills)68- You need to implement controls (use implementing-* skills)69- Task is about threat hunting, not post-incident analysis (use hunting-* skills)70- You don't have access to the artifacts/logs to analyze71- Task requires real-time monitoring (use SOC tools)727374## Red Flags7576- Performing actions without explicit written authorization from the asset owner77- Testing against production systems without a defined scope and rules of engagement78- Capturing traffic on networks without authorization or privacy considerations79- Leaving packet captures containing sensitive data unencrypted on disk80- Deploying inline blocking rules without testing for false positives first8182## Process83841. **Scope** — Define research questions, identify data sources, set time boundaries851. **Gather** — Collect data from primary sources, APIs, and public records861. **Synthesize** — Analyze findings, identify patterns, produce actionable report8788## Verification8990- All steps executed successfully against a test environment before production use91- Output documented with screenshots or logs demonstrating expected behavior92- Captures verified as complete with no dropped packets93- Detection rules tested against known-benign traffic for false positive rate94- Alert thresholds validated and tuned to reduce noise9596## Anti-Rationalization Table9798| Rationalization | Reality |99|---|---|100| "We are too small to be targeted" | Automated attacks target everyone. Size does not matter. |101| "Security slows us down" | A breach slows you down 100x more. Build security in from the start. |102| "We will fix it after launch" | Vulnerabilities in production are exploited within hours. Fix before deploy. |