[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71FN5A59EM6ZZ0HSYQ5C7X2":3,"skill-same:01M71FN5A59EM6ZZ0HSYQ5C7X2":89},{"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":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":62,"commitSha":63,"skillDirectory":64,"forksCount":14,"repositoryHtmlUrl":65,"repositoryHomepageUrl":6,"ownerHtmlUrl":66,"ownerBlogUrl":6,"ownerDescription":67,"updatedAt":68,"install":69,"resources":82},"01M71FN5A59EM6ZZ0HSYQ5C7X2","ids-suricata-configure",null,"Deploys and configures Suricata IDS\u002FIPS with Emerging Threats rulesets, EVE JSON logging, and custom rules for real-time network traffic inspection, threat detection, and integration with SIEM platforms for centralized security monitoring.","DCx7C5\u002Fai-marketplace","DCx7C5","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F42419559?v=4","01M71C01G2AZV3NTNGWAWSHJPP","DC","01M71C01GQW6G50S2BYMS7PP3E",0,"MIT","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fnetwork\u002Fids\u002Fsuricata\u002Fconfigure\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"configure","ids suricata configure","suricata","ids","network","monitoring","siem","ips","network-monitoring","Bash","security","read","threat","cm","time","de","sonnet","traffic","inspection","cybersecurity","2026-11-10 10:12:30",false,"---\nname: ids-suricata-configure\ndescription: Deploys and configures Suricata IDS\u002FIPS with Emerging Threats rulesets, EVE JSON logging, and custom rules for real-time network traffic inspection, threat detection, and integration with SIEM platforms for centralized security monitoring.\ndomain: cybersecurity\nsubdomain: network-security\ntags:\n- network-security\n- suricata\n- ids\n- ips\n- network-monitoring\nnist_csf:\n- PR.IR-01\n- DE.CM-01\n- ID.AM-03\n- PR.DS-02\nmodel: sonnet\nmaxTurns: 20\ntools: [Read, Bash, Glob, Grep]\nmitre_attack:\n- T1021.002\n- T1059\n- T1070\n- T1562.001\ncapec: []\n---\n\n# Configuring Suricata for Network Monitoring\n\n## When to Use\n\n- Deploying a high-performance IDS\u002FIPS capable of multi-threaded packet processing for 10+ Gbps network links\n- Monitoring network traffic with protocol-aware inspection for HTTP, TLS, DNS, SMB, and other protocols\n- Generating structured EVE JSON logs for direct SIEM ingestion without custom parsers\n- Running in inline (IPS) mode to actively block malicious traffic at network choke points\n- Combining signature-based detection with protocol anomaly detection and file extraction\n\n**Do not use** as a standalone security solution without complementary controls, for encrypted traffic inspection without TLS decryption capabilities, or on systems with insufficient CPU\u002Fmemory for the expected traffic volume.\n\n## Prerequisites\n\n- Suricata 7.0+ installed from PPA or source (`suricata --build-info`)\n- Network interface on a span port, tap, or inline bridge for traffic capture\n- AF_PACKET or DPDK support for high-performance packet capture\n- Emerging Threats Open or Pro ruleset subscription (or Snort Talos rules via oinkcode)\n- suricata-update tool for automated rule management\n- Elasticsearch\u002FKibana or Splunk for log analysis and visualization\n\n## Workflow\n\n### Step 1: Install Suricata and Dependencies\n\n```bash\n# Install from PPA (Ubuntu\u002FDebian)\nsudo add-apt-repository ppa:oisf\u002Fsuricata-stable\nsudo apt update\nsudo apt install -y suricata suricata-update jq\n\n# Verify installation\nsuricata --build-info | grep -E \"Version|AF_PACKET|NFQueue\"\n\n# Or install from source for latest features\nsudo apt install -y libpcre2-dev build-essential autoconf automake libtool \\\n  libpcap-dev libnet1-dev libyaml-dev libjansson-dev libcap-ng-dev \\\n  libmagic-dev libnetfilter-queue-dev libhiredis-dev rustc cargo cbindgen\ngit clone https:\u002F\u002Fgithub.com\u002FOISF\u002Fsuricata.git\ncd suricata && git clone https:\u002F\u002Fgithub.com\u002FOISF\u002Flibhtp.git -b 0.5.x\n.\u002Fautogen.sh && .\u002Fconfigure --prefix=\u002Fusr --sysconfdir=\u002Fetc --localstatedir=\u002Fvar \\\n  --enable-nfqueue --enable-af-packet\nmake -j$(nproc) && sudo make install install-conf\n```\n\n### Step 2: Configure Network Interfaces\n\n```bash\n# Disable NIC offloading features\nsudo ethtool -K eth1 gro off lro off tso off gso off rx off tx off sg off\n\n# Set interface to promiscuous mode\nsudo ip link set eth1 promisc on\n\n# For high-performance deployments, configure AF_PACKET with multiple threads\n# Edit \u002Fetc\u002Fsuricata\u002Fsuricata.yaml\n```\n\n### Step 3: Configure suricata.yaml\n\n```yaml\n# \u002Fetc\u002Fsuricata\u002Fsuricata.yaml (key sections)\n\n# Network variables\nvars:\n  address-groups:\n    HOME_NET: \"[10.0.0.0\u002F8, 172.16.0.0\u002F12, 192.168.0.0\u002F16]\"\n    EXTERNAL_NET: \"!$HOME_NET\"\n    HTTP_SERVERS: \"$HOME_NET\"\n    DNS_SERVERS: \"$HOME_NET\"\n    SMTP_SERVERS: \"$HOME_NET\"\n\n# Default rule path\ndefault-rule-path: \u002Fvar\u002Flibs\u002Fsuricata\u002Frules\nrule-files:\n  - suricata.rules\n\n# AF_PACKET configuration for high performance\naf-packet:\n  - interface: eth1\n    threads: auto\n    cluster-id: 99\n    cluster-type: cluster_flow\n    defrag: yes\n    use-mmap: yes\n    ring-size: 200000\n    buffer-size: 262144\n\n# EVE JSON logging (primary output format)\noutputs:\n  - eve-log:\n      enabled: yes\n      filetype: regular\n      filename: eve.json\n      pcap-file: false\n      community-id: true\n      types:\n        - alert:\n            tagged-packets: yes\n            payload: yes\n            payload-printable: yes\n            http-body: yes\n            http-body-printable: yes\n        - http:\n            extended: yes\n        - dns:\n            query: yes\n            answer: yes\n        - tls:\n            extended: yes\n        - files:\n            force-magic: yes\n            force-hash: [md5, sha256]\n        - smtp:\n            extended: yes\n        - flow\n        - netflow\n        - anomaly:\n            enabled: yes\n        - stats:\n            totals: yes\n            threads: yes\n\n  # PCAP logging for captured packets that trigger alerts\n  - pcap-log:\n      enabled: yes\n      filename: alert-%n.pcap\n      limit: 100mb\n      max-files: 50\n      mode: normal\n      use-stream-depth: no\n      honor-pass-rules: no\n\n# Stream engine settings\nstream:\n  memcap: 512mb\n  checksum-validation: no\n  reassembly:\n    memcap: 1gb\n    depth: 1mb\n    toserver-chunk-size: 2560\n    toclient-chunk-size: 2560\n\n# Detection engine\ndetect:\n  profile: high\n  custom-values:\n    toclient-groups: 200\n    toserver-groups: 200\n  sgh-mpm-context: auto\n  inspection-recursion-limit: 3000\n\n# Protocol detection and parsing\napp-layer:\n  protocols:\n    http:\n      enabled: yes\n      memcap: 64mb\n    tls:\n      enabled: yes\n      detection-ports:\n        dp: 443, 8443\n      ja3-fingerprints: yes\n    dns:\n      enabled: yes\n      tcp:\n        enabled: yes\n      udp:\n        enabled: yes\n    smb:\n      enabled: yes\n      detection-ports:\n        dp: 139, 445\n    ssh:\n      enabled: yes\n      hassh: yes\n```\n\n### Step 4: Download and Manage Rulesets\n\n```bash\n# Update Suricata rules using suricata-update\nsudo suricata-update\n\n# Enable additional rule sources\nsudo suricata-update list-sources\nsudo suricata-update enable-source et\u002Fopen\nsudo suricata-update enable-source oisf\u002Ftrafficid\nsudo suricata-update enable-source ptresearch\u002Fattackdetection\n\n# Update with all enabled sources\nsudo suricata-update\n\n# Check rule statistics\nsudo suricata-update list-sources --enabled\nwc -l \u002Fvar\u002Flibs\u002Fsuricata\u002Frules\u002Fsuricata.rules\n\n# Disable noisy rules\nsudo tee \u002Fetc\u002Fsuricata\u002Fdisable.conf \u003C\u003C 'EOF'\n# Disable overly broad rules\n2100498\n2013028\n2210000-2210050\ngroup:emerging-policy.rules\nEOF\n\n# Create custom local rules\nsudo tee \u002Fetc\u002Fsuricata\u002Frules\u002Flocal.rules \u003C\u003C 'EOF'\n# Detect reverse shell connections\nalert tcp $HOME_NET any -> $EXTERNAL_NET 4444 (msg:\"LOCAL Reverse Shell Port 4444\"; flow:established,to_server; content:\"|2f 62 69 6e 2f|\"; sid:9000001; rev:1; classtype:trojan-activity; priority:1;)\n\n# Detect DNS tunneling by query length\nalert dns $HOME_NET any -> any any (msg:\"LOCAL DNS Tunneling Long Query\"; dns.query; content:\".\"; offset:50; sid:9000002; rev:1; classtype:policy-violation; priority:2;)\n\n# Detect TLS to suspicious JA3 hash (Cobalt Strike default)\nalert tls $HOME_NET any -> $EXTERNAL_NET any (msg:\"LOCAL Cobalt Strike JA3 Hash\"; ja3.hash; content:\"72a589da586844d7f0818ce684948eea\"; sid:9000003; rev:1; classtype:trojan-activity; priority:1;)\n\n# Detect SSH brute force\nalert ssh $EXTERNAL_NET any -> $HOME_NET 22 (msg:\"LOCAL SSH Brute Force Attempt\"; flow:to_server; threshold:type both, track by_src, count 10, seconds 60; sid:9000004; rev:1; classtype:attempted-admin; priority:2;)\n\n# Detect data exfiltration via HTTP POST (large uploads)\nalert http $HOME_NET any -> $EXTERNAL_NET any (msg:\"LOCAL Large HTTP POST Upload\"; flow:to_server,established; http.method; content:\"POST\"; http.content_len; content:\">\"; byte_test:8,>,10000000,0,string; sid:9000005; rev:1; classtype:policy-violation; priority:2;)\nEOF\n\n# Add local rules to configuration\necho \"  - local.rules\" | sudo tee -a \u002Fetc\u002Fsuricata\u002Fsuricata.yaml\n```\n\n### Step 5: Deploy and Validate\n\n```bash\n# Validate configuration\nsudo suricata -T -c \u002Fetc\u002Fsuricata\u002Fsuricata.yaml -v\n\n# Run Suricata in IDS mode\nsudo suricata -c \u002Fetc\u002Fsuricata\u002Fsuricata.yaml --af-packet=eth1 -D\n\n# Or run in IPS mode (inline with NFQueue)\n# First configure iptables to send traffic to NFQueue\n# sudo iptables -I FORWARD -j NFQUEUE --queue-num 0\n# sudo suricata -c \u002Fetc\u002Fsuricata\u002Fsuricata.yaml -q 0 -D\n\n# Create systemd service\nsudo tee \u002Fetc\u002Fsystemd\u002Fsystem\u002Fsuricata.service \u003C\u003C 'EOF'\n[Unit]\nDescription=Suricata IDS\u002FIPS\nAfter=network.target\nRequires=network.target\n\n[Service]\nType=simple\nExecStartPre=\u002Fusr\u002Fbin\u002Fsuricata -T -c \u002Fetc\u002Fsuricata\u002Fsuricata.yaml\nExecStart=\u002Fusr\u002Fbin\u002Fsuricata -c \u002Fetc\u002Fsuricata\u002Fsuricata.yaml --af-packet=eth1 --pidfile \u002Fvar\u002Frun\u002Fsuricata.pid\nExecReload=\u002Fbin\u002Fkill -USR2 $MAINPID\nRestart=on-failure\n\n[Install]\nWantedBy=multi-user.target\nEOF\n\nsudo systemctl enable --now suricata\n\n# Test with a known signature\ncurl http:\u002F\u002Ftestmynids.org\u002Fuid\u002Findex.html\n# Should trigger ET GPL rule for uid.\n\n# Verify alerts are generated\nsudo tail -f \u002Fvar\u002Flog\u002Fsuricata\u002Feve.json | jq 'select(.event_type==\"alert\")'\n```\n\n### Step 6: Integrate with SIEM and Monitor\n\n```bash\n# Parse EVE JSON with jq for quick analysis\n# Top 10 alerts\ncat \u002Fvar\u002Flog\u002Fsuricata\u002Feve.json | jq -r 'select(.event_type==\"alert\") | .alert.signature' | sort | uniq -c | sort -rn | head -10\n\n# Extract IOCs from alerts\ncat \u002Fvar\u002Flog\u002Fsuricata\u002Feve.json | jq -r 'select(.event_type==\"alert\") | [.timestamp, .src_ip, .dest_ip, .alert.signature, .alert.severity] | @csv' > alert_summary.csv\n\n# JA3 fingerprint analysis\ncat \u002Fvar\u002Flog\u002Fsuricata\u002Feve.json | jq -r 'select(.event_type==\"tls\") | [.src_ip, .tls.ja3.hash, .tls.sni] | @csv' | sort | uniq -c | sort -rn\n\n# DNS query analysis\ncat \u002Fvar\u002Flog\u002Fsuricata\u002Feve.json | jq -r 'select(.event_type==\"dns\" and .dns.type==\"query\") | [.src_ip, .dns.rrname, .dns.rrtype] | @csv' | sort | uniq -c | sort -rn | head -20\n\n# Configure Filebeat for Elastic integration\nsudo tee \u002Fetc\u002Ffilebeat\u002Fmodules.d\u002Fsuricata.yml \u003C\u003C 'EOF'\n- module: suricata\n  eve:\n    enabled: true\n    var.paths: [\"\u002Fvar\u002Flog\u002Fsuricata\u002Feve.json\"]\nEOF\n\nsudo filebeat modules enable suricata\nsudo systemctl restart filebeat\n\n# Monitor Suricata performance\ncat \u002Fvar\u002Flog\u002Fsuricata\u002Feve.json | jq 'select(.event_type==\"stats\") | .stats.capture' | tail -1\n# Check for packet drops: kernel_drops should be 0\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **EVE JSON** | Suricata's primary logging format producing structured JSON events for alerts, protocol metadata, flow records, and statistics |\n| **AF_PACKET** | Linux kernel packet capture mechanism used by Suricata for high-performance traffic capture with kernel-bypass capabilities |\n| **JA3\u002FJA3S** | TLS fingerprinting method that creates hash values from TLS Client Hello and Server Hello parameters for identifying applications and malware |\n| **HASSH** | SSH fingerprinting method similar to JA3 that creates hashes from SSH key exchange parameters to identify SSH client and server implementations |\n| **Community ID** | Standardized flow identifier hash that enables correlation of the same network flow across different monitoring tools (Suricata, Zeek, Wireshark) |\n| **suricata-update** | Official rule management tool that downloads, merges, and manages multiple rulesets with enable\u002Fdisable controls |\n\n## Tools & Systems\n\n- **Suricata 7.0+**: Open-source multi-threaded IDS\u002FIPS\u002FNSM engine with protocol detection, file extraction, and JA3\u002FHASSH fingerprinting\n- **suricata-update**: Ruleset management tool supporting ET Open, ET Pro, Snort rules, and custom rule sources\n- **Elastic Stack (ELK)**: Log aggregation and visualization platform with native Suricata module in Filebeat for dashboards and alerting\n- **Scirius**: Web-based Suricata rule management interface for editing, enabling\u002Fdisabling, and monitoring rule performance\n- **Evebox**: Lightweight event viewer for Suricata EVE JSON logs with alert management and escalation capabilities\n\n## Common Scenarios\n\n### Scenario: Deploying Suricata IDS on a 10 Gbps Enterprise Network Perimeter\n\n**Context**: A technology company needs to deploy IDS at their internet egress point handling 10 Gbps of traffic. They require protocol-level metadata logging for threat hunting, signature-based alerting for known threats, and JA3 fingerprinting for detecting malware C2 communications. Alerts must feed into their Elastic SIEM.\n\n**Approach**:\n1. Deploy Suricata on a server with 16 CPU cores, 64 GB RAM, and dual 10G NICs using AF_PACKET with 14 worker threads\n2. Enable ET Open and ptresearch\u002Fattackdetection rulesets via suricata-update, totaling approximately 35,000 active rules\n3. Configure EVE JSON logging with community-id, extended HTTP\u002FTLS\u002FDNS metadata, and file hashing (MD5 + SHA256)\n4. Enable JA3 and HASSH fingerprinting for TLS and SSH traffic profiling\n5. Write custom rules for organization-specific threats: known bad JA3 hashes, DNS queries to DGA domains, large data uploads to uncommon destinations\n6. Integrate with Elastic via Filebeat's Suricata module, deploying pre-built Kibana dashboards for real-time visibility\n7. Tune rules over a 2-week baseline period, disabling false-positive generators and adjusting thresholds\n\n**Pitfalls**:\n- Not allocating sufficient CPU threads, causing packet drops at peak traffic volumes\n- Enabling all available rules without tuning, overwhelming analysts with false positives\n- Forgetting to disable NIC offloading, resulting in incorrect checksums and missed detections\n- Not enabling community-id, making it difficult to correlate Suricata events with Zeek or other tools\n\n## Output Format\n\n```\n## Suricata IDS Deployment Report\n\n**Sensor**: suricata-gw-01 (10.10.1.251)\n**Interface**: eth1 (span from border router)\n**Configuration**: \u002Fetc\u002Fsuricata\u002Fsuricata.yaml\n**Worker Threads**: 14 AF_PACKET threads\n**Active Rules**: 35,247 (ET Open + Custom)\n\n### Performance Metrics (24-hour)\n\n| Metric | Value |\n|--------|-------|\n| Packets Processed | 847,293,421 |\n| Kernel Drops | 0 (0.000%) |\n| Alerts Generated | 1,247 |\n| Unique Signatures Fired | 89 |\n| JA3 Fingerprints Observed | 342 unique |\n| Files Extracted | 2,847 |\n\n### Top 10 Alert Signatures\n\n| Count | SID | Signature | Severity |\n|-------|-----|-----------|----------|\n| 312 | 2024897 | ET POLICY curl User-Agent Outbound | 3 |\n| 189 | 9000003 | LOCAL Cobalt Strike JA3 Hash | 1 |\n| 145 | 2028765 | ET SCAN Nmap SYN Scan | 2 |\n| 98 | 9000002 | LOCAL DNS Tunneling Long Query | 2 |\n\n### Critical Alerts Requiring Immediate Triage\n1. SID 9000003: Cobalt Strike JA3 from 10.10.5.12 to 203.0.113.50 (189 alerts)\n2. SID 9000002: DNS tunneling from 10.10.3.45 to suspect-domain.xyz (98 alerts)\n```\n","# Configuring Suricata for Network Monitoring\n\n## When to Use\n\n- Deploying a high-performance IDS\u002FIPS capable of multi-threaded packet processing for 10+ Gbps network links\n- Monitoring network traffic with protocol-aware inspection for HTTP, TLS, DNS, SMB, and other protocols\n- Generating structured EVE JSON logs for direct SIEM ingestion without custom parsers\n- Running in inline (IPS) mode to actively block malicious traffic at network choke points\n- Combining signature-based detection with protocol anomaly detection and file extraction\n\n**Do not use** as a standalone security solution without complementary controls, for encrypted traffic inspection without TLS decryption capabilities, or on systems with insufficient CPU\u002Fmemory for the expected traffic volume.\n\n## Prerequisites\n\n- Suricata 7.0+ installed from PPA or source (`suricata --build-info`)\n- Network interface on a span port, tap, or inline bridge for traffic capture\n- AF_PACKET or DPDK support for high-performance packet capture\n- Emerging Threats Open or Pro ruleset subscription (or Snort Talos rules via oinkcode)\n- suricata-update tool for automated rule management\n- Elasticsearch\u002FKibana or Splunk for log analysis and visualization\n\n## Workflow\n\n### Step 1: Install Suricata and Dependencies\n\n```bash\n# Install from PPA (Ubuntu\u002FDebian)\nsudo add-apt-repository ppa:oisf\u002Fsuricata-stable\nsudo apt update\nsudo apt install -y suricata suricata-update jq\n\n# Verify installation\nsuricata --build-info | grep -E \"Version|AF_PACKET|NFQueue\"\n\n# Or install from source for latest features\nsudo apt install -y libpcre2-dev build-essential autoconf automake libtool \\\n  libpcap-dev libnet1-dev libyaml-dev libjansson-dev libcap-ng-dev \\\n  libmagic-dev libnetfilter-queue-dev libhiredis-dev rustc cargo cbindgen\ngit clone https:\u002F\u002Fgithub.com\u002FOISF\u002Fsuricata.git\ncd suricata && git clone https:\u002F\u002Fgithub.com\u002FOISF\u002Flibhtp.git -b 0.5.x\n.\u002Fautogen.sh && .\u002Fconfigure --prefix=\u002Fusr --sysconfdir=\u002Fetc --localstatedir=\u002Fvar \\\n  --enable-nfqueue --enable-af-packet\nmake -j$(nproc) && sudo make install install-conf\n```\n\n### Step 2: Configure Network Interfaces\n\n```bash\n# Disable NIC offloading features\nsudo ethtool -K eth1 gro off lro off tso off gso off rx off tx off sg off\n\n# Set interface to promiscuous mode\nsudo ip link set eth1 promisc on\n\n# For high-performance deployments, configure AF_PACKET with multiple threads\n# Edit \u002Fetc\u002Fsuricata\u002Fsuricata.yaml\n```\n\n### Step 3: Configure suricata.yaml\n\n```yaml\n# \u002Fetc\u002Fsuricata\u002Fsuricata.yaml (key sections)\n\n# Network variables\nvars:\n  address-groups:\n    HOME_NET: \"[10.0.0.0\u002F8, 172.16.0.0\u002F12, 192.168.0.0\u002F16]\"\n    EXTERNAL_NET: \"!$HOME_NET\"\n    HTTP_SERVERS: \"$HOME_NET\"\n    DNS_SERVERS: \"$HOME_NET\"\n    SMTP_SERVERS: \"$HOME_NET\"\n\n# Default rule path\ndefault-rule-path: \u002Fvar\u002Flibs\u002Fsuricata\u002Frules\nrule-files:\n  - suricata.rules\n\n# AF_PACKET configuration for high performance\naf-packet:\n  - interface: eth1\n    threads: auto\n    cluster-id: 99\n    cluster-type: cluster_flow\n    defrag: yes\n    use-mmap: yes\n    ring-size: 200000\n    buffer-size: 262144\n\n# EVE JSON logging (primary output format)\noutputs:\n  - eve-log:\n      enabled: yes\n      filetype: regular\n      filename: eve.json\n      pcap-file: false\n      community-id: true\n      types:\n        - alert:\n            tagged-packets: yes\n            payload: yes\n            payload-printable: yes\n            http-body: yes\n            http-body-printable: yes\n        - http:\n            extended: yes\n        - dns:\n            query: yes\n            answer: yes\n        - tls:\n            extended: yes\n        - files:\n            force-magic: yes\n            force-hash: [md5, sha256]\n        - smtp:\n            extended: yes\n        - flow\n        - netflow\n        - anomaly:\n            enabled: yes\n        - stats:\n            totals: yes\n            threads: yes\n\n  # PCAP logging for captured packets that trigger alerts\n  - pcap-log:\n      enabled: yes\n      filename: alert-%n.pcap\n      limit: 100mb\n      max-files: 50\n      mode: normal\n      use-stream-depth: no\n      honor-pass-rules: no\n\n# Stream engine settings\nstream:\n  memcap: 512mb\n  checksum-validation: no\n  reassembly:\n    memcap: 1gb\n    depth: 1mb\n    toserver-chunk-size: 2560\n    toclient-chunk-size: 2560\n\n# Detection engine\ndetect:\n  profile: high\n  custom-values:\n    toclient-groups: 200\n    toserver-groups: 200\n  sgh-mpm-context: auto\n  inspection-recursion-limit: 3000\n\n# Protocol detection and parsing\napp-layer:\n  protocols:\n    http:\n      enabled: yes\n      memcap: 64mb\n    tls:\n      enabled: yes\n      detection-ports:\n        dp: 443, 8443\n      ja3-fingerprints: yes\n    dns:\n      enabled: yes\n      tcp:\n        enabled: yes\n      udp:\n        enabled: yes\n    smb:\n      enabled: yes\n      detection-ports:\n        dp: 139, 445\n    ssh:\n      enabled: yes\n      hassh: yes\n```\n\n### Step 4: Download and Manage Rulesets\n\n```bash\n# Update Suricata rules using suricata-update\nsudo suricata-update\n\n# Enable additional rule sources\nsudo suricata-update list-sources\nsudo suricata-update enable-source et\u002Fopen\nsudo suricata-update enable-source oisf\u002Ftrafficid\nsudo suricata-update enable-source ptresearch\u002Fattackdetection\n\n# Update with all enabled sources\nsudo suricata-update\n\n# Check rule statistics\nsudo suricata-update list-sources --enabled\nwc -l \u002Fvar\u002Flibs\u002Fsuricata\u002Frules\u002Fsuricata.rules\n\n# Disable noisy rules\nsudo tee \u002Fetc\u002Fsuricata\u002Fdisable.conf \u003C\u003C 'EOF'\n# Disable overly broad rules\n2100498\n2013028\n2210000-2210050\ngroup:emerging-policy.rules\nEOF\n\n# Create custom local rules\nsudo tee \u002Fetc\u002Fsuricata\u002Frules\u002Flocal.rules \u003C\u003C 'EOF'\n# Detect reverse shell connections\nalert tcp $HOME_NET any -> $EXTERNAL_NET 4444 (msg:\"LOCAL Reverse Shell Port 4444\"; flow:established,to_server; content:\"|2f 62 69 6e 2f|\"; sid:9000001; rev:1; classtype:trojan-activity; priority:1;)\n\n# Detect DNS tunneling by query length\nalert dns $HOME_NET any -> any any (msg:\"LOCAL DNS Tunneling Long Query\"; dns.query; content:\".\"; offset:50; sid:9000002; rev:1; classtype:policy-violation; priority:2;)\n\n# Detect TLS to suspicious JA3 hash (Cobalt Strike default)\nalert tls $HOME_NET any -> $EXTERNAL_NET any (msg:\"LOCAL Cobalt Strike JA3 Hash\"; ja3.hash; content:\"72a589da586844d7f0818ce684948eea\"; sid:9000003; rev:1; classtype:trojan-activity; priority:1;)\n\n# Detect SSH brute force\nalert ssh $EXTERNAL_NET any -> $HOME_NET 22 (msg:\"LOCAL SSH Brute Force Attempt\"; flow:to_server; threshold:type both, track by_src, count 10, seconds 60; sid:9000004; rev:1; classtype:attempted-admin; priority:2;)\n\n# Detect data exfiltration via HTTP POST (large uploads)\nalert http $HOME_NET any -> $EXTERNAL_NET any (msg:\"LOCAL Large HTTP POST Upload\"; flow:to_server,established; http.method; content:\"POST\"; http.content_len; content:\">\"; byte_test:8,>,10000000,0,string; sid:9000005; rev:1; classtype:policy-violation; priority:2;)\nEOF\n\n# Add local rules to configuration\necho \"  - local.rules\" | sudo tee -a \u002Fetc\u002Fsuricata\u002Fsuricata.yaml\n```\n\n### Step 5: Deploy and Validate\n\n```bash\n# Validate configuration\nsudo suricata -T -c \u002Fetc\u002Fsuricata\u002Fsuricata.yaml -v\n\n# Run Suricata in IDS mode\nsudo suricata -c \u002Fetc\u002Fsuricata\u002Fsuricata.yaml --af-packet=eth1 -D\n\n# Or run in IPS mode (inline with NFQueue)\n# First configure iptables to send traffic to NFQueue\n# sudo iptables -I FORWARD -j NFQUEUE --queue-num 0\n# sudo suricata -c \u002Fetc\u002Fsuricata\u002Fsuricata.yaml -q 0 -D\n\n# Create systemd service\nsudo tee \u002Fetc\u002Fsystemd\u002Fsystem\u002Fsuricata.service \u003C\u003C 'EOF'\n[Unit]\nDescription=Suricata IDS\u002FIPS\nAfter=network.target\nRequires=network.target\n\n[Service]\nType=simple\nExecStartPre=\u002Fusr\u002Fbin\u002Fsuricata -T -c \u002Fetc\u002Fsuricata\u002Fsuricata.yaml\nExecStart=\u002Fusr\u002Fbin\u002Fsuricata -c \u002Fetc\u002Fsuricata\u002Fsuricata.yaml --af-packet=eth1 --pidfile \u002Fvar\u002Frun\u002Fsuricata.pid\nExecReload=\u002Fbin\u002Fkill -USR2 $MAINPID\nRestart=on-failure\n\n[Install]\nWantedBy=multi-user.target\nEOF\n\nsudo systemctl enable --now suricata\n\n# Test with a known signature\ncurl http:\u002F\u002Ftestmynids.org\u002Fuid\u002Findex.html\n# Should trigger ET GPL rule for uid.\n\n# Verify alerts are generated\nsudo tail -f \u002Fvar\u002Flog\u002Fsuricata\u002Feve.json | jq 'select(.event_type==\"alert\")'\n```\n\n### Step 6: Integrate with SIEM and Monitor\n\n```bash\n# Parse EVE JSON with jq for quick analysis\n# Top 10 alerts\ncat \u002Fvar\u002Flog\u002Fsuricata\u002Feve.json | jq -r 'select(.event_type==\"alert\") | .alert.signature' | sort | uniq -c | sort -rn | head -10\n\n# Extract IOCs from alerts\ncat \u002Fvar\u002Flog\u002Fsuricata\u002Feve.json | jq -r 'select(.event_type==\"alert\") | [.timestamp, .src_ip, .dest_ip, .alert.signature, .alert.severity] | @csv' > alert_summary.csv\n\n# JA3 fingerprint analysis\ncat \u002Fvar\u002Flog\u002Fsuricata\u002Feve.json | jq -r 'select(.event_type==\"tls\") | [.src_ip, .tls.ja3.hash, .tls.sni] | @csv' | sort | uniq -c | sort -rn\n\n# DNS query analysis\ncat \u002Fvar\u002Flog\u002Fsuricata\u002Feve.json | jq -r 'select(.event_type==\"dns\" and .dns.type==\"query\") | [.src_ip, .dns.rrname, .dns.rrtype] | @csv' | sort | uniq -c | sort -rn | head -20\n\n# Configure Filebeat for Elastic integration\nsudo tee \u002Fetc\u002Ffilebeat\u002Fmodules.d\u002Fsuricata.yml \u003C\u003C 'EOF'\n- module: suricata\n  eve:\n    enabled: true\n    var.paths: [\"\u002Fvar\u002Flog\u002Fsuricata\u002Feve.json\"]\nEOF\n\nsudo filebeat modules enable suricata\nsudo systemctl restart filebeat\n\n# Monitor Suricata performance\ncat \u002Fvar\u002Flog\u002Fsuricata\u002Feve.json | jq 'select(.event_type==\"stats\") | .stats.capture' | tail -1\n# Check for packet drops: kernel_drops should be 0\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **EVE JSON** | Suricata's primary logging format producing structured JSON events for alerts, protocol metadata, flow records, and statistics |\n| **AF_PACKET** | Linux kernel packet capture mechanism used by Suricata for high-performance traffic capture with kernel-bypass capabilities |\n| **JA3\u002FJA3S** | TLS fingerprinting method that creates hash values from TLS Client Hello and Server Hello parameters for identifying applications and malware |\n| **HASSH** | SSH fingerprinting method similar to JA3 that creates hashes from SSH key exchange parameters to identify SSH client and server implementations |\n| **Community ID** | Standardized flow identifier hash that enables correlation of the same network flow across different monitoring tools (Suricata, Zeek, Wireshark) |\n| **suricata-update** | Official rule management tool that downloads, merges, and manages multiple rulesets with enable\u002Fdisable controls |\n\n## Tools & Systems\n\n- **Suricata 7.0+**: Open-source multi-threaded IDS\u002FIPS\u002FNSM engine with protocol detection, file extraction, and JA3\u002FHASSH fingerprinting\n- **suricata-update**: Ruleset management tool supporting ET Open, ET Pro, Snort rules, and custom rule sources\n- **Elastic Stack (ELK)**: Log aggregation and visualization platform with native Suricata module in Filebeat for dashboards and alerting\n- **Scirius**: Web-based Suricata rule management interface for editing, enabling\u002Fdisabling, and monitoring rule performance\n- **Evebox**: Lightweight event viewer for Suricata EVE JSON logs with alert management and escalation capabilities\n\n## Common Scenarios\n\n### Scenario: Deploying Suricata IDS on a 10 Gbps Enterprise Network Perimeter\n\n**Context**: A technology company needs to deploy IDS at their internet egress point handling 10 Gbps of traffic. They require protocol-level metadata logging for threat hunting, signature-based alerting for known threats, and JA3 fingerprinting for detecting malware C2 communications. Alerts must feed into their Elastic SIEM.\n\n**Approach**:\n1. Deploy Suricata on a server with 16 CPU cores, 64 GB RAM, and dual 10G NICs using AF_PACKET with 14 worker threads\n2. Enable ET Open and ptresearch\u002Fattackdetection rulesets via suricata-update, totaling approximately 35,000 active rules\n3. Configure EVE JSON logging with community-id, extended HTTP\u002FTLS\u002FDNS metadata, and file hashing (MD5 + SHA256)\n4. Enable JA3 and HASSH fingerprinting for TLS and SSH traffic profiling\n5. Write custom rules for organization-specific threats: known bad JA3 hashes, DNS queries to DGA domains, large data uploads to uncommon destinations\n6. Integrate with Elastic via Filebeat's Suricata module, deploying pre-built Kibana dashboards for real-time visibility\n7. Tune rules over a 2-week baseline period, disabling false-positive generators and adjusting thresholds\n\n**Pitfalls**:\n- Not allocating sufficient CPU threads, causing packet drops at peak traffic volumes\n- Enabling all available rules without tuning, overwhelming analysts with false positives\n- Forgetting to disable NIC offloading, resulting in incorrect checksums and missed detections\n- Not enabling community-id, making it difficult to correlate Suricata events with Zeek or other tools\n\n## Output Format\n\n```\n## Suricata IDS Deployment Report\n\n**Sensor**: suricata-gw-01 (10.10.1.251)\n**Interface**: eth1 (span from border router)\n**Configuration**: \u002Fetc\u002Fsuricata\u002Fsuricata.yaml\n**Worker Threads**: 14 AF_PACKET threads\n**Active Rules**: 35,247 (ET Open + Custom)\n\n### Performance Metrics (24-hour)\n\n| Metric | Value |\n|--------|-------|\n| Packets Processed | 847,293,421 |\n| Kernel Drops | 0 (0.000%) |\n| Alerts Generated | 1,247 |\n| Unique Signatures Fired | 89 |\n| JA3 Fingerprints Observed | 342 unique |\n| Files Extracted | 2,847 |\n\n### Top 10 Alert Signatures\n\n| Count | SID | Signature | Severity |\n|-------|-----|-----------|----------|\n| 312 | 2024897 | ET POLICY curl User-Agent Outbound | 3 |\n| 189 | 9000003 | LOCAL Cobalt Strike JA3 Hash | 1 |\n| 145 | 2028765 | ET SCAN Nmap SYN Scan | 2 |\n| 98 | 9000002 | LOCAL DNS Tunneling Long Query | 2 |\n\n### Critical Alerts Requiring Immediate Triage\n1. SID 9000003: Cobalt Strike JA3 from 10.10.5.12 to 203.0.113.50 (189 alerts)\n2. SID 9000002: DNS tunneling from 10.10.3.45 to suspect-domain.xyz (98 alerts)\n```\n",{"name":5,"tags":44,"capec":46,"model":35,"tools":47,"domain":38,"maxTurns":51,"nist_csf":52,"subdomain":45,"description":7,"mitre_attack":57},[45,21,22,26,27],"network-security",[],[48,28,49,50],"Read","Glob","Grep",20,[53,54,55,56],"PR.IR-01","DE.CM-01","ID.AM-03","PR.DS-02",[58,59,60,61],"T1021.002","T1059","T1070","T1562.001","main","a91f1293287ffa9f4f1b8f486cd6e835a1568c84","skills\u002Fnetwork\u002Fids\u002Fsuricata\u002Fconfigure","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace","https:\u002F\u002Fgithub.com\u002FDCx7C5","#Python","2026-09-01 11:21:00",{"source":8,"skillName":5,"commands":70,"prompt":80,"zipAvailable":81},[71,74,77],{"tool":72,"command":73},"npx","npx skills add DCx7C5\u002Fai-marketplace --skill ids-suricata-configure",{"tool":75,"command":76},"bunx","bunx skills add DCx7C5\u002Fai-marketplace --skill ids-suricata-configure",{"tool":78,"command":79},"pnpm","pnpm dlx skills add DCx7C5\u002Fai-marketplace --skill ids-suricata-configure","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fnetwork\u002Fids\u002Fsuricata\u002Fconfigure\u002FSKILL.md",true,[83],{"path":84,"resourceType":85,"resourceTypeDesc":86,"sizeBytes":87,"sourceHtmlUrl":88},"index.json","REFERENCE","参考文档",681,"https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fnetwork\u002Fids\u002Fsuricata\u002Fconfigure\u002Findex.json",[90,100,123,143,164,186],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":94,"licenseFileUrl":95,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":99},"01M73MDK3NT5XHNYTQ5P5172V9","devel-jb-algorithmic-art","- Embed algorithms inline in the HTML artifact (don't create separate .","Apache-2.0","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fdevel-jb-algorithmic-art\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fdevel-jb-algorithmic-art\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":39},"01M71HAPZ01KQ30RKTB0FFSQ05","services-wmi-persistence-detect","Detect WMI event subscription persistence by enumerating ActiveScriptEventConsumer, CommandLineEventConsumer, and permanent subscriptions in the WMI repository.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fservices\u002Fwmi\u002Fpersistence\u002Fdetect\u002FSKILL.md",[],[107,108,109,110,111,112,113,38,114,115,116,117,118,119,120,121,122,32,34],"services","detect","services wmi persistence detect","wmi","persistence","process-forensics","process","forensics","t1546.003","event-subscription","subscription","repository","commandline-consumer","subscriptions","event","activescript",{"skillNo":124,"name":125,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":127,"categories":128,"keywords":129,"publishedAt":39},"01M71HAK6JTTTS229T17WJMMCG","services-wmi-exec-exploit","Perform lateral movement across Windows networks using WMI-based remote execution techniques including Impacket wmiexec.py, CrackMapExec, and native WMI commands for stealthy post-exploitation during red team engagements.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fservices\u002Fwmi\u002Fexec\u002Fexploit\u002FSKILL.md",[],[130,110,131,107,132,133,28,134,135,38,36,136,137,138,139,30,140,141,34,142],"exec","services wmi exec exploit","exploit","across","analysis","team","remote","crackmapexec","Impacket","lateral-movement","lateral movement","command","native",{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":149,"publishedAt":39},"01M71HAG6MHKNQV8KDZKMT4886","registry-artifact-extract","Extract and analyze Windows Registry hives to uncover user activity, installed software, autostart entries, and evidence of system compromise.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fregistry\u002Fartifact\u002Fextract\u002FSKILL.md",[],[150,151,152,153,154,35,155,156,157,158,30,34,159,160,134,161,28,38,162,163],"extract","registry artifact extract","registry","artifact","digital-forensics","regripper","windows-registry","evidence-collection","software","uncover","analyze","collection","artifact-analysis","activity",{"skillNo":165,"name":166,"nameZh":6,"description":167,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":168,"categories":169,"keywords":170,"publishedAt":39},"01M71HACR4A8XTWTTSXK4124AA","processes-token-impersonate-detect","Detect Windows token impersonation and privilege abuse including SeImpersonatePrivilege exploitation via Potato attacks and token stealing techniques.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fprocesses\u002Ftoken\u002Fimpersonate\u002Fdetect\u002FSKILL.md",[],[171,172,173,108,38,174,32,175,176,177,112,34,178,179,180,181,182,183,184,185],"processes","token","processes token impersonate detect","techniques","escalation","windows","attacks","via","impersonation","potato","exploitation","printspoofer","token-impersonation","seimpersonate","privilege-escalation",{"skillNo":187,"name":188,"nameZh":6,"description":189,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":190,"categories":191,"keywords":192,"publishedAt":39},"01M71HAABSB4Z6QFSXEG00R4RK","processes-thread-injection-detect","Detect Windows thread injection techniques including CreateRemoteThread, QueueUserAPC, NtCreateThreadEx, and thread hijacking via process memory analysis.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fprocesses\u002Fthread\u002Finjection\u002Fdetect\u002FSKILL.md",[],[193,171,194,108,195,196,113,34,178,197,198,199,134,112,38,174,200,32,201,176],"thread","injection","processes thread injection detect","thread-injection","nt-api","apc-injection","api","process-injection","memory"]