Skip to content

Commit c520d90

Browse files
martinsohngithub-actions[bot]d3vzer0
authored
fix/issue-31: Entra privileged roles queries (#32)
* Remove role condition for Tier Zero specific query * Add condition for AZRole 'Privileged Role Administrator' * revision bump * Update combined queries --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Joey Dreijer <[email protected]>
1 parent c30e5da commit c520d90

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

Queries.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1580,8 +1580,8 @@
15801580
],
15811581
"category": "Shortest Paths",
15821582
"description": null,
1583-
"query": "MATCH p=shortestPath((s:AZUser)-[:AZ_ATTACK_PATHS*1..]->(t:AZBase))\nWHERE (t:AZBase) AND t.name =~ '(?i)Global Administrator|User Administrator|Cloud Application Administrator|Authentication Policy Administrator|Exchange Administrator|Helpdesk Administrator|Privileged Authentication Administrator' AND s<>t\nAND ((t:Tag_Tier_Zero) OR COALESCE(t.system_tags, '') CONTAINS 'admin_tier_0')\nRETURN p\nLIMIT 1000",
1584-
"revision": 2,
1583+
"query": "MATCH p=shortestPath((s:AZUser)-[:AZ_ATTACK_PATHS*1..]->(t:AZBase))\nWHERE ((t:Tag_Tier_Zero) OR COALESCE(t.system_tags, '') CONTAINS 'admin_tier_0')\nRETURN p\nLIMIT 1000",
1584+
"revision": 3,
15851585
"resources": [],
15861586
"acknowledgements": []
15871587
},
@@ -2422,8 +2422,8 @@
24222422
],
24232423
"category": "Shortest Paths",
24242424
"description": null,
2425-
"query": "MATCH p=shortestPath((s:AZBase)-[:AZ_ATTACK_PATHS*1..]->(t:AZRole))\nWHERE t.name =~ '(?i)Global Administrator|User Administrator|Cloud Application Administrator|Authentication Policy Administrator|Exchange Administrator|Helpdesk Administrator|Privileged Authentication Administrator' AND s<>t\nRETURN p\nLIMIT 1000",
2426-
"revision": 2,
2425+
"query": "MATCH p=shortestPath((s:AZBase)-[:AZ_ATTACK_PATHS*1..]->(t:AZRole))\nWHERE t.name =~ '(?i)Global Administrator|User Administrator|Cloud Application Administrator|Authentication Policy Administrator|Exchange Administrator|Helpdesk Administrator|Privileged Authentication Administrator|Privileged Role Administrator' AND s<>t\nRETURN p\nLIMIT 1000",
2426+
"revision": 3,
24272427
"resources": [],
24282428
"acknowledgements": []
24292429
},
@@ -2636,8 +2636,8 @@
26362636
],
26372637
"category": "General",
26382638
"description": null,
2639-
"query": "MATCH p=(t:AZRole)<-[:AZHasRole|AZMemberOf*1..2]-(:AZBase)\nWHERE t.name =~ '(?i)Global Administrator|User Administrator|Cloud Application Administrator|Authentication Policy Administrator|Exchange Administrator|Helpdesk Administrator|Privileged Authentication Administrator'\nRETURN p\nLIMIT 1000",
2640-
"revision": 1,
2639+
"query": "MATCH p=(t:AZRole)<-[:AZHasRole|AZMemberOf*1..2]-(:AZBase)\nWHERE t.name =~ '(?i)Global Administrator|User Administrator|Cloud Application Administrator|Authentication Policy Administrator|Exchange Administrator|Helpdesk Administrator|Privileged Authentication Administrator|Privileged Role Administrator'\nRETURN p\nLIMIT 1000",
2640+
"revision": 2,
26412641
"resources": [],
26422642
"acknowledgements": []
26432643
},

queries/All members of high privileged roles.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ category: General
66
description:
77
query: |-
88
MATCH p=(t:AZRole)<-[:AZHasRole|AZMemberOf*1..2]-(:AZBase)
9-
WHERE t.name =~ '(?i)Global Administrator|User Administrator|Cloud Application Administrator|Authentication Policy Administrator|Exchange Administrator|Helpdesk Administrator|Privileged Authentication Administrator'
9+
WHERE t.name =~ '(?i)Global Administrator|User Administrator|Cloud Application Administrator|Authentication Policy Administrator|Exchange Administrator|Helpdesk Administrator|Privileged Authentication Administrator|Privileged Role Administrator'
1010
RETURN p
1111
LIMIT 1000
12-
revision: 1
12+
revision: 2
1313
resources:
1414
acknowledgements:
1515

queries/Shortest paths from Entra Users to Tier Zero High Value targets.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ category: Shortest Paths
66
description:
77
query: |-
88
MATCH p=shortestPath((s:AZUser)-[:AZ_ATTACK_PATHS*1..]->(t:AZBase))
9-
WHERE (t:AZBase) AND t.name =~ '(?i)Global Administrator|User Administrator|Cloud Application Administrator|Authentication Policy Administrator|Exchange Administrator|Helpdesk Administrator|Privileged Authentication Administrator' AND s<>t
10-
AND ((t:Tag_Tier_Zero) OR COALESCE(t.system_tags, '') CONTAINS 'admin_tier_0')
9+
WHERE ((t:Tag_Tier_Zero) OR COALESCE(t.system_tags, '') CONTAINS 'admin_tier_0')
1110
RETURN p
1211
LIMIT 1000
13-
revision: 2
12+
revision: 3
1413
resources:
1514
acknowledgements:
1615

queries/Shortest paths to privileged roles.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ category: Shortest Paths
66
description:
77
query: |-
88
MATCH p=shortestPath((s:AZBase)-[:AZ_ATTACK_PATHS*1..]->(t:AZRole))
9-
WHERE t.name =~ '(?i)Global Administrator|User Administrator|Cloud Application Administrator|Authentication Policy Administrator|Exchange Administrator|Helpdesk Administrator|Privileged Authentication Administrator' AND s<>t
9+
WHERE t.name =~ '(?i)Global Administrator|User Administrator|Cloud Application Administrator|Authentication Policy Administrator|Exchange Administrator|Helpdesk Administrator|Privileged Authentication Administrator|Privileged Role Administrator' AND s<>t
1010
RETURN p
1111
LIMIT 1000
12-
revision: 2
12+
revision: 3
1313
resources:
1414
acknowledgements:
1515

0 commit comments

Comments
 (0)