MITRE ATT&CK TTPs
Requirements
Permitted security roles:- Full Administrator
- Operations Administrator
Summary
The SCCM AdminService API is a REST API that provides limited administrative access to the SCCM site. The API provides a WMI route athttp(s)://target.siteserver.domain/AdminService/wmi/ which exposes over 700 WMI classes, including the SMS_SCI_Reserved class. This class maps to the SC_UserAccount table in the site database. Therefore, we can send a GET request to this endpoint to query any credential material stored in the site database.
All of these credentials are stored in the SC_UserAccount table in the site MSSQL database as hex-encoded, encrypted blobs. The secrets in this table are encrypted with an RSA private key which is stored in the “Microsoft Systems Management Server” cryptographic service provider (CSP) container on the primary site server for the site the account was added to.
Garrett Foster’s SCCMHunter operationalizes this by filtering the Username, Reserved2 (encrypted password blob), and AccountUsage fields in the get_creds command, part of the admin module. SCCMHunter’s decrypt command in the admin module allows decryption of the credential blobs using the site server’s private key.
Impact
This technique provides an alternative to CRED-5 that does not require direct interaction with the database.Defensive IDs
- PREVENT-10: Enforce the principle of least privilege for accounts
- PREVENT-20: Block unnecessary connections to site systems
Examples
SCCMHunter
First, we must use SCCMHunter’sadmin module to enter simulated shell access to the SMS Provider’s AdminService APi.
ResourceId) using get_device <site server>. Note: You must use only the hostname, not FQDN.
interact 16777223:
get_creds to query the credential blobs described above:
decrypt <blob> (no quotes) command to decrypt the blobs from the previous step.
OPSEC Note: This step will invoke a PowerShell script on the site server.
References
- Garrett Foster, Site Takeover via SCCM’s AdminService API
- Garrett Foster, Decrypting the Forest From the Trees