How to Hack Wi-Fi: Creating an Evil Twin Wireless Access Point to Eavesdrop on Data « Null Byte :: WonderHowTo

Welcome back, my greenhorn hackers!Now that we're familiar with thetechnologies, terminology, and theaircrack-ng suite, we can finally start hacking Wi-Fi.Our first task will be to creating anevil twin access point. Many new hackers are anxious tocrack Wi-Fi passwordsto gain some free bandwidth (don't worry, we'll get to that), but there are so many other Wi-Fi hacks that are far more powerful and put so much more at risk than a bit of bandwidth.What's an Evil Twin AP?The evil twin AP is an access point that looks and acts just like a legitimate AP and entices the end-user to connect toouraccess point. Ouraircrack-ng suitehas a tool,airbase-ng, that can be used to convertour wireless adapterinto an access point. This is a powerful client-side hack that will enable us to see all of the traffic from the client and conduct a man-in-the middle attack.What We'll Be DoingIn this scenario, we are a private investigator. We've been asked by a client to investigate the possibility that their neighbor is downloading and selling child pornography. They've asked us to investigate and determine whether he actually is, and if so, to collect evidence.Step 1: Start Airmon-NgFirst , we need to check whether our wireless card is operational.bt > iwconfigAs we can see, our wireless card is operational and has been assigned wlan0. Our next step is to put our wireless card into monitor or promiscuous mode. We can do this simply by:bt >airmon-ng start wlan0Airmon-ng has put our wireless into monitor mode and renamed it to mon0. Now our wireless card is capable of seeing all the wireless traffic.Step 2: Start Airdump-NgOur next step is to begin capturing traffic on our wireless card. We do this by typing:bt > airodump-ng mon0We can see all the wireless access points in our range along with all their vital statistics. The neighbor that we suspect of downloading and selling child porn is on an AP with the SSID "Elroy."If we do everything right, we can clone his AP and get him to connect to our evil twin. When he does that, we'll be able to see all of his traffic, as well as potentially inserting our own packets/messages/code into his computer.Step 3: Wait for the Suspect to ConnectNow we just wait for the suspect to connect to his wireless access point. When he does, it will appear in the lower part of the airodump-ng screen.Step 4: Create a New AP with Same SSID & MAC AddressOnce he has connected to his AP, we can use airbase-ng to create a fake, or evil twin, of his AP. We can do this by opening a new terminal and typing:bt > airbase-ng -a 00:09:5B:6F:64:1E --essid "Elroy" -c 11 mon0Where00:09:5B:6F:64:1Eis the BSSID,Elroyis the SSID, and -c 11is the channel of the suspect's AP.Step 5: Deauthentication or Bumping Him OffOur next step is tobump the "neighbor" offhis access point. The 802.11 standard has a special frame called deauthentication that, as you might expect, deauthenticates everyone on the access point. When his computer tries to re-authenticate, he will automatically reconnect to the strongest AP with the ESSID of "Elroy."We can do this by using aireplay-ng with the deauth packet:bt > aireplay-ng --deauth 0 -a 00:09:5B:6F:1ENote that we once again used his BSSID in the aireplay-ng command. If our signal is stronger than his own AP, he will automatically reconnect to our evil twin!Step 6: Turn Up the Power!The crucial link in the evil twin hack is to make certain that our fake AP is closer or stronger than the original or authentic AP. This could be a critical weakness when physical access is unavailable. In airports and other public places, this is no problem, but in our scenario here, we don't have physical access and it's very likely that his AP is closer and stronger than ours. Don't let this deter us!First, we can turn up the power on our access point in attempt to be stronger than his. Even next door, this may work as most access points automatically down-regulate their power to the minimum necessary to maintain a connection to its clients. We can boost our AP to maximum power by typing;iwconfig wlan0 txpower 27This command will boost our power output to the maximum legally allowable in the United States, 27 dBm or 500 milliwatts.In some cases, even boosting power to 500 mWs may prove to be inadequate. If we try to turn up the power to the maximum on our Alfa wireless cards—1,000 mWs or 30 dBm—we get the error message below (some of the newer cards can actually transmit at 2,000 mWs or four times what is legally allowable in the U.S.).iwconfig wlan0 txpower 30Note: This next step is illegal in the U.S., so be careful using it unless you have specific permission or are a member of law enforcement.Every nation has its own set of Wi-Fi regulations. Some allow more power and more channels than the U.S. For instance, Bolivia allows the use of channel 12 and a full 1,000 mWs of power. We can get our Alfa card to use Bolivian regulations by simply typing:iw reg set BONow that we are in Bolivian regulatory domain, we can boost our power to its maximum by typing:iwconfig wlan0 txpower 30Check output power by typing:iwconfigAnd we can now see at the end of the second line that our power is now up to 30 dBm or 1000 milliwatts, enough to overwhelm all the other local access points even from several houses away!The Evil Twin Is Now WorkingNow that we have our neighbor connected to our AP, we can take the next steps toward detecting his activity.We can use software likeEttercapto conduct a man-in-the middle attack. This way, we can intercept, analyze, and even inject traffic to this user. In other words, because he has connected to our AP, we have almost total access to his data both coming and going. If he really is downloading or selling child porn, we can intercept it.We also should be able to intercept email and passwords to other applications and networks. We could even inject ameterpreterorother listenerinto his system for further access and control.Stay Tuned...Make sure to check back on ourWi-Fi Hackingseries, because even more wireless hacks are coming! If you have any questions, please comment below or start a discussion in theNull Byte forumand we'll try to help you out.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRouter,magnifying glass, andwireless access pointphotos via ShutterstockRelatedHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:Create an Evil Access Point with MitmAPHow to Hack Wi-Fi:Stealing Wi-Fi Passwords with an Evil Twin AttackHow to Hack Wi-Fi:Getting Started with Terms & TechnologiesHow To:Spy on Network Relationships with Airgraph-NgHow To:Build a Pumpkin Pi — The Rogue AP & MITM Framework That Fits in Your PocketHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3Hack Like a Pro:How to Get Even with Your Annoying Neighbor by Bumping Them Off Their WiFi Network —UndetectedAndroid Basics:How to Connect to a Wi-Fi NetworkHow to Hack Wi-Fi:Capturing WPA Passwords by Targeting Users with a Fluxion AttackHow To:Turn on Google Pixel's Wi-Fi Assistant to Get Secure Access on Open NetworksHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow to Hack Wi-Fi:Creating an Invisible Rogue Access Point to Siphon Off Data UndetectedHow To:Hack Open Hotel, Airplane & Coffee Shop Wi-Fi with MAC Address SpoofingHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow to Hack Wi-Fi:DoSing a Wireless AP ContinuouslyHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow to Hack Wi-Fi:Breaking a WPS PIN to Get the Password with BullyHow to Hack with Arduino:Building MacOS Payloads for Inserting a Wi-Fi BackdoorHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyNews:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi ChipsHow To:This App Saves Battery Life by Toggling Data Off When You're on Wi-FiHow To:Your iPhone's Using More Data Than It Needs, but This Could Stop ItHow to Hack Wi-Fi:Performing a Denial of Service (DoS) Attack on a Wireless Access PointNews:Traveling Abroad? Here Are 6 Reasons Google Fi Is the Best OptionHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow To:Track Wi-Fi Devices & Connect to Them Using ProbequestNews:Evil Twin(Part 3) - the Full Bash ScriptHow To:Use Kismet to Watch Wi-Fi User Activity Through WallsHow to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow To:Hunt Down Wi-Fi Devices with a Directional AntennaHow To:Get Free Wi-Fi from Hotels & MoreHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android DeviceNews:Secure Your Wireless Network from Pillage and Plunder in 8 Easy StepsNews:PSP2 (Next Generation Portable) or NGP