BloodHound ⚙️
Last updated
Was this helpful?
Last updated
Was this helpful?
(Javascript webapp, compiled with Electron, uses as graph DBMS) is an awesome tool that allows mapping of relationships within Active Directory environments. It mostly uses Windows API functions and LDAP namespace functions to collect data from domain controllers and domain-joined Windows systems.
BloodHound needs to be fed JSON files containing info on the objects and relationships within the AD domain. This information are obtained with collectors (also called ingestors). The best way of doing this is using the official SharpHound (C#) collector.
SharpHound (, ) is designed targeting .Net 4.5. It can be used as a compiled executable.
It must be run from the context of a domain user, either directly through a logon or through another method such as runas (runas /netonly /user:$DOMAIN\$USER
) (see ). Alternatively, SharpHound can be used with the LdapUsername
and LdapPassword
flags for that matter.
The previous commands are basic but some options (i.e. Stealth and Loop) can be very useful depending on the context
More help on the CLI commands .
Here are a few tips and tricks on the collection process
Testers can absolutely run SharpHound from a computer that is not enrolled in the AD domain, by running it in a domain user context (e.g. with runas, or ). This is useful when domain computers have antivirus or other protections preventing (or slowing) testers from using enumerate or exploitation tools.
When obtaining a foothold on an AD domain, testers should first run SharpHound with all collection methods, and then start a loop collection to enumerate more sessions.
Once the collection is over, the data can be uploaded and analyzed in BloodHound by doing the following.
Find paths between specified nodes
Run pre-built analytics queries to find common attack paths
Run custom queries to help in finding more complex attack paths or interesting objects
Run manual neo4j queries
Mark nodes as high value targets for easier path finding
Mark nodes as owned for easier path finding
Find information about selected nodes: sessions, properties, group membership/members, local admin rights, Kerberos delegations, RDP rights, outbound/inbound control rights (ACEs), and so on
Find help about edges/attacks (abuse, OPSEC considerations, references)
Here are some examples of quick wins to spot with BloodHound
other over-privileged users: user that can control many objects (ACEs) and that often leads to admins, shadow admins or sensitive servers (check for "outbound control rights" in the node info panel)
Using BloodHound can help find attack paths and abuses like ACEs abuse, , and , , , , , etc.
For detailed and official documentation on the analysis process, testers can check the following resources: , and .
Some custom queries can be used to go even further with the analysis of attack paths, such as .
shadow admins: users that are not members of privileged Active Directory groups but have sensitive privileges over the domain (run graph queries like "find principals with rights", "users with most local admin rights", or check "inbound control rights" in the domain and privileged groups node info panel)
over-privileged computers: find computers that can do (run graph queries like "find computer with unconstrained delegations")
admin computers: find computers (A) that have admin rights against other computers (B). This can be exploited as follows: computer A triggered with an authentication is then , and credentials are on the computer B.
Other quick wins can be easily found with the Python script
(Python) can be used to populate BloodHound's database with password obtained during a pentest. This can help sort and report attack paths.