Harvesting EAP Credentials with hostapd-mana
hostapd-mana is a modified AP daemon that accepts any EAP authentication attempt and logs the credentials. When a WPA Enterprise client connects to it, hostapd-mana completes enough of the EAP exchange to receive the client's MSCHAPv2 challenge and response, then logs them in a format ready for offline cracking. The client needs to not validate the server certificate for this to work — confirmed during vulnerability discovery.
You need two wireless interfaces: one to run the rogue AP and one to deauthenticate clients from the legitimate AP. If you only have one interface, deauthentication is not possible but clients may still connect naturally if the rogue AP signal is stronger.
Install hostapd-mana
Create the hostapd-mana Configuration
Create a configuration file targeting the enterprise SSID. The certificate files are included with the hostapd-mana package:
Key configuration options:
- ssid — must match the target enterprise network name exactly including case.
- channel — set to the same channel as the legitimate AP or one with stronger signal to your position.
- mana_wpe=1 — enables the WPE credential logging module.
- mana_credout — path where captured credentials are written.
- mana_eapsuccess=1 — sends an EAP success to the client after capturing credentials, which prevents the client from detecting the authentication failure immediately.
Start the Rogue AP
Configuration file: /tmp/mana-enterprise.conf Using interface wlan0 with hwaddr 00:c0:ca:xx:xx:xx and ssid "CorpWifi" wlan0: interface state UNINITIALIZED->ENABLED wlan0: AP-ENABLED
Deauthenticate Clients from the Legitimate AP
In a second terminal, use the second adapter to push clients toward your rogue AP:
Continuous deauth (-0 0) keeps clients disconnected from the legitimate AP. Stop it once credentials start appearing — prolonged deauth is noisy and may trigger alerts.
Monitor Captured Credentials
Watch the credential output file as clients connect:
MANA WPE Captured Credentials Username: CORP\jsmith Challenge: 4a6f8d2e1b9c3f7a Response: 8d3f2a1c9e4b7f6d2a8c1e3b5d9f4a2c:3e7f1a9d2c8b4e6f
The username often includes the domain prefix which reveals the Active Directory domain. The challenge and response together form a crackable MSCHAPv2 hash. Proceed to the MSCHAPv2 cracking page once credentials are captured.
Use FreeRADIUS for a More Realistic Enterprise Simulation
hostapd-mana handles most enterprise scenarios but some clients perform stricter certificate chain validation and will only connect to a RADIUS server with a certificate signed by a recognised CA. FreeRADIUS lets you build a complete RADIUS infrastructure with a self-signed CA, which is more convincing to some supplicants than hostapd-mana's bundled certificates.
Install FreeRADIUS:
Test the FreeRADIUS configuration in debug mode to confirm it starts cleanly:
FreeRADIUS Version 3.2.x Ready to process requests
The main configuration files are in /etc/freeradius/3.0/. To configure PEAP/MSCHAPv2, edit eap.conf and set the default EAP type:
default_eap_type = peap
Point hostapd-mana at the FreeRADIUS server as an external RADIUS backend by adding these lines to the hostapd-mana config instead of the built-in EAP server:
Start FreeRADIUS in debug mode first, then start hostapd-mana. Authentication attempts are logged in the FreeRADIUS debug output including the full MSCHAPv2 exchange. Captured hashes are extracted from the FreeRADIUS logs and fed into asleap or hashcat.
References
-
sensepost/hostapd-mana on GitHubgithub.com/sensepost/hostapd-mana (opens in new tab)
Configuration reference, mana_wpe options, and eap_user file format
-
FreeRADIUS — documentationfreeradius.org/documentation (opens in new tab)
eap.conf PEAP configuration and debug mode reference
Was this helpful?
Your feedback helps improve this page.