nmap必須オプションチートシート
基本ポートスキャン(早い)
code:shell
nmap -sS -p- -T4 target
-sS SYNスキャン
-p- 全ポート
-T4 スピード調整
速度と慎重さ
-T0..T5 値が大きいほど速いがノイズ増える。CTFは -T4、実運用は慎重に。
サービス・バージョン検出
code:shell
nmap -sV -sC -p1-65535 target
-sV バージョン
-sC デフォルトスクリプト(軽めの検査)
高度なスクリプト利用
code:linux
nmap --script vuln <target>(脆弱性系スクリプト一括)
個別スクリプト指定: --script http-enum, http-headers
OS推定(参考程度)
code:shell
nmap -O target
出力を保存
-oA scanname(三形式:.nmap、.gnmap、.xml)