Skip to main content

MITRE ATT&CK TTPs

Requirements

The site database is not hosted on the coercion target

Coercion

  • Valid Active Directory domain credentials
  • Connectivity to SMB (TCP/445) on a coercion target:
    • TAKEOVER-1.1: Coerce primary site server
    • TAKEOVER-1.2: Coerce SMS Provider
    • TAKEOVER-1.3: Coerce passive site server
  • Connectivity from the coercion target to SMB (TCP/445) on the relay server
  • 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

  • Connectivity from the relay server to MSSQL (TCP/1433) on the relay target, the site database
  • Extended protection for authentication not required on the site database [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

By default, the Active Directory domain computer accounts for primary site servers (including CAS site servers), systems hosting the SMS Provider role, and passive site servers are granted the db_owner role in their respective site’s MSSQL database. An attacker who is able to successfully coerce NTLM authentication from one of these accounts and relay it to the site database can use these permissions to grant an arbitrary domain account the SCCM “Full Administrator” role.

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-1.1: Coerce primary site server
  • TAKEOVER-1.2: Coerce SMS Provider
  • TAKEOVER-1.3: Coerce passive site server

Examples

The steps to execute TAKEOVER-1.1 through TAKEOVER-1.3 are the same except that a different system is targeted for coercion of NTLM authentication.
  1. (Linux) Use sccmhunter to get the hex-formatted SID of the Active Directory user you’d like to grant the Full Administrator role in SCCM, as well as the MSSQL statements required to grant the role to the user:
    (Windows) Use SharpSCCMto get the hex-formatted SID of the Active Directory user you’d like to grant the Full Administrator role in SCCM, and assemble the query based on the output from the example sccmhunter command above, substituting the user SID, domain, and site code (ps1 in this example) where appropriate.
  2. On the attacker relay server, start ntlmrelayx, targeting the IP address of the site database server and the MSSQL service using the SQL statements assembled in the previous step:
  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 site database server to execute the SQL statements:
  4. Confirm that the account now has the Full Administrator role by querying WMI on an SMS Provider. On Linux, using sccmhunter:
    On Windows, using SharpSCCM:

References