167 | | |
| 167 | == Penetration testing your wifi network |
| 168 | |
| 169 | Once the SSID you wish to test has been identified, record its MAC address and note which channel it's on. |
| 170 | |
| 171 | Single out that network to find clients which can be deauthenticated. In this example my BSSID is {{{11:22:33:44:55:66}}} on channel 44. We will create a log file to record the handshake called "my-handshake". |
| 172 | {{{#!bash |
| 173 | sudo airodump-ng -c44 --write my-handshake --bssid 11:22:33:44:55:66 wlan0mon |
| 174 | }}} |
| 175 | Run this scan until a client (station) is identified. For this example I've used my cell phone MAC {{{77:88:99:AA:BB:CC}}}. |
| 176 | |
| 177 | [[Image(single out SSID.png,500px)]] |
| 178 | |
| 179 | Start a new SSH session, so both sessions are open simultaneously. |
| 180 | |
| 181 | In the second session execute your deauthentication attack (this is where packet injection is used): |
| 182 | |
| 183 | ** Note: Do not deauthenticate devices which are not part of your network ** |
| 184 | {{{#!bash |
| 185 | sudo aireplay-ng --deauth 0 -a 11:22:33:44:55:66 -c 77:88:99:AA:BB:CC wlan0mon |
| 186 | }}} |
| 187 | Upon success the client is disconnected from the access point. When the client reconnects airodump-ng will capture the handshake and log it to the designated file. |
| 188 | |
| 189 | [[Image(handshake.png,500px)]] |
| 190 | |
| 191 | Upper right displays handshake hash (pixelated in this image). |
| 192 | |
| 193 | === Wordlists and Aircrack-ng |
| 194 | |
| 195 | Wordlists with default manufacturer passwords are provided by Metasploit framework. More wordlists can be found in "/usr/share/wordlists". A wordlist is only one potential approach to breaking the handshake hash. Though this is an excellent test to perform in order to verify your passwords aren't easily compromised. |
| 196 | |
| 197 | An all around (basic) word list included with Kali is rockyou.txt. |
| 198 | {{{#!bash |
| 199 | sudo gunzip /usr/share/wordlists/rockyou.txt.gz #extract the wordlist |
| 200 | cat /usr/share/wordlists/rockyou.txt #display words contained in the list |
| 201 | }}} |
| 202 | Start aircrack-ng to decrypt the hash: |
| 203 | {{{ |
| 204 | aircrack-ng my-handshake-01.cap -w /usr/share/wordlists/rockyou.txt |
| 205 | }}} |
| 206 | |
| 207 | [[Image(aircrack.png,360px)]] |