National Cyber Warfare Foundation (NCWF)login

SCCMSecrets for auditing SCCM policy distribution and credential exposure


0 user ratings
2026-11-07 21:32:03
milo
Red Team (CNA)
"SCCMSecrets

SCCMSecrets is a Python tool from Synacktiv that examines Microsoft SCCM Management Points and Distribution Points for misconfigurations exposing secret policies and sensitive files, intended for authorized enterprise assessments.








Toolsynacktiv/SCCMSecrets — Python tool exploiting SCCM policies distribution for credentials harvesting and misconfiguration discovery
CategorySCCM/MECM attack surface auditing and post-exploitation (Python)
Primary UseDumping secret policies (NAA credentials, task sequences, collection variables) from an SCCM Management Point and indexing sensitive files on Distribution Points during authorized engagements
Safe UseFor use exclusively by authorized penetration testers and red teams inside scoped enterprise environments, or by SCCM administrators auditing their own site's configuration for credential-leaking misconfigurations
Telemetry NoteDevice registrations against the Management Point, anonymous package access on Distribution Points, and use of the alternate authentication endpoint are all logged in SCCM site server logs; defenders can alert on anomalous device approvals and bulk policy requests

Microsoft Endpoint Configuration Manager, still universally called SCCM, has become one of the richest attack surfaces in modern Active Directory estates, and synacktiv/SCCMSecrets is a focused Python effort to systematically probe it. The tool positions itself explicitly as going beyond the well-trodden Network Access Account (NAA) credential extraction that tools like sccm-thrash or SharpSCCM popularized. Instead, it attempts a comprehensive look at SCCM policies distribution, meaning everything the site pushes to clients that might embed secrets: NAA configurations, task sequences containing credentials, and collection variables. The README links to Synacktiv's accompanying research article, which is worth reading alongside the tool, plus a DEF CON 33 talk on SCCM misconfigurations.


The tool is organized around two subcommands, policies and files, which map neatly to the two SCCM roles an attacker or auditor cares about. The policies subcommand interacts with an SCCM Management Point (MP) to dump the contents of all secret policies, while files targets a Distribution Point (DP) to index and download interesting package files. This split is architecturally sensible: the MP is where policy secrets live, and the DP is where package content, often including deployment scripts and certificates, is stored. Both write their results into timestamped subdirectories under a loot directory, using the [timestamp]_policies and [timestamp]_files naming convention.


The most interesting design decision in the policies module is how it obtains an approved SCCM device, since secret policies are only handed to clients the site considers trustworthy. The README documents four distinct paths. Without any credentials, the tool will attempt anonymous device registration and abuse automatic device approval, a non-default SCCM configuration that grants the Approved state to newly registered devices. With a machine account, it uses the authenticated registration endpoint, which grants Approved by default, a sobering default behavior worth auditing in your own environment. The --altauth flag exploits an alternate authentication endpoint on HTTPS-configured MPs, bypassing mutual TLS requirements and obtaining an approved device without credentials at all, provided HTTPS is enforced site-wide. Finally, --use-existing-device lets the operator impersonate an already-registered client by supplying a directory containing a guid.txt file with the device GUID and a key.pem with the client's private key.


That last option deserves attention from both red and blue teams. As the README notes, SCCM policies are associated with collections, and a freshly registered device only lands in default collections, so only default-collection secret policies are retrieved. A compromised legitimate SCCM client, however, may belong to custom collections carrying additional secret policies, such as task sequences with embedded service account passwords for a specific server tier. This makes client key material on endpoints a genuine long-term credential asset, and defenders should treat the guid.txt/key.pem pair conceptually as equivalent to a machine credential worth protecting.


Authentication flexibility is a consistent theme. For the policies subcommand, the tool accepts a machine account via --machine-name with either --machine-pass or an NT hash through --machine-hash, which fits naturally into a pass-the-hash workflow during an authorized assessment. When the Management Point enforces HTTPS with client certificate authentication, a domain PKI certificate and key can be supplied via --pki-cert and --pki-key. There is also a --registration-sleep option (-rs, defaulting to 180 seconds) that waits after registration so the new device can be added to device collections before policy retrieval, a practical acknowledgment of how SCCM processes collection membership asynchronously.


