Skip to main content

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 = 0 or not present, or = 1 and BlockNTLMServerExceptionList contains attacker relay server [DEFAULT]
    • RestrictSendingNTLMTraffic = 0, 1, or not present, or = 2 and ClientAllowedNTLMServers contains attacker relay server [DEFAULT]
    • Domain computer account is not in Protected Users [DEFAULT]
  • Domain controller settings:
    • RestrictNTLMInDomain = 0 or not present, or is configured with any value and DCAllowedNTLMServers contains 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 = 0 or not present [DEFAULT]
  • Domain controller settings:
    • RestrictNTLMInDomain = 0 or not present, or is configured with any value and DCAllowedNTLMServers contains relay target [DEFAULT]
    • LmCompatibilityLevel < 5 or not present, or = 5 and LmCompatibilityLevel >= 3 on 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

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.
  1. Use SCCMHunter to profile SCCM infrastructure:
  2. On the attacker relay server, start ntlmrelayx, targeting the URL of the certificate enrollment web interface on the certificate authority:
  3. 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:
  4. Use certipy to recover the coerced target’s NT hash:
  5. Use SCCMHunter to authenticate to an SMS Provider as the site server and grant a user the Full Administrator role:

References