ATT&CK TTPs
Requirements
Coercion
- Valid Active Directory domain credentials
- Connectivity to SMB (TCP/445) on a coercion target:
- TAKEOVER-7.1: Coerce primary site server
- TAKEOVER-7.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 SMB on target host
- SMS Provider role installed on target preferred (default) but not required
- Relay target settings:
RequireSecuritySignature=0or not present [DEFAULT]RestrictReceivingNTLMTraffic=0or not present [DEFAULT]- Coercion target is local admin (to access RPC/admin shares) [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
For high availability configurations, the passive site server role is deployed to SCCM sites where redundancy for the site server role is required. A passive site server shares the same configuration and privileges as the active site server yet performs no writes or changes to the site until promoted manually or during an automated failover. During setup, the passive site server is required to be a member of the active site server’s local Administrators group. An attacker who is able to successfully coerce NTLM authentication from a active or passive site server via SMB and relay it to SMB on a remote active or passive site server to compromise the host can either:- Authenticate to its own hosted SMS Provider as the site server
- Authenticate to LDAP(s) as the site server and configure resource-based constrained delegation (RBCD) to impersonate an SCCM Full Administrator
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
- DETECT-5: Monitor group membership changes for SMS Admins
- DETECT-5: Monitor group membership changes for RBAC_Admins table
- PREVENT-12: Require SMB signing on site systems
- PREVENT-20: Block unnecessary connections to site systems
Subtechniques
- TAKEOVER-7.1: Coerce primary site server
- TAKEOVER-7.2: Coerce passive site server
Examples
The steps to execute TAKEOVER-7.1 and TAKEOVER-7.2 are the same except the coercion target and relay target are opposite. This example is for TAKEOVER-7.1.-
Use
SCCMHunterto profile SCCM infrastructure: The results of thefindmodule indicate:- The SCCM.INTERNAL.LAB and PASSIVE.INTERNAL.LAB sytems are both site servers in the “LAB” site
- The SCCM.INTERNAL.LAB host is the active site server and the PASSIVE.INTERNAL.LAB host is the passive site server
- SMB signing is disabled on both systems
-
On the attacker relay server, start
ntlmrelayx, targeting the SMB service on the primary site server identified in the previous step. The-socksflag is used to hold the authenticated session open: -
From the attacker host, coerce NTLM authentication from the passive 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 SMB service on the site server and the authenticated session is held open:
-
Proxy
secretsdump.pyin the context of the passive site server through the authenticated session to authenticate to the primary site server and recover its hashed credential: -
Use
sccmhunteras the primary site server to the Administration Service API and add an arbitrary user as Full Administrator:
References
- Chris Thompson, SCCM Site Takeover via Automatic Client Push Installation
- Garrett Foster, SCCM Hierarchy Takeover with High Availability
- Microsoft, Site server high availability in Configuration Manager