### Custom Installation Path Example Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/configuration.md Demonstrates how to specify a custom installation prefix when running the make install command. ```bash make install PREFIX=/usr/local # Installs to /usr/local/bin ``` -------------------------------- ### Makefile Installation Configuration Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/configuration.md Sets default installation paths and the install command. The DESTDIR variable is used for staging installations. ```makefile PREFIX ?= /usr BINDIR = $(DESTDIR)$(PREFIX)/bin INSTALL ?= install INSTFLAGS = -D (on Linux systems) ``` -------------------------------- ### Build hcxtools from Source on Linux Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/configuration.md Follow these steps to clone the repository, install dependencies on Ubuntu/Debian, build the project with all features, and install it to /usr/local. Verify the installation by checking the tool's version. ```bash # Clone repository git clone https://github.com/ZerBea/hcxtools.git cd hcxtools # Install dependencies (Ubuntu/Debian example) sudo apt-get update sudo apt-get install -y \ build-essential \ libssl-dev \ zlib1g-dev \ libcurl4-gnutls-dev \ pkg-config # Build with all features make -j $(nproc) # Install to /usr/local sudo make install PREFIX=/usr/local # Verify installation /usr/local/bin/hcxpcapngtool --version ``` -------------------------------- ### Build hcxtools from Source Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/README.md Clone the repository, navigate to the directory, and build the tools using make. Install the tools system-wide using make install. ```bash git clone https://github.com/ZerBea/hcxtools.git cd hcxtools make -j $(nproc) sudo make install ``` -------------------------------- ### Verify hcxtools Installation Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/README.md Check the installed versions of hcxpcapngtool, hcxhashtool, and hcxpottool to confirm successful installation. ```bash hcxpcapngtool --version hcxhashtool --version hcxpottool --version ``` -------------------------------- ### Install hcxtools to /usr/bin Source: https://github.com/zerbea/hcxtools/blob/master/README.md Install the compiled hcxtools to the /usr/bin directory. This requires superuser privileges. ```bash make install (as super user) ``` -------------------------------- ### Install hcxtools to /usr/local/bin Source: https://github.com/zerbea/hcxtools/blob/master/README.md Install the compiled hcxtools to a custom prefix, such as /usr/local/bin. This requires superuser privileges. ```bash make install PREFIX=/usr/local (as super user) ``` -------------------------------- ### Build hcxtools using Docker Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/configuration.md This Dockerfile sets up an Ubuntu environment, installs necessary build tools and dependencies, clones the hcxtools repository, builds it, and installs it. The container is configured to run hcxpcapngtool by default. ```dockerfile FROM ubuntu:latest RUN apt-get update && apt-get install -y \ build-essential libssl-dev zlib1g-dev \ libcurl4-gnutls-dev pkg-config git WORKDIR /tmp RUN git clone https://github.com/ZerBea/hcxtools.git && \ cd hcxtools && \ make -j $(nproc) && \ make install ENTRYPOINT ["/usr/bin/hcxpcapngtool"] ``` -------------------------------- ### Makefile Per-Tool Targets Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/configuration.md Provides targets for managing individual tools, including building, installing, cleaning, and uninstalling them. ```makefile make hcxpcapngtool # Build single tool make hcxpcapngtool.install # Install single tool make hcxpcapngtool.clean # Clean single tool artifacts make hcxpcapngtool.uninstall # Uninstall single tool ``` -------------------------------- ### Makefile Build Parallelization Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/configuration.md Example of using the -j flag with make to enable parallel builds, utilizing all available CPU cores for faster compilation. ```bash make -j $(nproc) # Build in parallel using all CPU cores ``` -------------------------------- ### Makefile Build Targets Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/configuration.md Defines the primary make targets for building, installing, cleaning, and uninstalling all tools. ```makefile make # Build all tools make build # Equivalent to 'make' (build all) make install # Compile and install to BINDIR make clean # Remove built artifacts make uninstall # Remove installed binaries ``` -------------------------------- ### Hashcat 22000 Format Example Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/api-reference/hash-structures.md Example of a WPA/WPA2 hash in Hashcat's 22000 text-based format. This format is used for PMKID+EAPOL hashes. ```text 22000:a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4:48656c6c6f:aabbccddee00:112233445566:0011223344550011223344550011223344550011223344550011223344550011223344550011223344550011223344550011223344550011:00:0000 ``` -------------------------------- ### Example C Structure Definition Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/README.md Defines a C structure with fields for data and status flags, including inline defines for flag meanings. Useful for defining custom data types. ```c struct example_s { field_type field_name; /* Description, range, or usage */ uint8_t status; /* Flag field with inline defines */ #define STATUS_ACTIVE 0x01 /* Meaning of each flag */ #define STATUS_ERROR 0x02 } ``` -------------------------------- ### OpenSSL 3.0+ Includes Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/api-reference/cryptographic-operations.md These are the standard includes required for cryptographic operations using the OpenSSL 3.0+ library. Ensure OpenSSL 3.0 or later is installed for compatibility. ```c #include #include #include #include #include #include ``` -------------------------------- ### WPS IE (Type 221, OUI 00:50:F2:04) Structure Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/api-reference/pcap-processing.md Explains the structure of the WPS IE (Wi-Fi Protected Setup Information Element). It highlights the TLV (Type-Length-Value) attributes used for device information and enrollee details. ```plaintext - TLV Attributes: - Manufacturer (Type 121) - Model Name (Type 128) - Model Number (Type 129) - Device Name (Type 143) - Enrollee Information (various) ``` -------------------------------- ### Makefile Dependency Management Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/configuration.md Configures pkg-config to retrieve library paths and compiler flags for OpenSSL, libcurl, and zlib. ```makefile PKG_CONFIG ?= pkg-config OPENSSL_LIBS=$(shell $(PKG_CONFIG) --libs openssl) OPENSSL_CFLAGS=$(shell $(PKG_CONFIG) --cflags openssl) CURL_LIBS=$(shell $(PKG_CONFIG) --libs libcurl) CURL_CFLAGS=$(shell $(PKG_CONFIG) --cflags libcurl) Z_LIBS=$(shell $(PKG_CONFIG) --libs zlib) Z_CFLAGS=$(shell $(PKG_CONFIG) --cflags zlib) ``` -------------------------------- ### Makefile Build Settings Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/configuration.md Configures production build settings, including versioning. When PRODUCTION is set to 1, the version is fixed; otherwise, git tags are used. ```makefile PRODUCTION := 0 PRODUCTION_VERSION := 7.1.2 PRODUCTION_YEAR := 2026 VERSION_TAG := $(shell git describe --tags || echo $(PRODUCTION_VERSION)) ``` -------------------------------- ### PBKDF2 Parameters Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/api-reference/cryptographic-operations.md Defines the standard parameters for PBKDF2, including iterations and key length, used for key derivation. ```c #define PBKDF2_ITERATIONS 4096 /* WPA/WPA2 standard */ #define PBKDF2_KEYLEN 32 /* 256-bit PMK */ #define PBKDF2_SALTLEN_MAX 32 /* Max ESSID length */ ``` -------------------------------- ### hcxtools Processing Pipeline Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/README.md Illustrates the data flow within the hcxtools application, from input file parsing to output file generation. ```text Input Files (PCAP/PCAPNG) ↓ Packet Reading & Parsing ↓ Frame Type Classification ↓ Information Element Extraction ↓ Handshake Assembly ↓ Validation & Filtering ↓ Hash Extraction & Format Conversion ↓ Output Files (Multiple Formats) ``` -------------------------------- ### Set Execute Permissions for hcxtools Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/configuration.md Sets execute permissions for hcxtools executables. Ensure these tools are in your system's PATH. ```bash chmod 755 /usr/bin/hcxpcapngtool chmod 755 /usr/bin/hcxhashtool # ... etc ``` -------------------------------- ### WPA Key Information Field Bits Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/api-reference/ieee80211-enums.md Defines bitmasks for WPA key information, covering key type, cipher, purpose, installation, transmission, acknowledgment, integrity, security, and encryption status. ```c #define WBIT(n) (1 << (n)) /* Key type and cipher info */ #define WPA_KEY_INFO_TYPE_MASK (WBIT(0) | WBIT(1) | WBIT(2)) #define WPA_KEY_INFO_TYPE_HMAC_MD5_RC4 WBIT(0) /* WPA with RC4 */ #define WPA_KEY_INFO_TYPE_HMAC_SHA1_AES WBIT(1) /* WPA2 with AES */ /* Key purpose bits */ #define WPA_KEY_INFO_KEY_TYPE WBIT(3) /* 1=Pairwise, 0=Group */ #define WPA_KEY_INFO_KEY_INDEX_MASK (WBIT(4) | WBIT(5)) #define WPA_KEY_INFO_KEY_INDEX_SHIFT 4 /* Installation and transmission bits */ #define WPA_KEY_INFO_INSTALL WBIT(6) /* Install key (pairwise) */ #define WPA_KEY_INFO_TXRX WBIT(6) /* Transmit/Receive (group) */ #define WPA_KEY_INFO_ACK WBIT(7) /* Ack required */ /* Integrity and security bits */ #define WPA_KEY_INFO_MIC WBIT(8) /* MIC field is valid */ #define WPA_KEY_INFO_SECURE WBIT(9) /* Secure bit (WPA2) */ #define WPA_KEY_INFO_ERROR WBIT(10) /* Error */ #define WPA_KEY_INFO_REQUEST WBIT(11) /* Request */ /* Key data encryption */ #define WPA_KEY_INFO_ENCR_KEY_DATA WBIT(12) /* Key data is encrypted */ ``` -------------------------------- ### Compile hcxtools Source: https://github.com/zerbea/hcxtools/blob/master/README.md Compile the hcxtools suite using make with parallel job execution. ```bash make -j $(nproc) ``` -------------------------------- ### Constants and Limits Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/api-reference/ieee80211-enums.md Defines various constants and maximum limits for network parameters. These are used for buffer sizes, lengths, and band definitions. ```c #define MYREPLAYCOUNT 63232 /* Custom replay count threshold */ #define ESSID_LEN_MAX 32 /* Maximum ESSID length */ #define OPTIONLEN_MAX 1024 /* Maximum option length */ #define EAPOL_AUTHLEN_OLD_MAX 255 /* Legacy EAPOL auth length */ #define EAPOL_AUTHLEN_MAX 512 /* Current EAPOL auth length */ #define PMK_LEN 32 /* PMK length in bytes */ #define PSK_LEN_MIN 8 /* Minimum PSK length */ #define PSK_LEN_MAX 63 /* Maximum PSK length */ #define CHANNEL_MAX 255 /* Maximum channel number */ #define GHZ24 1 /* 2.4 GHz band */ #define GHZ5 2 /* 5 GHz band */ ``` -------------------------------- ### hcxtools Module Dependencies Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/README.md Details the modular structure of hcxtools, showing the main tool and its dependent modules for packet handling, hash extraction, crypto operations, and output formatting. ```text Main Tool ├── PCAP Module │ ├── IEEE 802.11 Parser │ └── Information Element Handler ├── Hash Extraction │ ├── Message Aggregation │ ├── Validation │ └── Deduplication ├── Crypto Operations │ ├── OpenSSL EVP │ └── PBKDF2/HMAC └── Output Formatting ├── Hashcat Format ├── John the Ripper Format └── Statistics ``` -------------------------------- ### Clone hcxtools Repository Source: https://github.com/zerbea/hcxtools/blob/master/README.md Clone the hcxtools repository from GitHub and navigate into the project directory. ```bash git clone https://github.com/ZerBea/hcxtools.git cd hcxtools ``` -------------------------------- ### Makefile Compiler Configuration Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/configuration.md Defines the C compiler and default compilation flags, including optimization level and warning settings. ```makefile CC ?= gcc CFLAGS ?= -O3 -Wall -Wextra -Wpedantic CFLAGS += -std=gnu99 ``` -------------------------------- ### hcxtools WPA Version Definitions Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/api-reference/ieee80211-enums.md Defines constants for different WPA versions, including WPA1, WPA2, and WPA2 with extended key versions. ```c #define WPA1 1 /* WPA (legacy, uses TKIP) */ #define WPA2 2 /* WPA2 (802.11i, uses CCMP) */ #define WPA2kv3 4 /* WPA2 with additional key versions */ ``` -------------------------------- ### PBKDF2-HMAC-SHA1 Format Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/api-reference/hash-structures.md Illustrates the format for PBKDF2-HMAC-SHA1 hashes, commonly used with John the Ripper's generic PBKDF2 module. It includes iterations, salt, and the hash. ```text $pbkdf2-hmac-sha1$iterations$salt$hash ``` -------------------------------- ### Key and Hash Sizes Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/api-reference/cryptographic-operations.md Specifies the lengths in bytes for various cryptographic keys and hashes, such as PMK, PTK, KCK, KEK, TK, MIC, PMKID, and nonces. ```c #define PMK_LEN 32 /* Pairwise Master Key: 256 bits */ #define PTK_LEN 48 /* Pairwise Transient Key: 384 bits */ #define KCK_LEN 16 /* Key Confirmation Key: 128 bits */ #define KEK_LEN 16 /* Key Encryption Key: 128 bits */ #define TK_LEN 16 /* Temporal Key: 128 bits */ #define MIC_LEN 16 /* Message Integrity Code: 128 bits */ #define PMKID_LEN 16 /* PMKID: 128 bits */ #define NONCE_LEN 32 /* ANonce/SNonce: 256 bits */ ``` -------------------------------- ### File Size Limit for Raw Output Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/configuration.md Specifies the maximum buffer size for raw output, set to 128 KB. Input files are processed via streaming for large sizes. ```c #define RAW_LEN_MAX 131072 /* Raw output buffer: 128 KB */ ``` -------------------------------- ### Statistics Output Format Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/api-reference/hash-structures.md A summary format providing statistics about the captured hash data, including counts of types, APs, clients, and ESSIDs. ```text Type: PMKID Total: 1234 APs: 456 Clients: 789 ESSIDs: 321 ``` -------------------------------- ### hcxtools Authentication and Key Management Suite Flags Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/api-reference/ieee80211-enums.md Lists flags for various authentication and key management suites, including PMKSA, PSK, FT, SAE, and OWE, with SHA-256/384 variants. ```c #define TAK_PMKSA 0x0001 /* PMK caching (802.1X) */ #define TAK_PSK 0x0002 /* Pre-Shared Key (WPA-PSK) */ #define TAK_FT 0x0004 /* Fast Roaming (FT) over DS */ #define TAK_FT_PSK 0x0008 /* FT with PSK */ #define TAK_PMKSA256 0x0010 /* PMK caching with SHA-256 */ #define TAK_PSKSHA256 0x0020 /* PSK with SHA-256 (WPA2-PSK) */ #define TAK_TDLS 0x0040 /* TDLS peer key handshake */ #define TAK_SAE_SHA256 0x0080 /* SAE (WPA3) with SHA-256 */ #define TAK_FT_SAE 0x0100 /* FT with SAE */ #define TAK_AP_PKA 0x0200 /* AP PKA / Enhanced PKA */ #define TAK_SAE_SHA256B 0x0400 /* SAE SHA-256 variant B */ #define TAK_SAE_SHA384B 0x0800 /* SAE SHA-384 variant B */ #define TAK_OWE 0x1000 /* Opportunistic Wireless Encryption */ ``` -------------------------------- ### PMK/PSK List Structure Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/api-reference/core-types.md Defines the structure for storing Pairwise Master Key (PMK) or Pre-Shared Key (PSK) information, including status, ESSID, and the key material itself. Supports different key lengths and ESSIDs. ```c struct pmklist_s { uint8_t status; uint8_t essidlen; uint8_t psklen; uint8_t pmk[PMK_LEN]; uint8_t essid[ESSID_LEN_MAX]; uint8_t psk[PSK_LEN_MAX]; } ``` -------------------------------- ### PCAPNG Option Codes Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/api-reference/ieee80211-enums.md Defines common option codes for PCAPNG files, including end of options, comments, hardware/OS descriptions, user applications, and custom options. Also includes timestamp resolution codes. ```c #define SHB_EOC 0 /* End of Options */ #define SHB_COMMENT 1 /* Comment */ #define SHB_HARDWARE 2 /* Hardware description */ #define SHB_OS 3 /* OS description */ #define SHB_USER_APPL 4 /* User application */ #define SHB_CUSTOM_OPT 0x0bad /* Custom option */ #define TSRESOL_USEC 6 /* Microsecond timestamp resolution */ #define TSRESOL_NSEC 9 /* Nanosecond timestamp resolution */ #define IF_NAME 2 /* Interface name */ #define IF_DESCRIPTION 3 /* Interface description */ #define IF_MACADDR 6 /* Interface MAC address */ #define IF_TSRESOL 9 /* Interface timestamp resolution */ #define IF_TZONE 10 /* Interface timezone */ ``` -------------------------------- ### hcxtools Key Derivation Version Flags Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/api-reference/ieee80211-enums.md Defines versions for key derivation, distinguishing between RSN IE (WPA2/802.11i) and WPA IE (WPA legacy). ```c #define KV_RSNIE 1 /* RSN IE (WPA2/802.11i) */ #define KV_WPAIE 2 /* WPA IE (WPA legacy) */ ``` -------------------------------- ### CSV Output Format for Hashes Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/api-reference/hash-structures.md A comma-separated values format for hash data, suitable for import into spreadsheets or other data analysis tools. ```text type,essid,ap_mac,client_mac,anonce,snonce,pmkid,eapol,message_pair pmkid,Hello,aabbccddee00,112233445566,00112233...,...,...,0 ``` -------------------------------- ### PSK Constraints Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/api-reference/cryptographic-operations.md Defines the minimum and maximum lengths for Pre-Shared Keys (PSK) and Extended Service Set Identifiers (ESSID), including constraints for hidden networks. ```c #define PSK_LEN_MIN 8 /* Minimum PSK length */ #define PSK_LEN_MAX 63 /* Maximum PSK length */ #define ESSID_LEN_MIN 0 /* Hidden networks */ #define ESSID_LEN_MAX 32 /* Maximum ESSID length */ ``` -------------------------------- ### Makefile Feature Flags Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/configuration.md Defines preprocessor macros for version information and feature enablement, such as zlib support. ```makefile DEFS = -DVERSION_TAG=\"$(VERSION_TAG)\" -DVERSION_YEAR=\"$(VERSION_YEAR)\" DEFS += -DWANTZLIB ``` -------------------------------- ### String Length Limits Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/configuration.md Defines maximum lengths for ESSID/SSID, EAP-LEAP usernames, EAP-MSCHAPv2 usernames, and device information fields. ```c #define ESSID_LEN_MAX 32 /* ESSID/SSID length */ #define LEAPUSERNAME_LEN_MAX 120 /* EAP-LEAP username */ #define MSCHAPV2USERNAME_LEN_MAX 120 /* EAP-MSCHAPv2 username */ #define DEVICE_INFO_MAX 64 /* WPS device fields */ ``` -------------------------------- ### IEEE 802.11 Management Subtypes Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/api-reference/ieee80211-enums.md Lists the subtype constants for IEEE 802.11 Management frames, including Association, Probe, Beacon, Authentication, and Action frames. ```c #define IEEE80211_STYPE_ASSOC_REQ 0x0 /* Association Request */ #define IEEE80211_STYPE_ASSOC_RESP 0x1 /* Association Response */ #define IEEE80211_STYPE_REASSOC_REQ 0x2 /* Reassociation Request */ #define IEEE80211_STYPE_REASSOC_RESP 0x3 /* Reassociation Response */ #define IEEE80211_STYPE_PROBE_REQ 0x4 /* Probe Request */ #define IEEE80211_STYPE_PROBE_RESP 0x5 /* Probe Response */ #define IEEE80211_STYPE_BEACON 0x8 /* Beacon */ #define IEEE80211_STYPE_ATIM 0x9 /* Announcement Traffic Indication Message */ #define IEEE80211_STYPE_DISASSOC 0xa /* Disassociation */ #define IEEE80211_STYPE_AUTH 0xb /* Authentication */ #define IEEE80211_STYPE_DEAUTH 0xc /* Deauthentication */ #define IEEE80211_STYPE_ACTION 0xd /* Action */ #define IEEE80211_STYPE_NO_ACTION 0xe /* No Action */ #define IEEE80211_STYPE_MGTRESERVED 0xf /* Reserved */ ``` -------------------------------- ### PMKID List Structure (C) Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/api-reference/core-types.md Defines the structure for storing extracted PMKID hashes, used in WPA3 and some WPA2 implementations. Includes fields for timestamp, status, MAC addresses, nonces, PMKID hash, and mobility domain information. ```c struct pmkidlist_s { uint64_t timestamp; /* Extraction timestamp */ uint8_t status; /* PMKID source type */ #define PMKID_AP 0x01 /* From AP beacon/probe response */ #define PMKID_APPSK256 0x02 /* From AP with PSK-SHA256 */ #define PMKID_CLIENT 0x04 /* From client association request */ #define PMKID_AP_FTPSK 0x10 /* From AP with FT-PSK */ #define PMKID_CLIENT_FTPSK 0x20 /* From client with FT-PSK */ uint8_t ap[6]; /* Access Point MAC address */ uint8_t client[6]; /* Client MAC address */ uint8_t anonce[32]; /* ANonce */ uint8_t pmkid[16]; /* PMKID hash (16 bytes) */ uint8_t mdidlen; uint16_t mdid; uint8_t r0khidlen; uint8_t r0khid[FTR0KHID_LEN_MAX]; /* R0KH ID */ uint8_t r1khidlen; uint8_t r1khid[FTR1KHID_LEN]; /* R1KH ID */ } ``` -------------------------------- ### hcxtools Cipher Suite Flags Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/api-reference/ieee80211-enums.md Enumerates the supported cipher suites, including deprecated and recommended options like WEP, TKIP, CCMP, and GCMP. ```c #define TCS_WEP40 0x01 /* WEP-40 (deprecated) */ #define TCS_TKIP 0x02 /* TKIP (deprecated) */ #define TCS_WRAP 0x04 /* WRAP (not commonly used) */ #define TCS_CCMP 0x08 /* CCMP (AES) - recommended */ #define TCS_GCMP 0x10 /* GCMP */ #define TCS_WEP104 0x20 /* WEP-104 (deprecated) */ #define TCS_BIP 0x40 /* BIP-CCMP-256 (management frame protection) */ #define TCS_NOT_ALLOWED 0x80 /* Not allowed / invalid */ ``` -------------------------------- ### QoS Frame Structure Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/api-reference/core-types.md Defines the extended structure of a QoS frame, which includes all fields of a standard MAC frame plus the QoS control field. ```c struct qos_frame { uint16_t frame_control; uint16_t duration; uint8_t addr1[6]; uint8_t addr2[6]; uint8_t addr3[6]; uint16_t sequence_control; uint8_t addr4[6]; uint16_t qos_control; } ``` -------------------------------- ### Important C Constants for Network and Security Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/README.md Defines maximum lengths and sizes for network-related parameters like ESSID, PMK, NONCE, PMKID, and MIC. Also includes limits for PSK length. Essential for network security implementations. ```c #define ESSID_LEN_MAX 32 /* Network name max length */ #define PMK_LEN 32 /* Pairwise Master Key size */ #define NONCE_LEN 32 /* ANonce/SNonce size */ #define PMKID_LEN 16 /* PMKID size */ #define MIC_LEN 16 /* Message Integrity Code size */ #define EAPOL_AUTHLEN_MAX 512 /* EAPOL frame max size */ #define CHANNEL_MAX 255 /* Maximum channel number */ #define PSK_LEN_MIN 8 /* Minimum PSK length */ #define PSK_LEN_MAX 63 /* Maximum PSK length */ ``` -------------------------------- ### MAC Size Constants Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/api-reference/ieee80211-enums.md Defines constants for the sizes of various IEEE 802.11 MAC frames, including ACK, RTS, normal and QoS headers (both standard and long), and the Frame Check Sequence (FCS) length. ```c #define MAC_SIZE_ACK 10 /* ACK frame size */ #define MAC_SIZE_RTS 16 /* RTS frame size */ #define MAC_SIZE_NORM 24 /* Normal 802.11 MAC header */ #define MAC_SIZE_QOS 26 /* QoS 802.11 MAC header */ #define MAC_SIZE_LONG 30 /* Long 802.11 MAC header */ #define MAC_SIZE_QOS_LONG 32 /* QoS long 802.11 MAC header */ #define FCS_LEN 4 /* Frame Check Sequence length */ ``` -------------------------------- ### IEEE 802.11 Data Subtypes Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/api-reference/ieee80211-enums.md Enumerates the subtype constants for IEEE 802.11 Data frames, including standard data, QoS data, and Null Function frames, with and without control acknowledgments. ```c #define IEEE80211_STYPE_DATA 0x0 /* Data */ #define IEEE80211_STYPE_DATA_CFACK 0x1 /* Data + CF Ack */ #define IEEE80211_STYPE_DATA_CFPOLL 0x2 /* Data + CF Poll */ #define IEEE80211_STYPE_DATA_CFACKPOLL 0x3 /* Data + CF Ack + CF Poll */ #define IEEE80211_STYPE_NULLFUNC 0x4 /* Null (no data) */ #define IEEE80211_STYPE_CFACK 0x5 /* CF Ack (no data) */ #define IEEE80211_STYPE_CFPOLL 0x6 /* CF Poll (no data) */ #define IEEE80211_STYPE_CFACKPOLL 0x7 /* CF Ack + CF Poll (no data) */ #define IEEE80211_STYPE_QOS_DATA 0x8 /* QoS Data */ #define IEEE80211_STYPE_QOS_DATA_CFACK 0x9 /* QoS Data + CF Ack */ #define IEEE80211_STYPE_QOS_DATA_CFPOLL 0xa /* QoS Data + CF Poll */ #define IEEE80211_STYPE_QOS_DATA_CFACKPOLL 0xb /* QoS Data + CF Ack + CF Poll */ #define IEEE80211_STYPE_QOS_NULLFUNC 0xc /* QoS Null */ #define IEEE80211_STYPE_QOS_CFACK 0xd /* QoS CF Ack */ #define IEEE80211_STYPE_QOS_CFPOLL 0xe /* QoS CF Poll */ #define IEEE80211_STYPE_QOS_CFACKPOLL 0xf /* QoS CF Ack + CF Poll */ ``` -------------------------------- ### Hash List Structure Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/api-reference/core-types.md Defines the structure for storing hash information, including hash type, hash data, AP and client MAC addresses, ESSID, nonce, EAPOL data, and message pair identifier. Includes definitions for hash types like removed, PMKID, and EAPOL. ```c struct hashlist_s { uint8_t type; #define HS_REMOVED 0xff #define HS_PMKID 1 #define HS_EAPOL 2 uint8_t hash[16]; uint8_t ap[6]; uint8_t client[6]; uint8_t essidlen; uint8_t essid[ESSID_LEN_MAX]; uint8_t nonce[32]; uint16_t eapauthlen; uint8_t eapol[EAPOL_AUTHLEN_MAX]; uint8_t mp; } ``` -------------------------------- ### Handshake List Structure (C) Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/api-reference/core-types.md Defines the structure for aggregating message list entries into complete handshakes. Includes fields for time gaps, overall timestamp, status, message flags, replay counter gaps, nonce error correction, MAC addresses, ANonce, PMKID, and EAPOL data. ```c struct handshakelist_s { uint64_t timestampgap; /* Time gap between messages */ uint64_t timestamp; /* Overall handshake timestamp */ uint8_t status; /* Handshake status/validity */ uint8_t messageap; /* AP-side message flags */ uint8_t messageclient; /* Client-side message flags */ uint64_t rcgap; /* Replay Counter gap */ uint8_t nc; /* Nonce error correction flag */ uint8_t ap[6]; /* Access Point MAC address */ uint8_t client[6]; /* Client MAC address */ uint8_t anonce[32]; /* ANonce from AP */ uint8_t pmkid[16]; /* PMKID value */ uint8_t mdidlen; /* Mobility Domain ID length */ uint16_t mdid; /* Mobility Domain ID */ uint8_t r0khidlen; /* R0KH ID length */ uint8_t r0khid[FTR0KHID_LEN_MAX]; /* R0KH ID */ uint8_t r1khidlen; /* R1KH ID length */ uint8_t r1khid[FTR1KHID_LEN]; /* R1KH ID */ uint16_t eapauthlen; /* EAPOL authentication data length */ uint8_t eapol[256]; /* EAPOL frame data */ } ``` -------------------------------- ### Hashcat 22000 Output Format Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/api-reference/hash-structures.md This is the default output format for Hashcat 22000 mode, used for storing captured handshake data. ```text 22000:PMKID:ESSID_HEX:AP_MAC:CLIENT_MAC:EAPOL_HEX:MSG_PAIR:FLAGS ``` -------------------------------- ### PCAPNG Option Header Structure Source: https://github.com/zerbea/hcxtools/blob/master/_autodocs/api-reference/core-types.md Defines the structure for option headers within PCAPNG blocks, including option code, data length, and the option data itself. ```c struct option_header_s { uint16_t option_code; /* Option type identifier */ uint16_t option_length; /* Length of option data (padded to 32-bit boundary) */ uint8_t data[1]; /* Option data (variable length) */ } ```