How to Exploit Routers on an Unrooted Android Phone « Null Byte :: WonderHowTo

RouterSploit is a powerful exploit framework similar toMetasploit, working to quickly identify and exploit common vulnerabilities in routers. And guess what. It can be run on most Android devices.I initiallycovered RouterSploit on Kali Linux and macOS (OS X), but this tutorial will walk you through setting up RouterSploit to work on an unrooted Android phone. This allows you to pwn any vulnerable router you can connect your smartphone to. Doing so takes seconds and shows the power of running Debian Linux tools on the device you carry everywhere.RouterSploit vs RoutersRouters are our gateway to the world. They route our internet traffic, encrypt our traffic to protect our privacy, and link us to other devices on our local networks and on the World Wide Web.Most people take this wonderful device for granted, assuming once one is plugged in and providing the internet, the job of setting it up is done. Not knowing the router is actually its own Linux computer, most people simply leave the default password on the router's administrator panel or never bother logging in to install any security updates.If this sounds like you, you should probably go change the password on your router before reading the rest of this tutorial.Don't Miss:How the CIA & Hackers Exploit Your Router with RouterSploitBecause routers are neglected, they frequently have commonly known vulnerabilities that can be exploited with the right program. RouterSploit takes advantage of the most common vulnerabilities and default settings, allowing you to quickly assess and exploit a router from any device the supports the Python script.Debian Linux on AndroidIn order to run hacking tools on an Android phone, most tools requireroot access, which is not always easily done or safe. In order to run RouterSploit on the best available phone, an app calledGNURootDebiantakes the work out of setting up a Debian system, which is what Kali is, on an Android phone.We've got RouterSploit running on an unrooted Android!Image by SADMIN/Null ByteKali helpfully ensures that the majority of our dependencies are installed, so we'll need to install a lot more dependencies on our Android version of Debian to make sure we have everything we need. This method doesn't require root or any weird permissions and can be used to run Linux Python tools from an Android phone. While packet injection isn't supported, frameworks like RouterSploit work and are very effective.Using an Attack Framework on AndroidThe Android environment allows for a neat stack of wireless attack technologies to guide your tactics. Within one device, various apps will help you detect, connect to, and defeat any open AP. My "stack" of Android apps to defeat routers is as follows.For detection and identification of wireless networks in an area,Wigle Wifi Wardrivingallows you to see, log, and interact with any and all wireless networks transmitting in your areaFor scanning of networks and identification of likely targets by manufacturer, IP address, and services available,Fing Network Scannerwill scan the entirety of any network you are connected to and return detailed information about each connected device.Once a device has been targeted on the network to attack, RouterSploit's Autopwn scanner will throw every available exploit at the target and see which stick, often taking less than a minute on a Samsung Galaxy phone.Target variables are set.Image by SADMIN/Null ByteUnrooted Android Burner Phones as Attack PlatformsUsing powerful Linux frameworks on Android gives us another way to use something common to hack in plain sight. Even if someone knows what you're doing on your phone isn't normal, it's still a lot less suspicious than pulling out custom hardware to preform a task a generic burner Android phone can accomplish.For More on Attack Frameworks, Check Out:Null Byte's Series on Metasploit BasicsIt is often said that the best weapon to use during a moment of opportunity is the one you know you'll have with you, and hacking tools are no exception. With the ability to quickly set up an Android phone for offensive use, GNURoot Debian allows anyone to begin auditing router security without any specialized tools. Soon, you will learn to seize control of these precious, internet-giving devices while appearing like you're still looking forPokémon.What You Need to Get StartedThe beauty of this setup is that you just need an Android phone. I'm using a Samsung Galaxy S8 because carrying around a giant piece of curved screen glass reminds me of how fragile life is, but you can use any Android phone that supports GNURoot Debian.Step 1: Installing GNURoot DebianTo begin, we'll install GNURoot Debian, which will give us the ability to run Debian Linux on an unrooted Android device. In the Google Play Store, search for GNURoot Debian orfollow this link.You can tell he's a good time because of the goatee.Image by SADMIN/Null ByteDownload the app (at 60 MB, it may take a bit on a slow connection). Once the app is installed, it's time for your first run. On starting for the first time, you'll see the Debian environment being set up as a bunch of text scrolling very quickly across the screen.More dependencies loading.Image by SADMIN/Null ByteLet the setup complete for a few minutes, and you should see the following screen when installation is complete.Debian Linux is running on Android.Image by SADMIN/Null ByteOnce Debian Linux is installed, it's time to start installing dependencies.Step 2: Installing DependenciesDebian Linux on Android doesn't come with any special dependencies preinstalled like Kali, so we'll have to start from scratch on a lot of things. In particular, we'll need Python to run our desired module. First, let's update our version of Debian with the following.apt-get updateNext, let's install some of the tools we'll need to fetch and install RouterSploit:apt-get install sudosudo apt-get install git-coreThis will installgitandsudo, so you can fetch RouterSploit from GitHub and execute commands as sudo.sudo apt-get install python-dev python-pip libncurses5-dev gitStep 3: Installing RouterSploitOnce the dependencies are all installed, it's time to grab RouterSploit by typing the following.git clonehttps://github.com/reverse-shell/routersploitLook at all these beautiful dependencies.Image by SADMIN/Null ByteStep 4: Running RouterSploit for the First TimeUpon installing RouterSploit, you'll want to run it for the first time to check that it's working. Navigate to the home folder by typing the following.cd routersploitThen run the Python script with this:sudo python ./rsf.pyAfter a few seconds to load, you should see the RouterSploit splash screen. From here, the interface is similar toMetasploit, with the primary commands being:use(module)set(variable)show options(shows module options)check(checks to see if target is vulnerable to exploit)run(runs the exploit module against the target)The module we'll be running is Autopwn, which we can select by typing the following.use scanners/autopwnThis will open the Autopwn scanner to begin scanning a target.Step 5: Setting & Prosecuting a TargetWith theWigle Wifi Wardrivingapp installed on your Android phone, it's easy to see nearby wireless networks. As soon as you gain access to a Wi-Fi network, either an open network or by gaining the password, you'll be able to scan the network to find all devices on it withFingor another network scanner.Once you locate the IP address of your target, it's time to put it into Autopwn. To see the available options on any module, type the following.show optionsIn this case, we'll be setting the target IP to that of the router we want to attack. To do so, enter this into the terminal:set target IP_address_hereHere, we set the target for the Autopwn scan with the IP address of the target.ReplaceIP_address_herewith the IP address of the router, and hit enter. This should set the target to the router. To double check, typeshow optionsagain. When you're satisfied with the result, typerunand hit enter to begin the module. The module will run, presenting a list of found vulnerabilities at the end of the scan.Here, we see a scanning run starting against a target.Step 6: Exploiting Found VulnerabilitiesWhen Autopwn finds a vulnerability, exploiting it couldn't be easier. After the scan is complete, typeuseand then copy and paste the path provided by Autopwn to the exploit. For example, running theexploits/cameras/dlink/dcs_9301_9321_auth_bypasswould be done by typing:use exploits/cameras/dlink/dcs_9301_9321_auth_bypassAs before, we can set the target with:set target IP_address_hereOnce the target is set to our desired IP address, you can runcheckto verify the device is vulnerable. When you're ready to exploit, typerunand the exploit module will run.This device is vulnerable!Image by SADMIN/Null ByteWarningEven if the router is left completely undefended and is easy to pwn, that doesn't make it legal. Make sure you have permission to audit the router you're pwning, as the Autopwn scanner makes a lot of noise and may be detected by active security measures.If you have any questions, ask them here or @sadmin2001 onTwitterorInstagram.Follow Null Byte onTwitterandGoogle+Follow WonderHowTo onFacebook,Twitter,Pinterest, andGoogle+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 LicenseCover photo and screenshots by SADMIN/Null ByteRelatedHow To:Unroot Your Galaxy S5 or Other Android DeviceHow To:Seize Control of a Router with RouterSploitHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Map Networks & Connect to Discovered Devices Using Your PhoneHow To:Get Android Pay Working on a Rooted DeviceHow To:Use Your Android as a Hacking Platform:Part 1 Getting Your Android Ready.News:The New HTC One M8 Has Been RootedNews:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi ChipsHow To:Unroot an HTC Magic or T-Mobile MyTouch 3G Google Android smartphoneHow To:Unroot an HTC Hero Google Android smartphoneHow To:Hack Android Using Kali (Remotely)How To:Trick Verizon into Thinking You Never Modded Your Samsung Galaxy S IIIHow To:Unroot a Motorola Milestone Google Android smartphoneHow To:USB Tether Your Android Device to Your Mac—Without RootingHow To:Hack Android Using Kali (UPDATED and FAQ)Tell Your Friends:How to Protect Yourself from Android's Biggest Security Flaw in YearsHow To:Unroot an HTC Legend Google Android smartphoneHow To:Unroot an HTC Desire Google Android smartphoneHow To:Unroot a Samsung Behold 2 Google Android smartphoneHow To:Protect Yourself from the KRACK Attacks WPA2 Wi-Fi VulnerabilityHow To:Wardrive on an Android Phone to Map Vulnerable NetworksNews:Linux Kernel Exploits Aren't Really an Android ProblemHow To:Check Out WonderHowTo On Your iPhone Or Android PhoneNews:Be an Android expert userNews:Build Your Own Lego Router