Skip to main content

nmap使用指令

使用詳細輸出

nmap -v www.hinet.net
nmap -A ip或網址(可以分析各port的可能系統與使用服務,會很久)

EX:使用-A -Pn的結果

nmap -A -Pn {IP}

圖片.pngnmap結果.png

nmap -O ip或網址(僅掃描作業系統)

排除主機

nmap 192.168.0.* --exclude 192.168.0.100

使用排除名單

nmap -iL hostlist.txt --excludefile excludelist.txt

檢測是否有使用防火牆

nmap -sA scanme.nmap.org

掃描有防火牆的主機

nmap -PN scanme.nmap.org

偵測主機是否開機(ping scan)

nmap -sP 140.115.35.0/24
nmap -F www.hinet.net
#快速掃描 也可以使用-T5,預設-T3 

按照port做掃描

nmap -p 80,443 192.168.1.1
nmap -p 80-200 192.168.1.1

使用tcp掃描

nmap -p T:80 192.168.1.1

使用udp掃描

nmap -p U:53 192.168.1.1

最常用的10port

nmap --top-ports 10 192.168.1.1

綜合掃描

nmap -sS -P0 -sV -O 192.168.56.102
param:
-sS: Scan Syn
-sV: Determine OS Version
-P0: Protocol Scan
-O : Operation System

script scan

SCRIPT SCAN:
  -sC: equivalent to --script=default
  --script=<Lua scripts>: <Lua scripts> is a comma separated list of
           directories, script-files or script-categories
  --script-args=<n1=v1,[n2=v2,...]>: provide arguments to scripts
  --script-args-file=filename: provide NSE script args in a file
  --script-trace: Show all data sent and received
  --script-updatedb: Update the script database.
  --script-help=<Lua scripts>: Show help about scripts.
           <Lua scripts> is a comma-separated list of script-files or
           script-categories.