BloodHound From Red to Blue 1.5
By Scoubi @ScoubiMTL
BloodHound From Red to Blue 1.5 By Scoubi @ScoubiMTL BIO Sr - - PowerPoint PPT Presentation
BloodHound From Red to Blue 1.5 By Scoubi @ScoubiMTL BIO Sr Security Architect at Bell Canada Adversary Detection Team Lead Threat Hunting Team Lead First Presented at BSidesCharm French Canadian Dont pronounce S and H
By Scoubi @ScoubiMTL
Sr Security Architect at Bell Canada
Adversary Detection Team Lead Threat Hunting Team Lead
First Presented at BSidesCharm French Canadian
Don’t pronounce ”S” and “H”
BlueTeam Village 1
BlueTeam Village 2
Talk at Defcon Make a talk with a mohawk Second presentation this week Present as many talks as @Pyrotek at #HSC Present one more talks than @subTee Present two more talks than @mattifestation No security researcher’s Ego was harmed in the making of this slide!
Overview of Bloodhound Basics usage of Bloodhound Introduction to Cypher Destroy Attack Paths Report & Automation
BlueTeam Village 3
@JohnLaTwC git.io/fpfZ5
BlueTeam Village 4
BlueTeam Village 5
BlueTeam Village 6
You Alexis Family Taylor Jordan Friend
BlueTeam Village 7
AdminTo HasSession
BlueTeam Village 8
BlueTeam Village 9
BloodHound uses graph theory to reveal the hidden and often unintended relationships within an Active Directory environment. Attackers can use BloodHound to easily identify highly complex attack paths that would otherwise be impossible to quickly identify. Defenders can use BloodHound to identify and eliminate those same attack paths. Both blue and red teams can use BloodHound to easily gain a deeper understanding of privilege relationships in an Active Directory environment
BlueTeam Village 10
DEF CON 24 - Six Degrees of Domain Admin
https://youtu.be/Y8qu5NFKyrE
Blackhat 2017 - The Industrial Revolution of Lateral Movement
https://youtu.be/lbJPCnjQxCU
Blackhat 2018 – Arsenal : Bloodhound 2.0
BloodHound is developed by @_wald0, @CptJesus, and @harmj0y.
BlueTeam Village 11
It queries Active Directory Import the data in Neo4j Show relations between objects
BlueTeam Village 12
For Red
Use UI to build attack paths offline Reduce noise on the network
For Blue
Use queries to find “busiest” attack paths Test remediation’s effect on the graph Destroy paths before they are exploited
BlueTeam Village 13
First Steps
BlueTeam Village 14
Ingestors
all | LoggedOn | DConly
Sharphound -h https://github.com/BloodHoundAD/Sharp Hound
SharpHound Invoke-BloodHound bloodhound-python
BlueTeam Village 15
The GUI
BlueTeam Village 16
Right-Click Edges: CTRL: SHIFT+CTRL+I: Spacebar: “GPO:”: “OU:”: Contextual Help Toggle Labels Console Toggle Spotligh Search GPOs Search OUs
BlueTeam Village 17
Graph Database
Neo4j
Download : https://neo4j.com/download-center/#releases Launch : $ neo4j-community-3.4.5/bin/neo4j start Console : http://localhost:7474/
BlueTeam Village 18
Graph Database
Neo4j
Download : https://neo4j.com/download-center/#releases Launch : $ neo4j-community-3.4.5/bin/neo4j start Console : http://localhost:7474/
BlueTeam Village 19
Graph Database
Neo4j
Download : https://neo4j.com/download-center/#releases Launch : $ neo4j-community-3.4.5/bin/neo4j start Console : http://localhost:7474/
BlueTeam Village 20
Learning to run
BlueTeam Village 21
MATCH Objects : (u:User) u.name Relationship : -[:RelType]-> Path Finding : shortestpath(u)-[*1..]->(g) WHERE RETURN
BlueTeam Village 22
Explicit Where
BlueTeam Village 23
Explicit Where
BlueTeam Village 24
Explicit Where
BlueTeam Village 25
Explicit Where
BlueTeam Village 26
1 ms 81 ms
BlueTeam Village 27
BlueTeam Village 28
BlueTeam Village 29
BlueTeam Village 30
execution plan but not run the statement
run the statement and see which
most of the work
BlueTeam Village 31
BlueTeam Village 32
EXPLAIN MATCH
BlueTeam Village 33
PROFILE
BlueTeam Village 34
Useful queries you can run
1.1 Are Local Admin 1.2 Shortest path to High Value 1.3 Can RDP to 1.4 Other “bad” Rights 2.1 High Value Accounts 2.2 List all 3.1 User with sessions 3.2 Computer with Admin 3.3 Computer with Sessions 3.4 User with Admin Rights
2.Kerberoasting 3.Top 10 X
https://github.com/Scoubi/Blo
BlueTeam Village 35
BlueTeam Village 36
https://neo4j.com/docs/cypher- refcard/current/
BlueTeam Village 37
BlueTeam Village 38
Find Busiest Paths Test the effect of the proposed remediation Inform our Domain Admins what change to make
BlueTeam Village 39
BlueTeam Village 40
Create a link
BlueTeam Village 41
Create a link
BlueTeam Village 42
BlueTeam Village 43
BlueTeam Village 44
When there is only one relation of that type in the path
When there is more one relation of that type in the path
BlueTeam Village 45
BlueTeam Village 46
BlueTeam Village 47
BlueTeam Village 48
OR
BlueTeam Village 49
OR
BlueTeam Village 50
BlueTeam Village 51
BlueTeam Village 52
BlueTeam Village 53
BlueTeam Village 54
BlueTeam Village 55
BlueTeam Village 56
BlueTeam Village 57
BlueTeam Village 58
BlueTeam Village 59
BlueTeam Village 60
BlueTeam Village 61
BlueTeam Village 62
BlueTeam Village 63
BlueTeam Village 64
BlueTeam Village 65
BlueTeam Village 66
BlueTeam Village 67
BlueTeam Village 68
A graph is like a map BH will show you only 1 relation It is possible to delete a specific relation “ -[r:RelationName]-> ”
BlueTeam Village 69
BlueTeam Village 70
BlueTeam Village 71
BlueTeam Village 72
BlueTeam Village 73
BlueTeam Village 74
BlueTeam Village 75
BlueTeam Village 76
BlueTeam Village 77
BlueTeam Village 78
BlueTeam Village 79
BlueTeam Village 80
BlueTeam Village 81
Operationalizing BloodHound's Attack Graph for Defense
https://register.gotowebinar.com/register/5012887211059506187
@SadProcessor
https://insinuator.net/2019/01/2019-year-of-the-blue-dog/ https://insinuator.net/2018/11/the-dog-whisperers-handbook/
BH Slack
bloodhoundgang.herokuapp.com #cypher_queries
BlueTeam Village 82
Attackers Think in Graph. Management Thinks in Metrics. As long as this is true, Ops suffer.
BlueTeam Village 83
BlueTeam Village 84
BlueTeam Village 85
BlueTeam Village 86
BlueTeam Village 87
BlueTeam Village 88
BlueTeam Village 89
BlueTeam Village 90
BlueTeam Village 91
BlueTeam Village 92
BlueTeam Village 93
1 5 25 125 625 January Febuary March
Chart Title
List Computers where DOMAIN USERS are Local Admin Shortest Path from DOMAIN USERS to High Value Targets ALL Path from DOMAIN USERS to High Value Targets Find Workstations where DOMAIN USERS can RDP To Find Servers where DOMAIN USERS can RDP To Find all other Rights DOMAIN USERS shouldn’t have Kerberoastable Accounts member of High Value Group List all Kerberoastable Accounts
BlueTeam Village 94
BlueTeam Village 95
BlueTeam Village 96
BlueTeam Village 97
BlueTeam Village 98
Query Compare Last Results Alert if increase
BlueTeam Village 99
BlueTeam Village 100
Defenders can think in Graph too Cypher is a very flexible language Important to test real impact of remediation Not all queries are worth automating
BlueTeam Village 101
Blue Team Village @Pyrotek, @TalBeerySec, @Grifter801 @_wald0, @CptJesus
BlueTeam Village 102
BlueTeam Village 103