1. 程式人生 > >Kali學習筆記11:nmap在二層發現中的應用

Kali學習筆記11:nmap在二層發現中的應用

clas conf DC echo broadcast col 9.png ace arping

nmap在二層發現中的使用:

nmap只需要一行即可實現arping的一個腳本:並且速度更快

#!/bin/bash
if [ "$#" -ne 1 ];then 
  echo "Usage - ./arping.sh [interface]"
  echo "Excample - ./arping.sh eth0"
  echo "Example will perform an ARP scan of the local subnet to which eth0 is assigned"
  exit
fi

interface=$1
prefix=$(ifconfig $interface | grep "
broadcast" | cut -d " " -f 10 | cut -d ‘.‘ -f 1-3) for addr in $(seq 1 255);do arping -c 1 $prefix.$addr -I $interface | grep "reply from" | cut -d" " -f 4 done

nmap:

技術分享圖片

掃描一個指定文件中保存的IP:

技術分享圖片

其實nmap這裏的掃描和arping不一樣,可以抓包發現,nmap還發送DNS數據包,解析主機名

Kali學習筆記11:nmap在二層發現中的應用