Documentation Index
Fetch the complete documentation index at: https://docs.bytejmp.com/llms.txt
Use this file to discover all available pages before exploring further.
Identify Restricted Shell
| Shell | Description |
|---|---|
rbash | Restricted Bash — no cd, no PATH changes, no redirects |
rksh | Restricted Korn Shell |
rzsh | Restricted Zsh |
lshell | Limited Shell (Python-based) |
Typical Restrictions
- Cannot
cd - Cannot change
PATH,SHELL,ENV - Cannot use
/in commands - Cannot redirect output (
>,>>) - Cannot use
exec
Quick Escapes
SSH
Bypass rbash on login:Invoke Unrestricted Shell
/ blocked, use available commands:
Language Interpreters
Python
Perl
Ruby
Lua
PHP
Node.js
Editor Escapes
vi / vim
ed
nano
Pager Escapes
less
more
man
Program-specific Escapes
awk
find
nmap (old)
ftp
gdb
zip
tar
expect
tee
Write to files even when redirect blocked:PATH Manipulation
If PATH is restricted but you can set variables:export blocked:
Copy Trick
Ifcp is available:
Environment Variables
BASH_ENV
If BASH_ENV is not cleared:ENV (for sh)
lshell Escapes
lshell (Python-based limited shell) has known bypasses:Chroot Escape
If inside chroot jail with root:Quick Reference
| Method | When |
|---|---|
ssh -t "/bin/bash" | SSH access available |
python3 -c 'import pty...' | Python available |
vi → :!/bin/bash | vi/vim available |
less → !/bin/bash | Pager available |
awk 'BEGIN {system(...)}' | awk available |
BASH_CMDS[a]=/bin/bash; a | Can set variables |
cp /bin/bash /tmp; /tmp/bash | cp available |