From Mssql To Domain Admin Fileless Lateral Movement In Hybrid Active Directory
A red team case study describes moving from a low-privileged domain user to Domain Admin and hybrid cloud control by abusing SQL impersonation, linked servers, SQL CLR execution, Kerberos delegation and an Azure AD Connect backend database. The text claims the chain required no malware and no credential dumping tools, ending in DCSync and cloud role manipulation.
Published on infosecwriteups.com
In mature enterprise environments, traditional payload-based lateral movement is high-risk. EDR solutions heavily monitor:
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely excessive trust and over-permissioning across SQL logins, linked servers, Kerberos delegation, forest trusts and the hybrid sync database, rather than a single software flaw.
Impact
The operator could escalate to Domain Admin, extend control into the second forest and obtain cloud Global Admin through the sync account, though the text notes Defender and logging were enabled and does not show them blocking the chain.
What the attacker needed
Valid low-privileged domain credentials; SQL login with IMPERSONATE rights; linked servers with RPC enabled; machine account quota above zero
How it was found
- Connect to the SQL server using the existing Kerberos ticket and check the SQL security context.
- Find an IMPERSONATE permission and switch to the SQL service login.
- Enumerate linked servers, enable RPC out, and run a query on the remote server.
- Enable CLR and load a custom assembly to run code inside the SQL server process.
- Create a machine account and configure resource-based constrained delegation on a file server.
- Request a service ticket impersonating an administrator, then pivot across the forest trust and reach the sync database.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
This is a walkthrough of a simulated attack on a large company network. The attacker already had one ordinary user login and then used built-in features of database servers and Windows sign-in (Kerberos) to gradually gain more power, eventually reaching the highest administrator level and the cloud directory. Nothing was hacked with a software bug; the weaknesses were overly generous permissions and trust settings between systems.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.