Jailbreaks
Escape rbash
rbash
It's possible to do it directly connecting with
ssh
:
Or directly changing the
PATH
:
Is also possible by using
make
. First sets a variableCOMMAND
with the value/bin/bash
:
Then, execute
make
in silent mode (-s
) and evaluates the stringx:
containing the shell:
Finish it up by fixing the
PATH
:
sudo journalctl
via less
sudo journalctl
via less
journalctrl
will output to stdout if it can fit onto the current page, but intoless
if it can’t.When invoked with
sudo
is possible to have code execution asroot
just by pressing!
in theless
environment.
Escaping via NFS UID/GID
Manipulation
NFS UID/GID
ManipulationPrerequisites
:
NFS
server must allow arbitraryUID/GID
mappings (no_root_squash
,no_all_squash
, or similar).Access to a writable directory on the
NFS
share.Ability to execute compiled binaries on the
NFS
share.
Exploit
:
Compile the exploit:
Now just copy the binary to the
NFS
share withSUID
andSGID
permissions:
Finally just execute it to become the user with
1000
permissions:
This same technique could be used to escalate privilege to root by using
SUID
andSGID
of 0 if theNFS
share is configured with theno_root_squash
orno_all_squash
options.
Last updated