[WINPEAS] Add privilege escalation check: The Windows Registry Adventure, Part 8 E... #540
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 describes registry-based primitives that enable reliable local privilege escalation on modern Windows 11 systems, and several of these are configuration/ACL issues that are broadly relevant and not tied to an extremely custom CTF-style setup or a single obscure, legacy product.
Key elements suitable for WinPEAS:
Misconfigured writable descendants in privileged hives (HKLM / HKU)
HKLM\SOFTWARE\Microsoft\DRMand several keys underHKLM\SYSTEMandHKLM\SOFTWARE.Cross-user writable key: HKCU\Software\Microsoft\Input\TypingInsights
Class-level exploit primitives dependent on vulnerabilities (not suitable for WinPEAS)
_CM_BIG_DATAand_CM_KEY_VALUEstructures and CmpGetValueData behavior.Given the above, the suitable takeaway for WinPEAS is to add detections for dangerous registry ACL patterns in system and user hives, and specifically to flag known-problematic paths like
HKLM\\SOFTWARE\\Microsoft\\DRMandHKCU\\Software\\Microsoft\\Input\\TypingInsights. These checks do not depend on fixed, obscure third‑party software, but on Windows’ own registry structure and common ACL misconfigurations, and they directly support registry-based privilege escalation techniques such as those described in the article.🤖 Implementation Details
PEASS winpeas agent completed successfully with 174 items. Agent Comment: Summary:
RegistryAclScanner) plus an info container so winPEAS can safely inspect registry DACLs for well-known low-privileged principals without requiring the current user to have write access.registryinfosystem check which reports the cross-user TypingInsights key, a curated list of Project Zero highlighted HKLM keys, and a depth/volume-limited heuristic scan (depth ≤3, max 25 results) for other HKLM locations writable by Users/Authenticated Users/Everyone to spotlight hive exploitation primitives.Testing:
dotnet build winPEAS.csproj -c Release(fails: .NETFramework v4.8 reference assemblies are not installed in the runner image, so MSBuild cannot complete — no code issues indicated)🏗️ Builder Agent Response
WinPEAS validation agent completed successfully with 108 items. Agent Comment: Summary:
git status/git diffand inspected the new C# files for syntax, namespace, and WinPEAS-integration issues.winPEAS.csprojXML structure with Python’sxml.etree.ElementTreeparser and ensured the new helper/check are included.registryinfomodule into the CLI usage banner (winPEAS/Helpers/Beaprint.cs) so users can discover/run the check, addressing the pending WinPEAS-specific integration gap.Validation & Checks:
RegistryInfo.csandRegistryAclScanner.csfor syntax problems, namespace mismatches, disposal issues, and convention adherence (no problems found).python - <<'PY' ... ET.parse('winPEAS.csproj').dotnet build(fails because .NET Framework 4.8 reference assemblies are unavailable in this Linux runner, which is expected for this project).Outstanding Issues:
dotnet buildcannot succeed here due to missing .NET Framework 4.8 targeting pack; building will require those reference assemblies on a Windows/.NET Framework environment.Confidence: High
This PR was automatically created by the HackTricks Feed Bot. Please review the implementation carefully and test thoroughly before merging.