[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7E2Z0D5E4DP4FBVG236C667":3,"skill-same:01M7E2Z0D5E4DP4FBVG236C667":88},{"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":46,"commitSha":47,"skillDirectory":48,"forksCount":49,"repositoryHtmlUrl":50,"repositoryHomepageUrl":6,"ownerHtmlUrl":51,"ownerBlogUrl":6,"ownerDescription":52,"updatedAt":53,"install":54,"resources":67},"01M7E2Z0D5E4DP4FBVG236C667","configuring-suricata-for-network-monitoring",null,"Deploys and configures Suricata IDS\u002FIPS with Emerging Threats rulesets, EVE JSON logging, and custom rules for high-throughput, protocol-aware traffic inspection (HTTP, TLS, DNS, SMB) and SIEM integration. Use when running Suricata in IDS or inline IPS mode to detect or block malicious traffic, or when combining signature-based and protocol anomaly detection with file extraction.","sanjeevafk\u002Fagent-skills","sanjeevafk","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F230678117?v=4","01M7C540EFY46ETG1NNWKS5X3Q","Sanjeev","01M7C540F366J5C1D587BMKH9Q",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fcollections\u002Fcybersecurity-skills\u002Fskills\u002Fconfiguring-suricata-for-network-monitoring\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fcollections\u002Fcybersecurity-skills\u002Fskills\u002Fconfiguring-suricata-for-network-monitoring\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: configuring-suricata-for-network-monitoring\ndescription: 'Deploys and configures Suricata IDS\u002FIPS with Emerging Threats rulesets,\n  EVE JSON logging, and custom rules for high-throughput, protocol-aware traffic\n  inspection (HTTP, TLS, DNS, SMB) and SIEM integration. Use when running Suricata\n  in IDS or inline IPS mode to detect or block malicious traffic, or when combining\n  signature-based and protocol anomaly detection with file extraction.\n\n  '\ndomain: cybersecurity\nsubdomain: network-security\ntags:\n- network-security\n- suricata\n- ids\n- ips\n- network-monitoring\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- PR.IR-01\n- DE.CM-01\n- ID.AM-03\n- PR.DS-02\nmitre_attack:\n- T1046\n- T1071.001\n- T1572\n- T1048\n- T1573.001\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\u002Flib\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\u002Flib\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\u002Flib\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\u002Flib\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":25,"author":31,"domain":32,"license":15,"version":33,"nist_csf":34,"subdomain":26,"description":39,"mitre_attack":40},[26,27,28,29,30],"network-security","suricata","ids","ips","network-monitoring","mahipal","cybersecurity","1.0",[35,36,37,38],"PR.IR-01","DE.CM-01","ID.AM-03","PR.DS-02","Deploys and configures Suricata IDS\u002FIPS with Emerging Threats rulesets, EVE JSON logging, and custom rules for high-throughput, protocol-aware traffic inspection (HTTP, TLS, DNS, SMB) and SIEM integration. Use when running Suricata in IDS or inline IPS mode to detect or block malicious traffic, or when combining signature-based and protocol anomaly detection with file extraction.\n",[41,42,43,44,45],"T1046","T1071.001","T1572","T1048","T1573.001","main","4e084e84eb42fc53e144c89c0f7f48b39c8a4b0f","collections\u002Fcybersecurity-skills\u002Fskills\u002Fconfiguring-suricata-for-network-monitoring",1,"https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills","https:\u002F\u002Fgithub.com\u002Fsanjeevafk","First make it work. Then make it right. Then make it fast.","2026-11-14 13:36:16",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add sanjeevafk\u002Fagent-skills --skill configuring-suricata-for-network-monitoring",{"tool":60,"command":61},"bunx","bunx skills add sanjeevafk\u002Fagent-skills --skill configuring-suricata-for-network-monitoring",{"tool":63,"command":64},"pnpm","pnpm dlx skills add sanjeevafk\u002Fagent-skills --skill configuring-suricata-for-network-monitoring","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fcollections\u002Fcybersecurity-skills\u002Fskills\u002Fconfiguring-suricata-for-network-monitoring\u002FSKILL.md",true,[68,72,78,84],{"path":69,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":73,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fapi-reference.md","REFERENCE","参考文档",2627,"https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fcollections\u002Fcybersecurity-skills\u002Fskills\u002Fconfiguring-suricata-for-network-monitoring\u002Freferences\u002Fapi-reference.md",{"path":79,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":83},"scripts\u002Fagent.py","SCRIPT","脚本",7814,"https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fcollections\u002Fcybersecurity-skills\u002Fskills\u002Fconfiguring-suricata-for-network-monitoring\u002Fscripts\u002Fagent.py",{"path":85,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":86,"sourceHtmlUrl":87},"SKILL.es.md",1214,"https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fcollections\u002Fcybersecurity-skills\u002Fskills\u002Fconfiguring-suricata-for-network-monitoring\u002FSKILL.es.md",[89,97,105,113,121,128],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":93,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":20},"01M7EFHX67M3KKXT1BXVPA5ADT","zarr-python","Chunked N-D arrays for cloud storage (Zarr-Python 3). Compressed arrays, parallel I\u002FO, S3\u002FGCS via fsspec, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","MIT","https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":93,"licenseFileUrl":101,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":20},"01M7EFFQGM51TZBGRENXY50ZYM","whiteboard-diagrams","Create accurate, simple, hand-drawn whiteboard diagrams from a user's process, system, architecture, learning workflow, comparison, or causal explanation. Use when the user asks for a scribbly whiteboard visual, educational workflow graphic, hand-drawn explainer, or diagram like the bundled reference; ask one focused clarification question when the subject or relationships are missing, then generate and visually verify the final image.","https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwhiteboard-diagrams\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwhiteboard-diagrams\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":109,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":20},"01M7EFF1CSQNTDMHFK4ZGY6NYK","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":117,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":20},"01M7EFE8106X6C28FT8PA74427","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fweb-artifacts-builder\u002FSKILL.md",[],[],{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":93,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":20},"01M7EFCSNZM9G7ZHS6F127Q71X","verification-loop","A comprehensive verification system for Claude Code sessions.","https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fverification-loop\u002FSKILL.md",[],[],{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":93,"licenseFileUrl":132,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":20},"01M7EFCE7EZMKPRYDDNKBQ9EEH","vercel-deploy","Deploy applications and websites to Vercel. Use when the user requests deployment actions like \"deploy my app\", \"deploy and give me the link\", \"push this live\", or \"create a preview deployment\".","https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fvercel-deploy\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fsanjeevafk\u002Fagent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fvercel-deploy\u002FSKILL.md",[],[]]