Reviving GLPI Agent Abuse with ESC17
The GLPI agent's deployment feature trusts the server and runs tasks with high privileges, and ESC17 allows an attacker to obtain a certificate for server authentication with a chosen subject, enabling impersonation of the legitimate GLPI server. An attacker in a man-in-the-middle position can then deliver malicious deployment tasks, leading to remote code execution on managed hosts.
fenrisk.com
Published on fenrisk.com
This article explores how ESC17 certificate abuse revives an old GLPI agent tactic, enabling attackers to achieve RCE without needing access to the GLPI server.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker could achieve remote code execution with SYSTEM or root privileges on managed hosts, but only if they can obtain a MitM position and the agent is configured to trust the rogue server (e.g., via ESC17 certificate).
What the attacker needed
ESC17-vulnerable ADCS template; MitM position (e.g., IPv6, ARP, DNS); GLPI agent configured to poll deploy
The fix
Restrict who can request certificates from Server Authentication templates and/or remove the Enrollee Supplies Subject setting, and enforce HTTPS with strict certificate validation on agents.
How it was found
- Request a certificate from an ESC17-vulnerable ADCS template, specifying the FQDN of the legitimate GLPI server and a server-authentication EKU.
- Obtain a man-in-the-middle position (e.g., via IPv6 spoofing, ARP spoofing, or DNS manipulation).
- Run a rogue GLPI server (GLPwnIou) that responds to agent deployment requests with malicious tasks.
- Wait for the agent to connect and execute the tasks with high privileges.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
The GLPI agent is software that periodically checks a central server for instructions and runs them with high privileges. Normally, secure HTTPS connections prevent impostors, but a flaw in how certificates are issued (ESC17) lets an attacker get a valid certificate for the server's name. The attacker can then pretend to be the server and send harmful commands that the agent executes.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.