MITRE ATT&CK TTPs
Requirements
Coercion
- Valid Active Directory domain credentials
- Connectivity to SMB (TCP/445) on a coercion target:
- TAKEOVER-3.1: Coerce primary site server
- TAKEOVER-3.2: Coerce SMS Provider
- TAKEOVER-3.3: Coerce passive site server
- TAKEOVER-3.4: Coerce site database server
- Connectivity from the coercion target to SMB (TCP/445) on the relay server (or WebClient enabled and connectivity via any port)
- Coercion target settings:
BlockNTLM=0or not present, or =1andBlockNTLMServerExceptionListcontains attacker relay server [DEFAULT]RestrictSendingNTLMTraffic=0,1, or not present, or =2andClientAllowedNTLMServerscontains attacker relay server [DEFAULT]- Domain computer account is not in
Protected Users[DEFAULT]
- Domain controller settings:
RestrictNTLMInDomain=0or not present, or is configured with any value andDCAllowedNTLMServerscontains coercion target [DEFAULT]
Relay
- Either of the following AD CS services is in use:
- Certificate Authority Web Enrollment [NON-DEFAULT]
- Certificate Enrollment Web Service [NON-DEFAULT]
- Connectivity from the relay server to HTTPS (TCP/443) on the relay target hosting the AD CS service
- Extended protection for authentication is not required by the target AD CS service [DEFAULT]
- An enabled AD CS template that allows enrollment and supports authentication
- Relay target settings:
RestrictReceivingNTLMTraffic=0or not present [DEFAULT]
- Domain controller settings:
RestrictNTLMInDomain=0or not present, or is configured with any value andDCAllowedNTLMServerscontains relay target [DEFAULT]LmCompatibilityLevel<5or not present, or =5and LmCompatibilityLevel >=3on the coercion target [DEFAULT]
Summary
When available, SCCM uses public key infrastructure (PKI) for authentication and authorization. While not required, administrators may choose to deploy Active Directory Certificate Services (AD CS) to support SCCM’s various certificate requirements rather than use self-signed certificates. AD CS is home to its own misconfigurations; particularly ESC8. In short, the certificate enrollment web interface is vulnerable to NTLM relaying. An attacker may coerce NTLM authentication from a coercion target and relay to the AD CS enrollment web service to enroll in and acquire a valid certificate template on behalf of the target. The template can then be used to escalate to “Full Administrator” in SCCM by impersonating the coerced target.Impact
The “Full Administrator” security role is granted all permissions in Configuration Manager for all scopes and all collections. An attacker with this privilege can execute arbitrary programs on any client device that is online as SYSTEM, the currently logged on user, or as a specific user when they next log on. They can also leverage tools such as CMPivot and Run Script to query or execute scripts on client devices in real-time using the AdminService or WMI on an SMS Provider.Defensive IDs
- DETECT-1: Monitor site server domain computer accounts authenticating from another source
- PREVENT-11: Disable and uninstall WebClient on site servers
- PREVENT-14: Require EPA on AD CS and site databases
- PREVENT-20: Block unnecessary connections to site systems
Subtechniques
- TAKEOVER-3.1: Coerce primary site server
- TAKEOVER-3.2: Coerce SMS Provider
- TAKEOVER-3.3: Coerce passive site server
- TAKEOVER-3.4: Coerce site database server
Examples
The steps to execute TAKEOVER-3.1 through TAKEOVER-3.4 are the same except that a different system is targeted for coercion of NTLM authentication. The following example assumes the AD CS service has been previously enumerated and the web enrollment form is vulnerable to ESC8.-
Use
SCCMHunterto profile SCCM infrastructure: -
On the attacker relay server, start
ntlmrelayx, targeting the URL of the certificate enrollment web interface on the certificate authority: -
From the attacker host, coerce NTLM authentication from the site server via SMB, targeting the relay server’s IP address:
After a few seconds, you should receive an SMB connection on the relay server that is forwarded to the cert enrollment service to request a certificate for the coercion target:
-
Use
certipyto recover the coerced target’s NT hash: -
Use
SCCMHunterto authenticate to an SMS Provider as the site server and grant a user the Full Administrator role:
References
- Will Schroeder and Lee Chagolla-Christensen, Certified Pre-Owned
- Oliver Lyak, Certipy
- Microsoft, Plan for PKI certificates in Configuration Manager