Conducting Internal Reconnaissance with BloodHound CE
Legal Notice: This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.
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.
When to Use
- When conducting security assessments that involve conducting internal reconnaissance with bloodhound ce
- When following incident response procedures for related security events
- When performing scheduled security testing or auditing activities
- When validating security controls through hands-on testing
Prerequisites
- Familiarity with red teaming concepts and tools
- Access to a test or lab environment for safe execution
- Python 3.8+ with required dependencies installed
- Appropriate authorization for any testing activities
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
Workflow
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: Apache-2.010metadata:11 source: https://skillmd.com/skills/micsapp/conducting-internal-reconnaissance-with-bloodhound-ce12---1314# Conducting Internal Reconnaissance with BloodHound CE151617> **Legal Notice:** This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.1819## Overview2021BloodHound 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.222324## When to Use2526- When conducting security assessments that involve conducting internal reconnaissance with bloodhound ce27- When following incident response procedures for related security events28- When performing scheduled security testing or auditing activities29- When validating security controls through hands-on testing3031## Prerequisites3233- Familiarity with red teaming concepts and tools34- Access to a test or lab environment for safe execution35- Python 3.8+ with required dependencies installed36- Appropriate authorization for any testing activities3738## Objectives3940- Deploy BloodHound CE server using Docker Compose41- Collect AD data using SharpHound v2 or BloodHound.py42- Import collected data into BloodHound CE for graph analysis43- Identify shortest attack paths from owned principals to Domain Admins44- Discover ACL-based attack paths, Kerberoastable accounts, and delegation abuse45- Execute custom Cypher queries for advanced attack path analysis46- Generate attack path reports for engagement documentation4748## MITRE ATT&CK Mapping4950- **T1087.002** - Account Discovery: Domain Account51- **T1069.002** - Permission Groups Discovery: Domain Groups52- **T1482** - Domain Trust Discovery53- **T1615** - Group Policy Discovery54- **T1018** - Remote System Discovery55- **T1033** - System Owner/User Discovery56- **T1016** - System Network Configuration Discovery5758## Workflow5960### Phase 1: BloodHound CE Deployment611. Deploy BloodHound CE using Docker Compose:62 ```bash63 curl -L https://ghst.ly/getbhce -o docker-compose.yml64 docker compose pull65 docker compose up -d66 ```672. Access the web interface at https://localhost:8080683. Log in with the default admin credentials (displayed in Docker logs):69 ```bash70 docker compose logs | grep "Initial Password"71 ```724. Change the default admin password immediately7374### Phase 2: Data Collection with SharpHound v2751. Transfer SharpHound v2 to the compromised Windows host:76 ```powershell77 # Execute full collection78 .\SharpHound.exe -c All --outputdirectory C:\Temp7980 # DCOnly collection (LDAP only, stealthier)81 .\SharpHound.exe -c DCOnly8283 # Session collection for logged-on user mapping84 .\SharpHound.exe -c Session --loop --loopduration 02:00:008586 # Collect from specific domain87 .\SharpHound.exe -c All -d child.domain.local88 ```892. Alternative: Use BloodHound.py from Linux:90 ```bash91 bloodhound-python -u user -p 'Password123' -d domain.local -ns 10.10.10.1 -c All92 ```933. Exfiltrate the generated ZIP file to the analysis workstation9495### Phase 3: Data Import and Initial Analysis961. Upload collected data via the BloodHound CE web interface (File Ingest)972. Mark compromised accounts as "Owned" in the interface983. Run built-in analysis queries:99 - Shortest Path to Domain Admin100 - Kerberoastable Users with Path to DA101 - AS-REP Roastable Users102 - Users with DCSync Rights103 - Computers with Unconstrained Delegation104105### Phase 4: Custom Cypher Queries1061. Execute custom Cypher queries in the BloodHound CE search bar:107 ```cypher108 // Find shortest path from owned principals to Domain Admins109 MATCH p=shortestPath((n {owned:true})-[*1..]->(m:Group {name:"DOMAIN ADMINS@DOMAIN.LOCAL"}))110 RETURN p111112 // Find Kerberoastable users with path to DA113 MATCH (u:User {hasspn:true})114 MATCH p=shortestPath((u)-[*1..]->(g:Group {name:"DOMAIN ADMINS@DOMAIN.LOCAL"}))115 RETURN p116117 // Find computers with sessions of DA members118 MATCH (c:Computer)-[:HasSession]->(u:User)-[:MemberOf*1..]->(g:Group {name:"DOMAIN ADMINS@DOMAIN.LOCAL"})119 RETURN c.name, u.name120121 // Find ACL-based attack paths (GenericAll, WriteDACL, GenericWrite)122 MATCH p=(u:User)-[:GenericAll|GenericWrite|WriteDacl|WriteOwner|ForceChangePassword*1..]->(t)123 WHERE u.owned = true124 RETURN p125126 // Find users who can DCSync127 MATCH (u)-[:MemberOf*0..]->()-[:DCSync|GetChanges|GetChangesAll*1..]->(d:Domain)128 RETURN u.name, d.name129130 // Find computers with LAPS but readable by non-admins131 MATCH (c:Computer {haslaps:true})132 MATCH p=(u:User)-[:ReadLAPSPassword]->(c)133 RETURN p134 ```135136### Phase 5: Attack Path Prioritization1371. Score identified attack paths by:138 - Number of hops (shorter = higher priority)139 - Stealth requirements (avoid noisy techniques)140 - Tool availability for each hop141 - Likelihood of detection at each step1422. Create an execution plan for the highest-priority paths1433. Identify required tools for each step in the chain1444. Plan OPSEC considerations for each technique145146## Tools and Resources147148| Tool | Purpose | Platform |149|------|---------|----------|150| BloodHound CE | Web-based graph analysis platform | Docker |151| SharpHound v2 | AD data collection (.NET, for CE) | Windows |152| BloodHound.py | AD data collection (Python) | Linux |153| AzureHound | Azure AD / Entra ID data collection | Cross-platform |154| PlumHound | Automated BloodHound reporting | Python |155| BloodHound Query Library | Community Cypher query repository | Web |156157## Key Attack Path Types158159| Path Type | Description | Example |160|-----------|-------------|---------|161| ACL Abuse | Exploit misconfigured ACLs | GenericAll on DA group |162| Kerberoasting | Crack service account passwords | SPN account → DA |163| AS-REP Roasting | Attack accounts without pre-auth | No-preauth user → password crack |164| Delegation Abuse | Exploit unconstrained/constrained delegation | Computer → impersonate DA |165| GPO Abuse | Modify GPOs applied to privileged OUs | GPO write → code execution on DA |166| Session Hijack | Leverage DA sessions on compromised hosts | Admin session → token theft |167168## Validation Criteria169170- [ ] BloodHound CE deployed and accessible171- [ ] SharpHound v2 data collected from all domains in scope172- [ ] Data successfully imported into BloodHound CE173- [ ] Owned principals marked in the interface174- [ ] Shortest paths to Domain Admin identified175- [ ] ACL-based attack paths documented176- [ ] Kerberoastable and AS-REP roastable accounts listed177- [ ] Custom Cypher queries executed for advanced analysis178- [ ] Attack paths prioritized by feasibility and stealth179- [ ] Report generated with all identified paths and evidence