天天看點

Netdiscover網絡掃描工具

Netdiscover是一種網絡掃描工具,通過ARP掃描發現活動主機,可以通過主動和被動兩種模式進行ARP掃描。通過主動發送ARP請求檢查網絡ARP流量,通過自動掃描模式掃描網絡位址。本文介紹Netdiscover的安裝和使用方法。

Netdiscover安裝

Kali Linux提供的網絡掃描工具 github位址:https://github.com/alexxy/netdiscover ubuntu:

$ sudo apt install netdiscove      

安裝完成後檢視幫助資訊:

$ netdiscover -h
Netdiscover 0.5.1 [Active/passive ARP reconnaissance tool]
Written by: Jaime Penalba <[email protected]>
Usage: netdiscover [-i device] [-r range | -l file | -p] [-m file] [-F filter] [-s time] [-c count] [-n node] [-dfPLNS]
  -i device: your network device
  -r range: scan a given range instead of auto scan. 192.168.6.0/24,/16,/8
  -l file: scan the list of ranges contained into the given file
  -p passive mode: do not send anything, only sniff
  -m file: scan a list of known MACs and host names
  -F filter: customize pcap filter expression (default: "arp")
  -s time: time to sleep between each ARP request (milliseconds)
  -c count: number of times to send each ARP request (for nets with packet loss)
  -n node: last source IP octet used for scanning (from 2 to 253)
  -d ignore home config files for autoscan and fast mode
  -f enable fastmode scan, saves a lot of time, recommended for auto
  -P print results in a format suitable for parsing by another program and stop after active scan
  -L similar to -P but continue listening after the active scan is completed
  -N Do not print header. Only valid when -P or -L is enabled.
  -S enable sleep time suppression between each request (hardcore mode)
If -r, -l or -p are not enabled, netdiscover will scan for common LAN addresse      

Netdiscover選項

選項 說明
-i device 網絡接口
-r range 掃描範圍,例如192.168.0.0/24,僅支援/8, /16和/24
-l file 掃描範圍清單檔案,每行一個範圍
-p 被動模式:不發生任何封包,僅嗅探
-m file 掃描已知Mac位址和主機名的清單檔案
-F filter 自定義pcap filter表達式(預設“arp”)
-s time 每個ARP請求間的休眠時間(毫秒,預設1ms)
-c count 發送每個ARP請求的次數,用于丢失資料包的網絡,預設1次
-n node 掃描最後的源IP,預設為67(x.x.x.67),允許範圍為2-253
-d 忽略自動掃描和快速模式的主配置檔案,掃描預設的範圍和IP
-f 啟用快速模式掃描,掃描每個網段的.1、.100 和 .254

| -P | 産生輸出到檔案或者其他解析程式,掃描完成後退出,例如:​

​netdiscover -P -r 192.168.20.0/16 | grep 192.168.20.100​

​ | | -L | 與-P類似,但在主動掃描後繼續捕獲ARP包 | | -N | 不列印表頭,僅在-P 或者-L啟用時有效 | | -S | 已棄用 |

Netdiscover使用

用法

如果未啟用被動模式(-p)、掃描清單(-l)或掃描範圍(-r)選項,netdiscover将掃描LAN位址(192.168.0.0/16、172.16.0.0/12和10.0.0.0/8)。 掃描結果控制鍵: h:顯示幫助資訊

$ netdiscover -i ens38 -      
Netdiscover網絡掃描工具

q:退出幫助資訊界面,或者退出掃描(或者Ctrl+c退出) j:向下滾動(或者使用下方向箭頭) k:向上滾動(或者使用上方向箭頭) .:向上翻頁 ,:向下翻頁 掃描結果視圖: a:顯示ARP響應清單

Netdiscover網絡掃描工具

r:顯示ARP請求清單

Netdiscover網絡掃描工具

u:顯示檢測到的唯一主機

Netdiscover網絡掃描工具

使用執行個體

掃描指定接口:

$ netdiscover -i ens3      
Netdiscover網絡掃描工具

快速掃描:

$ netdiscover -i ens38 -      

掃描指定範圍:

$ netdiscover -i ens38 -r 192.168.0.0/1      
Netdiscover網絡掃描工具

被動掃描,僅嗅探:

$ netdiscover -i ens38 -r 192.168.0.0/16 -