Files
CyberStrikeAI/tools/nmap.yaml
2025-11-21 23:20:41 +08:00

109 lines
3.8 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: "nmap"
command: "nmap"
args: ["-sT", "-sV", "-sC"] # 固定参数TCP连接扫描、版本检测、默认脚本
enabled: true
# 简短描述用于工具列表减少token消耗- 一句话说明工具用途
short_description: "网络扫描工具,用于发现网络主机、开放端口和服务"
# 工具详细描述 - 帮助大模型理解工具用途和使用场景
description: |
网络映射和端口扫描工具,用于发现网络中的主机、服务和开放端口。
**主要功能:**
- 主机发现:检测网络中的活动主机
- 端口扫描:识别目标主机上开放的端口
- 服务识别:检测运行在端口上的服务类型和版本
- 操作系统检测:识别目标主机的操作系统类型
- 漏洞检测使用NSE脚本检测常见漏洞
**使用场景:**
- 网络资产发现和枚举
- 安全评估和渗透测试
- 网络故障排查
- 端口和服务审计
**注意事项:**
- 使用 -sT (TCP连接扫描) 而不是 -sS (SYN扫描),因为 -sS 需要root权限
- 扫描速度取决于网络延迟和目标响应
- 某些扫描可能被防火墙或IDS检测到
- 请确保有权限扫描目标网络
# 参数定义
parameters:
- name: "target"
type: "string"
description: |
目标IP地址或域名。可以是单个IP、IP范围、CIDR格式或域名。
**示例值:**
- 单个IP: "192.168.1.1"
- IP范围: "192.168.1.1-100"
- CIDR: "192.168.1.0/24"
- 域名: "example.com"
- URL: "https://example.com" (会自动提取域名部分)
**注意事项:**
- 如果提供URL会自动提取域名部分
- 确保目标地址格式正确
- 必需参数,不能为空
required: true
position: 0 # 位置参数,放在命令最后
format: "positional"
- name: "ports"
type: "string"
description: |
要扫描的端口范围。可以是单个端口、端口范围、逗号分隔的端口列表,或特殊值。
**示例值:**
- 单个端口: "80"
- 端口范围: "1-1000"
- 多个端口: "80,443,8080,8443"
- 组合: "80,443,8000-9000"
- 常用端口: "1-1024"
- 所有端口: "1-65535"
- 快速扫描: "80,443,22,21,25,53,110,143,993,995"
**注意事项:**
- 如果不指定将扫描默认的1000个常用端口
- 扫描所有端口(1-65535)会非常耗时
- 建议先扫描常用端口,再根据结果决定是否扫描全部端口
required: false
flag: "-p"
format: "flag"
- name: "scan_type"
type: "string"
description: |
扫描类型选项。可以覆盖默认的扫描类型。
**常用选项:**
- "-sV": 版本检测
- "-sC": 默认脚本扫描
- "-sS": SYN扫描需要root权限
- "-sT": TCP连接扫描默认
- "-sU": UDP扫描
- "-A": 全面扫描OS检测、版本检测、脚本扫描、路由追踪
**注意事项:**
- 多个选项可以组合,用空格分隔,例如: "-sV -sC"
- 默认已包含 "-sT -sV -sC"
- 如果指定此参数,将替换默认的扫描类型
required: false
format: "template"
template: "{value}"
- name: "additional_args"
type: "string"
description: |
额外的Nmap参数。用于传递未在参数列表中定义的Nmap选项。
**示例值:**
- "--script vuln": 运行漏洞检测脚本
- "-O": 操作系统检测
- "-T4": 时间模板0-5数字越大越快
- "--max-retries 3": 最大重试次数
- "-v": 详细输出
**注意事项:**
- 多个参数用空格分隔
- 确保参数格式正确,避免命令注入
- 此参数会直接追加到命令末尾
required: false
format: "positional"