Bash Jails
Bash Jails
Enumeration
First enumerate the best you can:
echo $SHELL
echo $PATH
env
export
pwdModify PATH
Check if you can modify the PATH env variable
echo $PATH
PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
echo /home/* Using vim
:set shell=/bin/sh
:shellCreate script
Check if you can create an executable file with /bin/bash as content
Get bash from SSH
If you are accessing via ssh you can use this trick to execute a bash shell:
Declare
Wget
You can overwrite for example sudoers file
Last updated