The files subcommand takes a different approach to authentication. It first checks whether the Distribution Point allows anonymous access, another non-default misconfiguration, and if so, indexes and downloads package content without any credentials. Otherwise, domain credentials are required, again accepting either a password or an NT hash via --hash. The tool indexes all files across all packages hosted on the DP, producing an index.txt file in the Unix tree format, which is a genuinely useful forensic artifact for understanding what an estate is distributing. The default extension filter for downloads is .ps1, .bat, .xml, .txt, .pfx, a sensible list targeting PowerShell deployment scripts, batch files, configuration XML, and exported certificates. Passing an empty extension list performs indexing only, and the --urls flag allows downloading specific files from the existing index without reindexing.


From an operational-tradecraft perspective, the tool is clearly built by practitioners who understand SCCM internals rather than being a thin wrapper over existing APIs. The alternate authentication endpoint abuse, the awareness that HTTPS enforcement must be site-wide (a partial HTTPS deployment will not auto-approve devices through that path), and the collection-membership timing considerations all reflect deep research into how the CCM client registration and policy pipeline actually behaves. The accompanying DEF CON 33 presentation from Synacktiv covers this alternate endpoint in detail and is the right primary source for understanding why it works.


For defenders, the tool's behavior doubles as a detection specification. Anonymous device registrations succeeding on a Management Point indicate automatic device approval is enabled and should be disabled. Requests against the alternate authentication endpoint, especially when mTLS was believed to be enforced, indicate the site-wide HTTPS configuration prerequisite is met and the endpoint should be reviewed. Bulk package indexing on a Distribution Point, or anonymous SMB/HTTP access to package shares, is another observable. SCCM site server logs record device registrations and policy requests, so alerting on registration velocity and on devices requesting policies outside their collection-normed behavior is feasible.


The hardening implications are straightforward and worth enumerating during any SCCM audit. Disable automatic device approval, ensure secrets are not embedded in task sequences or collection variables where alternatives exist, remove stored NAA credentials or scope them to minimal rights, enforce HTTPS with proper client certificate authentication consistently site-wide, and restrict Distribution Point access so anonymous indexing is impossible. The --nocert flag's ability to bypass mTLS requirements on DPs, as mentioned in the README, suggests that PKI enforcement on DPs is not always a hard boundary either.


Repository hygiene is decent: it is written in Python, carries roughly 280 stars at the time of this writing, and ships a thorough README with full --help output for both subcommands embedded as documentation. Invocation follows the expected pattern, python3 SCCMSecrets.py policies -mp -cn for policy auditing against a Management Point you are authorized to test, or python3 SCCMSecrets.py files -dp -u -p for DP content review in a lab or scoped engagement. There is no license field declared in the repository metadata, which is a minor friction point for enterprise teams evaluating whether they can legally bundle it into internal tooling.


Where this fits in the broader tooling landscape: it complements rather than replaces the existing SCCM attack suite. Tools in the SharpSCCM and SCCMHunter family largely focus on NAA extraction, hierarchy abuse, and ACL attacks; SCCMSecrets narrows onto policy distribution and DP content as dedicated, scriptable primitives. For an authorized assessor moving through a Windows domain, it slots in after initial foothold, when a machine account or a compromised client's key material is available, and before lateral movement, where harvested task-sequence and NAA credentials often provide the bridge. For blue teams, reading its README is effectively a checklist of SCCM misconfigurations to eliminate, which is arguably its most valuable contribution to the community.



Official project repository for synacktiv/SCCMSecrets.

Download Tool

Educational analysis for authorized security professionals. Use only in controlled, authorized environments.






Source: OffensiveSec
Source Link: https://www.offsecblog.com/2026/11/sccmsecrets-for-auditing-sccm-policy.html


Comments
new comment
Nobody has commented yet. Will you be the first?
 
Forum
Red Team (CNA)



Copyright 2012 through 2026 - National Cyber Warfare Foundation - All rights reserved worldwide.