Conducting Internal Reconnaissance with BloodHound CE
Overview
BloodHound Community Edition (CE) is a modern, web-based Active Directory reconnaissance platform developed by SpecterOps that uses graph theory to reveal hidden relationships and attack paths within AD environments. Unlike the legacy BloodHound application, BloodHound CE uses a PostgreSQL backend with a dedicated graph database, providing improved performance, a modern web UI, and enhanced API capabilities. Red teams use BloodHound CE to collect AD objects, ACLs, sessions, group memberships, and trust relationships, then visualize attack paths from compromised low-privileged accounts to high-value targets like Domain Admins. The SharpHound collector (v2 for CE) gathers data from Active Directory, while AzureHound collects from Azure AD / Entra ID environments.
Objectives
- Deploy BloodHound CE server using Docker Compose
- Collect AD data using SharpHound v2 or BloodHound.py
- Import collected data into BloodHound CE for graph analysis
- Identify shortest attack paths from owned principals to Domain Admins
- Discover ACL-based attack paths, Kerberoastable accounts, and delegation abuse
- Execute custom Cypher queries for advanced attack path analysis
- Generate attack path reports for engagement documentation
MITRE ATT&CK Mapping
- T1087.002 - Account Discovery: Domain Account
- T1069.002 - Permission Groups Discovery: Domain Groups
- T1482 - Domain Trust Discovery
- T1615 - Group Policy Discovery
- T1018 - Remote System Discovery
- T1033 - System Owner/User Discovery
- T1016 - System Network Configuration Discovery
Implementation Steps
Phase 1: BloodHound CE Deployment
- Deploy BloodHound CE using Docker Compose:
curl -L https://ghst.ly/getbhce -o docker-compose.yml
docker compose pull
docker compose up -d
- Access the web interface at https://localhost:8080
- Log in with the default admin credentials (displayed in Docker logs):
docker compose logs | grep "Initial Password"
- Change the default admin password immediately
Phase 2: Data Collection with SharpHound v2
- Transfer SharpHound v2 to the compromised Windows host:
# Execute full collection
.\SharpHound.exe -c All --outputdirectory C:\Temp
# DCOnly collection (LDAP only, stealthier)
.\SharpHound.exe -c DCOnly
# Session collection for logged-on user mapping
.\SharpHound.exe -c Session --loop --loopduration 02:00:00
# Collect from specific domain
.\SharpHound.exe -c All -d child.domain.local
- Alternative: Use BloodHound.py from Linux:
bloodhound-python -u user -p 'Password123' -d domain.local -ns 10.10.10.1 -c All
- Exfiltrate the generated ZIP file to the analysis workstation
Phase 3: Data Import and Initial Analysis
- Upload collected data via the BloodHound CE web interface (File Ingest)
- Mark compromised accounts as "Owned" in the interface
- Run built-in analysis queries:
- Shortest Path to Domain Admin
- Kerberoastable Users with Path to DA
- AS-REP Roastable Users
- Users with DCSync Rights
- Computers with Unconstrained Delegation
Phase 4: Custom Cypher Queries
- Execute custom Cypher queries in the BloodHound CE search bar:
// Find shortest path from owned principals to Domain Admins
MATCH p=shortestPath((n {owned:true})-[*1..]->(m:Group {name:"DOMAIN ADMINS@DOMAIN.LOCAL"}))
RETURN p
// Find Kerberoastable users with path to DA
MATCH (u:User {hasspn:true})
MATCH p=shortestPath((u)-[*1..]->(g:Group {name:"DOMAIN ADMINS@DOMAIN.LOCAL"}))
RETURN p
// Find computers with sessions of DA members
MATCH (c:Computer)-[:HasSession]->(u:User)-[:MemberOf*1..]->(g:Group {name:"DOMAIN ADMINS@DOMAIN.LOCAL"})
RETURN c.name, u.name
// Find ACL-based attack paths (GenericAll, WriteDACL, GenericWrite)
MATCH p=(u:User)-[:GenericAll|GenericWrite|WriteDacl|WriteOwner|ForceChangePassword*1..]->(t)
WHERE u.owned = true
RETURN p
// Find users who can DCSync
MATCH (u)-[:MemberOf*0..]->()-[:DCSync|GetChanges|GetChangesAll*1..]->(d:Domain)
RETURN u.name, d.name
// Find computers with LAPS but readable by non-admins
MATCH (c:Computer {haslaps:true})
MATCH p=(u:User)-[:ReadLAPSPassword]->(c)
RETURN p
Phase 5: Attack Path Prioritization
- Score identified attack paths by:
- Number of hops (shorter = higher priority)
- Stealth requirements (avoid noisy techniques)
- Tool availability for each hop
- Likelihood of detection at each step
- Create an execution plan for the highest-priority paths
- Identify required tools for each step in the chain
- Plan OPSEC considerations for each technique
Tools and Resources
| Tool |
Purpose |
Platform |
| BloodHound CE |
Web-based graph analysis platform |
Docker |
| SharpHound v2 |
AD data collection (.NET, for CE) |
Windows |
| BloodHound.py |
AD data collection (Python) |
Linux |
| AzureHound |
Azure AD / Entra ID data collection |
Cross-platform |
| PlumHound |
Automated BloodHound reporting |
Python |
| BloodHound Query Library |
Community Cypher query repository |
Web |
Key Attack Path Types
| Path Type |
Description |
Example |
| ACL Abuse |
Exploit misconfigured ACLs |
GenericAll on DA group |
| Kerberoasting |
Crack service account passwords |
SPN account → DA |
| AS-REP Roasting |
Attack accounts without pre-auth |
No-preauth user → password crack |
| Delegation Abuse |
Exploit unconstrained/constrained delegation |
Computer → impersonate DA |
| GPO Abuse |
Modify GPOs applied to privileged OUs |
GPO write → code execution on DA |
| Session Hijack |
Leverage DA sessions on compromised hosts |
Admin session → token theft |
Validation Criteria
1---2name: conducting-internal-reconnaissance-with-bloodhound-ce3description: Conduct internal Active Directory reconnaissance using BloodHound Community Edition to map attack paths, identify privilege escalation chains, and discover misconfigurations in domain environments.4domain: cybersecurity5subdomain: red-teaming6tags: [red-team, reconnaissance, bloodhound, active-directory, attack-paths, privilege-escalation, graph-analysis]7version: "1.0"8author: mahipal9license: MIT10metadata:11 source: https://skillmd.com/skills/njones17/conducting-internal-reconnaissance-with-bloodhound-ce12---1314# Conducting Internal Reconnaissance with BloodHound CE1516## Overview1718BloodHound Community Edition (CE) is a modern, web-based Active Directory reconnaissance platform developed by SpecterOps that uses graph theory to reveal hidden relationships and attack paths within AD environments. Unlike the legacy BloodHound application, BloodHound CE uses a PostgreSQL backend with a dedicated graph database, providing improved performance, a modern web UI, and enhanced API capabilities. Red teams use BloodHound CE to collect AD objects, ACLs, sessions, group memberships, and trust relationships, then visualize attack paths from compromised low-privileged accounts to high-value targets like Domain Admins. The SharpHound collector (v2 for CE) gathers data from Active Directory, while AzureHound collects from Azure AD / Entra ID environments.1920## Objectives2122- Deploy BloodHound CE server using Docker Compose23- Collect AD data using SharpHound v2 or BloodHound.py24- Import collected data into BloodHound CE for graph analysis25- Identify shortest attack paths from owned principals to Domain Admins26- Discover ACL-based attack paths, Kerberoastable accounts, and delegation abuse27- Execute custom Cypher queries for advanced attack path analysis28- Generate attack path reports for engagement documentation2930## MITRE ATT&CK Mapping3132- **T1087.002** - Account Discovery: Domain Account33- **T1069.002** - Permission Groups Discovery: Domain Groups34- **T1482** - Domain Trust Discovery35- **T1615** - Group Policy Discovery36- **T1018** - Remote System Discovery37- **T1033** - System Owner/User Discovery38- **T1016** - System Network Configuration Discovery3940## Implementation Steps4142### Phase 1: BloodHound CE Deployment431. Deploy BloodHound CE using Docker Compose:44 ```bash45 curl -L https://ghst.ly/getbhce -o docker-compose.yml46 docker compose pull47 docker compose up -d48 ```492. Access the web interface at https://localhost:8080503. Log in with the default admin credentials (displayed in Docker logs):51 ```bash52 docker compose logs | grep "Initial Password"53 ```544. Change the default admin password immediately5556### Phase 2: Data Collection with SharpHound v2571. Transfer SharpHound v2 to the compromised Windows host:58 ```powershell59 # Execute full collection60 .\SharpHound.exe -c All --outputdirectory C:\Temp6162 # DCOnly collection (LDAP only, stealthier)63 .\SharpHound.exe -c DCOnly6465 # Session collection for logged-on user mapping66 .\SharpHound.exe -c Session --loop --loopduration 02:00:006768 # Collect from specific domain69 .\SharpHound.exe -c All -d child.domain.local70 ```712. Alternative: Use BloodHound.py from Linux:72 ```bash73 bloodhound-python -u user -p 'Password123' -d domain.local -ns 10.10.10.1 -c All74 ```753. Exfiltrate the generated ZIP file to the analysis workstation7677### Phase 3: Data Import and Initial Analysis781. Upload collected data via the BloodHound CE web interface (File Ingest)792. Mark compromised accounts as "Owned" in the interface803. Run built-in analysis queries:81 - Shortest Path to Domain Admin82 - Kerberoastable Users with Path to DA83 - AS-REP Roastable Users84 - Users with DCSync Rights85 - Computers with Unconstrained Delegation8687### Phase 4: Custom Cypher Queries881. Execute custom Cypher queries in the BloodHound CE search bar:89 ```cypher90 // Find shortest path from owned principals to Domain Admins91 MATCH p=shortestPath((n {owned:true})-[*1..]->(m:Group {name:"DOMAIN ADMINS@DOMAIN.LOCAL"}))92 RETURN p9394 // Find Kerberoastable users with path to DA95 MATCH (u:User {hasspn:true})96 MATCH p=shortestPath((u)-[*1..]->(g:Group {name:"DOMAIN ADMINS@DOMAIN.LOCAL"}))97 RETURN p9899 // Find computers with sessions of DA members100 MATCH (c:Computer)-[:HasSession]->(u:User)-[:MemberOf*1..]->(g:Group {name:"DOMAIN ADMINS@DOMAIN.LOCAL"})101 RETURN c.name, u.name102103 // Find ACL-based attack paths (GenericAll, WriteDACL, GenericWrite)104 MATCH p=(u:User)-[:GenericAll|GenericWrite|WriteDacl|WriteOwner|ForceChangePassword*1..]->(t)105 WHERE u.owned = true106 RETURN p107108 // Find users who can DCSync109 MATCH (u)-[:MemberOf*0..]->()-[:DCSync|GetChanges|GetChangesAll*1..]->(d:Domain)110 RETURN u.name, d.name111112 // Find computers with LAPS but readable by non-admins113 MATCH (c:Computer {haslaps:true})114 MATCH p=(u:User)-[:ReadLAPSPassword]->(c)115 RETURN p116 ```117118### Phase 5: Attack Path Prioritization1191. Score identified attack paths by:120 - Number of hops (shorter = higher priority)121 - Stealth requirements (avoid noisy techniques)122 - Tool availability for each hop123 - Likelihood of detection at each step1242. Create an execution plan for the highest-priority paths1253. Identify required tools for each step in the chain1264. Plan OPSEC considerations for each technique127128## Tools and Resources129130| Tool | Purpose | Platform |131|------|---------|----------|132| BloodHound CE | Web-based graph analysis platform | Docker |133| SharpHound v2 | AD data collection (.NET, for CE) | Windows |134| BloodHound.py | AD data collection (Python) | Linux |135| AzureHound | Azure AD / Entra ID data collection | Cross-platform |136| PlumHound | Automated BloodHound reporting | Python |137| BloodHound Query Library | Community Cypher query repository | Web |138139## Key Attack Path Types140141| Path Type | Description | Example |142|-----------|-------------|---------|143| ACL Abuse | Exploit misconfigured ACLs | GenericAll on DA group |144| Kerberoasting | Crack service account passwords | SPN account → DA |145| AS-REP Roasting | Attack accounts without pre-auth | No-preauth user → password crack |146| Delegation Abuse | Exploit unconstrained/constrained delegation | Computer → impersonate DA |147| GPO Abuse | Modify GPOs applied to privileged OUs | GPO write → code execution on DA |148| Session Hijack | Leverage DA sessions on compromised hosts | Admin session → token theft |149150## Validation Criteria151152- [ ] BloodHound CE deployed and accessible153- [ ] SharpHound v2 data collected from all domains in scope154- [ ] Data successfully imported into BloodHound CE155- [ ] Owned principals marked in the interface156- [ ] Shortest paths to Domain Admin identified157- [ ] ACL-based attack paths documented158- [ ] Kerberoastable and AS-REP roastable accounts listed159- [ ] Custom Cypher queries executed for advanced analysis160- [ ] Attack paths prioritized by feasibility and stealth161- [ ] Report generated with all identified paths and evidence