The attack that takes down a domain usually isn’t a single critical vulnerability; it’s a chain of configurations that each look innocent on their own. The help desk group’s password reset right on an OU, an administrator session left open on a server in that OU, and that administrator reaching Domain Admins through nested group membership. Three steps, one domain. In this guide we look at graph-based tools like BloodHound through the eyes of the defense team: authorized and controlled data collection, common privilege paths, prioritization, and closing paths permanently.
What an attack path is and why a one-by-one audit isn’t enough
An attack path is a chain of permissions and relationships leading from a starting point (a compromised user or computer) to a target asset (Domain Admins, DCs, AD CS, the Entra Connect server). In the graph model, every AD object is a node and every relationship between them is an edge: MemberOf, AdminTo, HasSession, GenericAll, WriteDacl, ForceChangePassword and so on.
A one-by-one configuration audit asks, “Does this account’s password never expire?” Attack path analysis asks, “How many steps does someone who compromises this account need to reach Tier 0?” Neither replaces the other; the basic list of individual controls is in the Active Directory security controls article. The value of the graph is that it surfaces the few really exploitable chains from among thousands of ACL entries. The noise goes down, and the work becomes clear.
Data collection: scope, rights and approval
BloodHound is an open-source analysis platform developed by SpecterOps (the current version is BloodHound Community Edition; source and documentation are in the official GitHub repository). Data is collected with the SharpHound collector for AD and AzureHound for Entra ID and Azure. The collector can run with an ordinary domain user. The attacker sees the same map; that’s what makes the analysis meaningful from a defensive standpoint.
Because the tool is in attackers’ hands too, have this framework in writing before running it:
- Written approval: From the information security manager and the AD owner, specifying the scope (which domain/forest), the time window and the person who will run it.
- Notification: The SOC/MDR team and the EDR administrator are informed in advance. The collector and heavy LDAP queries may trigger detection rules. Triggering them is a good sign; if they don’t trigger, that is noted as a separate finding.
- Working environment: A managed, up-to-date workstation reserved for privileged access. The tool is downloaded from the official source and its hash is verified.
- Protecting the data: The output is a complete attack map of the environment. It’s stored encrypted, access is restricted, and the retention period after the analysis is set from the start.
The collection method determines the scope:
| Method | What it collects | Impact |
|---|---|---|
| DCOnly | Objects, groups, ACLs, GPOs and trusts via LDAP from DCs only | No connections to endpoints; lowest noise |
| Session / LoggedOn | Which account has a session on which machine | Connects to member servers and clients |
| LocalAdmin / LocalGroup | Local group memberships on machines | Requires SAMR access; restricted by default in current Windows versions |
| All | All of the above | Most comprehensive, noisiest |
# First round: structure and ACL data from DCs only
SharpHound.exe -c DCOnly --outputdirectory D:\analysis\bh
# Second round (approved scope): session information
SharpHound.exe -c Session --outputdirectory D:\analysis\bh
For a first analysis, DCOnly is usually enough; most paths caused by ACLs and groups show up in this data. Session data, on the other hand, is a snapshot. Data collected at nine in the morning doesn’t show the administrator sessions opened during the nightly backup window; unless it’s collected several times at different hours, it stays incomplete.
Common privilege paths
Environments change; path types hardly do. The ones we run into almost every time in the first graph:
- Nested groups: An application group made a member of built-in privileged groups such as Server Operators or Account Operators during a migration years ago, and then forgotten. Indirect memberships that don’t show in the interface but are in effect.
- Leftover sessions: RDP into a member server with a Domain Admin account; everyone who is local administrator on that server can reach this account’s credentials. In the graph it appears as an
AdminTo→HasSessionchain. - Broad local administrator rights: “Domain Users” or all IT staff made local administrators on all servers through a GPO. It’s opened as “temporary” and becomes permanent.
- GPO edit rights: An account that can edit a GPO linked to the OU containing the DCs can effectively run code on the DCs.
- Password read rights: Overly broad groups that can read the LAPS password (
ReadLAPSPassword) or the gMSA password (ReadGMSAPassword). - Identity infrastructure servers: Entra Connect, AD CS and backup servers not being protected like Tier 0. Anyone who is an administrator on these servers has a short path to the domain.
Risks caused by ACLs and delegation
The paths noticed last come from object permissions (ACLs) and Kerberos delegation, because they appear neither in group membership lists nor in session records. The table below lists the critical edges and what they mean on the defensive side:
| Edge | What it grants | Typical source |
|---|---|---|
| GenericAll / GenericWrite | Changing the object entirely or its attributes | “Full control” delegation granted in the past |
| WriteDacl / WriteOwner / Owns | Granting oneself any permission on the object | The account that created the object remaining its owner |
| ForceChangePassword | Resetting the password without knowing the current one | Help desk delegation covering privileged accounts |
| AddMember | Adding members to a group | Group manager (managedBy) settings |
| AddKeyCredentialLink | Adding a certificate-based credential to the account | Write permission on msDS-KeyCredentialLink |
| DCSync | Retrieving all password hashes through directory replication | The Replicating Directory Changes (All) right on the domain root |
| AllowedToDelegate / AllowedToAct | Accessing a service on behalf of other users | Constrained delegation or resource-based constrained delegation (RBCD) |
Unconstrained delegation should be handled separately: the TGT of every account that authenticates to a server with this setting stays in that server’s memory. You can quickly list computers other than DCs that have this setting with PowerShell:
# Computers other than DCs with unconstrained delegation
Get-ADComputer -Filter {TrustedForDelegation -eq $true} -Properties TrustedForDelegation |
Where-Object { $_.DistinguishedName -notlike '*OU=Domain Controllers*' } |
Select-Object Name, DistinguishedName
# Explicit permissions on an OU (with the AD PowerShell drive)
(Get-Acl "AD:\OU=Servers,DC=example,DC=local").Access |
Where-Object { -not $_.IsInherited } |
Select-Object IdentityReference, ActiveDirectoryRights, ObjectType
# Users' quota for adding computers to the domain (default 10)
Get-ADObject (Get-ADDomain).DistinguishedName -Properties ms-DS-MachineAccountQuota
A ms-DS-MachineAccountQuota value of the default 10 means every domain user can create computer accounts, which opens the way to RBCD-based paths. Delegating the right to add computers to a specific group and setting this value to 0 is a common hardening step. Do the delegation first, then zero the quota; in the reverse order, the desktop team’s work of joining machines to the domain stops.
Prioritization: the shortest paths to Tier 0
Seeing hundreds of paths in the first analysis is normal. Don’t panic. Three questions are enough for prioritization:
- Is the target Tier 0? First label the Tier 0 assets correctly: Domain Admins, Enterprise Admins, Administrators, DCs, AD CS servers and templates, Entra Connect, backup infrastructure, the domain root and AdminSDHolder. BloodHound CE automatically marks built-in privileged objects with the Tier Zero label (the name of the labeling interface may vary by version); add environment-specific assets such as Entra Connect, backup and AD CS servers manually. For the logic of tier classification, see the Active Directory tier model article.
- How broad is the starting point? A path starting from Domain Users, Authenticated Users or Everyone has much higher priority than one starting from a single account.
- How many steps, and through which nodes? A single node many paths pass through (e.g. a group or an ACL entry) is a choke point; cutting it closes many paths at once.
BloodHound’s built-in queries answer most of these questions. Cypher is used for custom queries; the example below lists the shortest paths from enabled users to the Domain Admins group (RID 512):
MATCH p = shortestPath((u:User {enabled: true})-[*1..]->(g:Group))
WHERE g.objectid ENDS WITH '-512'
RETURN p
LIMIT 50
Actions that close paths
For each finding, three things are planned together: the remediation action, what it might break and how it will be verified. Don’t say “we closed it” without removing the edge and collecting the graph again.
| Path type | Closing action | Watch out for |
|---|---|---|
| Leftover privileged session | “Deny log on” restrictions for Tier 0 accounts, use of PAWs | Move administrator accounts running as services first |
| Broad local administrator | Windows LAPS, role-based local administrator groups | Determine the application teams’ real needs |
| Excessive ACL rights | Removing explicit ACEs, transferring ownership to Domain Admins | Back up the ACL before the change |
| Faulty nested group | Removing the membership, redesigning the group | Test application access |
| Delegation | Converting unconstrained to constrained, marking sensitive accounts “Account is sensitive and cannot be delegated” | Verify the application’s Kerberos flow |
| LAPS/gMSA read right | Reducing read rights to small role-based groups | Update help desk processes |
The Windows LAPS migration article gives detailed steps for making local administrator passwords unique. For ACL changes, save the pre-change state to a file with dsacls output or Get-Acl. It’s the only guarantee of a rollback.
Periodic analysis and change tracking
Attack paths aren’t static; every new project, delegation and temporary right creates new edges. A one-off analysis is valid until the next project. From an enterprise cybersecurity standpoint, a sustainable model includes:
- DCOnly collection every three months or after major AD changes, compared with the previous result.
- Reporting the number of paths to Tier 0 and the choke-point nodes as a tracked metric.
- Membership change events in privileged groups (4728, 4732, 4756) and directory object change events (5136) raising alarms in the SIEM.
- Evaluating new delegation requests in change management with the question “what new path does this open?”
Graph analysis shows the static configuration; monitoring real-time abuse of the same paths requires a behavior-based detection layer such as Defender for Identity. The map and the alarm are separate jobs. A comprehensive attack path study can be carried out as part of an Active Directory security audit, or within penetration testing and security validation to prove that the paths are really exploitable.
Frequently asked questions
Do you need Domain Admin rights to run BloodHound?
No. Most AD objects, group memberships and ACLs can be read by an ordinary domain user. That’s why the analysis shows the map an attacker would see after initial access. Still, it should be run with written approval and from a controlled workstation.
Does the collection affect the production environment?
The DCOnly method only sends LDAP queries to DCs and usually doesn’t create noticeable load. Session and local group collection is noisier because it connects to all endpoints; notify the EDR and SOC teams in advance.
Does attack path analysis replace a penetration test?
No. Graph analysis derives potential paths from configuration data. A penetration test verifies whether the paths are really exploitable and whether detection controls work. The two complement each other.
How should the analysis output be stored?
The output is a detailed attack map of the environment. Store it in an encrypted location accessible only to the analysis team, and delete it securely when the period needed for comparison ends.