Skip to content

Commit 0e8a1d1

Browse files
authored
Merge pull request #3322 from DeCohen/WI408262-new-article-attack-paths-mda
new article for the attack paths feature
2 parents 4637b4a + 6d21f2d commit 0e8a1d1

18 files changed

+179
-2
lines changed
230 KB
Loading
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
---
2+
title: Investigate OAuth application attack paths in Defender for Cloud Apps
3+
description: Learn how to identify, analyze, and mitigate attack paths involving OAuth applications using Microsoft Defender for Cloud Apps and Security Exposure Management.
4+
ms.topic: how-to
5+
ms.date: 03/23/2025
6+
---
7+
8+
# Investigate OAuth application attack paths in Defender for Cloud Apps (Preview)
9+
10+
[Microsoft Security Exposure Management](/security-exposure-management/microsoft-security-exposure-management) helps you to manage your company's attack surface and exposure risk effectively. By combining assets and techniques, [attack paths](/security-exposure-management/review-attack-paths) illustrate the end-to-end paths that attackers can use to move from an entry point within your organization to your critical assets.
11+
Microsoft Defender for Cloud Apps observed an increase in attackers using OAuth applications to access sensitive data in business-critical applications like Microsoft Teams, SharePoint, Outlook, and more. To support investigation and mitigation, these applications are integrated into the attack path and attack surface map views in Microsoft Security Exposure Management.
12+
13+
### Critical Asset Management - Service Principals
14+
15+
Microsoft Defender for Cloud Apps defines a set of critical privilege OAuth permissions. OAuth applications with these permissions are considered high-value assets. If compromised, an attacker can gain high privileges to SaaS applications. To reflect this risk, attack paths treat service principals with these permissions as target goals.
16+
17+
### Prerequisites
18+
19+
To get started with OAuth application attack path features in Exposure Management, make sure you meet the following requirements.
20+
21+
- A Microsoft Defender for Cloud Apps license with [App Governance](app-governance-get-started.md) enabled.
22+
23+
- Microsoft 365 app connector must be activated. For information about connecting and about which of the app connectors provide security recommendations, see [Connect apps to get visibility and control with Microsoft Defender for Cloud Apps](enable-instant-visibility-protection-and-governance-actions-for-your-apps.md).
24+
25+
- Optional: To get full access to attack path data, we recommend having an E5 security license, Defender for Endpoint or Defender for Identity license.
26+
27+
### Required roles and permissions
28+
29+
To access all Exposure Management experiences, you need either a Unified Role-Based-Access-Control (RBAC) role or an Entra ID role. Only one is required.
30+
31+
- **Exposure Management (read)** (Unified RBAC)
32+
33+
Alternatively, you can use one of the following **Entra ID roles**:
34+
35+
|Permission |Actions |
36+
|---------|---------|
37+
|**Global Admin** | (read and write permissions) |
38+
|**Security Admin** | (read and write permissions) |
39+
|**Security Operator** | (read and limited write permissions) |
40+
|**Global Reader** | (read permissions) |
41+
|**Security Reader** | (read permissions) |
42+
43+
44+
>[!NOTE]
45+
> Currently available in commercial cloud environments only. Microsoft Security Exposure Management data and capabilities are currently unavailable in U.S Government clouds - GCC, GCC High, DoD, and China Gov.
46+
47+
## View permissions for critical assets
48+
49+
To view the full list of permissions, go to the [Microsoft Defender portal](https://security.microsoft.com) and navigate to Settings > Microsoft Defender XDR > Rules > Critical asset management.
50+
51+
:::image type="content" source="media/saas-securty-initiative/screenshot-of-the-critical-asset-management-page.png" alt-text="Screenshot of the Critical asset management page in the Defender XDR portal." lightbox="media/saas-securty-initiative/Screenshot-of-the-critical-asset-management-page.png":::
52+
53+
> [!NOTE]
54+
> OAuth apps appear in the attack path surface map only when specific conditions are detected.
55+
> For example, an OAuth app may appear in the attack path only if a vulnerable component with an easily exploitable entry point is detected that allows lateral movement to service principals with high privileges.
56+
57+
## Investigation user flow: View attack paths involving OAuth applications
58+
59+
Once you understand which permissions represent high-value targets, use the following steps to investigate how these applications appear in your environment’s attack paths.
60+
For smaller organizations with a manageable number of attack paths, we recommend following this structured approach to investigate each attack path:
61+
62+
1. Go to Exposure Management > Attack surface > Attack paths.
63+
64+
1. Filter by 'Target type: AAD Service principal'
65+
66+
:::image type="content" source="media/saas-securty-initiative/screenshot-of-the-attack-paths-aad-service-principal.png" alt-text="Screenshot of the attack paths service add pricipal target type" lightbox="media/saas-securty-initiative/Screenshot-of-the-attack-paths-aad-service-principal.png":::
67+
68+
1. Select the attack path titled: "Device with high severity vulnerabilities allows lateral movement to service principal with sensitive permissions"
69+
70+
:::image type="content" source="media/saas-securty-initiative/screenshot-of-the-attack-path-name.png" alt-text="Screenshot of the attack path name" lightbox="media/saas-securty-initiative/Screenshot-of-the-attack-path-name.png":::
71+
72+
1. Click the View in map button to see the attack path.
73+
74+
:::image type="content" source="media/saas-securty-initiative/screenshot-of-the-view-in-map-button.png" alt-text="Screenshot of the view in map button" lightbox="media/saas-securty-initiative/Screenshot-of-the-view-in-map-button.png":::
75+
76+
1. Select the + sign to expand nodes and view detailed connections.
77+
78+
:::image type="content" source="media/saas-securty-initiative/attack-surface-map.png" alt-text="Screenshot of the attack surface map" lightbox="media/saas-securty-initiative/attack-surface-map.png":::
79+
80+
1. Hover or select nodes and edges to explore extra data such as which permissions this OAuth app has.
81+
82+
:::image type="content" source="media/saas-securty-initiative/screenshot-of-the-permissions-set-for-service-principal.png" alt-text="Screenshot showing the permissions assigned to the OAuth app as shown in the attack surface map":::
83+
84+
1. Copy the OAuth application's name and paste it into the search bar in the Applications page.
85+
86+
:::image type="content" source="media/saas-securty-initiative/screenshot-of-the-oauth-applications-page.png" alt-text="Screenshot showing the OAuth applications tab" lightbox="media/saas-securty-initiative/Screenshot-of-the-oauth-applications-page.png":::
87+
88+
1. Select the app name to review assigned permissions and usage insights, including whether high-privilege permissions are actively used.
89+
90+
:::image type="content" source="media/saas-securty-initiative/screenshot-of-permissions-assigned-to-the-oauth-app.png" alt-text="Screenshot showing the permissions assigned to the Oauth app" lightbox="media/saas-securty-initiative/Screenshot-of-permissions-assigned-to-the-oauth-app.png" :::
91+
92+
1. Optional: If you determine the OAuth application should be disabled, you can disable it from the Applications page.
93+
94+
### Decision maker user flow: Prioritize attack path using choke points
95+
96+
For larger organizations with numerous attack paths that can't be manually investigated, we recommend using attack path data and utilizing the Choke Points experience as a prioritization tool. This approach allows you to:
97+
98+
- Identify assets connected with the most attack paths.
99+
- Make informed decisions on which assets to prioritize for investigation.
100+
- Filter by Microsoft Entra OAuth app to see which OAuth apps are involved in the most attack paths.
101+
- Decide which OAuth applications to apply least privilege permissions to.
102+
103+
To get started:
104+
1. Go to the Attack Paths > Choke Points page.
105+
106+
:::image type="content" source="media/saas-securty-initiative/screenshot-of-the-choke-point-page.png" alt-text="Screenshot showing the choke points page" lightbox="media/saas-securty-initiative/Screenshot-of-the-choke-point-page.png":::
107+
108+
1. Select a choke point name to see more details about the top attack paths such as the name, entry point, and target.
109+
1. Click View blast radius to further investigate the choke point in the Attack Surface Map.
110+
:::image type="content" source="media/saas-securty-initiative/screenshot-of-the-view-blast-radius-button.png" alt-text="Screenshot showing the view blast radius button" lightbox="media/saas-securty-initiative/Screenshot-of-the-view-blast-radius-button.png":::
111+
112+
If the choke point is an OAuth application, continue the investigation in Applications page, as described in steps 7–9 above.
113+
114+
115+
## Analyze attack surface map and hunt with queries
116+
117+
In the [Attack surface map](/security-exposure-management/cross-workload-attack-surfaces), you can see connections from user-owned apps, OAuth apps, and service principals. This relationship data is available in:
118+
119+
- ExposureGraphEdges table (shows connections)
120+
121+
- ExposureGraphNodes table (includes node properties like permissions)
122+
123+
Use the following Advanced Hunting query to identify all OAuth applications with critical permissions:
124+
125+
```
126+
let RelevantNodes = ExposureGraphNodes
127+
| where NodeLabel == "Microsoft Entra OAuth App" or NodeLabel == "serviceprincipal"
128+
| project NodeId, NodeLabel, NodeName, NodeProperties;
129+
ExposureGraphEdges
130+
| where EdgeLabel == "has permissions to" or EdgeLabel == "can authenticate as"
131+
| make-graph SourceNodeId --> TargetNodeId with RelevantNodes on NodeId
132+
| graph-match (AppRegistration)-[canAuthAs]->(SPN)-[hasPermissionTo]->(Target)
133+
where AppRegistration.NodeLabel == "Microsoft Entra OAuth App" and
134+
canAuthAs.EdgeLabel == "can authenticate as" and
135+
SPN.NodeLabel == "serviceprincipal" and
136+
SPN.NodeProperties["rawData"]["criticalityLevel"]["criticalityLevel"] == 0 and
137+
hasPermissionTo.EdgeLabel == @"has permissions to" and
138+
Target.NodeLabel == "Microsoft Entra OAuth App" and
139+
Target.NodeName == "Microsoft Graph"
140+
project AppReg=AppRegistration.NodeLabel,
141+
canAuthAs=canAuthAs.EdgeLabel, SPN.NodeLabel, DisplayName=SPN.NodeProperties["rawData"]["accountDisplayName"],
142+
Enabled=SPN.NodeProperties["rawData"]["accountEnabled"], AppTenantID=SPN.NodeProperties["rawData"]["appOwnerOrganizationId"],
143+
hasPermissionTo=hasPermissionTo.EdgeLabel, Target=Target.NodeName,
144+
AppPerm=hasPermissionTo.EdgeProperties["rawData"]["applicationPermissions"]["permissions"]
145+
| mv-apply AppPerm on (summarize AppPerm = make_list(AppPerm.permissionValue))
146+
| project AppReg, canAuthAs, DisplayName, Enabled, AppTenantID, hasPermissionTo, Target, AppPerm
147+
```
148+
149+
## Next steps
150+
151+
For more information, see:
152+
153+
- [App governance in Microsoft Defender for Cloud Apps](/defender-cloud-apps/app-governance-manage-app-governance)
154+
155+
- [Overview of attack surface management](/security-exposure-management/cross-workload-attack-surfaces)
156+
157+
- [Overview of attack paths](/security-exposure-management/work-attack-paths-overview)
158+
100 KB
Loading
113 KB
Loading
119 KB
Loading
130 KB
Loading
354 KB
Loading
107 KB
Loading
91.7 KB
Loading
50.6 KB
Loading

0 commit comments

Comments
 (0)