Webresource.axd Exploit 〈Firefox〉
| Misconfiguration | Exploit Consequence | |----------------|----------------------| | Custom errors off ( <customErrors mode="Off"/> ) | Full stack traces, source code paths, .NET version exposed via error pages. | | Debug=true in web.config | Slower performance, but also exposes detailed error info. | | Static machineKey without rotation | Attacker can decrypt and forge WebResource.axd requests, view state, auth cookies. | | Custom HTTP module before WebResource handler | May bypass security checks or allow injection. | | Running as .NET Framework 2.0/3.5 without MS10-070 patch | Cryptographic attack possible. | | Serving user-controlled files via a custom handler that uses WebResource.axd | Path traversal to any file on disk under the app’s physical path. |
HttpRequest req = HttpContext.Current.Request; if (req.Url.AbsolutePath.Contains("WebResource.axd")) webresource.axd exploit
The WebResource.axd exploit is not a myth from the early 2010s – it is a persistent threat that re-emerges whenever developers ignore basic hardening. While the original cryptographic attack is largely patched, misconfigurations, custom handlers, and legacy code keep the door open for resource disclosure, path traversal, and machineKey abuse. | | Custom HTTP module before WebResource handler
By repeatedly sending requests with slightly altered ciphertexts and analyzing the error codes returned by the server, an attacker can work backward to decrypt the original message byte by byte. This process does not require the encryption key; it only requires the server to tell the attacker whether the padding was correct or not. | HttpRequest req = HttpContext