Bash
Missing
ls
ordir
commandsIf you cannot run
ls
,dir
,find
norgrep
to list files you can useecho * echo /any/path/*
restricted bash (
rbash
) - GitHub Gistrbash
is a shell with restriction features. Misconfiguredrbash
can be bypassed.# List available commands compgen -c # Run bash without profiles (when rbash is initialized in .bashrc) bash --noprofile # Read files mapfile -t < /etc/passwd printf "$s\n" "${anything[@]}"
shell from provided commands - Website
Some commands/binaries allows to pop a shell. Use GTFOBins to find them. Here are the most common ones:
Command Description less !/bin/sh
vim :!/bin/sh