MITRE ATT&CK TTPs
Requirements
Coercion
- Valid Active Directory domain credentials
- Connectivity to SMB (TCP/445) on a coercion target:
- TAKEOVER-5.1: Coerce primary site server
- TAKEOVER-5.2: Coerce passive site server
- Connectivity from the coercion target to SMB (TCP/445) on the relay server
- 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 controller settings:
RestrictNTLMInDomain=0or not present, or is configured with any value andDCAllowedNTLMServerscontains coercion target [DEFAULT]
Relay
- Connectivity from the relay server to HTTPS (TCP/443) on the relay target hosting the SMS Provider role
- Relay target 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
The SMS Provider is a SCCM site server role installed by default on the site server when configuring a primary site or central administration site. The role can optionally be installed on additional SCCM site systems for high availability configurations. The SMS Provider is a Windows Management Instrumentation (WMI) provider that performs as an intermediary for accessing and modifying data stored in the site database. Access to the SMS Provider is controlled via membership of the theSMS Admins local security group on each site server. The site server computer account is a member of the SMS Admins security group on each SMS Provider in a site by default.
The SMS Provider also provides access to the site database via the administration service (AdminService) REST API and uses Microsoft Negotiate for authentication. In default configurations, the AdminService is vulnerable to NTLM relay attacks.
Impact
This technique may allow an attacker to relay a site server’s domain computer account to a remote SMS Provider and elevate their privileges to “Full Administrator” for the SCCM hierarchy. If successful, this technique enables an attacker to 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.Defensive IDs
- DETECT-1: Monitor site server domain computer accounts authenticating from another source
- DETECT-5: Monitor group membership changes for SMS Admins
- DETECT-5: Monitor group membership changes for RBAC_Admins table
- PREVENT-9: Enforce MFA for SMS Provider calls
- PREVENT-20: Block unnecessary connections to site systems
Extended Protection for Authentication (EPA) is not currently supported by the AdminService (as of March 2024), so cannot be configured to prevent relay to the AdminService.
Subtechniques
- TAKEOVER-5.1: Coerce primary site server
- TAKEOVER-5.2: Coerce passive site server
Examples
-
Use
SCCMHunterto profile SCCM infrastructure: -
On the attacker relay server, start
ntlmrelayx(currently, Garrett Foster’s fork/pull request here must be used until it is merged into impacket), targeting the URL of the AdminService API on the remote SMS Provider identified in the previous step, and provide a target account to add as a Full Administrator: -
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 AdminService on the SMS Provider to add a Full Administrator:
-
Confirm that the account now has the
Full Administratorrole by querying WMI on an SMS Provider:
References
- Garrett Foster, SCCMHunter
- Garrett Foster, Site Takeover via SCCM’s AdminService API
- Microsoft, Plan for the SMS Provider
- Microsoft, What is the administration service in Configuration Manager?