description
stringlengths
11
117
query
stringlengths
18
577
source
stringclasses
22 values
schema
stringclasses
1 value
id
int64
0
300
query_length
int64
18
577
description_length
int64
11
117
complexity_score
int64
0
5
query_type
stringclasses
2 values
entities
listlengths
0
3
The name of every computer in the database where at least one SPN for the computer contains the string 'MSSQL'
MATCH (c:Computer) WHERE ANY (x IN c.serviceprincipalnames WHERE toUpper(x) CONTAINS 'MSSQL') RETURN c
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
0
102
110
0
read
[ "Computer" ]
All (shortest) paths from Domain Users to High‑Value targets
MATCH (g:Group) WHERE g.name STARTS WITH 'DOMAIN USERS' MATCH (n {highvalue:true}), p = shortestPath((g)-[r*1..]->(n)) RETURN p
https://gist.github.com/seajaysec/a4d4a545047a51053d52cba567f78a9b
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
1
127
60
2
read
[ "Group" ]
All Computers without LAPS - with session
MATCH p = (d:Domain)-[r:Contains*1..]->(c:Computer)-[:HasSession]->(y) WHERE c.haslaps = false RETURN p
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
2
103
41
0
read
[ "Computer", "Domain" ]
All computers without LAPS and the computer is enabled
MATCH p = (d:Domain)-[r:Contains*1..]->(c:Computer) WHERE c.haslaps = false AND c.enabled = true RETURN p
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
3
105
54
0
read
[ "Computer", "Domain" ]
All enabled computers with a description
MATCH p = (d:Domain)-[r:Contains*1..]->(c:Computer) WHERE c.description =~ '(?i).*.*' RETURN p
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
4
94
40
0
read
[ "Computer", "Domain" ]
All enabled computers with a description containing the word file
MATCH p = (d:Domain)-[r:Contains*1..]->(c:Computer) WHERE c.description =~ '(?i).*file.*' RETURN p
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
5
98
65
0
read
[ "Computer", "Domain" ]
All Kerberoastable Users
MATCH (n {hasspn: true}) RETURN n
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
6
33
24
0
read
[]
All Owned Nodes
MATCH (n {owned: true}) RETURN n
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
7
32
15
0
read
[]
All Users with a homedirectory
MATCH p = (d:Domain)-[r:Contains*1..]->(u:User) WHERE u.homedirectory =~ '(?i).*.*' RETURN p
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
8
92
30
0
read
[ "User", "Domain" ]
Can a user from one domain affect *any* computer in another domain (VERY heavy)
MATCH (n:User {domain: {result}}) MATCH (m:Computer {domain: {}}) MATCH p=allShortestPaths((n)-[r:MemberOf|HasSession|AdminTo|AllExtendedRights|AddMember|ForceChangePassword|GenericAll|GenericWrite|Owns|WriteDacl|WriteOwner|CanRDP|ExecuteDCOM|AllowedToDelegate|ReadLAPSPassword|Contains|GpLink|AddAllowedToAct|AllowedToA...
https://gist.github.com/seajaysec/a4d4a545047a51053d52cba567f78a9b
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
9
351
79
1
read
[ "User", "Computer" ]
Computers with administrative Domain Users
MATCH p=(m:Group)-[r:AddMember|AdminTo|AllExtendedRights|AllowedToDelegate|CanRDP|Contains|ExecuteDCOM|ForceChangePassword|GenericAll|GenericWrite|GetChanges|GetChangesAll|HasSession|Owns|ReadLAPSPassword|SQLAdmin|TrustedBy|WriteDacl|WriteOwner|AddAllowedToAct|AllowedToAct]->(t) WHERE m.objectid ENDS WITH '-513' OR m.o...
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
10
422
42
1
read
[ "Group" ]
Constrained Delegation systems
MATCH p=(u)-[:AllowedToDelegate]->(c) RETURN p
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
11
46
30
0
read
[]
Count the LAPS status of all computers
MATCH (c:Computer) RETURN c.haslaps, COUNT(*)
https://redfoxsec.com/blog/bloodhound-cheat-sheet
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
12
45
38
1
read
[ "Computer" ]
Custom privileged groups that are **not** built‑in and not marked high‑value
MATCH (g:Group {admincount:true, highvalue:false, domain: $result}) WHERE NOT (g.objectid =~ $domain_admins OR g.objectid =~ $enterprise_admins OR g.objectid =~ $administrators OR g.objectid =~ $account_operators OR g.objectid CONTAINS $replicators OR g.objectid =~ $key_admins OR g.objectid =~ $read_only_domain_control...
https://raw.githubusercontent.com/InfamousSYN/bloodhound-queries/refs/heads/main/queries/privileged.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
13
406
76
0
read
[ "Group" ]
All active Domain Admin sessions
MATCH (n:User)-[:MemberOf]->(g:Group) WHERE g.objectid ENDS WITH '-512' MATCH p = (c:Computer)-[:HasSession]->(n) return p
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
14
122
32
1
read
[ "User", "Computer", "Group" ]
All AS-REP-roastable users
MATCH (u:User {dontreqpreauth: true}) RETURN u.name
https://redfoxsec.com/blog/bloodhound-cheat-sheet
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
15
51
26
0
read
[ "User" ]
All Certificate Templates
MATCH (n:GPO) WHERE n.type = 'Certificate Template' RETURN n
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
16
60
25
0
read
[ "GPO" ]
All computers domain users can RDP to
MATCH p=(g:Group)-[:CanRDP]->(c:Computer) WHERE g.objectid ENDS WITH '-513' RETURN p
https://redfoxsec.com/blog/bloodhound-cheat-sheet
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
17
84
37
1
read
[ "Computer", "Group" ]
All computers with unsupported operating systems
MATCH (H:Computer) WHERE H.operatingsystem =~ \'.*(2000|2003|2008|xp|vista|7|me).*\'AND H.enabled = true RETURN H
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
18
113
48
0
read
[ "Computer" ]
All domain admins
MATCH (n:User)-[:MemberOf*1..]->(g:Group {name: "DOMAIN ADMINS@"}) RETURN n
https://www.wwt.com/api-new/attachments/66a7b8d6ddfa33117e771706/file
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
19
75
17
0
read
[ "User", "Group" ]
All Domain Admins (nested SID S-1-5-21-.*-512) having a session opened on a domain computer
MATCH (m:User)-[r:MemberOf*1..]->(n:Group) WHERE n.objectid =~ '(?i)S-1-5-.*-512' WITH m MATCH q=((m)<-[:HasSession]-(o:Computer)) RETURN q
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
20
139
91
1
read
[ "User", "Computer", "Group" ]
All edges any owned user has on a computer
MATCH p=shortestPath((m:User)-[r]->(b:Computer)) WHERE m.owned RETURN p
https://hausec.com/2019/09/09/bloodhound-cypher-cheatsheet
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
21
71
42
1
read
[ "User", "Computer" ]
All edges any owned user has on a computer
MATCH p=shortestPath((m:User)-[r*]->(b:Computer)) WHERE m.owned RETURN p
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
22
72
42
1
read
[ "User", "Computer" ]
All local admins
MATCH (n:User)-[:AdminTo]->(m:Computer) RETURN n, m
https://www.wwt.com/api-new/attachments/66a7b8d6ddfa33117e771706/file
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
23
51
16
0
read
[ "User", "Computer" ]
All other Rights Domain Users shouldn't have
MATCH p=(m:Group)-[r:Owns|WriteDacl|GenericAll|WriteOwner|ExecuteDCOM|GenericWrite|AllowedToDelegate|ForceChangePassword]->(n:Computer) WHERE m.objectid ENDS WITH '-513' OR m.objectid ENDS WITH '-515' OR m.objectid ENDS WITH 'S-1-5-11' OR m.objectid ENDS WITH 'S-1-1-0' RETURN p
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
24
278
44
1
read
[ "Computer", "Group" ]
All Owners of Azure Applications
MATCH p = (n)-[r:AZOwns]->(g:AZApp) RETURN p
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
25
44
32
0
read
[]
All paths from users to Domain Admins group
MATCH p=shortestPath((n:User)-[*1..]->(m:Group)) WHERE m.name = "DOMAIN ADMINS@INTERNAL.LOCAL" RETURN p
https://gist.githubusercontent.com/joeminicucci/d9fb42f03186f6aaa556cc5f961f537b/raw/b6b41de85726679d37e2829f09adc66b33d86907/BloodhoundCheatSheet.md
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
26
103
43
1
read
[ "User", "Group" ]
All paths to an Azure KeyVault
MATCH p = (n)-[r]->(g:AZKeyVault) RETURN p
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
27
42
30
0
read
[]
All paths to an Azure VM
MATCH p = (n)-[r]->(g:AZVM) RETURN p
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
28
36
24
0
read
[]
All principals with certificate enrollment rights (Enroll, AllExtendedRights, or GenericAll) on certificate templates
MATCH p = ()-[:Enroll|AllExtendedRights|GenericAll]->(ct:CertTemplate) RETURN p
https://posts.specterops.io/adcs-attack-paths-in-bloodhound-part-1-799f3d3b03cf
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
29
79
117
0
read
[ "CertTemplate" ]
All Privileged Service Principals
MATCH p = (g:AZServicePrincipal)-[r]->(n) RETURN p
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
30
50
33
0
read
[]
All sessions
MATCH (n:User)-[:HasSession]->(m:Computer) RETURN n, m
https://www.wwt.com/api-new/attachments/66a7b8d6ddfa33117e771706/file
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
31
54
12
0
read
[ "User", "Computer" ]
All sessions any user in a specific domain has
MATCH p=(m:Computer)-[r:HasSession]->(n:User) WHERE n.domain IS NOT NULL RETURN p
Community contribution by @joshtmerrill
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
32
81
46
0
read
[ "User", "Computer" ]
All users a part of the VPN group
MATCH p=(u:User)-[:MemberOf]->(g:Group) WHERE toUPPER (g.name) CONTAINS 'VPN' return p
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
33
86
33
0
read
[ "User", "Group" ]
All users with 'AddMember' rights on groups
MATCH p=(g:Group)-[:AddMember]->(m:Group) RETURN p
https://gist.githubusercontent.com/joeminicucci/d9fb42f03186f6aaa556cc5f961f537b/raw/b6b41de85726679d37e2829f09adc66b33d86907/BloodhoundCheatSheet.md
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
34
50
43
0
read
[ "Group" ]
All users with 'AdminTo' rights on computers
MATCH p=(g:Group)-[:AdminTo]->(c:Computer) RETURN p
https://gist.githubusercontent.com/joeminicucci/d9fb42f03186f6aaa556cc5f961f537b/raw/b6b41de85726679d37e2829f09adc66b33d86907/BloodhoundCheatSheet.md
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
35
51
44
0
read
[ "Computer", "Group" ]
All users with 'AllExtendedRights' on computers
MATCH p=(g:Group)-[:AllExtendedRights]->(c:Computer) RETURN p
https://gist.githubusercontent.com/joeminicucci/d9fb42f03186f6aaa556cc5f961f537b/raw/b6b41de85726679d37e2829f09adc66b33d86907/BloodhoundCheatSheet.md
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
36
61
47
0
read
[ "Computer", "Group" ]
All users with 'CanPSRemote' rights on computers
MATCH p=(g:Group)-[:CanPSRemote]->(c:Computer) RETURN p
https://gist.githubusercontent.com/joeminicucci/d9fb42f03186f6aaa556cc5f961f537b/raw/b6b41de85726679d37e2829f09adc66b33d86907/BloodhoundCheatSheet.md
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
37
55
48
0
read
[ "Computer", "Group" ]
All users with 'CanRDP' rights on computers
MATCH p=(g:Group)-[:CanRDP]->(c:Computer) RETURN p
https://gist.githubusercontent.com/joeminicucci/d9fb42f03186f6aaa556cc5f961f537b/raw/b6b41de85726679d37e2829f09adc66b33d86907/BloodhoundCheatSheet.md
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
38
50
43
0
read
[ "Computer", "Group" ]
All users with 'ExecuteDCOM' rights on computers
MATCH p=(g:Group)-[:ExecuteDCOM]->(c:Computer) RETURN p
https://gist.githubusercontent.com/joeminicucci/d9fb42f03186f6aaa556cc5f961f537b/raw/b6b41de85726679d37e2829f09adc66b33d86907/BloodhoundCheatSheet.md
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
39
55
48
0
read
[ "Computer", "Group" ]
All users with 'ForceChangePassword' rights on users
MATCH p=(g:Group)-[:ForceChangePassword]->(u:User) RETURN p
https://gist.githubusercontent.com/joeminicucci/d9fb42f03186f6aaa556cc5f961f537b/raw/b6b41de85726679d37e2829f09adc66b33d86907/BloodhoundCheatSheet.md
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
40
59
52
0
read
[ "User", "Group" ]
All users with 'GenericAll' rights on computers
MATCH p=(g:Group)-[:GenericAll]->(c:Computer) RETURN p
https://gist.githubusercontent.com/joeminicucci/d9fb42f03186f6aaa556cc5f961f537b/raw/b6b41de85726679d37e2829f09adc66b33d86907/BloodhoundCheatSheet.md
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
41
54
47
0
read
[ "Computer", "Group" ]
All users with 'GenericWrite' rights on computers
MATCH p=(g:Group)-[:GenericWrite]->(c:Computer) RETURN p
https://gist.githubusercontent.com/joeminicucci/d9fb42f03186f6aaa556cc5f961f537b/raw/b6b41de85726679d37e2829f09adc66b33d86907/BloodhoundCheatSheet.md
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
42
56
49
0
read
[ "Computer", "Group" ]
All users with 'HasSession' on computers
MATCH p=(g:Group)-[:HasSession]->(c:Computer) RETURN p
https://gist.githubusercontent.com/joeminicucci/d9fb42f03186f6aaa556cc5f961f537b/raw/b6b41de85726679d37e2829f09adc66b33d86907/BloodhoundCheatSheet.md
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
43
54
40
0
read
[ "Computer", "Group" ]
All users with 'MemberOf' relationships
MATCH p=(g:Group)-[:MemberOf]->(m:Group) RETURN p
https://gist.githubusercontent.com/joeminicucci/d9fb42f03186f6aaa556cc5f961f537b/raw/b6b41de85726679d37e2829f09adc66b33d86907/BloodhoundCheatSheet.md
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
44
49
39
0
read
[ "Group" ]
All users with 'Owns' rights on computers
MATCH p=(g:Group)-[:Owns]->(c:Computer) RETURN p
https://gist.githubusercontent.com/joeminicucci/d9fb42f03186f6aaa556cc5f961f537b/raw/b6b41de85726679d37e2829f09adc66b33d86907/BloodhoundCheatSheet.md
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
45
48
41
0
read
[ "Computer", "Group" ]
All users with 'WriteDacl' rights on computers
MATCH p=(g:Group)-[:WriteDacl]->(c:Computer) RETURN p
https://gist.githubusercontent.com/joeminicucci/d9fb42f03186f6aaa556cc5f961f537b/raw/b6b41de85726679d37e2829f09adc66b33d86907/BloodhoundCheatSheet.md
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
46
53
46
0
read
[ "Computer", "Group" ]
All users with 'WriteOwner' rights on computers
MATCH p=(g:Group)-[:WriteOwner]->(c:Computer) RETURN p
https://gist.githubusercontent.com/joeminicucci/d9fb42f03186f6aaa556cc5f961f537b/raw/b6b41de85726679d37e2829f09adc66b33d86907/BloodhoundCheatSheet.md
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
47
54
47
0
read
[ "Computer", "Group" ]
All users with an SPN (Kerberoastable users)
MATCH (n:User) WHERE n.hasspn=true RETURN n
https://hausec.com/2019/09/09/bloodhound-cypher-cheatsheet
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
48
43
44
0
read
[ "User" ]
All users with passwords set over 1440 days ago (47 months)
MATCH (u:User) WHERE u.enabled=true AND u.pwdlastset < (datetime().epochseconds - (1440 * 86400)) and NOT u.pwdlastset IN [-1.0, 0.0] RETURN u
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
49
142
59
1
modification
[ "User" ]
All users with passwords set over 720 days ago (23 months)
MATCH (u:User) WHERE u.enabled=true AND u.pwdlastset < (datetime().epochseconds - (720 * 86400)) and NOT u.pwdlastset IN [-1.0, 0.0] RETURN u
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
50
141
58
1
modification
[ "User" ]
All‑shortest paths where non‑privileged users have dangerous rights to the AdminSDHolder object
MATCH p=allshortestpaths((u:User {enabled:true, admincount:false, domain: $result})-[*]->(c:Container)) WHERE c.distinguishedname CONTAINS 'ADMINSDHOLDER' RETURN p
https://raw.githubusercontent.com/InfamousSYN/bloodhound-queries/refs/heads/main/queries/persistence.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
51
163
95
0
read
[ "User", "Container" ]
All‑shortest paths where non‑privileged users have DCSync rights to a Domain object
MATCH p=allshortestpaths((u:User {enabled:true, admincount:false, domain: $result})-[r:MemberOf|DCSync*1..]->(:Domain)) RETURN p
https://raw.githubusercontent.com/InfamousSYN/bloodhound-queries/refs/heads/main/queries/persistence.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
52
128
83
0
read
[ "User", "Domain" ]
All‑shortest paths where principals can add Shadow Credentials to other principals
MATCH p=allshortestpaths((a {domain: $result})-[:MemberOf|AddKeyCredentialLink*1..]->(b)) WHERE NOT a=b RETURN p
https://raw.githubusercontent.com/InfamousSYN/bloodhound-queries/refs/heads/main/queries/persistence.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
53
112
82
0
read
[]
An object from domain 'A' that can do anything to a foreign object
MATCH p=(n)-[r]->(d) WHERE NOT d.domain=n.domain AND n.domain IS NOT NULL AND d.domain IS NOT NULL RETURN p
Community contribution by @joshtmerrill
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
54
107
66
0
read
[]
An object in one domain that can do something to a foreign object
MATCH p=(n)-[r]->(m) WHERE NOT n.domain = m.domain RETURN p
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
55
59
65
0
read
[]
Certificate Authorities
MATCH (n:GPO) WHERE n.type = 'Enrollment Service' RETURN n
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
56
58
23
0
read
[ "GPO" ]
Certificate Authorities with HTTP Web Enrollment (ESC8)
MATCH (n:GPO) WHERE n.type = 'Enrollment Service' and n.`Web Enrollment` = 'Enabled' RETURN n
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
57
93
55
0
read
[ "GPO" ]
Certificate Authorities with User Specified SAN (ESC6)
MATCH (n:GPO) WHERE n.type = 'Enrollment Service' and n.`User Specified SAN` = 'Enabled' RETURN n
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
58
97
54
0
read
[ "GPO" ]
Computers that allow unconstrained delegation that AREN'T domain controllers.
MATCH (c1:Computer)-[:MemberOf*1..]->(g:Group) WHERE g.objectid ENDS WITH '-516' WITH COLLECT(c1.name) AS domainControllers MATCH (c2:Computer {unconstraineddelegation:true}) WHERE NOT c2.name IN domainControllers RETURN c2
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
59
223
77
2
read
[ "Computer", "Group" ]
Computers with constrained delegation permissions and the corresponding targets where they allowed to delegate
MATCH (c:Computer) WHERE c.allowedtodelegate IS NOT NULL RETURN c
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
60
65
110
0
read
[ "Computer" ]
Computers with owned Admins
MATCH p=shortestPath((n:User {owned:true})-[r:AdminTo|MemberOf*1..]->(c:Computer)) return p
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
61
91
27
1
read
[ "User", "Computer" ]
Constrained delegation
MATCH p=(u:User)-[:AllowedToDelegate]->(c:Computer) RETURN p
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
62
60
22
0
read
[ "User", "Computer" ]
Domain Admin sessions not on domain controllers
OPTIONAL MATCH (c:Computer)-[:MemberOf]->(t:Group) WHERE NOT t.name = 'DOMAIN CONTROLLERS@TESTLAB.LOCAL' WITH c AS NonDC MATCH p=(NonDC)-[:HasSession]->(n:User)-[:MemberOf]->(g:Group {name:'DOMAIN ADMINS@TESTLAB.LOCAL'}) RETURN DISTINCT n.name AS Username, COUNT(DISTINCT NonDC) AS Connexions ORDER BY COUNT(DISTINCT Non...
https://hausec.com/2019/09/09/bloodhound-cypher-cheatsheet
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
63
328
47
3
read
[ "User", "Computer", "Group" ]
Enabled Certificate Templates
MATCH (n:GPO) WHERE n.type = 'Certificate Template' and n.Enabled = true RETURN n
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
64
81
29
0
read
[ "GPO" ]
Enabled Certificate Templates
MATCH (n:GPO {enabled:true, type:'Certificate Template', domain: $result}) RETURN n
https://raw.githubusercontent.com/InfamousSYN/bloodhound-queries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
65
83
29
0
read
[ "GPO" ]
Enrollment Agent Templates (ESC3)
MATCH (n:GPO) WHERE n.type = 'Certificate Template' and n.`Enabled` = true and (n.`Extended Key Usage` = [] or 'Any Purpose' IN n.`Extended Key Usage` or 'Certificate Request Agent' IN n.`Extended Key Usage`) RETURN n
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
66
217
33
0
read
[ "GPO" ]
If unprivileged users have rights to add members into groups
MATCH (n:User {admincount:False}) MATCH p=allShortestPaths((n)-[r:AddMember*1..]->(m:Group)) RETURN p
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
67
101
60
1
read
[ "User", "Group" ]
Instances where a User has GenericAll privileges on a Container
MATCH p=(n:User)-[:GenericAll]->(c:Container) RETURN p
https://posts.specterops.io/cypher-queries-in-bloodhound-enterprise-c7221a0d4bb3
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
68
54
63
0
read
[ "User", "Container" ]
Misconfigured Certificate Templates (ESC1)
MATCH (n:GPO) WHERE n.type = 'Certificate Template' and n.`Enrollee Supplies Subject` = true and n.`Client Authentication` = true and n.`Enabled` = true RETURN n
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
69
161
42
0
read
[ "GPO" ]
Misconfigured Certificate Templates (ESC2)
MATCH (n:GPO) WHERE n.type = 'Certificate Template' and n.`Enabled` = true and (n.`Extended Key Usage` = [] or 'Any Purpose' IN n.`Extended Key Usage`) RETURN n
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
70
160
42
0
read
[ "GPO" ]
Multi hop low privilege group rights (up to 6 hops)
MATCH (g:Group) WHERE g.objectid ENDS WITH '-S-1-1-0' OR g.objectid ENDS WITH '-S-1-5-11' OR g.objectid ENDS WITH '-513' OR g.objectid ENDS WITH '-515' OR g.objectid ENDS WITH '-S-1-5-32-545' OR g.objectid ENDS WITH '-S-1-5-32-554' MATCH p=(g)-[r1:MemberOf*1..6]->(g2:Group)-[r2]->(n) WHERE n<>g AND g<>g2 AND NOT type(r...
Community contribution by @knavesec
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
71
577
51
1
read
[ "Group" ]
Non-Tier Zero principals with ADCSESCx edges to Tier Zero ADCS templates
MATCH p = (n)-[:ADCSESC1|ADCSESC3|ADCSESC4|ADCSESC6a|ADCSESC6b|ADCSESC9a|ADCSESC9b|ADCSESC10a|ADCSESC10b|ADCSESC13]->(m) WHERE "admin_tier_0" IN split(m.system_tags, ' ') AND (n.system_tags IS NULL OR NOT "admin_tier_0" IN split(n.system_tags, ' ')) RETURN p
https://troopers.de/downloads/troopers24/TR24_Analyzing_and_Executing_ADCS_KZYMD8.pdf
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
72
258
72
0
read
[]
OU issues related to the new dMSA attack (may need updates)
MATCH (u:User)-[r:GenericAll|GenericWrite|WriteOwner|WriteDacl|WriteProperty|CreateChild]->(o:OU) RETURN u, r, o
Community contribution by @knavesec
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
73
112
59
0
modification
[ "User", "OU" ]
Owned Domain Admins
MATCH (n:Group) WHERE n.name CONTAINS 'DOMAIN ADMINS' AND n.owned=true WITH n MATCH p=(n)<-[r:MemberOf*1..]-(m) RETURN p
Community contribution by @joshtmerrill
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
74
120
19
1
read
[ "Group" ]
Owned Groups
MATCH (n:User {owned: true})-[r:MemberOf]->(g:Group) RETURN g
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
75
61
12
0
read
[ "User", "Group" ]
Principals with privileged access to an Azure tenancy
MATCH (a) WHERE (a:User OR a:AZUser) WITH a MATCH p=(a)-[r:MemberOf|AZGlobalAdmin|AZPrivilegedRoleAdmin*1..]->(azt:AZTenant) RETURN p
https://raw.githubusercontent.com/InfamousSYN/bloodhound-queries/refs/heads/main/queries/aad.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
76
133
53
1
read
[ "User" ]
Server 2000 and Enabled
MATCH (H:Computer) WHERE H.operatingsystem =~ '(?i).*(2000).*' AND H.enabled = true RETURN H
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
77
92
23
0
read
[ "Computer" ]
Server 2000 with session
MATCH (H:Computer)-[:HasSession]->(y) WHERE H.operatingsystem =~ '(?i).*(2000).*' RETURN H
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
78
90
24
0
read
[ "Computer" ]
Server 2003 and Enabled
MATCH (H:Computer) WHERE H.operatingsystem =~ '(?i).*(2003).*' AND H.enabled = true RETURN H
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
79
92
23
0
read
[ "Computer" ]
Server 2003 with session
MATCH (H:Computer)-[:HasSession]->(y) WHERE H.operatingsystem =~ '(?i).*(2003).*' RETURN H
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
80
90
24
0
read
[ "Computer" ]
Server 2008 and Enabled
MATCH (H:Computer) WHERE H.operatingsystem =~ '(?i).*(2008).*' AND H.enabled = true RETURN H
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
81
92
23
0
read
[ "Computer" ]
Server 2008 with session
MATCH (H:Computer)-[:HasSession]->(y) WHERE H.operatingsystem =~ '(?i).*(2008).*' RETURN H
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
82
90
24
0
read
[ "Computer" ]
Server 2012 and Enabled
MATCH (H:Computer) WHERE H.operatingsystem =~ '(?i).*(2012).*' AND H.enabled = true RETURN H
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
83
92
23
0
read
[ "Computer" ]
Server 2012 with session
MATCH (H:Computer)-[:HasSession]->(y) WHERE H.operatingsystem =~ '(?i).*(2012).*' RETURN H
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
84
90
24
0
read
[ "Computer" ]
Server 2016 and Enabled
MATCH (H:Computer) WHERE H.operatingsystem =~ '(?i).*(2016).*' AND H.enabled = true RETURN H
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
85
92
23
0
read
[ "Computer" ]
Server 2016 with session
MATCH (H:Computer)-[:HasSession]->(y) WHERE H.operatingsystem =~ '(?i).*(2016).*' RETURN H
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
86
90
24
0
read
[ "Computer" ]
Server 2019 and Enabled
MATCH (H:Computer) WHERE H.operatingsystem =~ '(?i).*(2019).*' AND H.enabled = true RETURN H
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
87
92
23
0
read
[ "Computer" ]
Server 2019 with session
MATCH (H:Computer)-[:HasSession]->(y) WHERE H.operatingsystem =~ '(?i).*(2019).*' RETURN H
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
88
90
24
0
read
[ "Computer" ]
Server 2022 and Enabled
MATCH (H:Computer) WHERE H.operatingsystem =~ '(?i).*(2022).*' AND H.enabled = true RETURN H
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
89
92
23
0
read
[ "Computer" ]
Server 2022 with session
MATCH (H:Computer)-[:HasSession]->(y) WHERE H.operatingsystem =~ '(?i).*(2022).*' RETURN H
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
90
90
24
0
read
[ "Computer" ]
Servers a user can RDP into
MATCH p=(g:Group)-[:CanRDP]->(c:Computer) WHERE g.objectid ENDS WITH '-513' AND c.operatingsystem CONTAINS 'Server' RETURN p
https://hausec.com/2019/09/09/bloodhound-cypher-cheatsheet
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
91
124
27
1
read
[ "Computer", "Group" ]
Servers Domain Users can RDP to
MATCH p=(g:Group)-[:CanRDP]->(c:Computer) WHERE g.name STARTS WITH 'DOMAIN USERS' AND c.operatingsystem CONTAINS 'Server' RETURN p
https://gist.github.com/seajaysec/a4d4a545047a51053d52cba567f78a9b
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
92
130
31
1
read
[ "Computer", "Group" ]
Shortest Path from owned Node to Domain Admin
MATCH (n:User {owned:true}), (m:Group) WHERE m.name CONTAINS 'DOMAIN ADMINS' WITH n, m MATCH p=shortestPath((n)-[r:MemberOf|AdminTo|HasSession|Contains|GpLink|Owns|DCSync|AllExtendedRights|ForceChangePassword|GenericAll|GenericWrite|WriteDacl|WriteOwner*1..]->(m)) RETURN p
Community contribution by @joshtmerrill
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
93
273
45
2
read
[ "User", "Group" ]
Shortest path to domain admin
MATCH p=shortestPath((n:User {name:""})-[:MemberOf*1..]->(g:Group {name:"DOMAIN ADMINS@"})) RETURN p
https://www.wwt.com/api-new/attachments/66a7b8d6ddfa33117e771706/file
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
94
100
29
1
read
[ "User", "Group" ]
Single hop low privilege group rights
MATCH (g:Group) WHERE g.objectid ENDS WITH '-S-1-1-0' OR g.objectid ENDS WITH '-S-1-5-11' OR g.objectid ENDS WITH '-513' OR g.objectid ENDS WITH '-515' OR g.objectid ENDS WITH '-S-1-5-32-545' OR g.objectid ENDS WITH '-S-1-5-32-554' MATCH p=(g)-[r]->(n) WHERE n<>g AND NOT type(r)='MemberOf' RETURN DISTINCT p
Community contribution by @knavesec
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
95
308
37
1
read
[ "Group" ]
SPNs with keywords (e.g., 'SQL')
MATCH (u:User) WHERE ANY (x IN u.serviceprincipalnames WHERE toUpper(x) CONTAINS 'SQL') RETURN u
https://hausec.com/2019/09/09/bloodhound-cypher-cheatsheet
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
96
96
32
0
read
[ "User" ]
The Shortest path to a high value target from an owned object
MATCH p=shortestPath((g {owned:true})-[*1..]->(n {highvalue:true})) WHERE g<>n return p
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
97
87
61
1
read
[]
The Shortest path to a unconstrained delegation system from an owned object
MATCH (n) MATCH p=shortestPath((n)-[*1..]->(m:Computer {unconstraineddelegation: true})) WHERE NOT n=m AND n.owned = true RETURN p
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
98
130
75
1
read
[ "Computer" ]
Un-Supported OS and Enabled
MATCH (n:Computer) WHERE n.operatingsystem =~ '(?i).*(2000|2003|2008|xp|vista|7|me).*' AND n.enabled = true RETURN n
https://raw.githubusercontent.com/ZephrFish/Bloodhound-CustomQueries/refs/heads/main/customqueries.json
## Node Labels and Properties: - ADLocalGroup: admincount, description, distinguishedname, domain, domainsid, isaclprotected, lastcollected, lastseen, name, objectid, ownersid, samaccountname, system_tags, whencreated - ADLocalUser - AIACA: basicconstraintpathlength, certchain, certname, certthumbprint, crosscertificat...
99
116
27
0
read
[ "Computer" ]