Evil Twin
Evil Twin
Evil Twin
STARTERS GUIDE
Prerequisites
1. Kali Linux
2. Prior experience with wireless hacking
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
You will also need to install a tool (bridge utils)
which doesn't come pre-installed in Kali. No big
deal-
Objectives
The whole process can be broken down into the following steps-
1. Finding out about the access point (AP) you want to imitate, and then actually imitating it
(i.e. creating another access point with the same SSID and everything). We'll use airmon-
ng for finding necessary info about the network, and airbase-ng to create it's twin.
2. Forcing the client to disconnect from the real AP and connecting to yours. We'll use
aireplay-ng to deauthenticate the client, and strong signal strength to make it connect to
our network.
3. Making sure the client doesn't notice that he connected to a fake AP. That basically means
that we have to provide internet access to our client after he has connected to the fake
wireless network. For that we will need to have internet access ourselves, which can be
routed to out client.
4. Have fun - monitor traffic from the client, maybe hack into his computer using metasploit.
PS: The first 3 are primary objectives, the last one is optional and not a part of evil twin attack
as such. It is rather a man in the middle attack. Picture credits : firewalls.com
WAN Optimizer
Boost Speed & Save costs. WAN Compression on the fly.
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Information Gathering - airmon-ng
To see available wireless interfaces-
iwconfig
After about 30-40 seconds, press ctrl+c and leave the terminal as is. Open a new terminal.
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Creating the twin
Now we will use airbase-ng to create the twin network of one of the networks that showed up in
the airodump-ng list. Remember, you need to have a client connected to the network (this
client will be forced to disconnect from that network and connect to ours), so choose the
network accordingly. Now after you have selected the network, take a note of it's ESSID and
BSSID. Replace them in given code-
airbase-ng -a <BSSID here> --essid <ESSID here> -c <channel here> <interface name>
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Note : We will need to provide internet access to our client at a later stage. Make sure you have
a method of connecting to the net other than wireless internet, because your card will be busy
acting like an AP, and won't be able to provide you with internet connectivity. So, either you
need another card, or broadband/ADSL/3G/4G/2G internet.
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Not the real one, but why the fake one
Even after being disconnected from the real AP, the client may choose to keep trying to
connect to the same AP a few more times, instead of trying to connect to ours. We need to
make our AP stand out, and for that, we need more signal strength. There are 2 ways to do
that-
Here 27 is the transmission power in dBm. Some cards can't transmit at high power, and some
can transmit at extremely high power. Alfa cards usually support upto 30dBm, but many
countries don't allow the card to transmit at such powers. Try changing 27 to 30 and you'll see
what I mean. In Bolivia, however, you can transmit at 30dBm, and by changing the regulatory
domain, we can overcome the power limitation.
iw reg set BO
It is strongly advised to not break laws as the transmission limits are there for a reason, and
very high power can be harmful to health (I have no experimental evidence). Nevertheless, the
client should connect to you if your signal strength is stronger than that you the real twin.
Note : If you are unable to get your client to connect to you, there is another option. You
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Note : If you are unable to get your client to connect to you, there is another option. You
can leave him with no options. If you keep transmitting the deauth packets continuously
(i.e. don't press ctrl+c after the client has disconnected), he will have no choice but to
connect to you. However, this is quite an unstable situation, and the client will go back to
the real twin as soon as it gets the chance.
Creating evil
We will use Bridge control utility provided by Kali, brctl. Execute the following code-
brctl addbr evil
This will create the bridge. Now we have to specify which two interfaces have to be bridged-
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
brctl addif evil x0
Also bring up the evil interface (the interfaces aren't always up by default so we have to do this
many times)
ifconfig evil up
Now to auto configure all the complicated DHCP settings, we'll use dhclient
dhclient3 evil &
Finally, all the configurations have been completed. You can execute ifconfig and see the
results, which will show you all the interfaces you have created.
Officially, the evil twin attack is complete. The client is now connected to your fake network, and
can use the internet pretty easily. He will not have any way to find out what went wrong.
However, the last objective remains.
Have fun
Now that the client is using the internet via our evil interface, we can do some evil stuff. This
actually comes under a Man In The Middle attack (MITM), and I'll write a detailed tutorial for it
later. However, for the time being, I will give you some idea what you can do.
Sniffing using Wireshark
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Sniffing using Wireshark
Now all the packets that go from the user to the
internet pass through out evil interface, and these
packets can be monitored via wireshark. I won't
teach you how to use it here, since it is a GUI tool.
You can take a look at their website to get an idea
on how to use wireshark. Pic credits: The picture
on the right has been directly taken from their
website.
http://www.wireshark.org/docs/wsug_html_chunked/ChapterIntroduction.html
Special Thanks
Matthew Bernard for his useful comment with some tips and a number of corrections
http://www.kalitutorials.net/2014/07/evil-twin-tutorial.html?
showComment=1406591245609#c5539483407421385761
The screenshots have also been taken by him and provided to me for usage (I would love to see
more helpful visitors like him).
39 comments:
Hi,
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
thanks for this great Tutorial :)
Although it's easy to understand, I have some problems with it:
When I want to create the Fake-Network using
"airbase-ng -A -ESSID -c "
I get the message, that -ESSID is an invalid argument. When I use "--essid" instead, I get
"ioctl(SIOCGIFINDEX) failed: no such device".
I found out, that I'm only allowed to use a monitor of airmon-ng, but I thought, that's not what we want
to imitate another one's AP, especially access point's MAC.
Next Problem: Even when I use the mon created with airmon-ng (e.g. after Spoofing my own MAC with
ifconfig) the program begins to send beacons to a apparantly random Client and won't stop that until I
tipe Ctrl+C, so I'm not able to continue with the next step.
Reply
Replies
I have the same problem as the first guy who commented but when I
try airbase-ng -a -essid mon0 i get this:
But if I try to put the bssid after the -a then i get this:
I really appreciate the time that went into this. As a beginner, this has been hugely helpful. Thanks!
Reply
Replies
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
SHASHWAT CHAUDHARY July 21, 2014 at 2:14 AM
Reply
Replies
We can, but it's kinda tricky. I will write on it after some time.
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
RAVI RAM July 27, 2014 at 12:51 PM
hey sashwat finally you are able to run adsense ads on your blog...congrats.
Reply
Reply
Reply
I will into those captcha related sources that you've listed. Also, I've sent you a mail.
Reply
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
CHROMIUMPT February 18, 2015 at 9:40 AM
Reply
Replies
SHASHWAT CHAUDHARY
February 18, 2015 at 8:46 PM
Try this
airbase-ng --essid Helder mon0 --ignore-negative-one
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
CHROMIUMPT February 19, 2015 at 10:17 AM
ty for the fast reply, unfortunately that didn't work. i got this error:
root@user:~# airbase-ng --essid Helder mon0 --ignore-negative-one
airbase-ng: unrecognized option '--ignore-negative-one'
"airbase-ng --help" for help.
SHASHWAT CHAUDHARY
February 19, 2015 at 9:17 PM
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
CHROMIUMPT February 20, 2015 at 1:46 AM
SHASHWAT CHAUDHARY
February 20, 2015 at 9:49 PM
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
TEST TZTZ April 22, 2015 at 5:15 AM
Dear Shashwat,
I have the same problem as Chromiupt and I have tried to follow your
instructions but there is still problems for me...
Indeed, everything works well when NetworkManager is stopped but I
will need it after in order to give internet access to the client.
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Thanks a lot for your answer,
Robert
Thanks!
Reply
Replies
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
You'll need something else to connect to the internet, like a second
wireless card, because your wlan0 interface is already acting as an AP.
I'm having the same issue, but with wlan1, which is connected to the
Internet. Apparently bridging is not possible with some wireless cards:
http://www.reddit.com/r/linux/comments/o3ub0/brctl_equivalent_for
_wlan0/c3e54tz
wouldn't it be better to give evil internet access before sending the death packet?
Reply
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
After sending the deauth command my tablet gets disconnected from my router and tries to connect to
the evil twin but it never will. I just keeps scanning over and over. If I choose the connection manually it
trys to authenticate but never does it just shows the network as saved or turned off. Any ideas what to
do about this?
Reply
Replies
1: Are you providing internet access to evil interface? (Not sure if this
step is necessary but worked for me.)
2: Is the AP having same bssid and essid? And is it on same channel? If
not then make it identical.
3: Donot send deauth continuously. Press ctrl^c to stop deauthing and
then try to connect to the twin.
Hope it helped! :)
Anonymous
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Anonymous July 27, 2015 at 2:41 AM
I am setting the evil bridge between eth0 and at0 interface. I have successfully established a connection
with a device after deauthing it. But after [dhclient evil &] command i am not able to connect to internet.
PS: ifconfig shows eth0 connected to router with ip 192.168.1.5
ato is at ip 172.168.1.0
Please help.
Reply
Reply
Reply
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
UNKNOWN October 21, 2015 at 1:19 AM
what ip address should we assign here after creating the bridge? Should i type "ifconfig at 0.0.0.0 up" and
"ifconfig eth0 0.0.0.0 up"? once i created the bridge i can no longer get out to the internet
Reply
For all of you having trouble with internet access after running
I found if I changed "dhclient3 evil &" to "dhclient evil &" it worked fine. ***remove quotes
Reply
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
It works great but after doing all this my wlan0 disappeared in my ifconfig.. there is only the evil left
Reply
Reply
Reply
For testing purpose, I use two wifi cards in Desktop computer. Can I use the same AP Wifi(Internet
source-mobile phone) for victim client Internet and Desktop comp alternative Internet access, if
deauthenticate only selected victim client-not myself:) ?
Reply
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
wouldn't it be better to bridge them first? That way the client will have internet access as soon as he
connects??
Reply
i am using kali in vmware and having wifi connection! so can you please tell me how to bridge the
network! it will be very helpful! thanks
Reply
after doing all of that how we can crack the wpa 2 psk
and exploit the machine
Reply
Reply
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Anonymous March 17, 2016 at 8:49 AM
You guys should probably try easycreds if u find the tutorial difficult to follow. It's automated
Reply
Publish Preview
Search
Kali Tutorials
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Kali Tutorials
4,254 likes
SPONSORED
POPULAR POSTS
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Hack WPA/WPA2 WPS - Reaver - Kali Linux
WPA/WPA-2 When it was known that a WEP network could be hacked by any kid with a laptop
and a network connection (using easy peasy tuto...
AUTHOR
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Shashwat Chaudhary
google.com/+ShashwatChaudhary1
Follow
707 followers
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com