jpskill.com
📦 その他 コミュニティ

nmap-recon

Nmapを使ってネットワークを調査し、接続されている機器や提供されているサービス、OSの種類、開いているポートなどを調べ、セキュリティ診断の準備段階として必要な情報を効率的に収集するSkill。

📜 元の英語説明(参考)

Perform network reconnaissance with Nmap. Use when a user asks to scan networks, discover hosts and services, detect OS versions, find open ports, enumerate service versions, or perform initial reconnaissance for a penetration test.

🇯🇵 日本人クリエイター向け解説

一言でいうと

Nmapを使ってネットワークを調査し、接続されている機器や提供されているサービス、OSの種類、開いているポートなどを調べ、セキュリティ診断の準備段階として必要な情報を効率的に収集するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o nmap-recon.zip https://jpskill.com/download/15175.zip && unzip -o nmap-recon.zip && rm nmap-recon.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/15175.zip -OutFile "$d\nmap-recon.zip"; Expand-Archive "$d\nmap-recon.zip" -DestinationPath $d -Force; ri "$d\nmap-recon.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して nmap-recon.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → nmap-recon フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Nmap偵察

概要

Nmapは、ネットワーク探索とセキュリティ監査のための標準的なツールです。稼働中のホスト、開いているポート、実行中のサービスとそのバージョン、オペレーティングシステム、潜在的な脆弱性を特定します。すべてのペネトレーションテストはNmapから始まります。TCP/UDPスキャン、OSフィンガープリンティング、脆弱性検出のためのNSE (Nmap Scripting Engine)、自動化のためのXML/JSONでの出力をサポートしています。

手順

ステップ 1: ホスト探索

# サブネット上の稼働中のホストを探索 (ポートスキャンなし)
nmap -sn 192.168.1.0/24
# -sn: pingスキャンのみ、ポートスキャンなし
# 出力: MACアドレスとホスト名を持つ稼働中のIPのリスト

# pingなしでホストを探索 (ICMPがブロックされている場合)
nmap -Pn -sn 10.0.0.0/24

# ローカルネットワークでのARP探索 (LAN上で最も信頼性が高い)
nmap -PR -sn 192.168.1.0/24

ステップ 2: ポートスキャン

# クイックスキャン — サービス検出付きの上位1000ポート
nmap -sV -sC -T4 target.example.com
# -sV: サービスバージョンを検出 (Apache 2.4.52, OpenSSH 8.9)
# -sC: デフォルトのNSEスクリプトを実行 (安全なチェック)
# -T4: アグレッシブなタイミング (より高速、よりノイズが多い)

# フルTCPポートスキャン — 全65535ポート
nmap -p- -sV --open target.example.com
# -p-: すべてのポートをスキャン (上位1000ポートだけでなく)
# --open: 開いているポートのみを表示 (ノイズを減らす)

# UDPスキャン — DNS, SNMP, TFTP, NTPをキャッチ
nmap -sU --top-ports 100 target.example.com
# UDPスキャンは遅い — 上位ポートに制限

# 特定のポート範囲
nmap -p 80,443,8080-8090,3000-3010 target.example.com

ステップ 3: サービス列挙とOS検出

# アグレッシブスキャン — サービスバージョン + OS検出 + スクリプト + traceroute
nmap -A -T4 target.example.com
# 組み合わせ: -sV -sC -O --traceroute

# OSフィンガープリンティング
nmap -O --osscan-guess target.example.com
# 識別: Linux 5.x, Windows Server 2019, FreeBSD 13, etc.

# 特定のサービスのバナーグラビング
nmap -sV --version-intensity 5 -p 22,80,443,3306,5432,6379 target.example.com
# 強度が高いほど = より多くのプローブ = より良い検出

ステップ 4: NSE脆弱性スクリプト

# 脆弱性検出スクリプトを実行
nmap --script vuln target.example.com
# チェック対象: ShellShock, Heartbleed, SMB vulns, etc.

# 特定の脆弱性チェック
nmap --script ssl-heartbleed -p 443 target.example.com
nmap --script smb-vuln-ms17-010 -p 445 target.example.com
nmap --script http-shellshock --script-args uri=/cgi-bin/status -p 80 target.example.com

# Webサーバー列挙
nmap --script http-enum,http-title,http-headers,http-methods -p 80,443,8080 target.example.com

