HCXDUMPTOOL(1)
π HCXDUMPTOOL(1) π
okay bestie, buckle up, because this is hcxdumptool β the manual name is hcxdumptool β and it's a tool to capture packets from wlan devices. she's iconic, she's powerful, and she has OPINIONS. let's get into it π
β¨ NAME β¨
hcxdumptool β tool to capture packets from wlan devices.
πΈ SYNOPSIS πΈ
hcxdumptool [OPTIONS]
π¦ DESCRIPTION π¦
Tool to capture wpa handshake from Wi-Fi networks and run several tests to determine if Wi-Fi access points or clients are vulnerable to brute-force atacks.
like. she grabs handshakes and then runs a whole lil vibe check on the APs and clients to see if they're out here being weak to brute-force attacks. no cap. π
π OPTIONS π
okay so before we even get to the flags, there's a whole stack of house rules and I need you to read them, bestie, because breaking them is giving chaos:
- press ctrl+c to terminate hcxdumptool
- press GPIO button to terminate hcxdumptool β hardware modification is necessary, read more: https://github.com/ZerBea/hcxdumptool/tree/master/docs
- do not set monitor mode by third party tools (iwconfig, iw, airmon-ng)
- do not run hcxdumptool on logical (NETLINK) interfaces (monx, wlanxmon, prismx, ...) created by airmon-ng and iw
- do not run hcxdumtool on virtual machines or emulators
- do not run hcxdumptool in combination with tools (channel hopper), that take access to the interface (except: tshark, wireshark, tcpdump)
- do not use tools like machcanger, because hcxdumptool run its own MAC space and will ignore this changes
- stop all this services (e.g.:
wpa_supplicant.service,NetworkManager.service) that take access to the interface
π short options π
-i <interface>β interface (monitor mode will be enabled by hcxdumptool). it is mandatory that the driver supportioctl()system calls, monitor mode and full packet injection!-o <dump file>β output file in pcapng format. filename'-'outputs to stdout,'+'outputs to client including radiotap header (LINKTYPE_IEEE802_11_RADIOTAP)-f <frames>β frames to save. it's a bitmask, bestie:0: clear default values1: MANAGEMENT frames (default)2: EAP and EAPOL frames (default)4: IPV4 frames8: IPV6 frames16: WEP encrypted frames32: WPA encrypted frames64: vendor defined frames (AWDL)
to clear default values use -f 0 first, followed by desired frame type (e.g. -f 0 -f 4)
-c <digit>β set frequency (2437,2462,5600,...) or channel (1,2,3, ...). default: auto frequency/auto band. maximum entries: 255.0-1000treated as channel; >1000treated as frequency in MHz. on 5GHz and 6Ghz it is recommended to use frequency instead of channel number because channel numbers are not longer unique. standard 802.11 channels (depend on device, driver and world regulatory domain): https://en.wikipedia.org/wiki/List_of_WLAN_channels-s <digit>β set predefined scanlist.0= auto frequency/auto band (default):1=1,6,11,3,5,1,6,11,2,4,1,6,11,7,9,1,6,11,8,10,1,6,11,12,13(optimized 2.4GHz)2=1,2,3,4,5,6,7,8,9,10,11,12,13(standard 2.4 GHz)3=36,40,44,48,52,56,60,64,100,104,108,112,116,120,124,128,132,136,140,144,149,153,157,161,165(standard 5GHz)4=1,2,3,4,5,6,7,8,9,10,11,12,13,36,40,44,48,52,56,60,64,100,104,108,112,116,120,124,128,132,136,140,144,149,153,157,161,165(standard 2.4GHz/5GHz)
-t <seconds>β stay time on frequency before hopping to the next channel. default 4 seconds-m <interface>β set monitor mode byioctl()system call and quit-Iβ show WLAN interfaces and quit-Cβ show available device channels and quit. if no frequencies are available, interface is probably in use or doesn't support monitor mode. if additional frequencies are available, firmware, driver and regulatory domain is probably patched-hβ show this help-vβ show version
π long options π
--do_rcascanβ show radio channel assignment (scan for target access points). this can be used to test thatioctl()calls and packet injection is working. if you got no HIT, packet injection is possible not working. also it can be used to get information about the target and to determine that the target is in range. use this mode to collect data for the filter list. run this mode at least for 2 minutes to save all received raw packets. use option-o. default scanlist: channel 1 ...13--rcascan_max=digit>β show only n highest ranking lines. default: 256 lines--rcascan_order=digit>β rcascan sorting order:0= sort by PROBERESPONSE count (default),1= sort by BEACON count,2= sort by CHANNEL--do_targetscan=<MAC_AP>β same as do_rcascan - hide all networks, except target. format:112233445566,11:22:33:44:55:66,11-22-33-44-55-66--reason_code=<digit>β deauthentication reason code. recommended codes:1WLAN_REASON_UNSPECIFIED2WLAN_REASON_PREV_AUTH_NOT_VALID4WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY5WLAN_REASON_DISASSOC_AP_BUSY6WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA7WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA (default)9WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH
--disable_client_attacksβ do not attack clients. affected: ap-less (EAPOL 2/4 - M2) attack--stop_client_m2_attacks=<digit>β stop attacks against CLIENTS after 10 M2 frames received. affected: ap-less (EAPOL 2/4 - M2) attack. requirehcxpcangtool --alloption--disable_ap_attacksβ do not attack access points. affected: connected clients and client-less (PMKID) attack--stop_ap_attacks=<digit>β stop attacks against ACCESS POINTs if<n>BEACONs received. default: stop after 600 BEACONs--resume_ap_attacks=<digit>β resume attacks against ACCESS POINTs after<n>BEACONs received. default: 864000 BEACONs--disable_deauthenticationβ do not send deauthentication or disassociation frames. affected: conntected clients--silentβ do not transmit! hcxdumptool is acting like a passive dumper. expect possible packet loss--eapoltimeout=<digit>β set EAPOL TIMEOUT (microseconds). default: 20000 usec--eapoleaptimeout=<digit>β set EAPOL EAP TIMEOUT (microseconds) over entire request sequence. default: 2500000 usec--bpfc=<file>β input kernel space Berkeley Packet Filter (BPF) code. affected: incoming and outgoing traffic - that include rca scan. steps to create a BPF (it only has to be done once): set hcxdumptool monitormode
$ hcxdumptool -m <interface>
create BPF to protect a MAC
$ tcpdump -i <interface> not wlan addr1 11:22:33:44:55:66 and not wlan addr2 11:22:33:44:55:66 -ddd > protect.bpf
recommended to protect own devices or create BPF to attack a MAC
$ tcpdump -i <interface> wlan addr1 11:22:33:44:55:66 or wlan addr2 11:22:33:44:55:66 -ddd > attack.bpf
it is strongly recommended to allow all PROBEREQUEST frames (wlan_type mgt && wlan_subtype probe-req). see man pcap-filter for a list of all filter options. to use the BPF code
$ hcxdumptool -i <interface> --bpfc=attack.bpf ...
notice: this is a protect/attack, a capture and a display filter
--filtermode=<digit>β user space filter mode for filter list. mandatory in combination with--filterlist_apand/or--filterlist_client. affected: only outgoing traffic. notice: hcxdumptool act as passive dumper and it will capture the whole traffic on the channel.0: ignore filter list (default)1: use filter list as protection list - do not interact with ACCESS POINTs and CLIENTs from this list2: use filter list as target list - only interact with ACCESS POINTs and CLIENTs from this list
not recommended, because some useful frames could be filtered out. using a filter list doesn't have an affect on rca scan. only for testing useful - devices to be protected should be added to BPF.
notice: this filter option will let hcxdumptool protect or attack a target - it is neither a capture nor a display filter
--filterlist_ap=<file or MAC>β ACCESS POINT MAC or MAC filter list. format:112233445566,11:22:33:44:55:66,11-22-33-44-55-66# comment. maximum entries 256. run first--do_rcascanto retrieve information about the target--filterlist_ap_vendor=<file>β ACCESS POINT VENDOR filter list by VENDOR. format:112233,11:22:33,11-22-33# comment. maximum entries 256. run first--do_rcascanto retrieve information about the target--filterlist_client=<file or MAC>β CLIENT MAC or MAC filter list. format:112233445566,11:22:33:44:55:66,11-22-33-44-55-66# comment. maximum entries 256. due to MAC randomization of the CLIENT, it does not always work!--filterlist_client_VENDOR=<file>β CLIENT VENDOR filter list. format:112233,11:22:33,11-22-33# comment. maximum entries 256. due to MAC randomization of the CLIENT, it does not always work!--weakcandidate=<password>β use this pre shared key (8...63 characters) for weak candidate alert. will be saved to pcapng to inform hcxpcaptool. default:12345678--essidlist=<file>β transmit beacons from this ESSID list. maximum total entries: 256 ESSIDs--essidlist_wpaent=<file>β transmit WPA-Enterprise-only beacons from this ESSID list. maximum total entries: 256 ESSIDs
and bestie, that's just part one β there's more coming, don't go anywhere π
--active_beaconβ blast out a beacon built from the ESSIDs we collected plus whatever's inessidlist, once every10000000nsec. affects: ap-less β¨--flood_beaconβ send a beacon back for every beacon you receive. affects: ap-less π¦--all_m2β accept literally every connection attempt that comes from a CLIENT. affects: CLIENTs. β οΈ warning: this can stop a CLIENT from being able to establish a connection to an assigned ACCESS POINT. so like, careful bestie.--infinityβ stop a CLIENT from ever establishing a connection to an assigned ACCESS POINT. affects: ACCESS POINTs and CLIENTs π--beaconparams=<TLVs>β update or add Information Elements in all reactive andessidlistbeacons. max50IEs as TLV hex string. tag id0(ESSID) gets ignored π, tag id3(channel) gets overwritten, multiple IEs with the same tag id all get added, and the default IE is overwritten by the first one.--wpaentβ turn on announcement of WPA-Enterprise in beacons and probe responses, on top of WPA-PSK. π--eapreq=[<mode>:]<type><data>[:<term>],...β send max.20subsequent EAP requests after the initial EAP ID request, hex string starting with EAP Type. the mode prefix decides the layer the request is exclusively send on:T:= only if any TLS tunnel is up, ignored otherwise. the response is terminated with::F= EAP Failure,:S= EAP Success,:I= EAP ERP Initiate,:F= EAP ERP Finish,:D= Deauthentication,:T= TLS shutdown,:-= no packet. default behavior is terminating all responses with a EAP Failure, and after the last one the client is deauthenticated. π--eapreq_follownakβ jump to the Auth Type requested by the client in a Legacy Nak response, if that type is available in the remaining request sequence. π--eaptlstunβ activate TLS tunnel negotiation and Phase 2 EAP requests when requesting PEAP. using--eapreqrequires--eap_server_certand--eap_server_key. π--eap_server_cert=<server.pem>β EAP TLS tunnel Server cert PEM file. π--eap_server_key=<server.key>β EAP TLS tunnel Server private key file. ποΈ--use_gps_device=<device>β use GPS device/dev/ttyACM0,/dev/ttyUSB0, ... NMEA 0183$GPGGA$GPGGAπ°οΈ--use_gpsdβ use GPSD device, NMEA 0183$GPGGA,$GPRMC.--nmea=<file>β save the track to file. format: NMEA 0183$GPGGA,$GPRMC,$GPWPL. to convert it to gpx, use GPSBabel:
gpsbabel -i nmea -f hcxdumptool.nmea -o gpx -F file.gpx
to display the track, open file.gpx with viking. πΊοΈ
--gpio_button=<digit>β Raspberry Pi GPIO pin number of button (2...27). default = GPIO not in use. π--gpio_statusled=<digit>β Raspberry Pi GPIO number of status LED (2...27). default = GPIO not in use. π‘--gpio_statusled_intervall=<digit>β Raspberry Pi GPIO LED flash intervall. default = flash every5seconds. β¨--tot=<digit>β enable the timeout timer in minutes (minimum =2minutes). hcxdumptool will terminate if tot is reached (EXIT code =2). for a successful attack tot >120minutes is recommended. β³--error_max=<digit>β terminate hcxdumptool if the error maximum is reached. default:100errors. π--rebootβ once hcxdumptool terminated, reboot the system. π--poweroffβ once hcxdumptool terminated, power off the system. π--enable_status=<digit>β enable real-time display (waterfall), only incoming traffic. each message is displayed only once, at the first occurrence, to avoid spamming the real-time display. bitmask:0: no status (default),1: EAPOL,2: ASSOCIATION and REASSOCIATION,4: AUTHENTICATION,8: BEACON and PROBERESPONSE,16: ROGUE AP,32: GPS (once a minute),64: internal status (once a minute),128: run as server,256: run as client,512: EAP,1024: EAP NAK. characters< 0x20 && > 0x7eare replaced by.. example: show everything but don't run as server or client (1+2+4+8+16 = 31), show only EAPOL and ASSOCIATION and REASSOCIATION (1+2 = 3). π--ip=<IP address>β define IP address for server / client (default:224.0.0.255) multicast, localhost or client unicast IP address on both sides. π--server_port=<digit>β define port for server status output (1...65535) : default IP:224.0.0.255: default port:60123. π‘--client_port=<digit>β define port for client status read (1...65535) default IP:224.0.0.255default port:60123. π₯--check_driverβ run several tests to determine that the driver supports all(!) requiredioctl()system calls. the driver must support monitor mode and full packet injection, otherwise hcxdumptool will not work as expected. π§ͺ--check_injectionβ run antenna test and packet injection test to determine that the driver supports full packet injection. packet injection will not work as expected if the Wireless Regulatory Domain is unset. πΆ--force_interfaceβ ignore allioctl()warnings and the error counter. allow hcxdumptool to run on a virtual NETLINK monitor interface. β οΈ warning: packet injection and/or channel change may not work as expected. you have been warned: do not report issues! π--exampleβ show abbreviations and example command lines. π--helpβ show this help. π«Ά--versionβ show version. π·οΈ
Make sure that the Wireless Regulatory Domain is not unset! π
Run hcxdumptool -i interface --do_rcascan for at least 30 seconds, to get information about the target! π
Do not edit, merge or convert this pcapng files, because it will remove optional comment fields! π It is much better to run gzip to compress the files. Wireshark, tshark and hcxpcapngtool will understand this, as well as wpa-sec.stanev.org. β¨
If hcxdumptool captured your password from WiFi traffic, you should check all your devices immediately! π
If you use GPS, make sure GPS device is inserted and has a GPS FIX, before you start hcxdumptool! π°οΈ
Recommended tools to show additional 802.11 fields or to decrypt WiFi traffic: Wireshark and/or tshark. π¦
Recommended tool to convert hashes to formats that hashcat and JtR understand: hcxpcapngtool. π₯
Recommended tool to get possible PSKs from pcapng file: hcxpcapngtool. π
Important notice: Using filter options, could cause that some useful frames are filtered out! In that case hcxpcapngtool will show a warning that this frames are missing! π’
Use SIGHUB with care, because it will impact pselect(). π
π AUTHOR π
Written by ZeroBeat <zerobeat@gmx.de>. π
This manual page was written by Paulo Roberto Alves de Oliveira (aka kretcheu) <kretcheu@gmail.com> for the Debian project (but may be used by others). π«Ά
π COPYRIGHT π
Copyright 2000-2021 ZeroBeat. π
License MIT. π
okay that's the whole thing bestie, we ate and left no crumbs π this was HCXDUMPTOOL version 6.2.5, dated Dec 2021 β go forth and slay responsibly, mwah πβ¨π¦
π¦ where this page comes from
- debian bookworm: hcxdumptool 6.2.6-2 Β· MIT
- debian trixie: hcxdumptool 6.3.5-1 Β· MIT
- ubuntu jammy: hcxdumptool 6.2.5-2 Β· MIT
- ubuntu noble: hcxdumptool 6.3.1-1 Β· MIT
- ubuntu questing: hcxdumptool 7.0.0-1
- ubuntu resolute: hcxdumptool 7.0.0-1build1 Β· MIT
- ubuntu stonking: hcxdumptool 7.1.2-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms