主动信息收集

第一阶段:确定攻击目标IP,且是活着的,显示在线IP

二层发现:

1、arping--------------不知此ping一个网段

#!/bin/bash
if [ "$#" -ne 1 ]; then
    echo "Example - ./arping.sh eth0"
   exit    
fi
interface=$1
prefix=$(ifconfig $interface | grep 'inet ' |  cut -d ' ' -f 10 | cut -d '.' -f 1-3)
for addr in $(seq 1 254); do
   arping -c 1 $prefix.$addr | grep "bytes from" | cut -d ' ' -f 5 | cut -d "(" -f 2 | cut -d ")" -f 1

2、nmap

nmap -sn 192.168.1.1-254

3、netdiscover 专用于二层发现,可用于无线和交换机网络环境 主动和被动探测

主动:netdiscover -i eth0 -r 192.168.1.0/24

被动:netdiscover -p   (主动arp容易出发报警)

4、scapy

作为python库进行调用,也可以作为单独的工具使用,抓包、分析、创建、修改、注入网络流量

apt-get install -y python-gnuplot

ARP().display()

sr1()

python脚本

arp1.py

arp2.py

root@kali:~# scapy ------------------进入该程序

猜你喜欢

转载自www.cnblogs.com/scorpios/p/11462695.html