Termux Metasploit Full Guide (No Root Required)
| Metasploit |
Metasploit is one of the most powerful penetration testing frameworks, and running it on an Android device using Termux is now possible—without root access! In this guide, we'll walk you through the complete installation and usage of Metasploit in Termux.
📌 Prerequisites
Before starting, ensure you have:
A working Android device (Android 7+ recommended)
Termux installed (Download from F-Droid)
Stable internet connection
At least 2GB of free storage
🔧 Step 1: Update & Upgrade Termux
Open Termux and run the following commands to update packages:
pkg update -y && pkg upgrade -y
📥 Step 2: Install Required Dependencies
Install essential tools for Metasploit:
pkg install -y git wget curl ruby ncurses-utils
🐍 Step 3: Install & Configure Ruby
Metasploit requires Ruby. Install it with:
pkg install -y ruby
Then, install the bundler gem:
gem install bundler🚀 Step 4: Install Metasploit in Termux
Now, download and install Metasploit:
git clone https://github.com/rapid7/metasploit-framework.git --depth=1 cd metasploit-framework
Install necessary gems:
bundle install⚙ Step 5: Set Up Metasploit
Initialize the Metasploit database:
./msfdb init
(If you get an error, run
pkg install postgresqland try again.)Start the Metasploit console:
./msfconsole
(First launch may take a few minutes.)
🔍 Step 6: Basic Metasploit Commands
Once inside msfconsole, try these commands:
help– Show all available commands.search [exploit]– Search for exploits (e.g.,search android).use [exploit_path]– Load an exploit module.show options– Display exploit settings.set RHOSTS [target_ip]– Set the target IP.exploit– Launch the exploit.
⚠ Important Notes
No Root Needed: This method works without root, but some exploits may require higher privileges.
Legal Use: Only use Metasploit on systems you own or have permission to test.
Avoid Detection: Some antivirus apps may flag Metasploit files.
🔗 Alternative: Using Metasploit with Ngrok (For External Access)
If you want to test exploits over the internet, use Ngrok:
Install Ngrok:
pkg install wget wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-arm.zip unzip ngrok-stable-linux-arm.zip
Get an auth token from ngrok.com and run:
./ngrok authtoken YOUR_AUTH_TOKEN ./ngrok tcp 4444Use the Ngrok IP in Metasploit payloads.
🔴 Troubleshooting
"Bundle install" fails? Try:
gem install nokogiri -- --use-system-librariesPostgreSQL errors? Run:
pkg install postgresql ./msfdb init
🎯 Conclusion
You now have Metasploit running on Termux without root! This setup is great for learning penetration testing and ethical hacking on the go. Always use this knowledge responsibly and legally.
🔹 Like this guide? Share it with others!
🔹 Follow for more Termux & hacking tutorials!
📢 Disclaimer: This guide is for educational purposes only. Unauthorized hacking is illegal. The author is not responsible for any misuse.
#Termux #Metasploit #EthicalHacking #NoRoot #PenetrationTesting
No comments:
Post a Comment