WPA Enterprise
Capture ESSID & BSSID:
# start monitor mode
airmon-ng start wlan0
# capture wireless requests
airodump-ng wlan0monOpen up wireshark and apply the following filter:
tls.handshake.type == 11,3 or tls.handshake.certificateFrom there, in the Packet Details pane, we now open Extensible Authentication Protocol > Transport Layer Security. We now have to open the TLSv1 Record Layer: Handshake Protocol: Certificate (or similar, as the TLS version will vary). Once there, we will have to expand Handshake Protocol: Certificate item, then Certificates (plural). Inside Certificates, we can see one or more entries named Certificate. Each of them will be preceded by the length. For each certificate, we right click and select Export Packet Bytes to save the data into a file with a .der extension.
These certificates, which are in binary form, can either be opened in the file manager, or we can display information about them using OpenSSL using openssl x509 -inform der -in CERTIFICATE_FILENAME -text where CERTIFICATE_FILENAME is the path to the certificate.
While this step isn't necessary, we can convert it to PEM format using openssl x509 -inform der -in CERTIFICATE_FILENAME -outform pem -out OUTPUT_PEM.crt. PEM format is basically a base64 version of the .der certificate, limited to 64 columns, with a header and a trailer to indicate it is a certificate.
Install freeradius:
apt install freeradius
cd /etc/freeradius/3.0/certs
nano ca.cnf
...
[certificate_authority]
countryName = US
stateOrProvinceName = CA
localityName = San Francisco
organizationName = Playtronics
emailAddress = ca@playtronics.com
commonName = "Playtronics Certificate Authority"
...
nano server.cnf
...
[server]
countryName = US
stateOrProvinceName = CA
localityName = San Francisco
organizationName = Playtronics
emailAddress = admin@playtronics.com
commonName = "Playtronics"
...Next, we'll build the certificates. First, we need to regenerate dh
Install hostapd-mana and then edit the config file:
Entering the following, making changes to the interface, ssid, channel, and certificates:
now create the EAP user file referenced in the configuration file, /etc/hostapd-mana/mana.eap_user.
The file should contain the following.
start hostapd-mana with the configuration file we created earlier, /etc/hostapd-mana/mana.conf.
When a victim attempts to authenticate to our AP, the login attempt is captured.
method=25 tells us that the chosen authentication is PEAP, and the line below that one includes the username cosmo. These credentials are also in /tmp/hostapd.credout.
using asleap to crack the password hash. We can copy/paste the output, starting with asleap, and append the wordlist /usr/share/john/password.lst to the -W parameter
crackapd can automatically run asleap when it sees credentials in the log file. If crackapd successfully recovers credentials, crackapd adds the user to hostapd eap_user file. This allows the user to successfully connect to our rogue AP. Install using:
Connect using cmdline:
connect:
Last updated