MITRE ATT&CK Tactics
Requirements
Coercion
- Valid Active Directory domain credentials
- Connectivity to HTTPS (TCP/443) on a management point
- Connectivity from the primary site server to SMB (TCP/445) on the relay server
- Primary site server settings:
- Automatic site-wide client push installation is enabled
- Automatic site assignment is enabled
Allow connection fallback to NTLMis enabled for client push installation- PKI certificates are not required for client authentication
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
- Relay target settings:
- Connectivity from the relay server to SMB (TCP/445) on the relay target
RequireSecuritySignature=0or not present [DEFAULT]RestrictReceivingNTLMTraffic=0or not present [DEFAULT]- Coercion target is local admin (to access RPC/admin shares)
- 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 SCCM automatic site assignment and automatic client push installation are enabled, and PKI certificates aren’t required for client authentication, it’s possible to coerce NTLM authentication from the site server’s installation and machine accounts to an arbitrary NetBIOS name, FQDN, or IP address, allowing the credentials to be relayed or cracked. This can be done using a low-privileged domain account on any Windows system.Impact
Client push installation accounts require local admin privileges to install software on systems in an SCCM site, so it is often possible to relay the credentials and execute actions in the context of a local admin on other SCCM clients in the site. Many organizations use a member of highly privileged groups such as “Domain Admins” for client push installation for the sake of convenience. If all configured accounts fail when the site server tries to authenticate to a system to install the client, or if no specific installation accounts are configured, the server tries to authenticate with its domain computer account. If SMB is used, TAKEOVER-1 and TAKEOVER-2 may be possible. If the WebClient (WebDAV) service is enabled on the site server, it is possible to coerce NTLM authentication via HTTP, allowing relay to LDAP or HTTP to conduct attacks such as Shadow Credentials, Resource-based Constrained Delegation, or AD CS ESC8 to take over the server (TAKEOVER-3 or TAKEOVER-4).Defensive IDs
- DETECT-1: Monitor site server domain computer accounts authenticating from another source
- DETECT-3: Monitor client push installation accounts authenticating from anywhere other than the primary site server
- PREVENT-1: Patch site server with KB15599094
- PREVENT-2: Disable Fallback to NTLM
- PREVENT-5: Disable automatic side-wide client push installation
- PREVENT-8: Require PKI certificates for client authentication
- PREVENT-11: Disable and uninstall WebClient on site servers
- PREVENT-12: Require SMB signing on site systems
Examples
It is not possible to identify whether automatic site-wide client push installation, automatic site assignment, andAllow connection fallback to NTLM are enabled without attempting this attack.
-
On the attacker relay server, start
ntlmrelayx, targeting the IP address of the relay target and the SMB service: -
Use SharpSCCM’s
invoke client-pushfunction to register a new device with the management point and send a DDR to initiate automatic client push installation to your relay server running ntlmrelayx:Note: Sometimes, this command results in a client device record being created, but SCCM does not kick off automatic client push installation right away. Running the same command again should kick off the process. -
After a few minutes, ntlmrelayx should receive a connection from the configured client push installation account(s) and the site server’s machine account:
Cleanup
It is not possible to remotely delete device records or remove CCRs in the retry queue that are created by heartbeat DDRs without havingFull Administrator privileges to SCCM. By default, the site will retry client push installation every 60 minutes for 7 days, and if a newly discovered device sits in the client push installation retry queue for more than 24 hours, an error message may be displayed in the console to administrators.
With Full Administrator access to SCCM, artifacts created by SharpSCCM that cause client push installation retries can be removed from the site server and database through the ConfigMgr console or using SharpSCCM.
The following command can be used to identify the device’s ResourceId:
References
- Chris Thompson, Coercing NTLM Authentication from SCCM Servers
- Chris Thompson, SharpSCCM