Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ba5cd1e
Create Accounts related to AAD Entra Connect and their sessions.yml
LuemmelSec Jun 20, 2025
400df32
Update and rename Accounts related to AAD Entra Connect and their ses…
LuemmelSec Jun 20, 2025
4550324
Create Domain Admin to OU mapping .yml
LuemmelSec Jun 20, 2025
8d6702b
Create Owners of Azure Applications.yml
LuemmelSec Jun 20, 2025
34dcf6f
Create Owners of Azure Subscriptions.yml
LuemmelSec Jun 20, 2025
2755bfd
Create All Paths to Azure VMs.yml
LuemmelSec Jun 20, 2025
4cf7e60
Update and rename All Paths to Azure VMs.yml to Shortest Paths from A…
LuemmelSec Jun 20, 2025
72e41a7
Update Shortest Paths from Azure Users to Azure VMs.yml
LuemmelSec Jun 20, 2025
c4cc645
Create Shortest Paths from Owned Azure Users to Azure VMs.yml
LuemmelSec Jun 20, 2025
ee00e43
Create Shortest Paths from Owned Azure Users to Azure Keyvaults.yml
LuemmelSec Jun 20, 2025
dff6641
Create Shortest Paths from Azure Users to Azure Keyvaults.yml
LuemmelSec Jun 20, 2025
aa26218
Create All direct Controllers of MS Graph
LuemmelSec Jun 20, 2025
281eb3f
Create All privileged Azure Service Principals.yml
LuemmelSec Jun 20, 2025
94040d6
Create All Azure VMs with a tied Managed Identity.yml
LuemmelSec Jun 20, 2025
ab97362
Rename All direct Controllers of MS Graph to All direct Controllers o…
LuemmelSec Jun 21, 2025
3f4ec4b
Update Accounts related to AAD Entra Connect.yml
martinsohn Jul 3, 2025
0a87d0f
Delete queries/Domain Admin to OU mapping .yml
martinsohn Jul 3, 2025
8b3d0a1
Update Shortest Paths from Azure Users to Azure Keyvaults.yml
LuemmelSec Sep 3, 2025
593faad
Update Shortest Paths from Azure Users to Azure VMs.yml
LuemmelSec Sep 3, 2025
09a0569
Update Shortest Paths from Owned Azure Users to Azure Keyvaults.yml
LuemmelSec Sep 3, 2025
acaa569
Update Shortest Paths from Owned Azure Users to Azure VMs.yml
LuemmelSec Sep 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions queries/Accounts related to AAD Entra Connect.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Accounts related to AAD Entra Connect
guid: 5993208e-6189-40e6-be03-c23c872d0ca4
prebuilt: false
platforms:
- Active Directory
- Azure
category: Active Directory Hygiene
description: Query to start reconnaissance about AADConnect / Entra Connect related accounts
query: |-
MATCH (u)
WHERE (u:User OR u:AZUser)
AND (u.name =~ '(?i)^MSOL_|.*AADConnect.*|.*ADSyncMSA.*|.*AAD_.*|.*PROVAGENTGMSA.*'
OR u.userprincipalname =~ '(?i)^sync_.*')
RETURN u
revision: 1
resources: https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/concept-adsync-service-account
acknowledgements: Daniel Scheidt, @theluemmel
13 changes: 13 additions & 0 deletions queries/All Azure VMs with a tied Managed Identity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: All Azure VMs with a tied Managed Identity
guid: 3ceca01a-226e-4e61-8692-a4b4611f2af0
prebuilt: false
platforms:
- Azure
category: General
description: Return all Azure VMs with a tied Managed Identity.
query: |-
MATCH p=(:AZVM)-[:AZManagedIdentity]->(n)
RETURN p
revision: 1
resources: -
acknowledgements: Daniel Scheidt, @theluemmel
14 changes: 14 additions & 0 deletions queries/All direct Controllers of MS Graph.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: All direct Controllers of MS Graph
guid: 45f949ca-ab69-43a4-adb2-796f9548beff
prebuilt: false
platforms:
- Azure
category: Microsoft Graph
description: Return all direct Controllers of MS Graph.
query: |-
MATCH p = (n)-[r:AZAddOwner|AZAddSecret|AZAppAdmin|AZCloudAppAdmin|AZMGAddOwner|AZMGAddSecret|AZOwns]->(g:AZServicePrincipal)
WHERE g.displayname = "MICROSOFT GRAPH"
RETURN p
revision: 1
resources: -
acknowledgements: Daniel Scheidt, @theluemmel
14 changes: 14 additions & 0 deletions queries/All privileged Azure Service Principals.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: All privileged Azure Service Principals
guid: 92f269ee-3727-4ffa-947b-aad492ac0fa2
prebuilt: false
platforms:
- Azure
category: Azure Hygiene
description: Return all privileged Azure Service Principals.
query: |-
MATCH p=(n:AZServicePrincipal)-[:AZHasRole|AZMemberOf*1..2]->(r:AZRole)
WHERE r.displayname =~ '(?i)Global Administrator|User Administrator|Cloud Application Administrator|Authentication Policy Administrator|Exchange Administrator|Helpdesk Administrator|PRIVILEGED AUTHENTICATION ADMINISTRATOR|Domain Name Administrator|Hybrid Identity Administrator|External Identity Provider Administrator|Privileged Role Administrator|Partner Tier2 Support|Application Administrator|Directory Synchronization Accounts'
RETURN p
revision: 1
resources: -
acknowledgements: Daniel Scheidt, @theluemmel
13 changes: 13 additions & 0 deletions queries/Owners of Azure Applications.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Owners of Azure Applications
guid: 3beb1260-61ad-42b5-819f-e1b619d28e22
prebuilt: false
platforms:
- Azure
category: General
description: Return all Owners of Azure Applications to search for possible attack paths. Low privileged users should not be owners of applications.
query: |-
MATCH p = (n)-[r:AZOwns]->(g:AZApp)
RETURN p
revision: 1
resources: -
acknowledgements: Daniel Scheidt, @theluemmel
15 changes: 15 additions & 0 deletions queries/Owners of Azure Subscriptions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Owners of Azure Subscriptions
guid: bd0daafd-4256-4ce6-9b7f-a9e38509d81c
prebuilt: false
platforms:
- Azure
category: General
description: Return all Owners of Azure Subscriptions to search for possible attack paths. Low privileged users should not be owners of Subscriptions.
query: |-
MATCH p=shortestPath((s:AZBase)-[:AZOwner*1..]->(t:AZSubscription))
WHERE s<>t
RETURN p
LIMIT 1000
revision: 1
resources: -
acknowledgements: Daniel Scheidt, @theluemmel
13 changes: 13 additions & 0 deletions queries/Shortest Paths from Azure Users to Azure Keyvaults.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Shortest Paths from Azure Users to Azure Keyvaults
guid: 6395428d-2deb-404b-85b5-edbac3a6e05d
prebuilt: false
platforms:
- Azure
category: Shortest Paths
description: Return shortest paths from Azure Users to Azure Keyvaults to check for attack vectors.
query: |-
MATCH p = shortestPath((n:AZUser)-[:AZ_ATTACK_PATHS*..]->(g:AZKeyVault))
RETURN p
revision: 1
resources: -
acknowledgements: Daniel Scheidt, @theluemmel
13 changes: 13 additions & 0 deletions queries/Shortest Paths from Azure Users to Azure VMs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Shortest Paths from Azure Users to Azure VMs
guid: 912454f1-75a3-4813-b3df-7bddac0ff00d
prebuilt: false
platforms:
- Azure
category: Shortest Paths
description: Return shortest paths from Azure Users to Azure VMs to check for attack vectors.
query: |-
MATCH p = shortestPath((m:AZUser)-[:AZ_ATTACK_PATHS*..]->(n:AZVM))
RETURN p
revision: 1
resources: -
acknowledgements: Daniel Scheidt, @theluemmel
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LuemmelSec I see you're refering to m.system_tags but "m" is not declared yet. This should probably be n.system_tags? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sharp eye. Probably fd up during copy pasta :)

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Shortest Paths from Owned Azure Users to Azure Keyvaults
guid: 53e73ae0-985e-4508-a82e-696d654f9538
prebuilt: false
platforms:
- Azure
category: Shortest Paths
description: Return shortest paths from Owned Azure Users to Azure Keyvaults to check for attack vectors.
query: |-
MATCH p = shortestPath((n:AZUser)-[:AZ_ATTACK_PATHS*..]->(g:AZKeyVault))
WHERE m.system_tags CONTAINS 'owned'
RETURN p
revision: 1
resources: -
acknowledgements: Daniel Scheidt, @theluemmel
14 changes: 14 additions & 0 deletions queries/Shortest Paths from Owned Azure Users to Azure VMs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Shortest Paths from Owned Azure Users to Azure VMs
guid: bab9fbec-7a46-4c1e-902e-a1b53a454610
prebuilt: false
platforms:
- Azure
category: Shortest Paths
description: Return shortest paths from Owned Azure Users to Azure VMs to check for attack vectors.
query: |-
MATCH p = shortestPath((m:AZUser)-[:AZ_ATTACK_PATHS*..]->(n:AZVM))
WHERE m.system_tags CONTAINS 'owned'
RETURN p
revision: 1
resources: -
acknowledgements: Daniel Scheidt, @theluemmel