MITRE ATT&CK Tactics
Requirements
- PKI client authentication certificates are used for communication with the target distribution point
- The distrubution is PXE-enabled or still hosts the OSD media boot images for PXE
- Connectivity to SMB on the distribution point OR
- Connectivty to HTTP(s) on the distribution point
- Valid Active Directory domain credentials
- Anonymous authentication enabled on the distribution point
Summary
SCCM sites may optionally be configured to support public-key infrastructure (PKI) certificates for secure communications. For deployments with internet-based site systems, PKI certificates are required. When deployed, the distribution point (DP) role requires its PKI certificate to support client authentication and for the private key to be exportable. The certificate is used by the DP to support communication with HTTPS enabled management points. During OSD task sequence media, the certificate is imported where required to support HTTPS communications to management points during operating system deployment. For environments that leverage Microsoft’s PKI solution Active Directory Certificate Services (AD CS), the certificate generated for the DP role may be used to authenticate as the DP’s host AD machine account. An attacker who is able to successfully recover the PKI certificate from the OSD task sequence variables file contents may gain control of the certificate’s AD identity.Impact
The impact of recovery is environment dependent. At a minimuim, based on Microsoft’s documentation an attacker that recovers this certificate can impersonate a DP’s AD identity and compromise the host system.Defensive IDs
- DETECT-7: Monitor read access to the SMSTemp directory
- PREVENT-6: Configure a strong PXE boot password
Examples
- On the attacker server, using cmloot.py triage the content library for common OSD media formats like .WIM or .ISO
- Using an archiving tool such as 7zip, parse the recovered media files for and extract the Variables.dat task sequence variables file.
- Use pxethief.py to extract the PKI certificate from the recovered variables file
- Inspect the certificate with openssl to confirm it’s an AD CS certificate and contains the client authentication EKU
- Use certipy to authenticate on behalf of the recovered certificate’s identity.
References
- Christopher Panayi, pxethief
- Christopher Panayi, Identifying and retrieving credentials from SCCM/MECM Task Sequences
- CRED-1, Retrieve secrets from PXE boot media
- ELEVATE-4, Distribution Point Takeover via PXE Boot Spoofing
- Microsoft, PKI certificate requirements for Configuration Manager