7. BloodHound


Collecting with SharpHound:

  1. Get script to system and launch bypassed powershell.
  2. Import module:
Import-Module .\Sharphound.ps1
  1. Invoke Bloodhound:
Invoke-BloodHound -CollectionMethod All -OutputDirectory C:\temp\ -OutputPrefix "audit"
  1. Delete generated .bin cache file at output location!

Analyzing with BloodHound:

  1. Start the Neo4j service:
sudo neo4j start
  1. Browse to the interface at: http://localhost:7474
  2. Authenticate using both username and password "neo4j". Then choose new password to database.
  3. Start Bloodhound from the terminal and log in using the credentials created:
bloodhound
  1. Unzip and upload data from "Upload Data" in GUI.

BloodHound analysis:

MATCH (m:Computer) RETURN m
MATCH (c:Computer) WHERE c.name CONTAINS "SEARCH" RETURN c
MATCH p = (c:Computer)-[:HasSession]->(m:User) RETURN p
MATCH (u:User {hasspn:true}) MATCH (g:Group) WHERE g.name CONTAINS 'DOMAIN ADMINS' MATCH p = shortestPath( (u)-[*1..]->(g) ) RETURN p
MATCH (n:Computer),(m:Group {name:'DOMAIN ADMINS@ADM.HUDDINGE.SE'}),p=shortestPath((n)-[r:MemberOf|HasSession|AdminTo|AllExtendedRights|AddMember|ForceChangePassword|GenericAll|GenericWrite|Owns|WriteDacl|WriteOwner|CanRDP|ExecuteDCOM|AllowedToDelegate|ReadLAPSPassword|Contains|GpLink|AddAllowedToAct|AllowedToAct*1..]->(m)) RETURN p

Good queries to run: