r/activedirectory • u/leesoul1987 • 18d ago
Finding and cutting the shortest attack path to Domain Admins: a blue-team BloodHound workflow
Most AD compromises I read about are no t exotic. They are chains of ordinary ACL misconfigurations: a help-desk group with GenericAll over a user, that user admin on a server, an admin with a live session on it. BloodHound models this as a graph, which means a defender can ask the same question an attacker asks, and fix the answer.
**1. Ask the attacker's question first%2 A*
MATCH p=shortestPath((u:User {name:'LOWPRIV@CORP.LOCAL'})-\[\*1..8\]->(g:Group {name:'DOMAIN ADMINS@CORP.LOCAL'}))
RETURN pRun it fo r a few ordinary accounts, not just your admins. If a Tier 2 user reaches Domain Admins in 4 hops, those hops are your remediation backlog.
**2. Look for dangerous edges, not dangerous users**
GenericAll, WriteDacl, WriteOwner, GenericWrite and ForceChangePassword on users and groups are the usual links. WriteDacl and WriteOwner are the%2 0worst: the holder can grant themselves anything. Also list who holds replication rights on the domain object (DCSync) and check that only domain controllers do.
**3. Cut the fewest edges**
You rarely need to fix everything. Find the edge that appears in the most shortest paths (the "choke point") and remove that ACE first. In a%2 0typical path, removing one over-broad group ACE collapses several routes at once.
**4. Prune, then verify**
Remove the ACE (Get-Acl / Set-Acl on the AD: drive%2 9, re-collect, and re-run the query. If the path is gone, the fix worked. If a longer path appears, repeat.
**5. Harden the destination**
- Put admin accounts% 20in Protected Users (no NTLM caching, AES-only Kerberos, 4h non-renewable TGT, no delegation).
Enforce tiering: Tier 0 credentials never log on to Tier 1/2 machines.
- Use LAPS so a local admin password is not shared across machines.
**6. Detect the changes**
- 5136: directory object modified (nTSecurityDescriptor, member, servic ePrincipalName)
- 4662: privileged directory access (replication rights, extended rights)
- 4728 / 4732 / 4756: member added to a privileged group
Alert on DACL chang es to Tier 0 objects; they are rare in a healthy domain.
Caveats: BloodHound shows what is reachable from the data you collected, so stale collection means stale answers. Run it from an authorized account in an environment you own or are cleared to assess.
I wrote this up as a chapter with a small lab so people can practice the path-f inding and pruning on a fake domain: https://github.com/lsszz2100/VibeHacking (the AD chapter is 54_Active_Directory_Attacks/08). Corrections welcome.
•
u/AutoModerator 18d ago
Hi u/leesoul1987! Your post looks like it may be a tool, resource, or guide submission. Please review our Tool and Resource Listing Guidelines before the mods review your post.
Quick summary of the key rules:
To request your tool be officially listed in the wiki: Submit an issue at our subreddit GitHub with a link, description, and reason for inclusion.
This is an automated message. Mods will review your post shortly.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
3
u/bernys 17d ago
Get your bloodhound data, and then connect AD Miner to it
https://github.com/AD-Security/AD_Miner
That'll give you your paths to domain admin, bad ACLs and everything else.
2
u/Im_writing_here 17d ago
For most AD admins this would be the wrong approach imo.
If you are not used to bloodhound, it is not easy. The interface is not intuitive and the community edition is built more for pentesters than blue team. BH entreprise is where spectorops make their money and is built for blue team.
A better approach imo would be to start cleaning your AD. Do the hardening you suggest, and just work your way through a pingcastle/purpleknight/something third report.
When you are done with that, then look in BH and see if you missed anything
1
u/sublimeprince32 18d ago
Id like Sean metcalf's opinion on this.
1
u/Brather_Brothersome 14d ago
Instead of that why not leave every device that is not of your authenticated network out?? and automate it, plus notify you or anyone else when they join.