[WINPEAS] Add privilege escalation check: pipetap – A Windows Named Pipe Multi-too... #531
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 and repository describe a general, reusable Windows privilege-abuse pattern around Named Pipes, not a one-off CTF configuration. The key idea is abusing high-privilege processes that expose or use Named Pipes with overly permissive ACLs or insecure logic. While pipetap itself is an inspection/man-in-the-middle tool, the text outlines a privilege escalation vector that is generic enough to be checked automatically.
Named Pipe ACL weaknesses as a privesc surface: The post explicitly calls out identifying insecure authorization on pipes (e.g., world-writable or weak ACLs) and then leveraging those for exploitation of high-privilege services. Misconfigured named pipe ACLs (e.g., Everyone or Authenticated Users with overly broad WRITE or FULL_CONTROL) on pipes backed by SYSTEM or service-account processes are a recurring real-world misconfiguration.
Privilege abuse via acting as or on behalf of a privileged pipe client/server: The described Remote Client / Remote Proxy technique uses a more privileged process as a proxy to open and interact with ACL-protected pipes, bypassing the ACL by operating in that process' security context. The underlying privesc pattern is:
WinPEAS already focuses on Windows misconfigurations like service permissions, registry permissions, and scheduled tasks. Named Pipe ACL misconfigurations are in the same category: a systemic Windows feature commonly misconfigured and suitable for auto-enumeration.
Suitability for automation: The technique does not depend on a specific product or outdated third-party software version; it relies on Windows core IPC (Named Pipes) and generic ACL misconfigurations / impersonation patterns. This fits winPEAS' scope:
Enumeration alone does not exploit anything but yields an actionable list of pipe endpoints to target with tools such as pipetap or custom PoCs.
Alignment with constraints: The technique is not a custom one-off script and is not tied to a niche, already-patched third-party product. It leverages standard Windows Named Pipes and ACLs, which are ubiquitous and repeatedly appear in real-world privesc and lateral movement chains.
Therefore, adding checks around Named Pipe ACLs and their association with privileged services fits well within winPEAS' purpose of surfacing dangerous misconfigurations.
🤖 Implementation Details
PEASS winpeas agent completed successfully with 199 items. Agent Comment: Summary:
NamedPipeSecurityAnalyzermodule (Info/SystemInfo/NamedPipes/NamedPipeSecurityAnalyzer.cs) which enumerates every named pipe security descriptor, flags low-privilege principals that hold write/full-control style rights, and correlates those misconfigurations with privileged server processes by duplicating system handles. This directly surfaces the kind of weak pipe ACLs that pipetap-style tooling can abuse to proxy or intercept privileged IPC.SystemInfoto run the analyzer, print a dedicated “Named Pipes with Low-Priv Write Access to Privileged Servers” section, and highlight each risky pipe with its offending ACLs, observed server PIDs/users, and raw SDDL so operators immediately know which endpoints are viable for named-pipe MITM/replay attacks.winPEASexe/README.mdand wired the new source file intowinPEAS.csprojso the check is part of future builds.Testing:
dotnet build winPEAS/winPEASexe/winPEAS.sln(fails: this Linux runner lacks the .NET Framework 4.8 reference assemblies/Developer Pack required to compile the WinPEAS solution).🏗️ Builder Agent Response
WinPEAS validation agent completed successfully with 128 items. Agent Comment: Summary:
git diff, focusing on the new named-pipe ACL analyzer, theSystemInfocheck wiring, the project file include, and the README note. Verified there are no stray edits (git diff --checkis clean).NamedPipes,NamedPipeInfo, helpers, Beaprint utilities) to ensure the newNamedPipeSecurityAnalyzerintegrates correctly: all required namespaces are imported, helper APIs (HandlesHelper,Kernel32, etc.) exist, and the analyzer follows existing output conventions (coloring, separators, summaries).winPEAS.csprojproperly includes the new source file so it will compile once the project is built on a Windows host with the .NET Framework targeting pack; no XML or structure issues detected.PrintNamedPipeAbuseCandidatesaction into theSystemInfocheck pipeline and validated its logic (summary formatting, exception handling, color usage) for consistency with the rest of WinPEAS.Tests:
dotnet build winPEAS/winPEASexe/winPEAS/winPEAS.csproj→ fails because the container lacks the .NET Framework 4.8 reference assemblies (MSB3644). This is an environment limitation; the new code does not introduce additional build errors.No code fixes were required beyond the submitted changes; everything is syntactically sound and adheres to WinPEAS patterns. Confidence: High.
This PR was automatically created by the HackTricks Feed Bot. Please review the implementation carefully and test thoroughly before merging.