MITRE ATT&CK TTPs
Requirements
- Local administrator privileges on an SCCM client
Summary
The network access account (NAA) is a domain account that can be configured on the site server. Clients use the NAA to access and retrieve software from a distribution point, but it serves no other purpose on the client. The credentials are retrieved by clients as part of the Computer Policy. Once received by the client, the credentials are stored in theCCM_NetworkAccessAccount class in the root\ccm\policy\Machine\ActualConfig WMI namespace. This can be verified with the following PowerShell one-liner: Get-WmiObject -namespace "root\ccm\policy\Machine\ActualConfig" -class "CCM_NetworkAccessAccount".
Within this class, there exists two members of interest: NetworkAccessUsername and NetworkAccessPassword, which contain hexidecimal strings of encrypted data. This data is protected via the Data Protection API (DPAPI) and the SYSTEM DPAPI masterkey. Therefore, we must be elevated on the host in order to retrieve the SYSTEM masterkey which can then be used to decrypt the secrets. This technique applies only to currently-configured NAAs.
This process is automated in SharpDPAPI and SharpSCCM.
A successful decryption result of 00 00 0E 0E 0E 0E... indicates that the site server is configured to instruct the client to use its machine account for the NAA.
The SharpSCCM local secrets -m wmi command extends this technique to retrieve collection variables and task sequences via WMI, which may also contain secrets such as credentials.
Impact
This technique may allow an attacker to retrieve plaintext domain credentials. Even if the NAA or credential stored in a collection variable or task sequence is not overprivileged, domain credentials may be useful for attackers where explicit credentials are required, such as proxying tooling into an environment over command and control (C2). If the credential is overprivileged, this technique may enable lateral movement to other clients and/or sensitive systems. At SpecterOps, we commonly see accounts that are members of the SCCMFull Administrator role and the Domain Admins group configured as NAAs.
Defensive IDs
- PREVENT-3: Harden or disable network access accounts
- PREVENT-4: Configure Enhanced HTTP
- PREVENT-10: Enforce the principle of least privilege for accounts
Examples
SharpSCCM
Manual
- Use SharpDPAPI to retrieve SYSTEM masterkey
- Use PowerShell to retrieve the encrypted secrets
- Manually parse with PowerShell
References
- Duane Michael, The Phantom Credentials of SCCM: Why the NAA Won’t Die
- Chris Thompson, SharpSCCM
- Will Schroeder, SharpDPAPI
- Duane Michael, https://twitter.com/subat0mik/status/1582387536147582976
- Benjamin Delpy, https://twitter.com/gentilkiwi/status/1392594113745362946