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: "Use BloodHound CE with SharpHound (AD) and AzureHound (Entra ID) collectors for internal AD reconnaissance and attack-path mapping. Signals: BloodHound, SharpHound."4zh-signals: "用 BloodHound CE 图数据库 + SharpHound(AD)/AzureHound(Entra ID)采集器做内网 AD 侦察,把 AC信号:bloodhound,sharphound。"5when-to-use: Conduct internal Active Directory reconnaissance using BloodHound Community Edition's graph database with the SharpHound (AD) and AzureHound (Entra ID) collectors, mapping ACLs, sessions, and group me6domain: cybersecurity7subdomain: red-teaming8tags:9- red-team10- reconnaissance11- bloodhound12- active-directory13- attack-paths14- privilege-escalation15- graph-analysis16version: '1.0'17author: mahipal18license: Apache-2.019d3fend_techniques:20- Restore Access21- Password Authentication22- Biometric Authentication23- Strong Password Policy24- Restore User Account Access25nist_csf:26- ID.RA-0127- GV.OV-0228- DE.AE-0729mitre_attack:30- T1087.00231- T1069.00232- T148233- T101834metadata:35 source: https://skillmd.com/skills/dangeroussong/conducting-internal-reconnaissance-with-bloodhound-ce36---3738# Conducting Internal Reconnaissance with BloodHound CE394041> **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.4243## Overview4445BloodHound 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.464748## When to Use4950- When conducting security assessments that involve conducting internal reconnaissance with bloodhound ce51- When following incident response procedures for related security events52- When performing scheduled security testing or auditing activities53- When validating security controls through hands-on testing5455## Prerequisites5657- Familiarity with red teaming concepts and tools58- Access to a test or lab environment for safe execution59- Python 3.8+ with required dependencies installed60- Appropriate authorization for any testing activities6162## Objectives6364- Deploy BloodHound CE server using Docker Compose65- Collect AD data using SharpHound v2 or BloodHound.py66- Import collected data into BloodHound CE for graph analysis67- Identify shortest attack paths from owned principals to Domain Admins68- Discover ACL-based attack paths, Kerberoastable accounts, and delegation abuse69- Execute custom Cypher queries for advanced attack path analysis70- Generate attack path reports for engagement documentation7172## MITRE ATT&CK Mapping7374- **T1087.002** - Account Discovery: Domain Account75- **T1069.002** - Permission Groups Discovery: Domain Groups76- **T1482** - Domain Trust Discovery77- **T1615** - Group Policy Discovery78- **T1018** - Remote System Discovery79- **T1033** - System Owner/User Discovery80- **T1016** - System Network Configuration Discovery8182## Workflow8384### Phase 1: BloodHound CE Deployment851. Deploy BloodHound CE using Docker Compose:86 ```bash87 curl -L https://ghst.ly/getbhce -o docker-compose.yml88 docker compose pull89 docker compose up -d90 ```912. Access the web interface at https://localhost:8080923. Log in with the default admin credentials (displayed in Docker logs):93 ```bash94 docker compose logs | grep "Initial Password"95 ```964. Change the default admin password immediately9798### Phase 2: Data Collection with SharpHound v2991. Transfer SharpHound v2 to the compromised Windows host:100 ```powershell101 # Execute full collection102 .\SharpHound.exe -c All --outputdirectory C:\Temp103104 # DCOnly collection (LDAP only, stealthier)105 .\SharpHound.exe -c DCOnly106107 # Session collection for logged-on user mapping108 .\SharpHound.exe -c Session --loop --loopduration 02:00:00109110 # Collect from specific domain111 .\SharpHound.exe -c All -d child.domain.local112 ```1132. Alternative: Use BloodHound.py from Linux:114 ```bash115 bloodhound-python -u user -p 'Password123' -d domain.local -ns 10.10.10.1 -c All116 ```1173. Exfiltrate the generated ZIP file to the analysis workstation118119### Phase 3: Data Import and Initial Analysis1201. Upload collected data via the BloodHound CE web interface (File Ingest)1212. Mark compromised accounts as "Owned" in the interface1223. Run built-in analysis queries:123 - Shortest Path to Domain Admin124 - Kerberoastable Users with Path to DA125 - AS-REP Roastable Users126 - Users with DCSync Rights127 - Computers with Unconstrained Delegation128129### Phase 4: Custom Cypher Queries1301. Execute custom Cypher queries in the BloodHound CE search bar:131 ```cypher132 // Find shortest path from owned principals to Domain Admins133 MATCH p=shortestPath((n {owned:true})-[*1..]->(m:Group {name:"DOMAIN ADMINS@DOMAIN.LOCAL"}))134 RETURN p135136 // Find Kerberoastable users with path to DA137 MATCH (u:User {hasspn:true})138 MATCH p=shortestPath((u)-[*1..]->(g:Group {name:"DOMAIN ADMINS@DOMAIN.LOCAL"}))139 RETURN p140141 // Find computers with sessions of DA members142 MATCH (c:Computer)-[:HasSession]->(u:User)-[:MemberOf*1..]->(g:Group {name:"DOMAIN ADMINS@DOMAIN.LOCAL"})143 RETURN c.name, u.name144145 // Find ACL-based attack paths (GenericAll, WriteDACL, GenericWrite)146 MATCH p=(u:User)-[:GenericAll|GenericWrite|WriteDacl|WriteOwner|ForceChangePassword*1..]->(t)147 WHERE u.owned = true148 RETURN p149150 // Find users who can DCSync151 MATCH (u)-[:MemberOf*0..]->()-[:DCSync|GetChanges|GetChangesAll*1..]->(d:Domain)152 RETURN u.name, d.name153154 // Find computers with LAPS but readable by non-admins155 MATCH (c:Computer {haslaps:true})156 MATCH p=(u:User)-[:ReadLAPSPassword]->(c)157 RETURN p158 ```159160### Phase 5: Attack Path Prioritization1611. Score identified attack paths by:162 - Number of hops (shorter = higher priority)163 - Stealth requirements (avoid noisy techniques)164 - Tool availability for each hop165 - Likelihood of detection at each step1662. Create an execution plan for the highest-priority paths1673. Identify required tools for each step in the chain1684. Plan OPSEC considerations for each technique169170## Tools and Resources171172| Tool | Purpose | Platform |173|------|---------|----------|174| BloodHound CE | Web-based graph analysis platform | Docker |175| SharpHound v2 | AD data collection (.NET, for CE) | Windows |176| BloodHound.py | AD data collection (Python) | Linux |177| AzureHound | Azure AD / Entra ID data collection | Cross-platform |178| PlumHound | Automated BloodHound reporting | Python |179| BloodHound Query Library | Community Cypher query repository | Web |180181## Key Attack Path Types182183| Path Type | Description | Example |184|-----------|-------------|---------|185| ACL Abuse | Exploit misconfigured ACLs | GenericAll on DA group |186| Kerberoasting | Crack service account passwords | SPN account → DA |187| AS-REP Roasting | Attack accounts without pre-auth | No-preauth user → password crack |188| Delegation Abuse | Exploit unconstrained/constrained delegation | Computer → impersonate DA |189| GPO Abuse | Modify GPOs applied to privileged OUs | GPO write → code execution on DA |190| Session Hijack | Leverage DA sessions on compromised hosts | Admin session → token theft |191192## Validation Criteria193194- [ ] BloodHound CE deployed and accessible195- [ ] SharpHound v2 data collected from all domains in scope196- [ ] Data successfully imported into BloodHound CE197- [ ] Owned principals marked in the interface198- [ ] Shortest paths to Domain Admin identified199- [ ] ACL-based attack paths documented200- [ ] Kerberoastable and AS-REP roastable accounts listed201- [ ] Custom Cypher queries executed for advanced analysis202- [ ] Attack paths prioritized by feasibility and stealth203- [ ] Report generated with all identified paths and evidence