# ブルートフォース (承認を得てからのみ使用)
nmap --script ssh-brute --script-args userdb=users.txt,passdb=pass.txt -p 22 target.example.com

# DNS列挙
nmap --script dns-brute --script-args dns-brute.domain=example.com

ステップ 5: 自動化のための出力

# パース用のXML出力 (searchsploit, Metasploitのようなツール)
nmap -sV -sC -oX scan-results.xml target.example.com

# すべてのフォーマットを一度に
nmap -sV -sC -oA scan-results target.example.com
# 作成: scan-results.nmap, scan-results.xml, scan-results.gnmap

# クイックフィルタリングのためのgrep可能な出力
nmap -sV -oG - target.example.com | grep "open"

# プログラムによるXML結果のパース
python3 -c "
import xml.etree.ElementTree as ET
tree = ET.parse('scan-results.xml')
for host in tree.findall('.//host'):
    ip = host.find('.//address[@addrtype=\"ipv4\"]').get('addr')
    for port in host.findall('.//port'):
        portid = port.get('portid')
        service = port.find('service')
        name = service.get('name', 'unknown') if service is not None else 'unknown'
        version = service.get('version', '') if service is not None else ''
        state = port.find('state').get('state')
        if state == 'open':
            print(f'{ip}:{portid} — {name} {version}')
"

ステップ 6: ステルスと回避

# SYNスキャン (ハーフオープン、ログが少ない)
nmap -sS -T2 target.example.com
# -sS: SYNスキャン (TCPハンドシェイクを完了しない)
# -T2: 丁寧なタイミング (より遅いが検出されにくい)

# ファイアウォールを回避するためにパケットをフラグメント化
nmap -f -sS target.example.com

# デコイスキャン — 偽のソースの中にあなたのIPを隠す
nmap -D RND:10 -sS target.example.com
# RND:10: 10個のランダムなデコイIPを生成

# アイドルスキャン — ゾンビホスト経由で完全に匿名化
nmap -sI zombie-host.example.com target.example.com

# ソースポート操作 (脆弱なファイアウォールをバイパス)
nmap --source-port 53 -sS target.example.com

ガイドライン

  • ネットワークまたはホストをスキャンする前に、常に書面による承認を得てください。
  • -sn (ホスト探索) → -sV -sC (サービススキャン) → --script vuln (脆弱性スキャン) から始めてください。アグレッシブなスキャンにいきなり飛びつかないでください。
  • -T4 はほとんどの評価に適しています。ステルスが重要な場合は -T2 を、ローカルネットワークでのみ -T5 を使用してください。
  • フルポートスキャン (-p-) は時間がかかりますが、非標準ポート上のサービスをキャッチします — 必ず実行してください。
  • UDPスキャン (-sU) は遅いですが重要です — 多くの脆弱性がUDP上に存在します (SNMP, DNS, TFTP)。
  • すべての出力をXML (-oX) として保存してください — Metasploit, searchsploit, およびカスタムパーサーと統合されます。
  • vuln カテゴリのNSEスクリプトは、承認されたテストに対して安全です。brute および exploit カテゴリはアグレッシブです。
  • searchsploit と組み合わせて、発見されたサービスバージョンと既知のエクスプロイトを相互参照してください。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Nmap Reconnaissance

Overview

Nmap is the standard tool for network discovery and security auditing. It identifies live hosts, open ports, running services and their versions, operating systems, and potential vulnerabilities. Every penetration test starts with Nmap. Supports TCP/UDP scanning, OS fingerprinting, NSE (Nmap Scripting Engine) for vulnerability detection, and output in XML/JSON for automation.

Instructions

Step 1: Host Discovery

# Discover live hosts on a subnet (no port scan)
nmap -sn 192.168.1.0/24
# -sn: ping scan only, no port scan
# Output: list of live IPs with MAC addresses and hostnames

# Discover hosts without ping (when ICMP is blocked)
nmap -Pn -sn 10.0.0.0/24

# ARP discovery on local network (most reliable on LAN)
nmap -PR -sn 192.168.1.0/24

Step 2: Port Scanning

# Quick scan — top 1000 ports with service detection
nmap -sV -sC -T4 target.example.com
# -sV: detect service versions (Apache 2.4.52, OpenSSH 8.9)
# -sC: run default NSE scripts (safe checks)
# -T4: aggressive timing (faster, noisier)

