Token导航 LogoToken导航

Agent Skill · 研究检索

nmap(nmap 效率)

nmap 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

nmap 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证为 MIT,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 38,637。

总安装 1,533周安装 62GitHub Stars 744下载 481核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:nmap(nmap 效率)
来源仓库:https://github.com/brownfinesecurity/iothackbot
仓库路径:skills/nmap
安装命令:
npx skills add https://github.com/brownfinesecurity/iothackbot --skill nmap
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/brownfinesecurity/iothackbot --skill nmap

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于查找、检索和筛选相关信息。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。适合根据关键词或任务场景快速定位候选结果。通过 npx skills add 命令从指定仓库安装并使用。安装前需确认权限范围和维护状态,注意是否触发联网或命令执行。

nmap 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/nmap

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/brownfinesecurity/iothackbot --skill nmap;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

nmap 怎么安装?

在终端执行 npx skills add https://github.com/brownfinesecurity/iothackbot --skill nmap。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

nmap 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

nmap 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/brownfinesecurity/iothackbot --skill nmap;npx skills add brownfinesecurity/iothackbot --skill "nmap" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

nmap 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

nmap 用的人多吗?

公开数据是累计安装 1,533 次,近一周安装 62 次,下载 481 次,GitHub 744 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

nmap 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
nmap

nmap 效率 · 本页

1,533744执行命令MIT有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Nmap Scan - Professional Network Reconnaissance

You are helping the user perform professional network reconnaissance and port scanning using nmap. This skill provides guidance for various scan types, output formats, and result analysis.

Output Directory

Directory Structure

nmap-output/
├── nmap-portscan.nmap      # Initial fast port discovery
├── nmap-portscan.xml
├── nmap-portscan.gnmap
├── nmap-services.nmap      # Detailed service detection on open ports
├── nmap-services.xml
└── nmap-services.gnmap

IMPORTANT: Always save nmap output to an organized directory structure. By default, use ./nmap-output/ or specify a custom directory.

Default Scanning Strategy

IMPORTANT: Unless the user explicitly requests a different scan type, ALWAYS use this two-phase approach:

Phase 1: Fast Port Discovery (Root SYN Scan)

sudo nmap -p- <target> -oA <output-dir>/nmap-portscan
  • Why sudo: Running as root enables fast SYN scan (-sS is implicit)
  • Why -p-: Scans all 65535 ports quickly
  • Duration: Typically 1-3 minutes for SYN scan
  • Output: List of all open ports

Host Down Detection: If the scan output contains "Note: Host seems down", automatically retry with:

sudo nmap -p- -Pn <target> -oA <output-dir>/nmap-portscan
  • -Pn: Skip host discovery, treat host as online
  • Use this when firewalls block ping probes

Phase 2: Targeted Service Detection

After Phase 1 completes, parse the open ports and run:

nmap -p <OPEN_PORT_LIST> -sV -sC <target> -oA <output-dir>/nmap-services
  • -p <OPEN_PORT_LIST>: Only scan the ports found to be open (e.g., -p 23,80,443,554,8000)
  • -sV: Service version detection
  • -sC: Run default NSE scripts for additional enumeration
  • Duration: Usually 1-3 minutes since only scanning known open ports

Why This Strategy?

  1. Speed: Fast SYN scan finds all open ports in 1-3 minutes
  2. Thoroughness: Covers all 65535 ports, not just top 1000
  3. Efficiency: Service detection only runs on confirmed open ports
  4. Accuracy: Two-phase approach reduces false negatives

Parsing Open Ports

After Phase 1, extract open ports using:

# Extract open ports from .gnmap file
grep "Ports:" <output-dir>/nmap-portscan.gnmap | sed 's/.*Ports: //g' | sed 's|/|\n|g' | grep "open" | cut -d'/' -f1 | tr '\n' ',' | sed 's/,$//'

Or parse from.nmap file:

grep "^[0-9]" <output-dir>/nmap-portscan.nmap | grep "open" | cut -d'/' -f1 | tr '\n' ',' | sed 's/,$//'

Implementation Workflow

When the nmap-scan skill is invoked:

  1. Create output directory OUTPUT_DIR="./nmap-output" mkdir -p "$OUTPUT_DIR"
  2. Run Phase 1: Fast port discovery sudo nmap -p- <target> -oA "$OUTPUT_DIR/nmap-portscan"
  3. Check for "Host seems down" error if grep -q "Host seems down" "$OUTPUT_DIR/nmap-portscan.nmap"; then echo "Host appears down, retrying with -Pn flag..." sudo nmap -p- -Pn <target> -oA "$OUTPUT_DIR/nmap-portscan" fi
  4. Parse open ports from results OPEN_PORTS=$(grep "^[0-9]" "$OUTPUT_DIR/nmap-portscan.nmap" | grep "open" | cut -d'/' -f1 | tr '\n' ',' | sed 's/,$//')
  5. Run Phase 2: Service detection on open ports if [-n "$OPEN_PORTS"]; then nmap -p "$OPEN_PORTS" -sV -sC <target> -oA "$OUTPUT_DIR/nmap-services" else echo "No open ports found, skipping service detection." fi
  6. Report results location echo "Scan complete. Results saved to: $OUTPUT_DIR"

