An idea from Sandman: Include "Evil Twin" attack in Wifite. This page tracks the requirements for such a feature. Evil Twin ========= [Fluxion](https://github.com/FluxionNetwork/fluxion) is a popular example of this attack. The attack requires multiple wireless cards: 1. Hosts the twin. 2. Deauthenticates clients. As clients connect to the Evil Twin, they are redirected to a fake router login page. Clients enter the password to the target AP. The Evil Twin then: 1. Captures the Wifi password, 2. Verifies Wifi password against the target AP, 3. If valid, all clients are deauthed from Evil Twin so they re-join the target AP. 4. Otherwise, tell the user the password is invalid and to "try again". GOTO step #1. Below are all of the requirements/components that Wifite would need for this feature. DHCP ==== We need to auto-assign IP addresses to clients as they connect (via DHCP?). DNS Redirects ============= All DNS requests need to redirect to the webserver: 1. So we clients are encouraged to login. 2. So we can intercept health-checks by Apple/Google Rogue AP, Server IP Address, etc ================================ Probably a few ways to do this in Linux; should use the most reliable & supported method. Mainly we need to: 1. Spin up the Webserver on some port (8000) 2. Start the Rogue AP 3. Assign localhost on port 8000 to some subnet IP (192.168.1.254) 4. Start DNS-redirecting all hostnames to 192.168.1.254. 5. Start DHCP to auto-assign IPs to incoming clients. 6. Start deauthing clients of the real AP. I think steps 3-5 can be applied to a specific wireless card (interface). * TODO: More details on how to start the fake AP, assign IPs, DHCP, DNS, etc. * Fluxion using `hostapd`: [code](https://github.com/FluxionNetwork/fluxion/blob/16965ec192eb87ae40c211d18bf11bb37951b155/lib/ap/hostapd.sh#L59-L64) * Kali "Evil Wireless AP" (uses `hostapd`): [article](https://www.offensive-security.com/kali-linux/kali-linux-evil-wireless-access-point/) * Fluxion using `airbase-ng`: [code](https://github.com/FluxionNetwork/fluxion/blob/16965ec192eb87ae40c211d18bf11bb37951b155/lib/ap/airbase-ng.sh#L76-L77) * TODO: Should the Evil Twin spoof the real AP's hardware MAC address? * Yes, looks like that's what Fluxion does ([code](https://github.com/FluxionNetwork/fluxion/blob/16965ec192eb87ae40c211d18bf11bb37951b155/lib/ap/hostapd.sh#L66-L74)). DEAUTHING ========= Easy to do using [MDK](https://tools.kali.org/wireless-attacks/mdk3) or `aireplay-ng`. I think MDK is a better tool for this job, but Wifite already requires the `aircrack` suite, so we should support both. TODO: Require MDK if it is miles-ahead of `aireplay-ng` TODO: Figure out MDK commands for persistent deauths; if we can provide a list of client MAC addresses & BSSIDs. Website ======= Router Login Pages ------------------ These are different for every vendor. Fluxion has a repo with fake login pages for a lot of popular router vendors ([FluxionNetwork/sites](https://github.com/FluxionNetwork/sites)). That repo includes sites in various languages. We need just the base router page HTML (Title/logo) and CSS (colors/font) for popular vendors. We also need a "generic" login page in case we don't have the page for a vendor. 1. Web server to host HTML, images, fonts, and CSS that the vendor uses. 3. Javascript to send the password to the webserver Language Support ---------------- Note: Users should choose the language to host; they know better than any script detection. Each router page will have a warning message telling the client they need to enter the Wifi password: * "Password is required after a router firmware update" The Login page content (HTML/images/css) could be reduced to just the logo and warning message. No navbars/sidebars/links to anything else. Then only the warning message needs to be templatized by-language (we only need one sentence per language). That would avoid the need for separate "sites" for each Vendor *and* language. But we probably need other labels to be translated as well: * Title of page ("Router Login Page") * "Password:" * "Re-enter Password:" * "Reconnect" or "Login" ...So 5 sentences per language. Not bad. The web server could send a Javascript file containing the language variable values: ```javascript document.title = 'Router Login'; document.querySelector('#warn').textContent('You need to login after router firmware upgrade.'); document.querySelector('#pass').textContent('Password:'); // ... ``` One HTML File ------------- We can compact everything into a single HTML file: 1. Inline CSS 2. Inline images (base64 image/jpg) 3. Some placeholders for the warning message, password label, login button. This would avoid the "lots of folders" problem; one folder for all .html files. E.g. `ASUS.html` can be chosen when the target MAC vendor contains `ASUS`. AJAX Password Submission ------------------------ The website needs to send the password to the webserver, likely through some endpoint (e.g. `./login.cgi?password1=...&password2=...`). Easy to do in Javascript (via a simple `