HEAD TO TAIL
Derbycon 9.0 - “Finish Line” Louisville, Kentucky 2019
AGENDA
SharpHound Review
Example Attack Path
Kerberoast
WriteOwner
Resource-Based Constrained Delegation
HasSession
MSSQL Execution
2
3
Andy Robbins
@_wald0
Rohan Vazarkar
@CptJesus
SharpHound
How does it work?
The Most Basic Level
5
Collection Methods
6
Default Collection
7
All Collection
8
DCOnly Collection
9
Stealth
10
Lesser Known Options
11
Available Collection Methods
Hybrid
Individual
More
12
Example Attack Path
14
Available Abusable Edges/Configs
Lateral movement:
ACL Edges:
ETC:
15
Available Abusable Edges/Configs
Lateral movement:
ACL Edges:
ETC:
16
ETC: Kerberoast
*Some caveats can apply, we will update this slide with a link to our colleague, Will Schroder’s, talk from earlier today
17
Finite Password Cracking Resources
19
DON’T BE AFRAID TO ROLL UP YOUR SLEEVES
20
21
22
Count of kerberoastable users
MATCH (u:User {hasspn:true})
RETURN COUNT(u)
23
Count of kerberoastable users with a path to DA
MATCH (u:User {hasspn:true})
MATCH (g:Group {name:'DOMAIN ADMINS@CONTOSO.LOCAL'})
MATCH p = shortestPath(
(u)-[*1..]->(g)
)
RETURN u.name,LENGTH(p)
ORDER BY LENGTH(p) ASC
24
Most privileged kerberoastable users
MATCH (u:User {hasspn:true})
OPTIONAL MATCH (u)-[:AdminTo]->(c1:Computer)
OPTIONAL MATCH (u)-[:MemberOf*1..]->(:Group)-[:AdminTo]->(c2:Computer)
WITH u,COLLECT(c1) + COLLECT(c2) AS tempVar
UNWIND tempVar AS comps
RETURN u.name,COUNT(DISTINCT(comps))
ORDER BY COUNT(DISTINCT(comps)) DESC
Kerberoast JFRANK
25
26
27
The group IT00035 has the WriteOwner privilege against the user Bob.Accounting
The users added to IT00035 can edit the object owner attribute on the Bob.Accounting user object
Object owners can modify object DACLs (read: add/remove permissions against the object)
WriteOwner - Attack Plan
28
29
30
Lateral Movement: AllowedToAct
31
32
The user Bob.Accounting is Allowed To Act On Behalf Of Other Identities to the computer Accounting-001
The user Bob.Accounting is Allowed To Impersonate Other Identities to the computer Accounting-001
Accounting-001 trusts Bob.Accounting to Impersonate ANYONE ELSE against ANY SERVICE
IT’S KERBEROS DELEGATION!
AllowedToAct - Attack Plan
33
34
35
36
What Creates this Edge?
37
Lateral Movement: SQLAdmin
38
SQLAdmin - Attack Plan
39
40
41
THANK YOU
42
42
CREDITS
Special thanks to all the people who made and released these awesome resources for free:
43