# Full TCP port scan — all 65535 ports
nmap -p- -sV --open target.example.com
# -p-: scan all ports (not just top 1000)
# --open: show only open ports (less noise)

# UDP scan — catches DNS, SNMP, TFTP, NTP
nmap -sU --top-ports 100 target.example.com
# UDP scans are slow — limit to top ports

# Specific port ranges
nmap -p 80,443,8080-8090,3000-3010 target.example.com

Step 3: Service Enumeration and OS Detection

# Aggressive scan — service version + OS detection + scripts + traceroute
nmap -A -T4 target.example.com
# Combines: -sV -sC -O --traceroute

# OS fingerprinting
nmap -O --osscan-guess target.example.com
# Identifies: Linux 5.x, Windows Server 2019, FreeBSD 13, etc.

# Banner grabbing for specific services
nmap -sV --version-intensity 5 -p 22,80,443,3306,5432,6379 target.example.com
# Higher intensity = more probes = better detection

Step 4: NSE Vulnerability Scripts

# Run vulnerability detection scripts
nmap --script vuln target.example.com
# Checks for: ShellShock, Heartbleed, SMB vulns, etc.

# Specific vulnerability checks
nmap --script ssl-heartbleed -p 443 target.example.com
nmap --script smb-vuln-ms17-010 -p 445 target.example.com
nmap --script http-shellshock --script-args uri=/cgi-bin/status -p 80 target.example.com

# Web server enumeration
nmap --script http-enum,http-title,http-headers,http-methods -p 80,443,8080 target.example.com

# Brute force (use with authorization only)
nmap --script ssh-brute --script-args userdb=users.txt,passdb=pass.txt -p 22 target.example.com

# DNS enumeration
nmap --script dns-brute --script-args dns-brute.domain=example.com

Step 5: Output for Automation

# XML output for parsing (tools like searchsploit, Metasploit)
nmap -sV -sC -oX scan-results.xml target.example.com

# All formats at once
nmap -sV -sC -oA scan-results target.example.com
# Creates: scan-results.nmap, scan-results.xml, scan-results.gnmap

# Grepable output for quick filtering
nmap -sV -oG - target.example.com | grep "open"

# Parse XML results programmatically
python3 -c "
import xml.etree.ElementTree as ET
tree = ET.parse('scan-results.xml')
for host in tree.findall('.//host'):
    ip = host.find('.//address[@addrtype=\"ipv4\"]').get('addr')
    for port in host.findall('.//port'):
        portid = port.get('portid')
        service = port.find('service')
        name = service.get('name', 'unknown') if service is not None else 'unknown'
        version = service.get('version', '') if service is not None else ''
        state = port.find('state').get('state')
        if state == 'open':
            print(f'{ip}:{portid} — {name} {version}')
"

Step 6: Stealth and Evasion

# SYN scan (half-open, less logged)
nmap -sS -T2 target.example.com
# -sS: SYN scan (doesn't complete TCP handshake)
# -T2: polite timing (slower but less detectable)

# Fragment packets to evade firewalls
nmap -f -sS target.example.com

# Decoy scan — hide your IP among fake sources
nmap -D RND:10 -sS target.example.com
# RND:10: generate 10 random decoy IPs

# Idle scan — completely anonymous via zombie host
nmap -sI zombie-host.example.com target.example.com

# Source port manipulation (bypass weak firewalls)
nmap --source-port 53 -sS target.example.com

Guidelines

  • Always have written authorization before scanning any network or host.
  • Start with -sn (host discovery) → -sV -sC (service scan) → --script vuln (vulnerability scan). Don't jump to aggressive scans.
  • -T4 is good for most assessments. Use -T2 when stealth matters, -T5 only on local networks.
  • Full port scan (-p-) takes much longer but catches services on non-standard ports — always do it.
  • UDP scans (-sU) are slow but important — many vulnerabilities live on UDP (SNMP, DNS, TFTP).
  • Save all output as XML (-oX) — it integrates with Metasploit, searchsploit, and custom parsers.
  • NSE scripts in the vuln category are safe for authorized testing. brute and exploit categories are aggressive.
  • Combine with searchsploit to cross-reference found service versions with known exploits.