githubEdit

BOFHound

BOFHound parses Cobalt Strike logs to generate BloodHound-compatible data without running SharpHound on target.


Data Collection (Beacon)

Run these LDAP queries from Beacon to collect the necessary data:

# Collect domains, OUs, GPOs with security descriptors
ldapsearch (|(objectClass=domain)(objectClass=organizationalUnit)(objectClass=groupPolicyContainer)) --attributes *,ntsecuritydescriptor

# Collect users, computers, groups with security descriptors
ldapsearch (|(samAccountType=805306368)(samAccountType=805306369)(samAccountType=268435456)) --attributes *,ntsecuritydescriptor

Processing Logs

# From Ubuntu/WSL - copy CS logs
cd /mnt/c/Users/Attacker/Desktop
scp -r attacker@TEAMSERVER:/opt/cobaltstrike/logs .

# Run BOFHound
bofhound -i logs

Output can be imported into BloodHound.


Restricted Groups - Get Local Admins

BloodHound may miss local admin relationships defined via GPO Restricted Groups. Extract manually:

Download GptTmpl.inf

Add Custom Edges in BloodHound

After identifying the group SID from GptTmpl.inf, add AdminTo edges:


WMI Filters

Important: BloodHound does NOT show WMI Filters. GPOs may appear to apply to computers but are actually filtered out.

Enumerate WMI Filters on GPOs

Get Filter Details

This filter means the GPO only applies to Windows 10+ systems - older versions are excluded even if in the target OU.


Key Takeaways

  • BOFHound collects BloodHound data via Beacon without SharpHound

  • Restricted Groups in GPOs can grant local admin - manually add edges

  • WMI Filters can exclude computers from GPO application - BloodHound won't show this

Last updated