[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A6AKBSTQM1T0BAHV8SD2ER":3,"skill-same:01M7A6AKBSTQM1T0BAHV8SD2ER":123},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":68,"commitSha":69,"skillDirectory":70,"forksCount":14,"repositoryHtmlUrl":71,"repositoryHomepageUrl":6,"ownerHtmlUrl":72,"ownerBlogUrl":6,"ownerDescription":73,"updatedAt":74,"install":75,"resources":88},"01M7A6AKBSTQM1T0BAHV8SD2ER","detecting-ransomware-precursors-in-network",null,"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.","NeelakshSaxena\u002FVayu","NeelakshSaxena","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F87892838?v=4","01M7A3B9YFS6F6N9DD1787DT86","Neelaksh Saxena","01M7A3B9ZKBT09MNMPX2XN69BY",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdetecting-ransomware-precursors-in-network\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdetecting-ransomware-precursors-in-network\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: detecting-ransomware-precursors-in-network\ndescription: 'Detects early-stage ransomware indicators in network traffic before\n  encryption begins, including initial access broker activity, command-and-control\n  beaconing, credential harvesting, reconnaissance scanning, and staging behavior.\n  Uses network detection tools (Zeek, Suricata, Arkime), SIEM correlation rules, and\n  threat intelligence feeds to identify ransomware precursor patterns such as Cobalt\n  Strike beacons, Mimikatz network signatures, and RDP brute-force attempts. Activates\n  for requests involving pre-ransomware detection, network-based ransomware indicators,\n  or early warning ransomware monitoring.\n\n  '\ndomain: cybersecurity\nsubdomain: ransomware-defense\ntags:\n- ransomware\n- detection\n- network-security\n- incident-response\n- defense\nversion: 1.0.0\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- PR.DS-11\n- RS.MA-01\n- RC.RP-01\n- PR.IR-01\nmitre_attack:\n- T1078\n- T1190\n- T1059\n- T1003\n- T1110\nmitre_f3:\n  version: '1.1'\n  tactics:\n  - initial-access\n  - positioning\n  - monetization\n  techniques:\n  - id: T1110\n    name: Brute Force\n    tactic: initial-access\n    source: attack\n  - id: T1219\n    name: Remote Access Tools\n    tactic: positioning\n    source: attack\n  - id: T1650\n    name: Acquire Access\n    tactic: resource-development\n    source: attack\n  - id: F1018\n    name: Convert to Cryptocurrency\n    tactic: monetization\n    source: f3\n---\n# Detecting Ransomware Precursors in Network Traffic\n\n## When to Use\n\n- Building detection rules for pre-ransomware network activity (the average time from Cobalt Strike deployment to encryption is 17 minutes)\n- Monitoring for initial access broker (IAB) indicators that precede ransomware deployment\n- Creating SIEM correlation rules that chain multiple precursor events into high-confidence alerts\n- Tuning network detection systems to distinguish ransomware staging from normal administrative activity\n- Investigating suspicious network patterns that may indicate ransomware operators have established a foothold\n\n**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.\n\n## Prerequisites\n\n- Network detection platform (Zeek\u002FBro, Suricata, or Arkime\u002FMoloch) deployed on network TAP or SPAN ports\n- SIEM platform (Splunk, Elastic Security, Microsoft Sentinel, or QRadar) ingesting network logs\n- Threat intelligence feeds covering ransomware IOCs (CISA, abuse.ch, OTX, MISP)\n- Network flow data (NetFlow\u002FIPFIX) from core routers and firewalls\n- DNS query logging from internal resolvers\n- Full packet capture capability for incident investigation\n\n## Workflow\n\n### Step 1: Identify Ransomware Kill Chain Phases in Network Traffic\n\nMap network-observable indicators to each pre-encryption phase:\n\n| Kill Chain Phase | Network Indicators | Detection Source |\n|------------------|--------------------|------------------|\n| Initial Access | RDP brute force, VPN credential stuffing, phishing callback | Firewall logs, IDS, proxy logs |\n| C2 Establishment | Cobalt Strike beacons (HTTPS\u002FDNS), Sliver\u002FBrute Ratel callbacks | Zeek SSL\u002FHTTP logs, DNS logs |\n| Credential Harvesting | NTLM relay, Kerberoasting, DCSync traffic | Zeek Kerberos\u002FNTLM logs, DC logs |\n| Reconnaissance | Internal port scanning, AD enumeration (LDAP\u002FSMB) | Zeek conn.log, flow data |\n| Lateral Movement | PsExec\u002FWMI\u002FWinRM traffic, RDP pivoting, SMB file copies | Zeek SMB\u002FDCE-RPC logs |\n| Staging | Data aggregation, archive creation, cloud upload prep | Proxy logs, DNS logs, DLP |\n\n### Step 2: Deploy Network Detection Rules\n\n**Suricata rules for common ransomware precursors:**\n\n```yaml\n# Cobalt Strike default HTTPS beacon profile detection\nalert 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;)\n\n# Cobalt Strike DNS beacon\nalert dns $HOME_NET any -> any 53 (msg:\"RANSOMWARE PRECURSOR - Cobalt Strike DNS Beacon Pattern\"; dns.query; pcre:\"\u002F^[a-z0-9]{3}\\.[a-z]{4,8}\\.\u002F\"; threshold:type both, track by_src, count 50, seconds 60; sid:3000002; rev:1;)\n\n# Mimikatz network signature (DCSync - DRS GetNCChanges)\nalert tcp $HOME_NET any -> $HOME_NET 135 (msg:\"RANSOMWARE PRECURSOR - Possible DCSync\u002FMimikatz\"; content:\"|05 00 0b|\"; offset:0; depth:3; content:\"|e3 51 4d 2b 4b 47 15 d2|\"; sid:3000003; rev:1;)\n\n# Internal network scanning (many connections, few bytes)\nalert 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;)\n\n# PsExec service installation over SMB\nalert tcp $HOME_NET any -> $HOME_NET 445 (msg:\"RANSOMWARE PRECURSOR - PsExec Service Install\"; content:\"|ff|SMB\"; content:\"PSEXESVC\"; nocase; sid:3000005; rev:1;)\n\n# RDP brute force from internal host (lateral movement)\nalert 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;)\n\n# Large SMB file transfer (data staging)\nalert 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;)\n```\n\n**Zeek scripts for behavioral detection:**\n\n```zeek\n# detect_ransomware_precursors.zeek\n# Detect high volume of failed SMB connections (credential testing)\n\n@load base\u002Fprotocols\u002Fsmb\n\nmodule RansomwarePrecursor;\n\nexport {\n    redef enum Notice::Type += {\n        SMB_Brute_Force,\n        Suspicious_Internal_Scan,\n        Excessive_DNS_Queries,\n        SMB_Admin_Share_Access,\n    };\n\n    const smb_fail_threshold = 10 &redef;\n    const scan_threshold = 50 &redef;\n    const dns_query_threshold = 200 &redef;\n}\n\nglobal smb_fail_count: table[addr] of count &default=0 &create_expire=5min;\nglobal conn_count: table[addr] of set[addr] &create_expire=1min;\n\nevent smb2_message(c: connection, hdr: SMB2::Header, is_orig: bool) {\n    if (hdr$status != 0) {\n        ++smb_fail_count[c$id$orig_h];\n        if (smb_fail_count[c$id$orig_h] >= smb_fail_threshold) {\n            NOTICE([$note=SMB_Brute_Force,\n                    $msg=fmt(\"Host %s has %d failed SMB attempts\", c$id$orig_h, smb_fail_count[c$id$orig_h]),\n                    $src=c$id$orig_h,\n                    $identifier=cat(c$id$orig_h)]);\n        }\n    }\n}\n\nevent new_connection(c: connection) {\n    if (c$id$orig_h in Site::local_nets && c$id$resp_h in Site::local_nets) {\n        if (c$id$orig_h !in conn_count)\n            conn_count[c$id$orig_h] = set();\n        add conn_count[c$id$orig_h][c$id$resp_h];\n        if (|conn_count[c$id$orig_h]| >= scan_threshold) {\n            NOTICE([$note=Suspicious_Internal_Scan,\n                    $msg=fmt(\"Host %s connected to %d internal hosts in 1 min\", c$id$orig_h, |conn_count[c$id$orig_h]|),\n                    $src=c$id$orig_h,\n                    $identifier=cat(c$id$orig_h)]);\n        }\n    }\n}\n```\n\n### Step 3: Create SIEM Correlation Rules\n\n**Splunk correlation for ransomware precursor chain:**\n\n```spl\n| tstats count FROM datamodel=Network_Traffic\n  WHERE earliest=-24h All_Traffic.dest_port IN (445, 135, 139, 3389, 5985, 5986)\n    AND All_Traffic.src_ip IN 10.0.0.0\u002F8\n    AND All_Traffic.dest_ip IN 10.0.0.0\u002F8\n  BY All_Traffic.src_ip, All_Traffic.dest_port, _time span=1h\n| stats dc(All_Traffic.dest_port) as port_count,\n        values(All_Traffic.dest_port) as ports,\n        count as total_conns\n  BY All_Traffic.src_ip\n| where port_count >= 3 AND total_conns > 50\n| rename All_Traffic.src_ip as src_ip\n| lookup threat_intel_ioc ip as src_ip OUTPUT threat_type\n| eval risk_score = case(\n    port_count >= 5 AND total_conns > 200, \"CRITICAL\",\n    port_count >= 3 AND total_conns > 50, \"HIGH\",\n    1=1, \"MEDIUM\")\n| table src_ip, ports, port_count, total_conns, risk_score, threat_type\n```\n\n**Microsoft Sentinel KQL - Ransomware precursor correlation:**\n\n```kql\nlet timeframe = 24h;\nlet RDPBruteForce = SecurityEvent\n| where TimeGenerated > ago(timeframe)\n| where EventID == 4625\n| where LogonType == 10\n| summarize FailedRDP = count() by TargetAccount, IpAddress, bin(TimeGenerated, 1h)\n| where FailedRDP > 10;\nlet SuspiciousSMB = SecurityEvent\n| where TimeGenerated > ago(timeframe)\n| where EventID == 5145\n| where ShareName has \"ADMIN$\" or ShareName has \"C$\" or ShareName has \"IPC$\"\n| summarize AdminShareAccess = count() by SubjectUserName, IpAddress, bin(TimeGenerated, 1h)\n| where AdminShareAccess > 5;\nlet ServiceInstalls = SecurityEvent\n| where TimeGenerated > ago(timeframe)\n| where EventID == 7045\n| where ServiceName has_any (\"PSEXESVC\", \"meterpreter\", \"beacon\");\nRDPBruteForce\n| join kind=inner SuspiciousSMB on IpAddress\n| project TimeGenerated, IpAddress, TargetAccount, FailedRDP, SubjectUserName, AdminShareAccess\n| extend AlertTitle = \"Ransomware Precursor: RDP Brute Force + Admin Share Access\"\n```\n\n### Step 4: Integrate Threat Intelligence\n\nConfigure automated IOC feeds for known ransomware infrastructure:\n\n```bash\n# Download and update ransomware C2 blocklists\n# abuse.ch Feodo Tracker (Cobalt Strike, TrickBot, BazarLoader C2s)\ncurl -s https:\u002F\u002Ffeodotracker.abuse.ch\u002Fdownloads\u002Fipblocklist.csv | \\\n  grep -v \"^#\" | cut -d, -f2 > \u002Fopt\u002Fthreat-intel\u002Ffeodo_ips.txt\n\n# abuse.ch URLhaus (malware distribution URLs)\ncurl -s https:\u002F\u002Furlhaus.abuse.ch\u002Fdownloads\u002Fcsv_recent\u002F | \\\n  grep -v \"^#\" | cut -d, -f3 > \u002Fopt\u002Fthreat-intel\u002Furlhaus_urls.txt\n\n# abuse.ch ThreatFox (ransomware IOCs)\ncurl -s https:\u002F\u002Fthreatfox.abuse.ch\u002Fexport\u002Fcsv\u002Frecent\u002F | \\\n  grep -i \"ransomware\" | cut -d, -f3 > \u002Fopt\u002Fthreat-intel\u002Fransomware_iocs.txt\n\n# CISA Known Exploited Vulnerabilities (initial access vectors)\ncurl -s https:\u002F\u002Fwww.cisa.gov\u002Fsites\u002Fdefault\u002Ffiles\u002Ffeeds\u002Fknown_exploited_vulnerabilities.json | \\\n  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()]\"\n```\n\n### Step 5: Establish Alert Triage and Escalation\n\nDefine triage procedures based on precursor confidence level:\n\n| Alert Type | Confidence | Response Time | Action |\n|------------|-----------|---------------|--------|\n| Confirmed Cobalt Strike beacon | High | 15 minutes | Isolate host immediately, trigger IR |\n| DCSync\u002FKerberoasting from non-DC | High | 15 minutes | Disable account, isolate host, trigger IR |\n| Internal port scan + admin share access | Medium-High | 30 minutes | Investigate source host, check EDR telemetry |\n| RDP brute force from internal host | Medium | 1 hour | Verify if legitimate admin activity, check host |\n| Unusual DNS query volume | Low-Medium | 4 hours | Check for DNS tunneling, correlate with other alerts |\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **Ransomware Precursor** | Network activity that precedes ransomware encryption, including C2 communication, lateral movement, and data staging |\n| **Dwell Time** | Time between initial compromise and ransomware deployment, averaging 21 days but sometimes as short as 17 minutes |\n| **Initial Access Broker (IAB)** | Threat actors who sell compromised network access to ransomware operators on dark web markets |\n| **Beaconing** | Periodic C2 callbacks from implants (Cobalt Strike, Sliver) that can be detected by analyzing connection timing patterns |\n| **Kerberoasting** | Credential harvesting technique requesting Kerberos service tickets for offline cracking, detectable via unusual TGS-REQ patterns |\n| **DCSync** | Technique using Directory Replication Service to extract password hashes from domain controllers, critical ransomware precursor |\n\n## Tools & Systems\n\n- **Zeek (formerly Bro)**: Network analysis framework generating structured logs for SMB, Kerberos, DNS, HTTP, and TLS connections\n- **Suricata**: High-performance IDS\u002FIPS with protocol analysis and multi-threading support for ransomware signature detection\n- **Arkime (formerly Moloch)**: Full packet capture and search platform for deep forensic investigation of network events\n- **RITA (Real Intelligence Threat Analytics)**: Open-source tool for detecting beaconing, DNS tunneling, and long connections in Zeek logs\n- **AC-Hunter**: Network threat hunting platform from Active Countermeasures for beacon detection and C2 identification\n\n## Common Scenarios\n\n### Scenario: Detecting LockBit Precursors in a Manufacturing Network\n\n**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.\n\n**Approach**:\n1. 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\n2. 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)\n3. RITA beacon analysis confirms high beacon score (0.96) for the external IP with 60-second jitter\n4. Zeek kerberos.log shows TGS-REQ for multiple SPN accounts from 10.1.5.42 (Kerberoasting)\n5. SMB tree_connect events show access to ADMIN$ shares on 12 hosts (lateral movement staging)\n6. Containment: Host isolated, credentials for engineering user reset, blocking rule for C2 IP deployed\n7. Full IR initiated before ransomware deployment could begin\n\n**Pitfalls**:\n- Dismissing internal port scans as vulnerability scanner activity without verifying the source is an authorized scanner\n- Not correlating individual low-severity alerts (DNS anomaly + SMB access + failed logins) into a high-severity chain\n- Setting detection thresholds too high to avoid false positives, missing low-and-slow reconnaissance\n- Ignoring encrypted traffic analysis (JA3\u002FJA4 fingerprinting) that can identify Cobalt Strike even in TLS tunnels\n\n## Output Format\n\n```\n## Ransomware Precursor Detection Alert\n\n**Alert ID**: [SIEM-generated ID]\n**Detection Time**: [Timestamp]\n**Source Host**: [IP \u002F Hostname]\n**Confidence**: [High \u002F Medium \u002F Low]\n**Kill Chain Phase**: [Initial Access \u002F C2 \u002F Credential Harvest \u002F Recon \u002F Lateral Movement \u002F Staging]\n\n### Indicators Detected\n| Indicator | Source | Detail | MITRE ATT&CK |\n|-----------|--------|--------|--------------|\n| [Type] | [Zeek\u002FSuricata\u002FSIEM] | [Description] | [T-ID] |\n\n### Correlation Chain\n1. [Timestamp] - [Event 1]\n2. [Timestamp] - [Event 2]\n3. [Timestamp] - [Event 3]\n\n### Recommended Actions\n- [ ] Isolate source host from network\n- [ ] Check EDR telemetry for host-based indicators\n- [ ] Reset credentials for affected user accounts\n- [ ] Block identified C2 infrastructure\n- [ ] Escalate to incident response team\n```\n","# Detecting Ransomware Precursors in Network Traffic\n\n## When to Use\n\n- Building detection rules for pre-ransomware network activity (the average time from Cobalt Strike deployment to encryption is 17 minutes)\n- Monitoring for initial access broker (IAB) indicators that precede ransomware deployment\n- Creating SIEM correlation rules that chain multiple precursor events into high-confidence alerts\n- Tuning network detection systems to distinguish ransomware staging from normal administrative activity\n- Investigating suspicious network patterns that may indicate ransomware operators have established a foothold\n\n**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.\n\n## Prerequisites\n\n- Network detection platform (Zeek\u002FBro, Suricata, or Arkime\u002FMoloch) deployed on network TAP or SPAN ports\n- SIEM platform (Splunk, Elastic Security, Microsoft Sentinel, or QRadar) ingesting network logs\n- Threat intelligence feeds covering ransomware IOCs (CISA, abuse.ch, OTX, MISP)\n- Network flow data (NetFlow\u002FIPFIX) from core routers and firewalls\n- DNS query logging from internal resolvers\n- Full packet capture capability for incident investigation\n\n## Workflow\n\n### Step 1: Identify Ransomware Kill Chain Phases in Network Traffic\n\nMap network-observable indicators to each pre-encryption phase:\n\n| Kill Chain Phase | Network Indicators | Detection Source |\n|------------------|--------------------|------------------|\n| Initial Access | RDP brute force, VPN credential stuffing, phishing callback | Firewall logs, IDS, proxy logs |\n| C2 Establishment | Cobalt Strike beacons (HTTPS\u002FDNS), Sliver\u002FBrute Ratel callbacks | Zeek SSL\u002FHTTP logs, DNS logs |\n| Credential Harvesting | NTLM relay, Kerberoasting, DCSync traffic | Zeek Kerberos\u002FNTLM logs, DC logs |\n| Reconnaissance | Internal port scanning, AD enumeration (LDAP\u002FSMB) | Zeek conn.log, flow data |\n| Lateral Movement | PsExec\u002FWMI\u002FWinRM traffic, RDP pivoting, SMB file copies | Zeek SMB\u002FDCE-RPC logs |\n| Staging | Data aggregation, archive creation, cloud upload prep | Proxy logs, DNS logs, DLP |\n\n### Step 2: Deploy Network Detection Rules\n\n**Suricata rules for common ransomware precursors:**\n\n```yaml\n# Cobalt Strike default HTTPS beacon profile detection\nalert 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;)\n\n# Cobalt Strike DNS beacon\nalert dns $HOME_NET any -> any 53 (msg:\"RANSOMWARE PRECURSOR - Cobalt Strike DNS Beacon Pattern\"; dns.query; pcre:\"\u002F^[a-z0-9]{3}\\.[a-z]{4,8}\\.\u002F\"; threshold:type both, track by_src, count 50, seconds 60; sid:3000002; rev:1;)\n\n# Mimikatz network signature (DCSync - DRS GetNCChanges)\nalert tcp $HOME_NET any -> $HOME_NET 135 (msg:\"RANSOMWARE PRECURSOR - Possible DCSync\u002FMimikatz\"; content:\"|05 00 0b|\"; offset:0; depth:3; content:\"|e3 51 4d 2b 4b 47 15 d2|\"; sid:3000003; rev:1;)\n\n# Internal network scanning (many connections, few bytes)\nalert 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;)\n\n# PsExec service installation over SMB\nalert tcp $HOME_NET any -> $HOME_NET 445 (msg:\"RANSOMWARE PRECURSOR - PsExec Service Install\"; content:\"|ff|SMB\"; content:\"PSEXESVC\"; nocase; sid:3000005; rev:1;)\n\n# RDP brute force from internal host (lateral movement)\nalert 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;)\n\n# Large SMB file transfer (data staging)\nalert 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;)\n```\n\n**Zeek scripts for behavioral detection:**\n\n```zeek\n# detect_ransomware_precursors.zeek\n# Detect high volume of failed SMB connections (credential testing)\n\n@load base\u002Fprotocols\u002Fsmb\n\nmodule RansomwarePrecursor;\n\nexport {\n    redef enum Notice::Type += {\n        SMB_Brute_Force,\n        Suspicious_Internal_Scan,\n        Excessive_DNS_Queries,\n        SMB_Admin_Share_Access,\n    };\n\n    const smb_fail_threshold = 10 &redef;\n    const scan_threshold = 50 &redef;\n    const dns_query_threshold = 200 &redef;\n}\n\nglobal smb_fail_count: table[addr] of count &default=0 &create_expire=5min;\nglobal conn_count: table[addr] of set[addr] &create_expire=1min;\n\nevent smb2_message(c: connection, hdr: SMB2::Header, is_orig: bool) {\n    if (hdr$status != 0) {\n        ++smb_fail_count[c$id$orig_h];\n        if (smb_fail_count[c$id$orig_h] >= smb_fail_threshold) {\n            NOTICE([$note=SMB_Brute_Force,\n                    $msg=fmt(\"Host %s has %d failed SMB attempts\", c$id$orig_h, smb_fail_count[c$id$orig_h]),\n                    $src=c$id$orig_h,\n                    $identifier=cat(c$id$orig_h)]);\n        }\n    }\n}\n\nevent new_connection(c: connection) {\n    if (c$id$orig_h in Site::local_nets && c$id$resp_h in Site::local_nets) {\n        if (c$id$orig_h !in conn_count)\n            conn_count[c$id$orig_h] = set();\n        add conn_count[c$id$orig_h][c$id$resp_h];\n        if (|conn_count[c$id$orig_h]| >= scan_threshold) {\n            NOTICE([$note=Suspicious_Internal_Scan,\n                    $msg=fmt(\"Host %s connected to %d internal hosts in 1 min\", c$id$orig_h, |conn_count[c$id$orig_h]|),\n                    $src=c$id$orig_h,\n                    $identifier=cat(c$id$orig_h)]);\n        }\n    }\n}\n```\n\n### Step 3: Create SIEM Correlation Rules\n\n**Splunk correlation for ransomware precursor chain:**\n\n```spl\n| tstats count FROM datamodel=Network_Traffic\n  WHERE earliest=-24h All_Traffic.dest_port IN (445, 135, 139, 3389, 5985, 5986)\n    AND All_Traffic.src_ip IN 10.0.0.0\u002F8\n    AND All_Traffic.dest_ip IN 10.0.0.0\u002F8\n  BY All_Traffic.src_ip, All_Traffic.dest_port, _time span=1h\n| stats dc(All_Traffic.dest_port) as port_count,\n        values(All_Traffic.dest_port) as ports,\n        count as total_conns\n  BY All_Traffic.src_ip\n| where port_count >= 3 AND total_conns > 50\n| rename All_Traffic.src_ip as src_ip\n| lookup threat_intel_ioc ip as src_ip OUTPUT threat_type\n| eval risk_score = case(\n    port_count >= 5 AND total_conns > 200, \"CRITICAL\",\n    port_count >= 3 AND total_conns > 50, \"HIGH\",\n    1=1, \"MEDIUM\")\n| table src_ip, ports, port_count, total_conns, risk_score, threat_type\n```\n\n**Microsoft Sentinel KQL - Ransomware precursor correlation:**\n\n```kql\nlet timeframe = 24h;\nlet RDPBruteForce = SecurityEvent\n| where TimeGenerated > ago(timeframe)\n| where EventID == 4625\n| where LogonType == 10\n| summarize FailedRDP = count() by TargetAccount, IpAddress, bin(TimeGenerated, 1h)\n| where FailedRDP > 10;\nlet SuspiciousSMB = SecurityEvent\n| where TimeGenerated > ago(timeframe)\n| where EventID == 5145\n| where ShareName has \"ADMIN$\" or ShareName has \"C$\" or ShareName has \"IPC$\"\n| summarize AdminShareAccess = count() by SubjectUserName, IpAddress, bin(TimeGenerated, 1h)\n| where AdminShareAccess > 5;\nlet ServiceInstalls = SecurityEvent\n| where TimeGenerated > ago(timeframe)\n| where EventID == 7045\n| where ServiceName has_any (\"PSEXESVC\", \"meterpreter\", \"beacon\");\nRDPBruteForce\n| join kind=inner SuspiciousSMB on IpAddress\n| project TimeGenerated, IpAddress, TargetAccount, FailedRDP, SubjectUserName, AdminShareAccess\n| extend AlertTitle = \"Ransomware Precursor: RDP Brute Force + Admin Share Access\"\n```\n\n### Step 4: Integrate Threat Intelligence\n\nConfigure automated IOC feeds for known ransomware infrastructure:\n\n```bash\n# Download and update ransomware C2 blocklists\n# abuse.ch Feodo Tracker (Cobalt Strike, TrickBot, BazarLoader C2s)\ncurl -s https:\u002F\u002Ffeodotracker.abuse.ch\u002Fdownloads\u002Fipblocklist.csv | \\\n  grep -v \"^#\" | cut -d, -f2 > \u002Fopt\u002Fthreat-intel\u002Ffeodo_ips.txt\n\n# abuse.ch URLhaus (malware distribution URLs)\ncurl -s https:\u002F\u002Furlhaus.abuse.ch\u002Fdownloads\u002Fcsv_recent\u002F | \\\n  grep -v \"^#\" | cut -d, -f3 > \u002Fopt\u002Fthreat-intel\u002Furlhaus_urls.txt\n\n# abuse.ch ThreatFox (ransomware IOCs)\ncurl -s https:\u002F\u002Fthreatfox.abuse.ch\u002Fexport\u002Fcsv\u002Frecent\u002F | \\\n  grep -i \"ransomware\" | cut -d, -f3 > \u002Fopt\u002Fthreat-intel\u002Fransomware_iocs.txt\n\n# CISA Known Exploited Vulnerabilities (initial access vectors)\ncurl -s https:\u002F\u002Fwww.cisa.gov\u002Fsites\u002Fdefault\u002Ffiles\u002Ffeeds\u002Fknown_exploited_vulnerabilities.json | \\\n  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()]\"\n```\n\n### Step 5: Establish Alert Triage and Escalation\n\nDefine triage procedures based on precursor confidence level:\n\n| Alert Type | Confidence | Response Time | Action |\n|------------|-----------|---------------|--------|\n| Confirmed Cobalt Strike beacon | High | 15 minutes | Isolate host immediately, trigger IR |\n| DCSync\u002FKerberoasting from non-DC | High | 15 minutes | Disable account, isolate host, trigger IR |\n| Internal port scan + admin share access | Medium-High | 30 minutes | Investigate source host, check EDR telemetry |\n| RDP brute force from internal host | Medium | 1 hour | Verify if legitimate admin activity, check host |\n| Unusual DNS query volume | Low-Medium | 4 hours | Check for DNS tunneling, correlate with other alerts |\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **Ransomware Precursor** | Network activity that precedes ransomware encryption, including C2 communication, lateral movement, and data staging |\n| **Dwell Time** | Time between initial compromise and ransomware deployment, averaging 21 days but sometimes as short as 17 minutes |\n| **Initial Access Broker (IAB)** | Threat actors who sell compromised network access to ransomware operators on dark web markets |\n| **Beaconing** | Periodic C2 callbacks from implants (Cobalt Strike, Sliver) that can be detected by analyzing connection timing patterns |\n| **Kerberoasting** | Credential harvesting technique requesting Kerberos service tickets for offline cracking, detectable via unusual TGS-REQ patterns |\n| **DCSync** | Technique using Directory Replication Service to extract password hashes from domain controllers, critical ransomware precursor |\n\n## Tools & Systems\n\n- **Zeek (formerly Bro)**: Network analysis framework generating structured logs for SMB, Kerberos, DNS, HTTP, and TLS connections\n- **Suricata**: High-performance IDS\u002FIPS with protocol analysis and multi-threading support for ransomware signature detection\n- **Arkime (formerly Moloch)**: Full packet capture and search platform for deep forensic investigation of network events\n- **RITA (Real Intelligence Threat Analytics)**: Open-source tool for detecting beaconing, DNS tunneling, and long connections in Zeek logs\n- **AC-Hunter**: Network threat hunting platform from Active Countermeasures for beacon detection and C2 identification\n\n## Common Scenarios\n\n### Scenario: Detecting LockBit Precursors in a Manufacturing Network\n\n**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.\n\n**Approach**:\n1. 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\n2. 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)\n3. RITA beacon analysis confirms high beacon score (0.96) for the external IP with 60-second jitter\n4. Zeek kerberos.log shows TGS-REQ for multiple SPN accounts from 10.1.5.42 (Kerberoasting)\n5. SMB tree_connect events show access to ADMIN$ shares on 12 hosts (lateral movement staging)\n6. Containment: Host isolated, credentials for engineering user reset, blocking rule for C2 IP deployed\n7. Full IR initiated before ransomware deployment could begin\n\n**Pitfalls**:\n- Dismissing internal port scans as vulnerability scanner activity without verifying the source is an authorized scanner\n- Not correlating individual low-severity alerts (DNS anomaly + SMB access + failed logins) into a high-severity chain\n- Setting detection thresholds too high to avoid false positives, missing low-and-slow reconnaissance\n- Ignoring encrypted traffic analysis (JA3\u002FJA4 fingerprinting) that can identify Cobalt Strike even in TLS tunnels\n\n## Output Format\n\n```\n## Ransomware Precursor Detection Alert\n\n**Alert ID**: [SIEM-generated ID]\n**Detection Time**: [Timestamp]\n**Source Host**: [IP \u002F Hostname]\n**Confidence**: [High \u002F Medium \u002F Low]\n**Kill Chain Phase**: [Initial Access \u002F C2 \u002F Credential Harvest \u002F Recon \u002F Lateral Movement \u002F Staging]\n\n### Indicators Detected\n| Indicator | Source | Detail | MITRE ATT&CK |\n|-----------|--------|--------|--------------|\n| [Type] | [Zeek\u002FSuricata\u002FSIEM] | [Description] | [T-ID] |\n\n### Correlation Chain\n1. [Timestamp] - [Event 1]\n2. [Timestamp] - [Event 2]\n3. [Timestamp] - [Event 3]\n\n### Recommended Actions\n- [ ] Isolate source host from network\n- [ ] Check EDR telemetry for host-based indicators\n- [ ] Reset credentials for affected user accounts\n- [ ] Block identified C2 infrastructure\n- [ ] Escalate to incident response team\n```\n",{"name":5,"tags":25,"author":31,"domain":32,"license":15,"version":33,"mitre_f3":34,"nist_csf":56,"subdomain":61,"description":62,"mitre_attack":63},[26,27,28,29,30],"ransomware","detection","network-security","incident-response","defense","mahipal","cybersecurity","1.0.0",{"tactics":35,"version":39,"techniques":40},[36,37,38],"initial-access","positioning","monetization","1.1",[41,45,48,52],{"id":42,"name":43,"source":44,"tactic":36},"T1110","Brute Force","attack",{"id":46,"name":47,"source":44,"tactic":37},"T1219","Remote Access Tools",{"id":49,"name":50,"source":44,"tactic":51},"T1650","Acquire Access","resource-development",{"id":53,"name":54,"source":55,"tactic":38},"F1018","Convert to Cryptocurrency","f3",[57,58,59,60],"PR.DS-11","RS.MA-01","RC.RP-01","PR.IR-01","ransomware-defense","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.\n",[64,65,66,67,42],"T1078","T1190","T1059","T1003","main","7540bbccf0c1ded6156a467b02c95b61ad62413f",".agents\u002Fskills\u002Fdetecting-ransomware-precursors-in-network","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena","Currently exploring the intersection of tech","2026-09-11 03:02:31",{"source":8,"skillName":5,"commands":76,"prompt":86,"zipAvailable":87},[77,80,83],{"tool":78,"command":79},"npx","npx skills add NeelakshSaxena\u002FVayu --skill detecting-ransomware-precursors-in-network",{"tool":81,"command":82},"bunx","bunx skills add NeelakshSaxena\u002FVayu --skill detecting-ransomware-precursors-in-network",{"tool":84,"command":85},"pnpm","pnpm dlx skills add NeelakshSaxena\u002FVayu --skill detecting-ransomware-precursors-in-network","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdetecting-ransomware-precursors-in-network\u002FSKILL.md",true,[89,95,99,105,109,113,119],{"path":90,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":93,"sourceHtmlUrl":94},"assets\u002Ftemplate.md","ASSET","资产文件",1653,"https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdetecting-ransomware-precursors-in-network\u002Fassets\u002Ftemplate.md",{"path":96,"resourceType":96,"resourceTypeDesc":97,"sizeBytes":98,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":100,"resourceType":101,"resourceTypeDesc":102,"sizeBytes":103,"sourceHtmlUrl":104},"references\u002Fapi-reference.md","REFERENCE","参考文档",5282,"https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdetecting-ransomware-precursors-in-network\u002Freferences\u002Fapi-reference.md",{"path":106,"resourceType":101,"resourceTypeDesc":102,"sizeBytes":107,"sourceHtmlUrl":108},"references\u002Fstandards.md",1790,"https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdetecting-ransomware-precursors-in-network\u002Freferences\u002Fstandards.md",{"path":110,"resourceType":101,"resourceTypeDesc":102,"sizeBytes":111,"sourceHtmlUrl":112},"references\u002Fworkflows.md",2712,"https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdetecting-ransomware-precursors-in-network\u002Freferences\u002Fworkflows.md",{"path":114,"resourceType":115,"resourceTypeDesc":116,"sizeBytes":117,"sourceHtmlUrl":118},"scripts\u002Fagent.py","SCRIPT","脚本",7344,"https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdetecting-ransomware-precursors-in-network\u002Fscripts\u002Fagent.py",{"path":120,"resourceType":115,"resourceTypeDesc":116,"sizeBytes":121,"sourceHtmlUrl":122},"scripts\u002Fprocess.py",19498,"https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdetecting-ransomware-precursors-in-network\u002Fscripts\u002Fprocess.py",[124,131,138,145,152,159],{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":20},"01M7ACCCVNCFKMA9X6D15X6G98","runpodctl","Runpod CLI for managing GPU\u002FCPU workloads from the terminal — pods, serverless endpoints, templates, network volumes, Hub deploys, models, SSH, and file transfer (send\u002Freceive). Use for terminal\u002FCI\u002Fscripting, Hub browse\u002Fdeploy, SSH setup, `doctor`, or when the Runpod MCP tools are not connected. For structured tool calls in an MCP-enabled session, prefer runpod-mcp.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpodctl\u002FSKILL.md",[],[],{"skillNo":132,"name":133,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":20},"01M7ACC63SRHEA5KMCHSMZK2TC","runpod","Start here for any Runpod task — running GPU\u002FCPU pods, deploying serverless endpoints, templates, network volumes, building images, or understanding how Runpod works. Routes to the right skill (runpod-mcp, runpodctl, flash, companion-clis, runpod-usage, runpod-templates, runpod-migrate) and indexes two dozen live-verified end-to-end examples (golden paths) — use it when the lane is unclear, and for any multi-step or provisioning task even when it is not.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod\u002FSKILL.md",[],[],{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":144,"publishedAt":20},"01M7ACC0Q1C89N9BZBV91CTQTF","runpod-usage","How Runpod works and how to work it — pods vs serverless, GPU\u002FVRAM selection, storage, building a container, networking, plus the agentic pod development loop (provision → ssh-exec → set up → poll readiness) and on-pod install hygiene (uv\u002Fapt). Use to answer \"how does X work\", \"which GPU\", \"how do I build a container\", or \"how do I stand up a workload on a pod\". Guidance, not a tool — execute with runpodctl, runpod-mcp, or flash.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-usage\u002FSKILL.md",[],[],{"skillNo":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":151,"publishedAt":20},"01M7ACBRPE345GF5GM5B8P8RRC","runpod-templates","Runpod's official prebuilt pod templates (ComfyUI, PyTorch, and others): what each image ships, which ports and paths it uses, how to pick one, how to pin a version, and what is missing on first boot. Use when a task says \"run \u003CX> on a pod\" and an official template already covers it, instead of building an image — and when a user needs help with or wants to fix something about a Runpod template they are already running (won't boot, can't reach the UI, missing models, wrong CUDA line, broken ComfyUI workflow metadata on imported workflows): start here and route onward. Deploy with runpodctl or runpod-mcp; end-to-end walkthroughs live in the runpod router's golden paths.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-templates\u002FSKILL.md",[],[],{"skillNo":153,"name":154,"nameZh":6,"description":155,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":156,"categories":157,"keywords":158,"publishedAt":20},"01M7ACBJATHKVX1TWES2F44GY8","runpod-migrate","Migrate a codebase from the Runpod GraphQL API or REST v1 to REST v2 — inventory which parts use which API version, rewrite the call sites, flag breaking changes, and verify. Use when someone asks to move to v2, asks what v2 would change, or asks which Runpod API their code is on. For managing infrastructure rather than migrating code, use runpod-mcp or runpodctl.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-migrate\u002FSKILL.md",[],[],{"skillNo":160,"name":161,"nameZh":6,"description":162,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":163,"categories":164,"keywords":165,"publishedAt":20},"01M7ACBC7GHVH6T9YEAPCG2AP8","runpod-mcp","Manage Runpod infrastructure — pods, serverless endpoints, jobs, templates, network volumes, container-registry auth, GPU\u002FCPU catalog, and billing — via the Runpod MCP server's structured tool calls. Use when the Runpod MCP tools (create-pod, list-endpoints, …) are connected in this session, or to connect them (hosted OAuth or local npx). Prefer this over runpodctl for plain infra CRUD when MCP is available; use runpodctl for the terminal, file transfer, or SSH setup.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-mcp\u002FSKILL.md",[],[]]