好用小套件-nmap

偵測遠端服務是否開啟。

安裝nmap套件
# yum install -y nmap

查詢遠端 TCP 類型服務是否開啟
# nmap -sT 140.112.xxx.xx  // sT = scan TCP
 Starting Nmap 5.51 ( http://nmap.org ) at 2012-10-12 15:04 CST
 Nmap scan report for pcxx.career.studa.ntu.edu.tw (140.112.xxx.xx)
 Host is up (0.0014s latency).
 Not shown: 996 filtered ports
 PORT STATE SERVICE
 21/tcp open ftp
 22/tcp open ssh
 80/tcp open http
 443/tcp open https

 Nmap done: 1 IP address (1 host up) scanned in 25.23 seconds

查詢遠端 UDP 類型服務是否開啟
# nmap -sU 140.112.xxx.xx  // sU = scan UDP
 Starting Nmap 5.51 ( http://nmap.org ) at 2012-10-12 15:05 CST
 Nmap scan report for dns.career (140.112.xxx.xx)
 Host is up (0.00036s latency).
 Not shown: 999 open|filtered ports
 PORT STATE SERVICE
 123/udp open ntp
 Nmap done: 1 IP address (1 host up) scanned in 4.03 seconds

參數『-A』可同時作業系統偵測及版本偵測,但會花費較長的時間,且結果可能會有錯誤,像作業系統怎麼變成Windows了
# nmap -A 140.112.xxx.xx


沒有留言:

張貼留言