跳到正文
Skillpedia
智能体35k · #7854

detecting-network-scanning-with-ids-signatures

它能做什么

这个工具可以帮你发现网络中的入侵尝试。它借助 Suricata、Snort 等安全系统,检测有人是否在探查你电脑上哪些端口和服务处于开放状态。这类探查通常使用 Nmap 或 Masscan 等工具。

适用场景

  • ✓当你怀疑有人正在试图入侵你的网络时。
  • ✓检验你的安全系统能否有效防范入侵者。
  • ✓调查安全事件时,确认是否发生过侦察行为。

技能链接

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-network-scanning-with-ids-signatures/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-network-scanning-with-ids-signatures/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“帮我检测内网中的网络扫描行为。”

每周 5 个新技能,1 分钟读完。

工作原理

这个工具通过在安全系统中设置规则来工作。这些规则会寻找表明使用了扫描工具(比如 Nmap 或 Masscan)的流量模式,或者统计短时间内的大量连接尝试。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Detecting Network Scanning with IDS Signatures

Overview

Network scanning is typically the first phase of an attack, where adversaries enumerate live hosts, open ports, running services, and OS versions using tools like Nmap, Masscan, ZMap, and custom scanners. Detecting this reconnaissance activity provides early warning of potential attacks. IDS/IPS systems like Suricata and Snort can identify scanning through signature-based detection (matching known scanner packet patterns), threshold-based detection (counting connection attempts over time), and anomaly detection (identifying unusual traffic patterns). This skill covers writing and deploying IDS signatures for scan detection, configuring threshold-based alerting, and correlating scan activity with downstream attack indicators.

When to Use

  • When investigating security incidents that require detecting network scanning with ids signatures
  • When building detection rules or threat hunting queries for this domain
  • When SOC analysts need structured procedures for this analysis type
  • When validating security monitoring coverage for related attack techniques

Prerequisites

  • Suricata 7.0+ or Snort 3.0+ deployed in IDS/IPS mode
  • Network TAP or SPAN port for traffic visibility
  • Emerging Threats ruleset enabled
  • Logging infrastructure for alert analysis (ELK Stack, Splunk)
  • Baseline understanding of normal network traffic patterns

Core Concepts

Scanning Techniques and Detection Indicators

Scan Type Nmap Flag Packet Characteristics Detection Method
TCP SYN -sS SYN flag only, no completion SYN without SYN/ACK response pattern
TCP Connect -sT Full 3-way handshake Multiple connections from single source
TCP FIN -sF FIN flag only FIN to closed port (RST response)
TCP Xmas -sX FIN+PSH+URG flags Unusual flag combination
TCP NULL -sN No flags set Zero-flag TCP packet
UDP Scan -sU UDP to many ports ICMP port unreachable responses
ACK Scan -sA ACK flag only (firewall probing) Unsolicited ACK packets
SYN/ACK Scan Custom SYN+ACK without prior SYN State violation
OS Fingerprint -O Unusual TCP options/window sizes Specific option combinations
Version Detect -sV Service probe strings Known probe payloads

Nmap Timing Templates

Template Nmap Flag Speed Detection Difficulty
Paranoid -T0 1 probe/5 min Very difficult
Sneaky -T1 1 probe/15 sec Difficult
Polite -T2 1 probe/0.4 sec Moderate
Normal -T3 Default parallelism Easy
Aggressive -T4 Parallel, 1.25s timeout Very easy
Insane -T5 Maximum parallelism Trivial

Workflow

Step 1: Deploy Suricata Scan Detection Rules

Create /var/lib/suricata/rules/scan-detection.rules:

# === TCP Scan Detection ===

# Detect TCP SYN scan (high volume SYN without completion)
alert 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;)

# Detect TCP FIN scan
alert 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;)

# Detect TCP Xmas scan (FIN+PSH+URG)
alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"SCAN TCP Xmas Tree Scan"; flags:FPU,12; classtype:attempted-recon; sid:5000003; rev:1;)

# Detect TCP NULL scan (no flags)
alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"SCAN TCP NULL Scan"; flags:0,12; classtype:attempted-recon; sid:5000004; rev:1;)

# Detect ACK scan (firewall probing)
alert 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;)

# Detect SYN+ACK scan (unusual stateless probe)
alert 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;)

# === UDP Scan Detection ===

# Detect UDP port scan

…
常见问题

什么是“网络扫描”?

网络扫描是攻击者了解你网络的第一步,用来发现哪些电脑在线、哪些端口开放,以及运行着哪些服务。

这个技能能检测哪些扫描工具?

它能检测 Nmap、Masscan 等常见工具,也能检测自定义的扫描行为。

什么是“IDS 特征码”?

它们就像网络数据包的“指纹”,用来识别已知的恶意活动,比如扫描工具产生的流量特征。

详情

作者的原始描述

Detect network reconnaissance and port scanning using Suricata and Snort IDS signatures, threshold-based detection rules, and traffic anomaly analysis to identify Nmap, Masscan, and custom scanning activity.

repo: mukul975/Anthropic-Cybersecurity-Skills

热度

GitHub 星标
35k
排名
#7854
许可证
Apache-2.0
更新时间
2026/8/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能