Always ensure you have explicit permission to access any computer system before using any of the techniques contained in these documents. You accept full responsibility for your actions by applying any knowledge gained here.
Choosing a wireless module
You must choose a wireless module that has a chipset that is capable of being put in monitor mode. The site below has a fairly comprehensive list of adapters that support this.
Install the correct driver with apt-get install realtek-rtl88xxau-dkms. After a reboot the WiFi adapter worked on my installation. The only thing to note - it may not work in the usual way with airmon-ng to capture handshakes. The following commands can be used to troubleshoot the interface:
After a lot of failed attempts I found a working solution for folks that have continued problems with getting the Alfa card to work. First unplug your Wi-Fi adapter, then follow these steps:
aptremoverealtek-rtl88xxau-dkms&&aptpurgerealtek-rtl88xxau-dkmsaptupdate&&aptupgradeaptautoremove&&aptautoclean# rebootapt-getdist-upgrade# rebootgitclonehttps://github.com/aircrack-ng/rtl8812aucdrtl8812aumake&&makeinstall# power off the PC
Now turn ON the PC and plug your Wi-Fi adapter and it should work normally.
With airdecap-ng you can decrypt WEP/WPA/WPA2 capture files. As well, it can also be used to strip the wireless headers from an unencrypted wireless capture.
It outputs a new file ending with “-dec.cap” which is the decrypted/stripped version of the input file.
Option
Param.
Description
-l
don't remove the 802.11 header
-b
bssid
access point MAC address filter
-k
pmk
WPA/WPA2 Pairwise Master Key in hex
-e
essid
target network ascii identifier
-p
pass
target network WPA/WPA2 passphrase
-w
key
target network WEP key in hexadecimal
Remove the wireless headers from an open network (no encryption) capture:
Decrypt a WEP-encrypted capture using a hexadecimal WEP key:
Decrypt a WPA/WPA2 encrypted capture using the passphrase:
WPA/WPA2 Requirements
The capture file must contain a valid four-way handshake. For this purpose having (packets 2 and 3) or (packets 3 and 4) will work correctly. In fact, you don't truly need all four handshake packets.
As well, only data packets following the handshake will be decrypted. This is because information is required from the handshake in order to decrypt the data packets.
# $infile should be a .csv from aerodump-ng, $outfile should be a .png
airgraph-ng -i $infile.csv -o $outfile.png -g CAPR
eog $outfile.png
airgraph-ng -i $infile.csv -o $outfile.png -g CPG
eog $outfile.png