Remote Code Execution (RCE) via Telerik Dialog Handler Exploit
The Telerik UI DialogHandler endpoint was vulnerable to CVE-2017-9248, which uses weak encryption to protect the dp parameter. An attacker could decrypt the encryption key and then upload a malicious ASP file to achieve remote code execution.
medium.com
Published on medium.com
The ASP.NET web application add-on, Telerik UI, has been around a long time and is a good source of adrenaline when an RCE is confirmed. The cherry on top?
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 execute arbitrary commands on the server, but files over 200 KB did not execute as expected.
What the attacker needed
Telerik UI version 2011.3.1305.40; Network access to the application
The fix
The application should be updated to a non-vulnerable version of Telerik UI.
How it was found
- Observe a request to Telerik.Web.UI.WebResource.axd and note the version.
- Try the RAU endpoint but receive a 403 Forbidden.
- Use dp_cryptomg to check if the DialogHandler endpoint is vulnerable and to obtain a Base64 string.
- Manually verify by sending valid and invalid Base64 strings in the dp parameter and comparing error messages.
- Run dp_crypto with the correct version to recover the MachineKey or DialogParametersEncryptionKey.
- Use the recovered key to access the Document Manager, upload an ASP file, and navigate to it to execute commands.
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 web app used an old version of a toolkit called Telerik UI. That version had a flaw in how it scrambled a parameter, making it possible to recover the secret key. With that key, an attacker could upload a script that runs commands on the server.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.