Post Exploitation
Theory
Since the main goal of SCCM is to deploy applications and services on the managed assets of the Active Directory, it is also a pretty good candidate to move latteraly on the network. With administrative rights on the primary site server, this can be done by deploying applications and scripts on the targets or coercing clients' authentication.
Additionnaly, SCCM permits to enumerate many data on the ressources. Among all the services offered by SCCM to the administrator, there is one named CMPivot. This service, located on the MP server, can enumerate all the resources of a computer or computer collection (installed software, local administrators, hardware specification, etc.), and perform administrative tasks on them. It uses a HTTP REST API, named AdminService, provided by the SMS Provider server.
Finally, as indicated by Chris Thompson in his article SCCM Hierarchy Takeover, by default, when a new user is promoted to any SCCM administrative role on a primary site server (for example, Full Administrator), the role is automatically propagated to the other SCCM site in the hierarchy by the CAS.
This means that there is no security boundary between SCCM sites in a same hierarchy, and being able to takeover one SCCM site implicates to takeover all the others.
Practice
Admin & Special Account Enumeration
This step requires administrative privileges over the SCCM Management Point (MP) in order to query the MP's WMI database.
Admin Users
SharpSCCM.exe get class-instances SMS_ADMINSpecial Accounts
SharpSCCM.exe get class-instances SMS_SCI_Reserved

Applications and scripts deployment
With sufficient rights on the central SCCM server (sufficient rights on WMI), it is possible to deploy applications or scripts on the Active Directory machines with PowerSCCM (Powershell).
If deploying applications fails, deploying CMScripts is an alternative, which requires a "Configuration Manager" drive on the SCCM server.
This pull request on PowerSCCM can be used to do everything in one command. It uses the script configurationmanager.psd1 created by Microsoft, usually installed on SCCM servers.
AdminService API
It appears that, with SCCM administrative rights, it is possible to directly interact with the AdminService API, without using CMPivot, for post SCCM exploitation purpose.
From UNIX-like systems, sccmhunter (Python) can be used for this purpose.
Then, the help command can be typed in the opened shell to view all the CMPivot commands handled by sccmhunter.
SCCM Hierarchy takeover
There is nothing to do. Just promote a user to any SCCM administrative role on a primary site server (for example, Full Administrator), and the role will be automatically propagated to the other SCCM site in the hierarchy by the CAS.
Resources
Last updated
Was this helpful?

