mirror of
https://github.com/Ed1s0nZ/CyberStrikeAI.git
synced 2026-03-31 16:20:28 +02:00
Add files via upload
This commit is contained in:
129
tools/nmap.yaml
129
tools/nmap.yaml
@@ -1,108 +1,85 @@
|
||||
name: "nmap"
|
||||
command: "nmap"
|
||||
args: ["-sT", "-sV", "-sC"] # 固定参数:TCP连接扫描、版本检测、默认脚本
|
||||
# 默认:TCP 连接扫描 + 版本检测 + 默认 NSE 脚本(无 root 也可用)
|
||||
args: ["-sT", "-sV", "-sC"]
|
||||
enabled: true
|
||||
# 简短描述(用于工具列表,减少token消耗)- 一句话说明工具用途
|
||||
short_description: "网络扫描工具,用于发现网络主机、开放端口和服务"
|
||||
# 工具详细描述 - 帮助大模型理解工具用途和使用场景
|
||||
short_description: "网络扫描:端口/服务/脚本;可选时序、自定义 NSE、OS 检测(需 root)"
|
||||
description: |
|
||||
网络映射和端口扫描工具,用于发现网络中的主机、服务和开放端口。
|
||||
网络映射与端口扫描,合并了原「nmap」与「nmap-advanced」的能力。
|
||||
|
||||
**主要功能:**
|
||||
- 主机发现:检测网络中的活动主机
|
||||
- 端口扫描:识别目标主机上开放的端口
|
||||
- 服务识别:检测运行在端口上的服务类型和版本
|
||||
- 操作系统检测:识别目标主机的操作系统类型
|
||||
- 漏洞检测:使用NSE脚本检测常见漏洞
|
||||
**默认行为(只传 target/ports 即可):**
|
||||
- `-sT` TCP 连接扫描(无需 root)
|
||||
- `-sV` 版本检测
|
||||
- `-sC` 默认 NSE 脚本
|
||||
|
||||
**使用场景:**
|
||||
- 网络资产发现和枚举
|
||||
- 安全评估和渗透测试
|
||||
- 网络故障排查
|
||||
- 端口和服务审计
|
||||
**可选增强:**
|
||||
- `timing`:`-T0`~`-T5` 时序
|
||||
- `nse_scripts`:`--script` 自定义脚本(如 `vuln`、`http-*`)
|
||||
- `os_detection`:`-O` **必须 root**,否则 nmap 会 QUITTING
|
||||
- `aggressive`:`-A` **必须 root**(含 OS 检测)
|
||||
- `scan_type`:若传入则**整段替换**上述默认 `-sT -sV -sC`,需自行写上需要的选项(如 `-sT -sV`)
|
||||
|
||||
**注意事项:**
|
||||
- 使用 -sT (TCP连接扫描) 而不是 -sS (SYN扫描),因为 -sS 需要root权限
|
||||
- 扫描速度取决于网络延迟和目标响应
|
||||
- 某些扫描可能被防火墙或IDS检测到
|
||||
- 请确保有权限扫描目标网络
|
||||
# 参数定义
|
||||
- `-sS` SYN 扫描需要 root;无 root 请用默认或 `-sT`
|
||||
- 扫描全端口 `1-65535` 非常慢,建议先常用端口
|
||||
- 请确保有权限扫描目标
|
||||
parameters:
|
||||
- name: "target"
|
||||
type: "string"
|
||||
description: |
|
||||
目标IP地址或域名。可以是单个IP、IP范围、CIDR格式或域名。
|
||||
目标 IP、主机名、CIDR 或域名;URL 会自动提取主机部分。
|
||||
|
||||
**示例值:**
|
||||
- 单个IP: "192.168.1.1"
|
||||
- IP范围: "192.168.1.1-100"
|
||||
- CIDR: "192.168.1.0/24"
|
||||
- 域名: "example.com"
|
||||
- URL: "https://example.com" (会自动提取域名部分)
|
||||
|
||||
**注意事项:**
|
||||
- 如果提供URL,会自动提取域名部分
|
||||
- 确保目标地址格式正确
|
||||
- 必需参数,不能为空
|
||||
**示例:** `192.168.1.1`、`10.0.0.0/24`、`example.com`
|
||||
required: true
|
||||
position: 1 # 位置参数,必须放在命令最后(nmap [options] target),用 1 确保在 flag 之后、最后添加
|
||||
position: 1
|
||||
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)会非常耗时
|
||||
- 建议先扫描常用端口,再根据结果决定是否扫描全部端口
|
||||
端口范围。示例:`80`、`1-1000`、`80,443,8080`、`1-65535`(全端口很慢)
|
||||
required: false
|
||||
flag: "-p"
|
||||
format: "flag"
|
||||
- name: "timing"
|
||||
type: "string"
|
||||
description: "时序模板 T0–T5,数字越大越快。示例:`4` 生成 `-T4`"
|
||||
required: false
|
||||
format: "template"
|
||||
template: "-T{value}"
|
||||
- name: "nse_scripts"
|
||||
type: "string"
|
||||
description: "NSE 脚本,传给 `--script`。示例:`vuln`、`http-title,http-headers`"
|
||||
required: false
|
||||
flag: "--script"
|
||||
format: "flag"
|
||||
- name: "os_detection"
|
||||
type: "bool"
|
||||
description: |
|
||||
启用 `-O` OS 检测。**必须 root**;无 root 请保持 false。
|
||||
required: false
|
||||
flag: "-O"
|
||||
format: "flag"
|
||||
default: false
|
||||
- name: "aggressive"
|
||||
type: "bool"
|
||||
description: |
|
||||
启用 `-A` 激进扫描(含 OS 检测)。**必须 root**;无 root 请保持 false。
|
||||
required: false
|
||||
flag: "-A"
|
||||
format: "flag"
|
||||
default: false
|
||||
- name: "scan_type"
|
||||
type: "string"
|
||||
description: |
|
||||
扫描类型选项。可以覆盖默认的扫描类型。
|
||||
|
||||
**常用选项:**
|
||||
- "-sV": 版本检测
|
||||
- "-sC": 默认脚本扫描
|
||||
- "-sS": SYN扫描(需要root权限)
|
||||
- "-sT": TCP连接扫描(默认)
|
||||
- "-sU": UDP扫描
|
||||
- "-A": 全面扫描(OS检测、版本检测、脚本扫描、路由追踪)
|
||||
|
||||
**注意事项:**
|
||||
- 多个选项可以组合,用空格分隔,例如: "-sV -sC"
|
||||
- 默认已包含 "-sT -sV -sC"
|
||||
- 如果指定此参数,将替换默认的扫描类型
|
||||
扫描类型选项;**若填写则替换默认的 `-sT -sV -sC`**,只保留你写的选项。
|
||||
多选项用空格分隔,例如:`-sT -sV`、`-sU`(UDP)。
|
||||
required: false
|
||||
format: "template"
|
||||
template: "{value}"
|
||||
- name: "additional_args"
|
||||
type: "string"
|
||||
description: |
|
||||
额外的Nmap参数。用于传递未在参数列表中定义的Nmap选项。
|
||||
|
||||
**示例值:**
|
||||
- "--script vuln": 运行漏洞检测脚本
|
||||
- "-O": 操作系统检测
|
||||
- "-T4": 时间模板(0-5,数字越大越快)
|
||||
- "--max-retries 3": 最大重试次数
|
||||
- "-v": 详细输出
|
||||
|
||||
**注意事项:**
|
||||
- 多个参数用空格分隔
|
||||
- 确保参数格式正确,避免命令注入
|
||||
- 此参数会直接追加到命令末尾
|
||||
额外参数,按空格追加到命令末尾。
|
||||
示例:`--max-retries 3`、`-v`、`-Pn`
|
||||
required: false
|
||||
format: "positional"
|
||||
|
||||
Reference in New Issue
Block a user