Ready to Start Your Career?

By: ^Graff
July 7, 2015
Evil Twin Attack Using Kali Linux

By: ^Graff
July 7, 2015

Section 1
-
Information:An Evil Twin AP is also known as a rogue wireless access point. The idea is to set up your own wireless network that looks exactly like the one you are attacking. Computers won't differentiate between SSID's that share the same name. Instead, they'll only display the one with the stronger connection signal. The goal is to have the victim connect to your spoofed network, perform a Man-In-the-Middle Attack (MITM) and forward their data on to the internet without them ever suspecting a thing. This can be used to steal someone's credentials or spoof DNS queries so the victim will visit a phishing site, and many more!Hardware/Software Required:A compatible wireless adapter - There are many on the internet to buy. I'm using the TL-WN722N. You can buy this from Amazon for about 15.00 dollars.Kali Linux - You can either run from a USB or a VM. If you run from a VM, you may have issues getting the wireless card to work. I'll write more on that later.An alternate way to connect to the internet - The card you're into the Evil Twin will be busy and therefore cannot connect you to the internet. You'll need a way to connect, so as to forward the victim's information on. You may use a separate wireless adapter, 3G/Modem connection or an Ethernet connection to a network.Steps:1. Install software that will also set up our DHCP service.2. Install some software that will spoof the AP for us.3. Edit the .conf files for getting our network going.4. Start the services.5. Run the attacks.Section 2
-
Setting up the Wireless Adapter
PLEASE NOTE:
I recently discovered that you do NOT need to edit the network settings in Virtualbox to get the wireless adapter to work properly. Please go to Section 3 and follow the rest of the tutorial. The section below is for anyone who is having issues with the wireless adapter. It may help somewhat.
Okay, this is one of the hardest and trickiest parts of this tutorial. You may have to be patient and try this a couple of times for this to work, but after you figure this out, it will seriously help you with any future VM wireless adapter problems you may have.This is going to assume you are running Kali from a Virtual Machine on Virtual box. If you're running from a live USB, then don't worry about this part. You can skip to the next section. Just plug in the adapter to a different port on the computer and it should integrate automatically.

Section 3
-
Now in the virtual machine, go to the top and click on 'Devices', select 'USB Devices', and finally click on your wireless adapter. In my case, it's called ATHEROS USB2.0 WLAN.[caption id="attachment_15469" align="alignnone" width="576"]
Section 4
-
DNSMASQOpen up a terminal.Type in the command:apt-get install -y hostapd dnsmasq wireless-tools iw wvdialThis will install all the needed software.Now, we'll configure dnsmasq to serve DHCP and DNS on our wireless interface and start the service.[caption id="attachment_15470" align="alignnone" width="567"]
Section 5
-
Setting Up the Wireless Access Point Now, we're going to set up the Evil Twin. I'm going to deviate slightly from a tutorial I saw recently on this. I made a snippet of their commands, so no copyright infringement here. They use a 3G modem in order to forward the victim's data, but we'll be using the network you are already connected to. This is assuming you're running from a VM and not a live USB. If you run from a USB, you will need an additional wireless card for doing this. Thankfully, using a VM, we only need one wireless adapter. Let's get to it!We are going to set up a network with an SSID of ‘linksys’.I'll post the picture from the provided tutorial, that I snipped, and then tell you of the additions and changes I did for this to work.[caption id="attachment_15471" align="alignnone" width="556"]
Section 6
-
SuccessAt this point, you should be able to search, either with your phone or laptop, and find the Rouge Wireless AP! If so, then congratulations! YOU DID IT!From here, you should be able to start performing all sorts of nasty tricks, MITM attacks, packet sniffing, password sniffing, etc. A good MITM program is Ettercap. It may be worth it to you to check it out.Those things are outside the scope of this tutorial, but I may add them in at a future point.If you weren't successful, go back and read everything carefully, especially check your spelling when typing in commands.If you need to re-edit the .conf files, you can use Gedit (apt-get install gedit) or leafpad (already installed), just navigate to the folder and type: gedit <<filename>> (without the ‘<< >>’). If you're going to edit it, make sure you stop the service before doing so (service dnsmasq stop),(service hostapd stop).Now, if you ever want to start up the Evil Twin again, just start up the services again and it should work properly!Section 7
-
More InformationHere's some more information and guides on doing Evil Twin attacks. Although I had some problem with these guides, they still provide some good information that you could use in order to understand this better.http://www.kalitutorials.net/2014/07/evil-twin-tutorial.htmlhttps://en.wikipedia.org/wiki/Evil_twin_%28wireless_networks%29 Thanks!