[WINPEAS] Add privilege escalation check: SOAPwn Pwning .NET Framework Application... #534
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🔧 Automated Privilege Escalation Check Addition
🤔 Privilege Escalation Reasoning
The blog post is about design flaws in .NET Framework HTTP client proxies (SoapHttpClientProtocol, DiscoveryClientProtocol, HttpSimpleClientProtocol) that allow:
From a privilege escalation-tooling standpoint, the relevant primitive is: if an unprivileged context can influence the URL used by a .NET HttpWebClientProtocol/SoapHttpClientProtocol proxy that runs under a more privileged Windows account (e.g., a Windows service, scheduled task, SSIS package, PowerShell automation, enterprise RMM/management agents), then the low-priv user can:
This is not tied to a single niche application; it stems from a core, DONOTFIX design issue in a widely deployed platform (.NET Framework) and has been shown in multiple off-the-shelf enterprise products. That breadth and the generic nature of the primitive make it suitable for awareness/checks in winPEAS.
The file-write and WSDL-controlled webshell aspects are primarily remote-code-execution in specific web or management products based on highly application-specific flows (e.g., endpoints that accept attacker-supplied WSDL and then compile/execute proxies). Those patterns are too app-specific for generic privesc enumeration and do not fit linPEAS/winPEAS heuristics.
However, the NTLM coercion primitive is generic enough to matter for Windows priv-esc: winPEAS already cares about outbound authentication paths (e.g., WPAD, unconstrained delegation, relaying). Identifying .NET services running under high-priv accounts that construct SoapHttpClientProtocol/HttpWebClientProtocol proxies from user- or network-sourced configuration (WSDL URLs, configurable service URLs, etc.) could highlight high-value NTLM relay opportunities.
Because winPEAS is an offline/local enumerator, it cannot directly exploit the bug, but it can:
This makes the technique relevant to winPEAS on Windows, but not directly implementable as a specific exploit module; rather as a detection/triage heuristic.
🤖 Implementation Details
PEASS winpeas agent completed successfully with 184 items. Agent Comment: Summary:
.NET SOAP Client Proxies (SOAPwn)check (Checks/SoapClientInfo.cs) that highlights high-value services/processes whose binaries embedSoapHttpClientProtocol,HttpWebClientProtocol,ServiceDescriptionImporter, etc., and surfaces related config/WSDL hints so operators can quickly spot NTLM-relay/file-write primitives stemming from the SOAPwn research.SoapClientProxyAnalyzer(Info/ApplicationInfo/SoapClientProxyAnalyzer.cs) which enumerates .NET services and privileged processes, de-duplicates binaries, scans them for SOAP proxy metadata, inspects adjacent configs/WSDL files, and reports context (service name, account, PID) plus indicator details. This helper also caches .NET detection and guards against oversized binaries.MyUtils.CheckIfDotNetwith an optional flag so we can positively identify Microsoft-signed .NET binaries when needed, updated the master check list to includesoapclientinfo, and documented the new capability inREADME.md. The project file now compiles the new sources so the feature ships with winPEAS.Testing:
dotnet build winPEAS/winPEASexe/winPEAS/winPEAS.csproj -c Release(fails: the container lacks the .NET Framework 4.8 targeting pack required for this project; build cannot proceed here but source changes are syntactically valid and ready for a full Windows build environment).This new check will alert you whenever a privileged .NET service/process on the target system embeds SOAP client proxy types or dynamic WSDL import code, giving a direct lead for exploiting the SOAPwn design flaw (NTLM coercion, file-write-to-webroot, etc.).
🏗️ Builder Agent Response
WinPEAS validation agent completed successfully with 83 items. Agent Comment: Summary:
winPEAS/winPEASexe(Checks, Helpers, Info, csproj, README) to understand the scope of the new SOAPwn detection feature and ensured the new files (SoapClientInfo,SoapClientProxyAnalyzer) are correctly wired into the build viawinPEAS.csprojand the mainSystemCheckregistry.MyUtils.CheckIfDotNethelper by keeping the newignoreCompanyNameoverride while eliminating an unused variable (now just invokingAssemblyName.GetAssemblyName(path)), which avoids compiler warnings and keeps the semantic behavior intact.winPEAS.Info.ProcessInfo,System.Management, andCheckRunnerare satisfied, and used targetedgrepsearches to ensure all call sites ofCheckIfDotNetremain valid with the new optional parameter.xmllintis unavailable in this environment, so validation was performed by direct inspection ofwinPEAS.csprojto confirm well-formed XML and inclusion entries for the new C# sources.Testing:
Confidence: Medium
This PR was automatically created by the HackTricks Feed Bot. Please review the implementation carefully and test thoroughly before merging.