nmap - yokohama/oreshic-record GitHub Wiki

well-known ports(0-1023)

Message

nmap のデフォルトスキャン。
ポート範囲 0-1023(well-known ports)を対象にTCPスキャンを実行する。
特に指定しない場合、この範囲のみが対象となる。

Command

nmap xx.xx.xx.xx

Result

Tag

{none}

registed ports(0-49151)

Message

-p-49151 を指定することで、ポート 0-49151 までをスキャンする。
well-known ports と registered ports を含む範囲を網羅する。

Command

nmap -p-49151 xx.xx.xx.xx

Result

Tag

{none}

all ports(0-65535)

Message

-p- を指定すると全ポート 0-65535 を対象にスキャンする。
未知の高位ポートの検出に有効。

Command

nmap -p- xx.xx.xx.xx

Result

Tag

{none}

ライブホストスキャン(Pingのみ)

Message

-sn を指定するとポートスキャンを行わず、ホスト生存確認のみ実行する。
ICMP / ARP / TCP などを内部的に組み合わせてホストの生存確認を行う。

Command

nmap -sn xx.xx.xx.xx/24

Result

Tag

{none}

ARPスキャン

Message

-PR を指定するとARPリクエストを使用して生存確認を行う。
同一LAN内のスキャンに有効。

Command

sudo nmap -PR -sn xx.xx.xx.xx/24

Result

Tag

{none}

ICMP Echoスキャン

Message

-PE を指定するとICMP Echo Requestを送信する。

Command

sudo nmap -PE -sn xx.xx.xx.xx/24

Result

Tag

{none}

ICMP Timestampスキャン

Message

-PP を指定するとICMP Timestamp Requestを送信する。

Command

sudo nmap -PP -sn xx.xx.xx.xx/24

Result

Tag

{none}

ICMP Address Maskスキャン

Message

-PM を指定するとICMP Address Mask Requestを送信する。

Command

sudo nmap -PM -sn xx.xx.xx.xx/24

Result

Tag

{none}

SYN Pingスキャン

Message

-PS で指定ポートにSYNパケットを送信して生存確認を行う。
ICMPが遮断されている環境で有効。

Command

sudo nmap -PS22,80,443 -sn xx.xx.xx.xx

Result

Tag

{none}

ACK Pingスキャン

Message

-PA で指定ポートにACKパケットを送信して生存確認を行う。

Command

sudo nmap -PA22,80,443 -sn xx.xx.xx.xx

Result

Tag

{none}

UDP Pingスキャン

Message

-PU で指定ポートにUDPパケットを送信して生存確認を行う。

Command

sudo nmap -PU53 -sn xx.xx.xx.xx

Result

Tag

{none}

IPアドレス範囲指定

Message

IP範囲を 192.168.0.1-10 のように指定可能。

Command

nmap 192.168.0.1-10

Result

Starting Nmap 7.95 ( https://nmap.org ) at 2026-01-06 09:04 JST

Tag

{none}

ライブホストスキャン(内部自動判定)

Message

-sn により、ICMP / ARP / TCP を内部的に自動選択して生存確認を行う。

Command

nmap -sn 192.168.1.1

Result

Starting Nmap 7.95 ( https://nmap.org ) at 2026-01-06 09:08 JST
Nmap scan report for 192.168.1.1
Host is up (0.0011s latency).
Nmap done: 1 IP address (1 host up) scanned in 0.10 seconds

Tag

{none}

範囲対象の確認

Message

-sL を指定すると実際のスキャンは行わず、対象IP一覧のみ表示する。

Command

nmap -sL 192.168.0.1/27

Result

Starting Nmap 7.95 ( https://nmap.org ) at 2026-01-06 09:24 JST
Nmap scan report for 192.168.0.0
Nmap scan report for 192.168.0.1
...
Nmap done: 32 IP addresses (0 hosts up) scanned in 0.04 seconds

Tag

{none}

UDPスキャン

Message

-sU を指定するとUDPポートスキャンを行う。

Command

nmap -sU -p53 192.168.1.1

Result

Starting Nmap 7.95 ( https://nmap.org ) at 2026-01-06 09:31 JST
PORT   STATE SERVICE
53/udp open  domain

Tag

{none}

OSスキャン

Message

-O を指定するとOS検出を行う。

Command

nmap -O 192.168.1.1

Result

Device type: general purpose
Running: Linux 3.X|4.X

Tag

{none}

バージョンスキャン

Message

-sV を指定するとサービスバージョン検出を行う。

Command

nmap -sV 192.168.1.1

Result

PORT      STATE SERVICE   VERSION
53/tcp    open  domain    Unbound
80/tcp    open  http
443/tcp   open  ssl/https

Tag

{none}

ICMPを返さないホストをスキャンする

Message

-Pn を指定するとホストが生存していないと仮定せずにスキャンを行う。
ICMPが遮断されている環境で有効。

Command

nmap -Pn 192.168.1.1

Result

PORT      STATE SERVICE
53/tcp    open  domain
80/tcp    open  http
443/tcp   open  https

Tag

{none}

⚠️ **GitHub.com Fallback** ⚠️