Restricted Shell Bypassing

SSH

Example :

ssh [email protected] -t "bash --noprofile"

Source : https://0xffsec.com/handbook/shells/restricted-shells/

Check the Environment. ls usr/bin will show you the commands available to you.

Source: https://www.sevenlayers.com/index.php/198-vulnhub-dc-2-walkthrough

If you get a bash shell but still cannot run some commands you may need to fix the path.

export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Source: https://blog.mzfr.me/vulnhub-writeups/2019-07-12-DC2

Last updated

Was this helpful?