macOS ◆ xterm-256color ◆ bash 5027 views

Info

Wireshark Equivalent: Decrypt WPA2-PSK using Wireshark

With help from ^ article and this Wireshark answer.

NOTE: WPA3 decryption in Wireshark is currently a work in progress.

Transcript

#   === Decrypting WPA-PSK ===
cd /tmp

# Get a sample.pcap from Rasika Nayanajith's website
pcap_url="https://mrncciew.files.wordpress.com/2014/08/wpa2-psk-final.zip"
curl $pcap_url | tar -xzv
ls *.cap

# Set the values of vars to whatever they are in your case.
infile="WPA2-PSK-Final.cap"
outfile="decrypted.pcap"
ssid='TEST1'
psk='Cisco123Cisco123'

# Base tshark snippet
tshark -r $infile -w $outfile \
       -o wlan.enable_decryption:TRUE \
       -o "uat:80211_keys:\"wpa-pwd\",\"${psk}:${ssid}\""

# We can then analyze the decrypted pcap for something we care about,
# like TCP resets (filter 'tcp.connection.rst')
tshark -r decrypted.pcap -Y "tcp.connection.rst
  487  38.407227 192.168.140.1 → 192.168.140.100 TCP 112 2000 → 1091 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0
  626  41.687352 192.168.140.1 → 192.168.140.100 TCP 112 2000 → 1092 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0
 1226  52.758103 192.168.140.1 → 192.168.140.100 TCP 112 2000 → 1093 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0

More by pocc

Falcon Heavy Rocket 00:14

by pocc

Editing hex in vim (xxd -p) 00:56

by pocc

randpkt usage 01:05

by pocc

See all