
SSH RCE PoC CVE-2024-6387
CVE-2024-6387 exploit targets a signal handler race condition in the OpenSSH server (sshd) on glibc-based Linux systems. Due to calling an async-signal-unsafe function in the SIGALRM handler, this vulnerability allows remote code execution as root.
This vulnerability targets the SIGALRM handler race condition in OpenSSH's sshd.
Affected versions: OpenSSH 8.5p1 through 9.8p1.
Vulnerability: Due to the vulnerable SIGALRM handler calling an async-signal-unsafe function, remote code execution as root is possible.
protocol="ssh"
Requires compiling the code into an executable. Assuming the file is named exploit.c, use the following command to compile
gcc -o exploit exploit.c
./exploit <ip> <port>
Example:
./exploit 192.168.1.100 22