Scan Types

Quick Scan (Top 1000 Ports)

Use for initial reconnaissance or when time is limited:

nmap -sV -sC <target> -oA <output-prefix>
  • -sV: Service version detection
  • -sC: Run default NSE scripts
  • -oA: Output in all formats (normal, XML, grepable)
  • Scans top 1000 most common ports
  • Typical duration: 1-3 minutes

Comprehensive Scan (All Ports)

Use for thorough assessment when all ports must be checked:

nmap -sV -sC -p- <target> -oA <output-prefix>
  • -p-: Scan all 65535 ports
  • Significantly longer duration (5-30+ minutes depending on target)
  • Use only when comprehensive coverage is required

Stealth SYN Scan

Use when trying to avoid detection (requires root/sudo):

sudo nmap -sS -sV -sC <target> -oA <output-prefix>
  • -sS: SYN stealth scan (doesn't complete TCP handshake)
  • Less likely to be logged by target
  • Requires root privileges

UDP Scan

Use when UDP services need to be enumerated:

sudo nmap -sU --top-ports 100 <target> -oA <output-prefix>
  • -sU: UDP scan
  • --top-ports 100: Scan top 100 UDP ports (UDP scanning is slow)
  • Common UDP services: DNS (53), SNMP (161), DHCP (67/68)
  • Very slow - use top-ports to limit scope

Aggressive Scan

Use for maximum information gathering (noisy):

nmap -A -T4 <target> -oA <output-prefix>
  • -A: Enable OS detection, version detection, script scanning, traceroute
  • -T4: Aggressive timing template (faster but more detectable)
  • Very noisy - will be detected by IDS/IPS
  • Use only with authorization

Vulnerability Scan

Use to check for known vulnerabilities:

nmap -sV --script vuln <target> -oA <output-prefix>
  • --script vuln: Run NSE vulnerability detection scripts
  • Checks for common CVEs and misconfigurations
  • Can be noisy and trigger alerts

OS Detection

Use to identify operating system:

sudo nmap -O <target> -oA <output-prefix>
  • -O: Enable OS detection
  • Requires root privileges
  • Uses TCP/IP stack fingerprinting

Alternative Scan Types

The following scan types are available if the user explicitly requests them instead of the default two-phase strategy:

Quick Scan (Top 1000 Ports Only)

Use ONLY if user explicitly requests a quick/fast scan:

nmap -sV -sC <target> -oA <output-dir>/nmap-quick
  • -sV: Service version detection
  • -sC: Run default NSE scripts
  • -oA: Output in all formats (normal, XML, grepable)
  • Scans top 1000 most common ports ONLY
  • Typical duration: 1-3 minutes
  • Limitation: May miss services on non-standard ports

Scan Workflow

Default Workflow (Two-Phase Strategy)

Phase 1: Port Discovery

  1. Run fast SYN scan: sudo nmap -p- <target> -oA <output-dir>/nmap-portscan
  2. Check for "Host seems down" and retry with -Pn if needed
  3. Wait for scan to complete (typically 1-3 minutes)

Phase 2: Service Detection 4. Parse open ports from Phase 1 results 5. Run targeted service detection: nmap -p <OPEN_PORTS> -sV -sC <target> -oA <output-dir>/nmap-services 6. Wait for scan to complete (typically 1-3 minutes)

Phase 3: Analysis 7. Review the service detection results to determine:

  • What services are running?
  • What versions are detected?
  • Are there any interesting services (web, SSH, database, IoT protocols)?
  • Do NSE scripts reveal any issues?

Additional Targeted Scans (Optional)

Based on service detection results, run specialized scans:

If web services found (80, 443, 8080, etc.):

nmap -p 80,443,8080,8443 --script http-* <target> -oA <output-dir>/nmap-web

If SSH found:

nmap -p 22 --script ssh-* <target> -oA <output-dir>/nmap-ssh

If RTSP found (554):

nmap -p 554 --script rtsp-* <target> -oA <output-dir>/nmap-rtsp

If ONVIF/camera suspected:

nmap -p 80,554,8000,8080 --script http-methods,http-headers <target> -oA <output-dir>/nmap-onvif

Output Management

Output Formats

Always use -oA <prefix> to generate all three formats:

  • .nmap - Normal human-readable format
  • .xml - XML format for parsing/importing into tools
  • .gnmap - Grepable format for command-line processing

Timing and Performance

Timing Templates

Use -T<0-5> to control scan speed:

  • -T0 (Paranoid): Extremely slow, for IDS evasion
  • -T1 (Sneaky): Very slow, for IDS evasion
  • -T2 (Polite): Slow, less bandwidth intensive
  • -T3 (Normal): Default, balanced speed
  • -T4 (Aggressive): Fast, recommended for modern networks
  • -T5 (Insane): Very fast, may miss results

Default: Use -T3 or omit (default is T3) Fast scans: Use -T4 when speed is important and network can handle it Stealth: Use -T1 or -T2 for evasion

Timeout Considerations

  • Phase 1 Port Discovery (sudo nmap -p-): 180-300 seconds timeout (3-5 minutes)
  • Phase 2 Service Detection (nmap -p -sV -sC): 120-180 seconds timeout (2-3 minutes)
  • UDP scan: 600+ seconds timeout (very slow)

Network Ranges

Single Host

nmap <ip-address>

CIDR Notation

nmap 192.168.1.0/24

IP Range

nmap 192.168.1.1-254

Multiple Hosts

nmap 192.168.1.1 192.168.1.10 192.168.1.100

Exclude Hosts

nmap 192.168.1.0/24 --exclude 192.168.1.1,192.168.1.254

NSE Scripts

Common Script Categories

# Authentication scripts
nmap --script auth <target>

# Brute force scripts
nmap --script brute <target>

# Default safe scripts
nmap -sC <target>  # equivalent to --script default

# Discovery scripts
nmap --script discovery <target>

# Vulnerability scripts
nmap --script vuln <target>

# All HTTP scripts
nmap --script "http-*" <target>

IoT-Specific Scripts

# RTSP enumeration
nmap -p 554 --script rtsp-methods,rtsp-url-brute <target>

# UPnP discovery
nmap -p 1900 --script upnp-info <target>

# MQTT discovery
nmap -p 1883,8883 --script mqtt-subscribe <target>

# Modbus enumeration
nmap -p 502 --script modbus-discover <target>

Result Analysis

Key Information to Extract

  1. Open Ports and Services

- What ports are open? - What services are running? - What versions are detected?

  1. Service Fingerprints

- Does version detection reveal outdated software? - Are there known vulnerabilities for detected versions?

  1. NSE Script Results

- Authentication issues? - Information disclosure? - Misconfigurations?

  1. Operating System

- What OS is running? - What OS version?

Parsing Nmap Output

Extract open ports:

grep "^[0-9]" nmap-output.nmap | grep "open"

Extract service versions:

grep -E "^[0-9]+/tcp.*open" nmap-output.nmap

Check for vulnerabilities in NSE output:

grep -i "vuln\|cve\|exploit" nmap-output.nmap

Common IoT Service Ports

When scanning IoT devices, pay special attention to:

PortServiceDescription
21FTPFile transfer (often misconfigured)
22SSHRemote administration
23TelnetInsecure remote access
80HTTPWeb interface
443HTTPSSecure web interface
554RTSPVideo streaming
1883MQTTIoT messaging protocol
3702WS-DiscoveryONVIF device discovery
5000UPnPUniversal Plug and Play
8000HTTP AltAlternative HTTP port
8080HTTP ProxyAlternative HTTP port
8883MQTT/TLSSecure MQTT

Best Practices

1. Always Save Output

Never run nmap without saving output:

# GOOD
nmap -p <ports> -sV -sC <target> -oA output/nmap-services

# BAD
nmap -sV -sC <target>

2. Always Use Two-Phase Strategy

Always use the default two-phase strategy unless explicitly told otherwise:

# Phase 1: Fast port discovery
sudo nmap -p- <target> -oA nmap-portscan

# Phase 2: Service detection on open ports
nmap -p <OPEN_PORTS> -sV -sC <target> -oA nmap-services

3. Use Appropriate Timing

Match timing to your needs:

# Pentest with authorization: Fast
nmap -sV -sC -T4 <target>

# Red team/stealth: Slow
nmap -sV -sC -T2 <target>

4. Document Scan Parameters

Always document:

  • What scan type was used?
  • What date/time was scan performed?
  • What were the scan results?
  • Any anomalies or errors?

5. Respect Authorization

  • Only scan systems you have permission to scan
  • Respect scope limitations
  • Be aware of scan impact on production systems
  • Use appropriate timing to avoid DoS

Integration with IoT Testing Workflow

For IoT Pentests

  1. Run default two-phase scan (port discovery + service detection)
  2. Run wsdiscovery if ONVIF suspected based on open ports
  3. Run onvifscan if port 80/554 open on camera
  4. Run targeted HTTP scripts if web interface found

Output Directory Usage

Always save to an organized output directory:

OUTPUT_DIR="./nmap-output"
mkdir -p "$OUTPUT_DIR"

# Phase 1: Port discovery
sudo nmap -p- <target> -oA "$OUTPUT_DIR/nmap-portscan"

# Phase 2: Service detection
nmap -p <OPEN_PORTS> -sV -sC <target> -oA "$OUTPUT_DIR/nmap-services"

Troubleshooting

Scan Taking Too Long

  • Use -T4 for faster scanning
  • Limit port range: -p 1-1000 instead of -p-
  • Use --top-ports 100 instead of all ports

No Results / Firewalled

  • Try different scan types: -sS, -sT, -sA
  • Use -Pn to skip host discovery
  • Try -f for fragmented packets
  • Consider using --source-port 53 or other trusted ports

Requires Root/Sudo

These scan types require root:

  • -sS (SYN scan)
  • -sU (UDP scan)
  • -O (OS detection)
  • Raw packet features

Permission Denied Errors

If you see "Permission denied" or "Operation not permitted":

# Run with sudo
sudo nmap <options> <target>

Example Workflows

Workflow 1: Standard Single Target Scan (Default)

TARGET="192.168.1.100"
OUTPUT_DIR="./nmap-output"
mkdir -p "$OUTPUT_DIR"

# Phase 1: Fast port discovery
sudo nmap -p- $TARGET -oA "$OUTPUT_DIR/nmap-portscan"

# Check for "Host seems down"
if grep -q "Host seems down" "$OUTPUT_DIR/nmap-portscan.nmap"; then
    sudo nmap -p- -Pn $TARGET -oA "$OUTPUT_DIR/nmap-portscan"
fi

# Parse open ports
OPEN_PORTS=$(grep "^[0-9]" "$OUTPUT_DIR/nmap-portscan.nmap" | grep "open" | cut -d'/' -f1 | tr '\n' ',' | sed 's/,$//')

# Phase 2: Service detection
if [ -n "$OPEN_PORTS" ]; then
    nmap -p "$OPEN_PORTS" -sV -sC $TARGET -oA "$OUTPUT_DIR/nmap-services"
fi

Workflow 2: IoT Camera Testing

OUTPUT_DIR="./nmap-output"
mkdir -p "$OUTPUT_DIR"

# 1. Run default two-phase scan
sudo nmap -p- 192.168.1.100 -oA "$OUTPUT_DIR/nmap-portscan"
OPEN_PORTS=$(grep "^[0-9]" "$OUTPUT_DIR/nmap-portscan.nmap" | grep "open" | cut -d'/' -f1 | tr '\n' ',' | sed 's/,$//')
nmap -p "$OPEN_PORTS" -sV -sC 192.168.1.100 -oA "$OUTPUT_DIR/nmap-services"

# 2. If ONVIF camera detected, check HTTP methods
nmap -p 80 --script http-methods 192.168.1.100 -oA "$OUTPUT_DIR/nmap-http"

# 3. Check RTSP service
nmap -p 554 --script rtsp-methods 192.168.1.100 -oA "$OUTPUT_DIR/nmap-rtsp"

Workflow 3: Additional UDP/OS Detection

OUTPUT_DIR="./nmap-output"

# After completing default two-phase scan, optionally add:

# UDP scan (top ports)
sudo nmap -sU --top-ports 100 <target> -oA "$OUTPUT_DIR/nmap-udp"

# OS detection
sudo nmap -O <target> -oA "$OUTPUT_DIR/nmap-os"

# Vulnerability scan
nmap -sV --script vuln <target> -oA "$OUTPUT_DIR/nmap-vuln"

Questions to Ask User

Before starting scans, clarify:

  1. Target: What is the IP address or network range?
  2. Scope: Single host or network range?
  3. Scan Type: Use default two-phase strategy or user has specific requirements?
  4. Authorization: Do you have permission to scan this target?
  5. Special interests: Any specific services or ports to focus on after initial scan?

Note: Output is saved to ./nmap-output/ by default.

Success Criteria

A successful nmap scan includes:

  • Phase 1 port discovery completed without errors
  • Phase 2 service detection completed on all open ports
  • Results saved in all formats (-oA) in output directory
  • Open ports identified with service versions
  • NSE scripts executed successfully
  • Results documented and ready for analysis
  • Clear summary provided showing:

- Number of open ports found - Key services detected - Location of output files

平台分布

Gemini CLI

30.37%
按下载量换算146

Claude Code

22.52%
按下载量换算108

Antigravity

16.87%
按下载量换算81

Codex

11.64%
按下载量换算56

Cursor

8.31%
按下载量换算40

OpenCode

3.15%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/brownfinesecurity/iothackbot --skill nmap;npx skills add brownfinesecurity/iothackbot --skill "nmap" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills