[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71FFTZ465NN47NBRGT7ARD5":3,"skill-same:01M71FFTZ465NN47NBRGT7ARD5":58},{"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":26,"linkOnly":27,"markdownContent":28,"markdownBody":29,"frontMatter":30,"refName":31,"commitSha":32,"skillDirectory":33,"forksCount":14,"repositoryHtmlUrl":34,"repositoryHomepageUrl":6,"ownerHtmlUrl":35,"ownerBlogUrl":6,"ownerDescription":36,"updatedAt":37,"install":38,"resources":51},"01M71FFTZ465NN47NBRGT7ARD5","net-security-ids-configure",null,"| | Paranoid | `-T0` | 1 probe\u002F5 min | Very difficult | | Sneaky | `-T1` | 1 probe\u002F15 sec | Difficult | | Polite | `-T2` | 1 probe\u002F0.","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\u002Fnet-security-ids-configure\u002FSKILL.md",[],[19,20,21,22,23,24,25],"net security ids configure","ids","security","configure","probe","cybersecurity","sneaky","2026-11-10 10:12:30",false,"---\nname: net-security-ids-configure\ndescription: \"| | Paranoid | `-T0` | 1 probe\u002F5 min | Very difficult | | Sneaky | `-T1` | 1 probe\u002F15 sec | Difficult | | Polite | `-T2` | 1 probe\u002F0.\"\ndomain: cybersecurity\n---\n\n|\n| Paranoid | `-T0` | 1 probe\u002F5 min | Very difficult |\n| Sneaky | `-T1` | 1 probe\u002F15 sec | Difficult |\n| Polite | `-T2` | 1 probe\u002F0.4 sec | Moderate |\n| Normal | `-T3` | Default parallelism | Easy |\n| Aggressive | `-T4` | Parallel, 1.25s timeout | Very easy |\n| Insane | `-T5` | Maximum parallelism | Trivial |\n\n## Workflow\n\n### Step 1: Deploy Suricata Scan Detection Rules\n\nCreate `\u002Fvar\u002Flib\u002Fsuricata\u002Frules\u002Fscan-detection.rules`:\n\n```\n# === TCP Scan Detection ===\n\n# Detect TCP SYN scan (high volume SYN without completion)\nalert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:\"SCAN TCP SYN Scan Detected\"; flags:S,12; threshold:type both,track by_src,count 30,seconds 10; classtype:attempted-recon; sid:5000001; rev:2;)\n\n# Detect TCP FIN scan\nalert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:\"SCAN TCP FIN Scan\"; flags:F,12; threshold:type both,track by_src,count 20,seconds 60; classtype:attempted-recon; sid:5000002; rev:1;)\n\n# Detect TCP Xmas scan (FIN+PSH+URG)\nalert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:\"SCAN TCP Xmas Tree Scan\"; flags:FPU,12; classtype:attempted-recon; sid:5000003; rev:1;)\n\n# Detect TCP NULL scan (no flags)\nalert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:\"SCAN TCP NULL Scan\"; flags:0,12; classtype:attempted-recon; sid:5000004; rev:1;)\n\n# Detect ACK scan (firewall probing)\nalert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:\"SCAN TCP ACK Scan\"; flags:A,12; flow:stateless; threshold:type both,track by_src,count 50,seconds 30; classtype:attempted-recon; sid:5000005; rev:1;)\n\n# Detect SYN+ACK scan (unusual stateless probe)\nalert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:\"SCAN TCP SYN-ACK Scan\"; flags:SA,12; flow:stateless; threshold:type both,track by_src,count 30,seconds 30; classtype:attempted-recon; sid:5000006; rev:1;)\n\n# === UDP Scan Detection ===\n\n# Detect UDP port scan\nalert udp $EXTERNAL_NET any -> $HOME_NET any (msg:\"SCAN UDP Port Scan\"; threshold:type both,track by_src,count 30,seconds 10; classtype:attempted-recon; sid:5000010; rev:1;)\n\n# === Nmap Specific Detection ===\n\n# Detect Nmap OS fingerprinting (T1 probe - ECN SYN)\nalert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:\"SCAN Nmap OS Fingerprint Probe\"; flags:SEC,12; window:1; classtype:attempted-recon; sid:5000020; rev:1;)\n\n# Detect Nmap window scan (specific window size patterns)\nalert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:\"SCAN Nmap Window Size Probe\"; flags:A,12; flow:stateless; window:1024; threshold:type both,track by_src,count 10,seconds 30; classtype:attempted-recon; sid:5000021; rev:1;)\n\n# Detect Nmap version detection probes\nalert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:\"SCAN Nmap Service Version Probe\"; flow:established; content:\"HELP\"; depth:4; threshold:type both,track by_src,count 5,seconds 60; classtype:attempted-recon; sid:5000022; rev:1;)\n\n# Detect Nmap scripting engine (NSE)\nalert http $EXTERNAL_NET any -> $HOME_NET any (msg:\"SCAN Nmap NSE HTTP Script\"; http.user_agent; content:\"Nmap Scripting Engine\"; classtype:attempted-recon; sid:5000023; rev:1;)\n\n# === Masscan Detection ===\n\n# Detect Masscan SYN scan (specific window size)\nalert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:\"SCAN Masscan SYN Scan Detected\"; flags:S,12; window:1024; threshold:type both,track by_src,count 100,seconds 10; classtype:attempted-recon; sid:5000030; rev:1;)\n\n# === Internal Scan Detection ===\n\n# Detect internal host scanning (lateral movement recon)\nalert tcp $HOME_NET any -> $HOME_NET any (msg:\"SCAN Internal Network Scan Detected\"; flags:S,12; threshold:type both,track by_src,count 50,seconds 30; classtype:attempted-recon; sid:5000040; rev:1;)\n\n# Detect internal ICMP sweep\nalert icmp $HOME_NET any -> $HOME_NET any (msg:\"SCAN Internal ICMP Sweep\"; itype:8; threshold:type both,track by_src,count 30,seconds 10; classtype:attempted-recon; sid:5000041; rev:1;)\n```\n\n### Step 2: Configure Threshold-Based Detection\n\nEdit `\u002Fetc\u002Fsuricata\u002Fthreshold.config`:\n\n```\n# Suppress scan alerts from authorized vulnerability scanners\nsuppress gen_id 1, sig_id 5000001, track by_src, ip 10.0.5.100\nsuppress gen_id 1, sig_id 5000001, track by_src, ip 10.0.5.101\n\n# Rate-limit scan alerts to prevent log flooding\nrate_filter gen_id 1, sig_id 5000001, track by_src, count 5, seconds 300, new_action alert, timeout 600\nrate_filter gen_id 1, sig_id 5000040, track by_src, count 3, seconds 300, new_action alert, timeout 600\n\n# Event filter for critical internal scans\nevent_filter gen_id 1, sig_id 5000040, type both, track by_src, count 1, seconds 60\n```\n\n### Step 3: Scan Detection Analysis Script\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"Analyze IDS alerts for network scanning activity and generate reports.\"\"\"\n\nimport json\nimport sys\nfrom collections import defaultdict\nfrom datetime import datetime\n\nclass ScanDetector:\n    \"\"\"Correlate IDS alerts to identify scanning campaigns.\"\"\"\n\n    def __init__(self):\n        self.scan_events = defaultdict(lambda: {\n            'source_ip': '',\n            'target_ips': set(),\n            'target_ports': set(),\n            'scan_types': set(),\n            'alert_count': 0,\n            'first_seen': None,\n            'last_seen': None,\n            'signatures': defaultdict(int),\n        })\n\n    def process_eve_json(self, filepath: str):\n        \"\"\"Process Suricata EVE JSON alert log.\"\"\"\n        with open(filepath, 'r') as f:\n            for line in f:\n                try:\n                    event = json.loads(line)\n                    if event.get('event_type') != 'alert':\n                        continue\n\n                    alert = event.get('alert', {})\n                    sig = alert.get('signature', '')\n\n                    if 'SCAN' not in sig:\n                        continue\n\n                    src_ip = event.get('src_ip', '')\n                    dst_ip = event.get('dest_ip', '')\n                    dst_port = event.get('dest_port', 0)\n                    ts = datetime.fromisoformat(\n                        event['timestamp'].replace('Z', '+00:00')\n                    )\n\n                    scanner = self.scan_events[src_ip]\n                    scanner['source_ip'] = src_ip\n                    scanner['target_ips'].add(dst_ip)\n                    scanner['target_ports'].add(dst_port)\n                    scanner['alert_count'] += 1\n                    scanner['signatures'][sig] += 1\n\n                    if 'SYN' in sig:\n                        scanner['scan_types'].add('SYN Scan')\n                    elif 'FIN' in sig:\n                        scanner['scan_types'].add('FIN Scan')\n                    elif 'Xmas' in sig:\n                        scanner['scan_types'].add('Xmas Scan')\n                    elif 'NULL' in sig:\n                        scanner['scan_types'].add('NULL Scan')\n                    elif 'UDP' in sig:\n                        scanner['scan_types'].add('UDP Scan')\n                    elif 'Nmap' in sig:\n                        scanner['scan_types'].add('Nmap Detected')\n                    elif 'Masscan' in sig:\n                        scanner['scan_types'].add('Masscan Detected')\n                    elif 'Internal' in sig:\n                        scanner['scan_types'].add('Internal Scan')\n\n                    if scanner['first_seen'] is None or ts \u003C scanner['first_seen']:\n                        scanner['first_seen'] = ts\n                    if scanner['last_seen'] is None or ts > scanner['last_seen']:\n                        scanner['last_seen'] = ts\n\n                except (json.JSONDecodeError, KeyError, ValueError):\n                    continue\n\n    def generate_report(self):\n        \"\"\"Generate scan detection report.\"\"\"\n        scanners = sorted(\n            self.scan_events.values(),\n            key=lambda x: x['alert_count'],\n            reverse=True\n        )\n\n        print(f\"\\n{'='*70}\")\n        print(\"NETWORK SCAN DETECTION REPORT\")\n        print(f\"{'='*70}\")\n        print(f\"Unique Scanning Sources: {len(scanners)}\\n\")\n\n        for scanner in scanners:\n            targets = len(scanner['target_ips'])\n            ports = len(scanner['target_ports'])\n            duration = (scanner['last_seen'] - scanner['first_seen']).total_seconds() \\\n                if scanner['first_seen'] and scanner['last_seen'] else 0\n\n            is_internal = scanner['source_ip'].startswith(('10.', '172.', '192.168.'))\n            severity = \"CRITICAL\" if is_internal else \\\n                       \"HIGH\" if targets > 50 or ports > 100 else \"MEDIUM\"\n\n            print(f\"[{severity}] Scanner: {scanner['source_ip']}\")\n            print(f\"  Type: {'INTERNAL' if is_internal else 'EXTERNAL'}\")\n            print(f\"  Scan Types: {', '.join(scanner['scan_types'])}\")\n            print(f\"  Target Hosts: {targets}, Target Ports: {ports}\")\n            print(f\"  Total Alerts: {scanner['alert_count']}\")\n            print(f\"  Duration: {duration:.0f}s\")\n            print(f\"  First Seen: {scanner['first_seen']}\")\n            print(f\"  Top Signatures:\")\n            for sig, count in sorted(\n                scanner['signatures'].items(), key=lambda x: x[1], reverse=True\n            )[:5]:\n                print(f\"    - {sig}: {count}\")\n            print()\n\nif __name__ == '__main__':\n    detector = ScanDetector()\n    log_file = sys.argv[1] if len(sys.argv) > 1 else '\u002Fvar\u002Flog\u002Fsuricata\u002Feve.json'\n    detector.process_eve_json(log_file)\n    detector.generate_report()\n```\n\n## Response Playbook\n\n1. **Triage** - Determine if scan is from authorized scanner or unknown source\n2. **Enrich** - Look up source IP in threat intelligence feeds\n3. **Assess Scope** - Count unique targets and ports to gauge scan breadth\n4. **Block** - Add aggressive external scanners to firewall block list\n5. **Investigate Internal** - Internal scans may indicate compromised host; isolate and investigate\n6. **Correlate** - Check if scan was followed by exploitation attempts\n\n## Best Practices\n\n- **Whitelist Authorized Scanners** - Suppress alerts from known vulnerability scanner IPs\n- **Focus on Internal Scans** - Internal scanning is higher severity than external (indicates compromise)\n- **Threshold Tuning** - Adjust thresholds based on environment; a \u002F16 network sees more scan noise\n- **Correlate with Other Alerts** - Combine scan detection with exploitation alerts for kill chain visibility\n- **Time-Based Analysis** - Scans at unusual hours (3 AM) warrant higher priority\n- **Rate Limit Alerts** - Prevent scan floods from overwhelming the SIEM with noise\n\n## References\n\n- [Suricata Rules Documentation](https:\u002F\u002Fdocs.suricata.io\u002Fen\u002Flatest\u002Frules\u002Findex.html)\n- [Nmap IDS Evasion Techniques](https:\u002F\u002Fnmap.org\u002Fbook\u002Fsubvert-ids.html)\n- [OPNsense Suricata Nmap Detection Rules](https:\u002F\u002Fgithub.com\u002Faleksibovellan\u002Fopnsense-suricata-nmaps)\n- [Emerging Threats Ruleset](https:\u002F\u002Frules.emergingthreats.net\u002F)\n","|\n| Paranoid | `-T0` | 1 probe\u002F5 min | Very difficult |\n| Sneaky | `-T1` | 1 probe\u002F15 sec | Difficult |\n| Polite | `-T2` | 1 probe\u002F0.4 sec | Moderate |\n| Normal | `-T3` | Default parallelism | Easy |\n| Aggressive | `-T4` | Parallel, 1.25s timeout | Very easy |\n| Insane | `-T5` | Maximum parallelism | Trivial |\n\n## Workflow\n\n### Step 1: Deploy Suricata Scan Detection Rules\n\nCreate `\u002Fvar\u002Flib\u002Fsuricata\u002Frules\u002Fscan-detection.rules`:\n\n```\n# === TCP Scan Detection ===\n\n# Detect TCP SYN scan (high volume SYN without completion)\nalert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:\"SCAN TCP SYN Scan Detected\"; flags:S,12; threshold:type both,track by_src,count 30,seconds 10; classtype:attempted-recon; sid:5000001; rev:2;)\n\n# Detect TCP FIN scan\nalert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:\"SCAN TCP FIN Scan\"; flags:F,12; threshold:type both,track by_src,count 20,seconds 60; classtype:attempted-recon; sid:5000002; rev:1;)\n\n# Detect TCP Xmas scan (FIN+PSH+URG)\nalert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:\"SCAN TCP Xmas Tree Scan\"; flags:FPU,12; classtype:attempted-recon; sid:5000003; rev:1;)\n\n# Detect TCP NULL scan (no flags)\nalert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:\"SCAN TCP NULL Scan\"; flags:0,12; classtype:attempted-recon; sid:5000004; rev:1;)\n\n# Detect ACK scan (firewall probing)\nalert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:\"SCAN TCP ACK Scan\"; flags:A,12; flow:stateless; threshold:type both,track by_src,count 50,seconds 30; classtype:attempted-recon; sid:5000005; rev:1;)\n\n# Detect SYN+ACK scan (unusual stateless probe)\nalert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:\"SCAN TCP SYN-ACK Scan\"; flags:SA,12; flow:stateless; threshold:type both,track by_src,count 30,seconds 30; classtype:attempted-recon; sid:5000006; rev:1;)\n\n# === UDP Scan Detection ===\n\n# Detect UDP port scan\nalert udp $EXTERNAL_NET any -> $HOME_NET any (msg:\"SCAN UDP Port Scan\"; threshold:type both,track by_src,count 30,seconds 10; classtype:attempted-recon; sid:5000010; rev:1;)\n\n# === Nmap Specific Detection ===\n\n# Detect Nmap OS fingerprinting (T1 probe - ECN SYN)\nalert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:\"SCAN Nmap OS Fingerprint Probe\"; flags:SEC,12; window:1; classtype:attempted-recon; sid:5000020; rev:1;)\n\n# Detect Nmap window scan (specific window size patterns)\nalert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:\"SCAN Nmap Window Size Probe\"; flags:A,12; flow:stateless; window:1024; threshold:type both,track by_src,count 10,seconds 30; classtype:attempted-recon; sid:5000021; rev:1;)\n\n# Detect Nmap version detection probes\nalert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:\"SCAN Nmap Service Version Probe\"; flow:established; content:\"HELP\"; depth:4; threshold:type both,track by_src,count 5,seconds 60; classtype:attempted-recon; sid:5000022; rev:1;)\n\n# Detect Nmap scripting engine (NSE)\nalert http $EXTERNAL_NET any -> $HOME_NET any (msg:\"SCAN Nmap NSE HTTP Script\"; http.user_agent; content:\"Nmap Scripting Engine\"; classtype:attempted-recon; sid:5000023; rev:1;)\n\n# === Masscan Detection ===\n\n# Detect Masscan SYN scan (specific window size)\nalert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:\"SCAN Masscan SYN Scan Detected\"; flags:S,12; window:1024; threshold:type both,track by_src,count 100,seconds 10; classtype:attempted-recon; sid:5000030; rev:1;)\n\n# === Internal Scan Detection ===\n\n# Detect internal host scanning (lateral movement recon)\nalert tcp $HOME_NET any -> $HOME_NET any (msg:\"SCAN Internal Network Scan Detected\"; flags:S,12; threshold:type both,track by_src,count 50,seconds 30; classtype:attempted-recon; sid:5000040; rev:1;)\n\n# Detect internal ICMP sweep\nalert icmp $HOME_NET any -> $HOME_NET any (msg:\"SCAN Internal ICMP Sweep\"; itype:8; threshold:type both,track by_src,count 30,seconds 10; classtype:attempted-recon; sid:5000041; rev:1;)\n```\n\n### Step 2: Configure Threshold-Based Detection\n\nEdit `\u002Fetc\u002Fsuricata\u002Fthreshold.config`:\n\n```\n# Suppress scan alerts from authorized vulnerability scanners\nsuppress gen_id 1, sig_id 5000001, track by_src, ip 10.0.5.100\nsuppress gen_id 1, sig_id 5000001, track by_src, ip 10.0.5.101\n\n# Rate-limit scan alerts to prevent log flooding\nrate_filter gen_id 1, sig_id 5000001, track by_src, count 5, seconds 300, new_action alert, timeout 600\nrate_filter gen_id 1, sig_id 5000040, track by_src, count 3, seconds 300, new_action alert, timeout 600\n\n# Event filter for critical internal scans\nevent_filter gen_id 1, sig_id 5000040, type both, track by_src, count 1, seconds 60\n```\n\n### Step 3: Scan Detection Analysis Script\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"Analyze IDS alerts for network scanning activity and generate reports.\"\"\"\n\nimport json\nimport sys\nfrom collections import defaultdict\nfrom datetime import datetime\n\nclass ScanDetector:\n    \"\"\"Correlate IDS alerts to identify scanning campaigns.\"\"\"\n\n    def __init__(self):\n        self.scan_events = defaultdict(lambda: {\n            'source_ip': '',\n            'target_ips': set(),\n            'target_ports': set(),\n            'scan_types': set(),\n            'alert_count': 0,\n            'first_seen': None,\n            'last_seen': None,\n            'signatures': defaultdict(int),\n        })\n\n    def process_eve_json(self, filepath: str):\n        \"\"\"Process Suricata EVE JSON alert log.\"\"\"\n        with open(filepath, 'r') as f:\n            for line in f:\n                try:\n                    event = json.loads(line)\n                    if event.get('event_type') != 'alert':\n                        continue\n\n                    alert = event.get('alert', {})\n                    sig = alert.get('signature', '')\n\n                    if 'SCAN' not in sig:\n                        continue\n\n                    src_ip = event.get('src_ip', '')\n                    dst_ip = event.get('dest_ip', '')\n                    dst_port = event.get('dest_port', 0)\n                    ts = datetime.fromisoformat(\n                        event['timestamp'].replace('Z', '+00:00')\n                    )\n\n                    scanner = self.scan_events[src_ip]\n                    scanner['source_ip'] = src_ip\n                    scanner['target_ips'].add(dst_ip)\n                    scanner['target_ports'].add(dst_port)\n                    scanner['alert_count'] += 1\n                    scanner['signatures'][sig] += 1\n\n                    if 'SYN' in sig:\n                        scanner['scan_types'].add('SYN Scan')\n                    elif 'FIN' in sig:\n                        scanner['scan_types'].add('FIN Scan')\n                    elif 'Xmas' in sig:\n                        scanner['scan_types'].add('Xmas Scan')\n                    elif 'NULL' in sig:\n                        scanner['scan_types'].add('NULL Scan')\n                    elif 'UDP' in sig:\n                        scanner['scan_types'].add('UDP Scan')\n                    elif 'Nmap' in sig:\n                        scanner['scan_types'].add('Nmap Detected')\n                    elif 'Masscan' in sig:\n                        scanner['scan_types'].add('Masscan Detected')\n                    elif 'Internal' in sig:\n                        scanner['scan_types'].add('Internal Scan')\n\n                    if scanner['first_seen'] is None or ts \u003C scanner['first_seen']:\n                        scanner['first_seen'] = ts\n                    if scanner['last_seen'] is None or ts > scanner['last_seen']:\n                        scanner['last_seen'] = ts\n\n                except (json.JSONDecodeError, KeyError, ValueError):\n                    continue\n\n    def generate_report(self):\n        \"\"\"Generate scan detection report.\"\"\"\n        scanners = sorted(\n            self.scan_events.values(),\n            key=lambda x: x['alert_count'],\n            reverse=True\n        )\n\n        print(f\"\\n{'='*70}\")\n        print(\"NETWORK SCAN DETECTION REPORT\")\n        print(f\"{'='*70}\")\n        print(f\"Unique Scanning Sources: {len(scanners)}\\n\")\n\n        for scanner in scanners:\n            targets = len(scanner['target_ips'])\n            ports = len(scanner['target_ports'])\n            duration = (scanner['last_seen'] - scanner['first_seen']).total_seconds() \\\n                if scanner['first_seen'] and scanner['last_seen'] else 0\n\n            is_internal = scanner['source_ip'].startswith(('10.', '172.', '192.168.'))\n            severity = \"CRITICAL\" if is_internal else \\\n                       \"HIGH\" if targets > 50 or ports > 100 else \"MEDIUM\"\n\n            print(f\"[{severity}] Scanner: {scanner['source_ip']}\")\n            print(f\"  Type: {'INTERNAL' if is_internal else 'EXTERNAL'}\")\n            print(f\"  Scan Types: {', '.join(scanner['scan_types'])}\")\n            print(f\"  Target Hosts: {targets}, Target Ports: {ports}\")\n            print(f\"  Total Alerts: {scanner['alert_count']}\")\n            print(f\"  Duration: {duration:.0f}s\")\n            print(f\"  First Seen: {scanner['first_seen']}\")\n            print(f\"  Top Signatures:\")\n            for sig, count in sorted(\n                scanner['signatures'].items(), key=lambda x: x[1], reverse=True\n            )[:5]:\n                print(f\"    - {sig}: {count}\")\n            print()\n\nif __name__ == '__main__':\n    detector = ScanDetector()\n    log_file = sys.argv[1] if len(sys.argv) > 1 else '\u002Fvar\u002Flog\u002Fsuricata\u002Feve.json'\n    detector.process_eve_json(log_file)\n    detector.generate_report()\n```\n\n## Response Playbook\n\n1. **Triage** - Determine if scan is from authorized scanner or unknown source\n2. **Enrich** - Look up source IP in threat intelligence feeds\n3. **Assess Scope** - Count unique targets and ports to gauge scan breadth\n4. **Block** - Add aggressive external scanners to firewall block list\n5. **Investigate Internal** - Internal scans may indicate compromised host; isolate and investigate\n6. **Correlate** - Check if scan was followed by exploitation attempts\n\n## Best Practices\n\n- **Whitelist Authorized Scanners** - Suppress alerts from known vulnerability scanner IPs\n- **Focus on Internal Scans** - Internal scanning is higher severity than external (indicates compromise)\n- **Threshold Tuning** - Adjust thresholds based on environment; a \u002F16 network sees more scan noise\n- **Correlate with Other Alerts** - Combine scan detection with exploitation alerts for kill chain visibility\n- **Time-Based Analysis** - Scans at unusual hours (3 AM) warrant higher priority\n- **Rate Limit Alerts** - Prevent scan floods from overwhelming the SIEM with noise\n\n## References\n\n- [Suricata Rules Documentation](https:\u002F\u002Fdocs.suricata.io\u002Fen\u002Flatest\u002Frules\u002Findex.html)\n- [Nmap IDS Evasion Techniques](https:\u002F\u002Fnmap.org\u002Fbook\u002Fsubvert-ids.html)\n- [OPNsense Suricata Nmap Detection Rules](https:\u002F\u002Fgithub.com\u002Faleksibovellan\u002Fopnsense-suricata-nmaps)\n- [Emerging Threats Ruleset](https:\u002F\u002Frules.emergingthreats.net\u002F)\n",{"name":5,"domain":24,"description":7},"main","a91f1293287ffa9f4f1b8f486cd6e835a1568c84","skills\u002Fnet-security-ids-configure","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace","https:\u002F\u002Fgithub.com\u002FDCx7C5","#Python","2026-09-01 11:21:00",{"source":8,"skillName":5,"commands":39,"prompt":49,"zipAvailable":50},[40,43,46],{"tool":41,"command":42},"npx","npx skills add DCx7C5\u002Fai-marketplace --skill net-security-ids-configure",{"tool":44,"command":45},"bunx","bunx skills add DCx7C5\u002Fai-marketplace --skill net-security-ids-configure",{"tool":47,"command":48},"pnpm","pnpm dlx skills add DCx7C5\u002Fai-marketplace --skill net-security-ids-configure","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fnet-security-ids-configure\u002FSKILL.md",true,[52],{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":57},"index.json","REFERENCE","参考文档",610,"https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fnet-security-ids-configure\u002Findex.json",[59,69,94,117,139,161],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":63,"licenseFileUrl":64,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":68},"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":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":26},"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",[],[76,77,78,79,80,81,82,24,83,84,85,86,87,88,89,90,91,92,93],"services","detect","services wmi persistence detect","wmi","persistence","process-forensics","process","forensics","t1546.003","event-subscription","subscription","repository","commandline-consumer","subscriptions","event","activescript","cm","de",{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":26},"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",[],[101,79,102,76,103,104,105,106,107,24,108,109,110,111,112,113,114,115,93,116],"exec","services wmi exec exploit","exploit","across","Bash","analysis","team","traffic","remote","crackmapexec","Impacket","lateral-movement","read","lateral movement","command","native",{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":26},"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",[],[124,125,126,127,128,129,130,131,132,133,113,93,134,135,106,136,105,24,137,138],"extract","registry artifact extract","registry","artifact","digital-forensics","sonnet","regripper","windows-registry","evidence-collection","software","uncover","analyze","collection","artifact-analysis","activity",{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":145,"publishedAt":26},"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",[],[146,147,148,77,24,149,92,150,151,152,81,93,153,154,155,156,157,158,159,160],"processes","token","processes token impersonate detect","techniques","escalation","windows","attacks","via","impersonation","potato","exploitation","printspoofer","token-impersonation","seimpersonate","privilege-escalation",{"skillNo":162,"name":163,"nameZh":6,"description":164,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":165,"categories":166,"keywords":167,"publishedAt":26},"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",[],[168,146,169,77,170,171,82,93,153,172,173,174,106,81,24,149,175,92,176,151],"thread","injection","processes thread injection detect","thread-injection","nt-api","apc-injection","api","process-injection","memory"]