RCE - Telerik UI for ASP.NET AJAX (CVE-2017-9248)
The Telerik UI for ASP.NET AJAX dialog handler encrypted its dialog configuration with a weak XOR cipher using a key that could be recovered through error-message differences. An unauthenticated attacker could then craft a configuration allowing upload of any file extension, leading to webshell upload and remote code execution.
Two years ago, Progress released a security advisory about a cryptographic weakness issue in Telerik UI for ASP.NET AJAX components that can result in an arbitrary file upload, allowing unauthenticated attackers to compromise vulnerable websites via uploading a webshell. CMSes that use the component, such as…
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
Root cause
Likely the dialog configuration was protected only by a reversible XOR cipher with a static default key, and error messages revealed whether decrypted bytes were valid Base64, enabling key recovery.
Impact
An unauthenticated attacker could upload a webshell and compromise vulnerable sites, including CMSes such as DotNetNuke and Sitefinity that use the component.
What the attacker needed
Target runs vulnerable Telerik UI component; no authentication needed; network access to the dialog handler
How it was found
- Send a crafted dp parameter and observe which error message is returned.
- Use the difference between the 'Index was outside the bounds of the array' error and the 'not a valid Base-64 string' error to learn whether decrypted bytes are valid Base64.
- Send 256 one-byte inputs to recover the first key byte, then extend the input to recover each subsequent byte.
- Once the full key is known, craft a dialog configuration that permits any file extension.
- Upload a webshell through the File Manager to achieve code execution.
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.
A file manager in a web component let users upload images, and it decided which file types were allowed based on settings sent in an encrypted parameter. The encryption was a simple XOR with a fixed key, and by watching which inputs caused different error messages, the author could recover that key character by character. With the key, an attacker could change the settings to allow uploading a script file, which the server would then run.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.