Detecting Ransomware Precursors in Network Traffic
When to Use
- Building detection rules for pre-ransomware network activity (the average time from Cobalt Strike deployment to encryption is 17 minutes)
- Monitoring for initial access broker (IAB) indicators that precede ransomware deployment
- Creating SIEM correlation rules that chain multiple precursor events into high-confidence alerts
- Tuning network detection systems to distinguish ransomware staging from normal administrative activity
- Investigating suspicious network patterns that may indicate ransomware operators have established a foothold
Do not use for post-encryption response (see recovering-from-ransomware-attack). This skill focuses on the pre-encryption detection window where containment can prevent data loss.
Prerequisites
- Network detection platform (Zeek/Bro, Suricata, or Arkime/Moloch) deployed on network TAP or SPAN ports
- SIEM platform (Splunk, Elastic Security, Microsoft Sentinel, or QRadar) ingesting network logs
- Threat intelligence feeds covering ransomware IOCs (CISA, abuse.ch, OTX, MISP)
- Network flow data (NetFlow/IPFIX) from core routers and firewalls
- DNS query logging from internal resolvers
- Full packet capture capability for incident investigation
Workflow
Step 1: Identify Ransomware Kill Chain Phases in Network Traffic
Map network-observable indicators to each pre-encryption phase:
| Kill Chain Phase |
Network Indicators |
Detection Source |
| Initial Access |
RDP brute force, VPN credential stuffing, phishing callback |
Firewall logs, IDS, proxy logs |
| C2 Establishment |
Cobalt Strike beacons (HTTPS/DNS), Sliver/Brute Ratel callbacks |
Zeek SSL/HTTP logs, DNS logs |
| Credential Harvesting |
NTLM relay, Kerberoasting, DCSync traffic |
Zeek Kerberos/NTLM logs, DC logs |
| Reconnaissance |
Internal port scanning, AD enumeration (LDAP/SMB) |
Zeek conn.log, flow data |
| Lateral Movement |
PsExec/WMI/WinRM traffic, RDP pivoting, SMB file copies |
Zeek SMB/DCE-RPC logs |
| Staging |
Data aggregation, archive creation, cloud upload prep |
Proxy logs, DNS logs, DLP |
Step 2: Deploy Network Detection Rules
Suricata rules for common ransomware precursors:
# Cobalt Strike default HTTPS beacon profile detection
alert tls $HOME_NET any -> $EXTERNAL_NET any (msg:"RANSOMWARE PRECURSOR - Cobalt Strike Default TLS Certificate"; tls.cert_subject; content:"Major Cobalt Strike"; sid:3000001; rev:1;)
# Cobalt Strike DNS beacon
alert dns $HOME_NET any -> any 53 (msg:"RANSOMWARE PRECURSOR - Cobalt Strike DNS Beacon Pattern"; dns.query; pcre:"/^[a-z0-9]{3}\.[a-z]{4,8}\./"; threshold:type both, track by_src, count 50, seconds 60; sid:3000002; rev:1;)
# Mimikatz network signature (DCSync - DRS GetNCChanges)
alert tcp $HOME_NET any -> $HOME_NET 135 (msg:"RANSOMWARE PRECURSOR - Possible DCSync/Mimikatz"; content:"|05 00 0b|"; offset:0; depth:3; content:"|e3 51 4d 2b 4b 47 15 d2|"; sid:3000003; rev:1;)
# Internal network scanning (many connections, few bytes)
alert tcp $HOME_NET any -> $HOME_NET any (msg:"RANSOMWARE PRECURSOR - Internal Port Scan"; flags:S; threshold:type both, track by_src, count 100, seconds 10; sid:3000004; rev:1;)
# PsExec service installation over SMB
alert tcp $HOME_NET any -> $HOME_NET 445 (msg:"RANSOMWARE PRECURSOR - PsExec Service Install"; content:"|ff|SMB"; content:"PSEXESVC"; nocase; sid:3000005; rev:1;)
# RDP brute force from internal host (lateral movement)
alert tcp $HOME_NET any -> $HOME_NET 3389 (msg:"RANSOMWARE PRECURSOR - Internal RDP Brute Force"; flow:to_server,established; threshold:type both, track by_src, count 20, seconds 60; sid:3000006; rev:1;)
# Large SMB file transfer (data staging)
alert tcp $HOME_NET any -> $HOME_NET 445 (msg:"RANSOMWARE PRECURSOR - Large SMB Transfer Possible Staging"; flow:to_server,established; dsize:>60000; threshold:type both, track by_src, count 100, seconds 300; sid:3000007; rev:1;)
Zeek scripts for behavioral detection:
# detect_ransomware_precursors.zeek
# Detect high volume of failed SMB connections (credential testing)
@load base/protocols/smb
module RansomwarePrecursor;
export {
redef enum Notice::Type += {
SMB_Brute_Force,
Suspicious_Internal_Scan,
Excessive_DNS_Queries,
SMB_Admin_Share_Access,
};
const smb_fail_threshold = 10 &redef;
const scan_threshold = 50 &redef;
const dns_query_threshold = 200 &redef;
}
global smb_fail_count: table[addr] of count &default=0 &create_expire=5min;
global conn_count: table[addr] of set[addr] &create_expire=1min;
event smb2_message(c: connection, hdr: SMB2::Header, is_orig: bool) {
if (hdr$status != 0) {
++smb_fail_count[c$id$orig_h];
if (smb_fail_count[c$id$orig_h] >= smb_fail_threshold) {
NOTICE([$note=SMB_Brute_Force,
$msg=fmt("Host %s has %d failed SMB attempts", c$id$orig_h, smb_fail_count[c$id$orig_h]),
$src=c$id$orig_h,
$identifier=cat(c$id$orig_h)]);
}
}
}
event new_connection(c: connection) {
if (c$id$orig_h in Site::local_nets && c$id$resp_h in Site::local_nets) {
if (c$id$orig_h !in conn_count)
conn_count[c$id$orig_h] = set();
add conn_count[c$id$orig_h][c$id$resp_h];
if (|conn_count[c$id$orig_h]| >= scan_threshold) {
NOTICE([$note=Suspicious_Internal_Scan,
$msg=fmt("Host %s connected to %d internal hosts in 1 min", c$id$orig_h, |conn_count[c$id$orig_h]|),
$src=c$id$orig_h,
$identifier=cat(c$id$orig_h)]);
}
}
}
Step 3: Create SIEM Correlation Rules
Splunk correlation for ransomware precursor chain:
| tstats count FROM datamodel=Network_Traffic
WHERE earliest=-24h All_Traffic.dest_port IN (445, 135, 139, 3389, 5985, 5986)
AND All_Traffic.src_ip IN 10.0.0.0/8
AND All_Traffic.dest_ip IN 10.0.0.0/8
BY All_Traffic.src_ip, All_Traffic.dest_port, _time span=1h
| stats dc(All_Traffic.dest_port) as port_count,
values(All_Traffic.dest_port) as ports,
count as total_conns
BY All_Traffic.src_ip
| where port_count >= 3 AND total_conns > 50
| rename All_Traffic.src_ip as src_ip
| lookup threat_intel_ioc ip as src_ip OUTPUT threat_type
| eval risk_score = case(
port_count >= 5 AND total_conns > 200, "CRITICAL",
port_count >= 3 AND total_conns > 50, "HIGH",
1=1, "MEDIUM")
| table src_ip, ports, port_count, total_conns, risk_score, threat_type
Microsoft Sentinel KQL - Ransomware precursor correlation:
let timeframe = 24h;
let RDPBruteForce = SecurityEvent
| where TimeGenerated > ago(timeframe)
| where EventID == 4625
| where LogonType == 10
| summarize FailedRDP = count() by TargetAccount, IpAddress, bin(TimeGenerated, 1h)
| where FailedRDP > 10;
let SuspiciousSMB = SecurityEvent
| where TimeGenerated > ago(timeframe)
| where EventID == 5145
| where ShareName has "ADMIN$" or ShareName has "C$" or ShareName has "IPC$"
| summarize AdminShareAccess = count() by SubjectUserName, IpAddress, bin(TimeGenerated, 1h)
| where AdminShareAccess > 5;
let ServiceInstalls = SecurityEvent
| where TimeGenerated > ago(timeframe)
| where EventID == 7045
| where ServiceName has_any ("PSEXESVC", "meterpreter", "beacon");
RDPBruteForce
| join kind=inner SuspiciousSMB on IpAddress
| project TimeGenerated, IpAddress, TargetAccount, FailedRDP, SubjectUserName, AdminShareAccess
| extend AlertTitle = "Ransomware Precursor: RDP Brute Force + Admin Share Access"
Step 4: Integrate Threat Intelligence
Configure automated IOC feeds for known ransomware infrastructure:
# Download and update ransomware C2 blocklists
# abuse.ch Feodo Tracker (Cobalt Strike, TrickBot, BazarLoader C2s)
curl -s https://feodotracker.abuse.ch/downloads/ipblocklist.csv | \
grep -v "^#" | cut -d, -f2 > /opt/threat-intel/feodo_ips.txt
# abuse.ch URLhaus (malware distribution URLs)
curl -s https://urlhaus.abuse.ch/downloads/csv_recent/ | \
grep -v "^#" | cut -d, -f3 > /opt/threat-intel/urlhaus_urls.txt
# abuse.ch ThreatFox (ransomware IOCs)
curl -s https://threatfox.abuse.ch/export/csv/recent/ | \
grep -i "ransomware" | cut -d, -f3 > /opt/threat-intel/ransomware_iocs.txt
# CISA Known Exploited Vulnerabilities (initial access vectors)
curl -s https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json | \
python3 -c "import json,sys; data=json.load(sys.stdin); [print(v['cveID'],v['vendorProject'],v['product']) for v in data['vulnerabilities'] if 'ransomware' in v.get('knownRansomwareCampaignUse','').lower()]"
Step 5: Establish Alert Triage and Escalation
Define triage procedures based on precursor confidence level:
| Alert Type |
Confidence |
Response Time |
Action |
| Confirmed Cobalt Strike beacon |
High |
15 minutes |
Isolate host immediately, trigger IR |
| DCSync/Kerberoasting from non-DC |
High |
15 minutes |
Disable account, isolate host, trigger IR |
| Internal port scan + admin share access |
Medium-High |
30 minutes |
Investigate source host, check EDR telemetry |
| RDP brute force from internal host |
Medium |
1 hour |
Verify if legitimate admin activity, check host |
| Unusual DNS query volume |
Low-Medium |
4 hours |
Check for DNS tunneling, correlate with other alerts |
Key Concepts
| Term |
Definition |
| Ransomware Precursor |
Network activity that precedes ransomware encryption, including C2 communication, lateral movement, and data staging |
| Dwell Time |
Time between initial compromise and ransomware deployment, averaging 21 days but sometimes as short as 17 minutes |
| Initial Access Broker (IAB) |
Threat actors who sell compromised network access to ransomware operators on dark web markets |
| Beaconing |
Periodic C2 callbacks from implants (Cobalt Strike, Sliver) that can be detected by analyzing connection timing patterns |
| Kerberoasting |
Credential harvesting technique requesting Kerberos service tickets for offline cracking, detectable via unusual TGS-REQ patterns |
| DCSync |
Technique using Directory Replication Service to extract password hashes from domain controllers, critical ransomware precursor |
Tools & Systems
- Zeek (formerly Bro): Network analysis framework generating structured logs for SMB, Kerberos, DNS, HTTP, and TLS connections
- Suricata: High-performance IDS/IPS with protocol analysis and multi-threading support for ransomware signature detection
- Arkime (formerly Moloch): Full packet capture and search platform for deep forensic investigation of network events
- RITA (Real Intelligence Threat Analytics): Open-source tool for detecting beaconing, DNS tunneling, and long connections in Zeek logs
- AC-Hunter: Network threat hunting platform from Active Countermeasures for beacon detection and C2 identification
Common Scenarios
Scenario: Detecting LockBit Precursors in a Manufacturing Network
Context: A manufacturing company's SOC receives an alert for unusual SMB traffic from a workstation (10.1.5.42) in the engineering department. The workstation connected to 47 internal hosts on port 445 within 5 minutes at 2:00 AM.
Approach:
- Zeek conn.log analysis shows 10.1.5.42 initiated connections to 47 unique internal IPs on port 445, 135, and 3389 between 01:55-02:05
- Zeek ssl.log reveals an outbound HTTPS connection to 185.x.x.x every 60 seconds with consistent 48-byte payloads (Cobalt Strike beacon pattern)
- RITA beacon analysis confirms high beacon score (0.96) for the external IP with 60-second jitter
- Zeek kerberos.log shows TGS-REQ for multiple SPN accounts from 10.1.5.42 (Kerberoasting)
- SMB tree_connect events show access to ADMIN$ shares on 12 hosts (lateral movement staging)
- Containment: Host isolated, credentials for engineering user reset, blocking rule for C2 IP deployed
- Full IR initiated before ransomware deployment could begin
Pitfalls:
- Dismissing internal port scans as vulnerability scanner activity without verifying the source is an authorized scanner
- Not correlating individual low-severity alerts (DNS anomaly + SMB access + failed logins) into a high-severity chain
- Setting detection thresholds too high to avoid false positives, missing low-and-slow reconnaissance
- Ignoring encrypted traffic analysis (JA3/JA4 fingerprinting) that can identify Cobalt Strike even in TLS tunnels
Output Format
## Ransomware Precursor Detection Alert
**Alert ID**: [SIEM-generated ID]
**Detection Time**: [Timestamp]
**Source Host**: [IP / Hostname]
**Confidence**: [High / Medium / Low]
**Kill Chain Phase**: [Initial Access / C2 / Credential Harvest / Recon / Lateral Movement / Staging]
### Indicators Detected
| Indicator | Source | Detail | MITRE ATT&CK |
|-----------|--------|--------|--------------|
| [Type] | [Zeek/Suricata/SIEM] | [Description] | [T-ID] |
### Correlation Chain
1. [Timestamp] - [Event 1]
2. [Timestamp] - [Event 2]
3. [Timestamp] - [Event 3]
### Recommended Actions
- [ ] Isolate source host from network
- [ ] Check EDR telemetry for host-based indicators
- [ ] Reset credentials for affected user accounts
- [ ] Block identified C2 infrastructure
- [ ] Escalate to incident response team
Source: mukul975/Anthropic-Cybersecurity-Skills → skills/detecting-ransomware-precursors-in-network/SKILL.md
1---2name: detecting-ransomware-precursors-in-network3description: 'Detects early-stage ransomware indicators in network traffic before encryption begins, including initial access broker activity, command-and-control beaconing, credential harvesting, reconnaissance scanning, and staging behavior. Uses network detection tools (Zeek, Suricata, Arkime), SIEM correlation rules, and threat intelligence feeds to identify ransomware precursor patterns such as Cobalt Strike beacons, Mimikatz network signatures, and RDP brute-force attempts. Activates for requests involving pre-ransomware detection, network-based ransomware indicators, or early warning ransomware monitoring. '4---5
6# Detecting Ransomware Precursors in Network Traffic
7
8## When to Use
9
10- Building detection rules for pre-ransomware network activity (the average time from Cobalt Strike deployment to encryption is 17 minutes)
11- Monitoring for initial access broker (IAB) indicators that precede ransomware deployment
12- Creating SIEM correlation rules that chain multiple precursor events into high-confidence alerts
13- Tuning network detection systems to distinguish ransomware staging from normal administrative activity
14- Investigating suspicious network patterns that may indicate ransomware operators have established a foothold
15
16**Do not use** for post-encryption response (see recovering-from-ransomware-attack). This skill focuses on the pre-encryption detection window where containment can prevent data loss.
17
18## Prerequisites
19
20- Network detection platform (Zeek/Bro, Suricata, or Arkime/Moloch) deployed on network TAP or SPAN ports
21- SIEM platform (Splunk, Elastic Security, Microsoft Sentinel, or QRadar) ingesting network logs
22- Threat intelligence feeds covering ransomware IOCs (CISA, abuse.ch, OTX, MISP)
23- Network flow data (NetFlow/IPFIX) from core routers and firewalls
24- DNS query logging from internal resolvers
25- Full packet capture capability for incident investigation
26
27## Workflow
28
29### Step 1: Identify Ransomware Kill Chain Phases in Network Traffic
30
31Map network-observable indicators to each pre-encryption phase:
32
33| Kill Chain Phase | Network Indicators | Detection Source |
34|------------------|--------------------|------------------|
35| Initial Access | RDP brute force, VPN credential stuffing, phishing callback | Firewall logs, IDS, proxy logs |
36| C2 Establishment | Cobalt Strike beacons (HTTPS/DNS), Sliver/Brute Ratel callbacks | Zeek SSL/HTTP logs, DNS logs |
37| Credential Harvesting | NTLM relay, Kerberoasting, DCSync traffic | Zeek Kerberos/NTLM logs, DC logs |
38| Reconnaissance | Internal port scanning, AD enumeration (LDAP/SMB) | Zeek conn.log, flow data |
39| Lateral Movement | PsExec/WMI/WinRM traffic, RDP pivoting, SMB file copies | Zeek SMB/DCE-RPC logs |
40| Staging | Data aggregation, archive creation, cloud upload prep | Proxy logs, DNS logs, DLP |
41
42### Step 2: Deploy Network Detection Rules
43
44**Suricata rules for common ransomware precursors:**
45
46```yaml
47# Cobalt Strike default HTTPS beacon profile detection
48alert tls $HOME_NET any -> $EXTERNAL_NET any (msg:"RANSOMWARE PRECURSOR - Cobalt Strike Default TLS Certificate"; tls.cert_subject; content:"Major Cobalt Strike"; sid:3000001; rev:1;)
49
50# Cobalt Strike DNS beacon
51alert dns $HOME_NET any -> any 53 (msg:"RANSOMWARE PRECURSOR - Cobalt Strike DNS Beacon Pattern"; dns.query; pcre:"/^[a-z0-9]{3}\.[a-z]{4,8}\./"; threshold:type both, track by_src, count 50, seconds 60; sid:3000002; rev:1;)
52
53# Mimikatz network signature (DCSync - DRS GetNCChanges)
54alert tcp $HOME_NET any -> $HOME_NET 135 (msg:"RANSOMWARE PRECURSOR - Possible DCSync/Mimikatz"; content:"|05 00 0b|"; offset:0; depth:3; content:"|e3 51 4d 2b 4b 47 15 d2|"; sid:3000003; rev:1;)
55
56# Internal network scanning (many connections, few bytes)
57alert tcp $HOME_NET any -> $HOME_NET any (msg:"RANSOMWARE PRECURSOR - Internal Port Scan"; flags:S; threshold:type both, track by_src, count 100, seconds 10; sid:3000004; rev:1;)
58
59# PsExec service installation over SMB
60alert tcp $HOME_NET any -> $HOME_NET 445 (msg:"RANSOMWARE PRECURSOR - PsExec Service Install"; content:"|ff|SMB"; content:"PSEXESVC"; nocase; sid:3000005; rev:1;)
61
62# RDP brute force from internal host (lateral movement)
63alert tcp $HOME_NET any -> $HOME_NET 3389 (msg:"RANSOMWARE PRECURSOR - Internal RDP Brute Force"; flow:to_server,established; threshold:type both, track by_src, count 20, seconds 60; sid:3000006; rev:1;)
64
65# Large SMB file transfer (data staging)
66alert tcp $HOME_NET any -> $HOME_NET 445 (msg:"RANSOMWARE PRECURSOR - Large SMB Transfer Possible Staging"; flow:to_server,established; dsize:>60000; threshold:type both, track by_src, count 100, seconds 300; sid:3000007; rev:1;)
67```
68
69**Zeek scripts for behavioral detection:**
70
71```zeek
72# detect_ransomware_precursors.zeek
73# Detect high volume of failed SMB connections (credential testing)
74
75@load base/protocols/smb
76
77module RansomwarePrecursor;
78
79export {
80 redef enum Notice::Type += {
81 SMB_Brute_Force,
82 Suspicious_Internal_Scan,
83 Excessive_DNS_Queries,
84 SMB_Admin_Share_Access,
85 };
86
87 const smb_fail_threshold = 10 &redef;
88 const scan_threshold = 50 &redef;
89 const dns_query_threshold = 200 &redef;
90}
91
92global smb_fail_count: table[addr] of count &default=0 &create_expire=5min;
93global conn_count: table[addr] of set[addr] &create_expire=1min;
94
95event smb2_message(c: connection, hdr: SMB2::Header, is_orig: bool) {
96 if (hdr$status != 0) {
97 ++smb_fail_count[c$id$orig_h];
98 if (smb_fail_count[c$id$orig_h] >= smb_fail_threshold) {
99 NOTICE([$note=SMB_Brute_Force,
100 $msg=fmt("Host %s has %d failed SMB attempts", c$id$orig_h, smb_fail_count[c$id$orig_h]),
101 $src=c$id$orig_h,
102 $identifier=cat(c$id$orig_h)]);
103 }
104 }
105}
106
107event new_connection(c: connection) {
108 if (c$id$orig_h in Site::local_nets && c$id$resp_h in Site::local_nets) {
109 if (c$id$orig_h !in conn_count)
110 conn_count[c$id$orig_h] = set();
111 add conn_count[c$id$orig_h][c$id$resp_h];
112 if (|conn_count[c$id$orig_h]| >= scan_threshold) {
113 NOTICE([$note=Suspicious_Internal_Scan,
114 $msg=fmt("Host %s connected to %d internal hosts in 1 min", c$id$orig_h, |conn_count[c$id$orig_h]|),
115 $src=c$id$orig_h,
116 $identifier=cat(c$id$orig_h)]);
117 }
118 }
119}
120```
121
122### Step 3: Create SIEM Correlation Rules
123
124**Splunk correlation for ransomware precursor chain:**
125
126```spl
127| tstats count FROM datamodel=Network_Traffic
128 WHERE earliest=-24h All_Traffic.dest_port IN (445, 135, 139, 3389, 5985, 5986)
129 AND All_Traffic.src_ip IN 10.0.0.0/8
130 AND All_Traffic.dest_ip IN 10.0.0.0/8
131 BY All_Traffic.src_ip, All_Traffic.dest_port, _time span=1h
132| stats dc(All_Traffic.dest_port) as port_count,
133 values(All_Traffic.dest_port) as ports,
134 count as total_conns
135 BY All_Traffic.src_ip
136| where port_count >= 3 AND total_conns > 50
137| rename All_Traffic.src_ip as src_ip
138| lookup threat_intel_ioc ip as src_ip OUTPUT threat_type
139| eval risk_score = case(
140 port_count >= 5 AND total_conns > 200, "CRITICAL",
141 port_count >= 3 AND total_conns > 50, "HIGH",
142 1=1, "MEDIUM")
143| table src_ip, ports, port_count, total_conns, risk_score, threat_type
144```
145
146**Microsoft Sentinel KQL - Ransomware precursor correlation:**
147
148```kql
149let timeframe = 24h;
150let RDPBruteForce = SecurityEvent
151| where TimeGenerated > ago(timeframe)
152| where EventID == 4625
153| where LogonType == 10
154| summarize FailedRDP = count() by TargetAccount, IpAddress, bin(TimeGenerated, 1h)
155| where FailedRDP > 10;
156let SuspiciousSMB = SecurityEvent
157| where TimeGenerated > ago(timeframe)
158| where EventID == 5145
159| where ShareName has "ADMIN$" or ShareName has "C$" or ShareName has "IPC$"
160| summarize AdminShareAccess = count() by SubjectUserName, IpAddress, bin(TimeGenerated, 1h)
161| where AdminShareAccess > 5;
162let ServiceInstalls = SecurityEvent
163| where TimeGenerated > ago(timeframe)
164| where EventID == 7045
165| where ServiceName has_any ("PSEXESVC", "meterpreter", "beacon");
166RDPBruteForce
167| join kind=inner SuspiciousSMB on IpAddress
168| project TimeGenerated, IpAddress, TargetAccount, FailedRDP, SubjectUserName, AdminShareAccess
169| extend AlertTitle = "Ransomware Precursor: RDP Brute Force + Admin Share Access"
170```
171
172### Step 4: Integrate Threat Intelligence
173
174Configure automated IOC feeds for known ransomware infrastructure:
175
176```bash
177# Download and update ransomware C2 blocklists
178# abuse.ch Feodo Tracker (Cobalt Strike, TrickBot, BazarLoader C2s)
179curl -s https://feodotracker.abuse.ch/downloads/ipblocklist.csv | \
180 grep -v "^#" | cut -d, -f2 > /opt/threat-intel/feodo_ips.txt
181
182# abuse.ch URLhaus (malware distribution URLs)
183curl -s https://urlhaus.abuse.ch/downloads/csv_recent/ | \
184 grep -v "^#" | cut -d, -f3 > /opt/threat-intel/urlhaus_urls.txt
185
186# abuse.ch ThreatFox (ransomware IOCs)
187curl -s https://threatfox.abuse.ch/export/csv/recent/ | \
188 grep -i "ransomware" | cut -d, -f3 > /opt/threat-intel/ransomware_iocs.txt
189
190# CISA Known Exploited Vulnerabilities (initial access vectors)
191curl -s https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json | \
192 python3 -c "import json,sys; data=json.load(sys.stdin); [print(v['cveID'],v['vendorProject'],v['product']) for v in data['vulnerabilities'] if 'ransomware' in v.get('knownRansomwareCampaignUse','').lower()]"
193```
194
195### Step 5: Establish Alert Triage and Escalation
196
197Define triage procedures based on precursor confidence level:
198
199| Alert Type | Confidence | Response Time | Action |
200|------------|-----------|---------------|--------|
201| Confirmed Cobalt Strike beacon | High | 15 minutes | Isolate host immediately, trigger IR |
202| DCSync/Kerberoasting from non-DC | High | 15 minutes | Disable account, isolate host, trigger IR |
203| Internal port scan + admin share access | Medium-High | 30 minutes | Investigate source host, check EDR telemetry |
204| RDP brute force from internal host | Medium | 1 hour | Verify if legitimate admin activity, check host |
205| Unusual DNS query volume | Low-Medium | 4 hours | Check for DNS tunneling, correlate with other alerts |
206
207## Key Concepts
208
209| Term | Definition |
210|------|------------|
211| **Ransomware Precursor** | Network activity that precedes ransomware encryption, including C2 communication, lateral movement, and data staging |
212| **Dwell Time** | Time between initial compromise and ransomware deployment, averaging 21 days but sometimes as short as 17 minutes |
213| **Initial Access Broker (IAB)** | Threat actors who sell compromised network access to ransomware operators on dark web markets |
214| **Beaconing** | Periodic C2 callbacks from implants (Cobalt Strike, Sliver) that can be detected by analyzing connection timing patterns |
215| **Kerberoasting** | Credential harvesting technique requesting Kerberos service tickets for offline cracking, detectable via unusual TGS-REQ patterns |
216| **DCSync** | Technique using Directory Replication Service to extract password hashes from domain controllers, critical ransomware precursor |
217
218## Tools & Systems
219
220- **Zeek (formerly Bro)**: Network analysis framework generating structured logs for SMB, Kerberos, DNS, HTTP, and TLS connections
221- **Suricata**: High-performance IDS/IPS with protocol analysis and multi-threading support for ransomware signature detection
222- **Arkime (formerly Moloch)**: Full packet capture and search platform for deep forensic investigation of network events
223- **RITA (Real Intelligence Threat Analytics)**: Open-source tool for detecting beaconing, DNS tunneling, and long connections in Zeek logs
224- **AC-Hunter**: Network threat hunting platform from Active Countermeasures for beacon detection and C2 identification
225
226## Common Scenarios
227
228### Scenario: Detecting LockBit Precursors in a Manufacturing Network
229
230**Context**: A manufacturing company's SOC receives an alert for unusual SMB traffic from a workstation (10.1.5.42) in the engineering department. The workstation connected to 47 internal hosts on port 445 within 5 minutes at 2:00 AM.
231
232**Approach**:
2331. Zeek conn.log analysis shows 10.1.5.42 initiated connections to 47 unique internal IPs on port 445, 135, and 3389 between 01:55-02:05
2342. Zeek ssl.log reveals an outbound HTTPS connection to 185.x.x.x every 60 seconds with consistent 48-byte payloads (Cobalt Strike beacon pattern)
2353. RITA beacon analysis confirms high beacon score (0.96) for the external IP with 60-second jitter
2364. Zeek kerberos.log shows TGS-REQ for multiple SPN accounts from 10.1.5.42 (Kerberoasting)
2375. SMB tree_connect events show access to ADMIN$ shares on 12 hosts (lateral movement staging)
2386. Containment: Host isolated, credentials for engineering user reset, blocking rule for C2 IP deployed
2397. Full IR initiated before ransomware deployment could begin
240
241**Pitfalls**:
242- Dismissing internal port scans as vulnerability scanner activity without verifying the source is an authorized scanner
243- Not correlating individual low-severity alerts (DNS anomaly + SMB access + failed logins) into a high-severity chain
244- Setting detection thresholds too high to avoid false positives, missing low-and-slow reconnaissance
245- Ignoring encrypted traffic analysis (JA3/JA4 fingerprinting) that can identify Cobalt Strike even in TLS tunnels
246
247## Output Format
248
249```
250## Ransomware Precursor Detection Alert
251
252**Alert ID**: [SIEM-generated ID]
253**Detection Time**: [Timestamp]
254**Source Host**: [IP / Hostname]
255**Confidence**: [High / Medium / Low]
256**Kill Chain Phase**: [Initial Access / C2 / Credential Harvest / Recon / Lateral Movement / Staging]
257
258### Indicators Detected
259| Indicator | Source | Detail | MITRE ATT&CK |
260|-----------|--------|--------|--------------|
261| [Type] | [Zeek/Suricata/SIEM] | [Description] | [T-ID] |
262
263### Correlation Chain
2641. [Timestamp] - [Event 1]
2652. [Timestamp] - [Event 2]
2663. [Timestamp] - [Event 3]
267
268### Recommended Actions
269- [ ] Isolate source host from network
270- [ ] Check EDR telemetry for host-based indicators
271- [ ] Reset credentials for affected user accounts
272- [ ] Block identified C2 infrastructure
273- [ ] Escalate to incident response team
274```
275
276---
277
278**Source:** [`mukul975/Anthropic-Cybersecurity-Skills`](https://github.com/mukul975/Anthropic-Cybersecurity-Skills) → `skills/detecting-ransomware-precursors-in-network/SKILL.md`