Skip to content

Commit 2627050

Browse files
committed
removed related content
1 parent 2d8a7f3 commit 2627050

1 file changed

Lines changed: 66 additions & 30 deletions

File tree

articles/defender-for-cloud/how-to-test-attack-path-and-security-explorer-with-vulnerable-container-image.md

Lines changed: 66 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,21 @@ ms.date: 03/02/2026
88

99
# Attack path analysis and enhanced risk-hunting for containers
1010

11-
Attack path analysis is a graph-based algorithm that scans the cloud security graph. The scans expose paths that bad actors might exploit to breach your environment and reach your high-impact assets. Attack path analysis exposes attack paths and suggests recommendations for remediating issues that break the attack path and prevent a successful breach.
11+
Attack path analysis identifies potential paths that attackers could use to reach high-impact resources in your environment. It analyzes relationships between resources and highlights issues that can be remediated to reduce risk.
1212

13-
You can explore and investigate [attack paths](how-to-manage-attack-path.md) by sorting them based on risk level, name, environment, risk factors, entry point, target, affected resources, and active recommendations. You can also explore cloud security graph Insights on the resource. Examples of Insight types include:
13+
This article shows how to test attack path analysis by deploying a mock vulnerable container image.
1414

15-
- Pod exposed to the internet
16-
- Privileged container
17-
- Pod uses host network
18-
- Container image is vulnerable to remote code execution
15+
# [Azure](#tab/azure)
1916

20-
## Test the attack path and security explorer using a mock vulnerable container image for each cloud provider
17+
## Prerequisites
2118

22-
## [Azure](#tab/testing-the-attack-path-and-security-explorer-using-a-mock-vulnerable-container-image-for-azure)
19+
- [Defender CSPM enabled for your subscription](tutorial-enable-cspm-plan.md).
2320

24-
### Test the attack path and security explorer by using a mock vulnerable container image for Azure
21+
- Access to an Azure Kubernetes Service (AKS) cluster.
2522

26-
If the list of attack paths has no entries, you can still test this feature by using a mock container image. Use the following steps to set up the test:
23+
- An Azure Container Registry (ACR) that the cluster can access.
2724

28-
**Requirement:** An instance of Azure Container Registry (ACR) in the tested scope.
29-
30-
#### Import a mock vulnerable image to your Azure Container Registry
25+
## Test the attack path and security explorer using a mock vulnerable container image
3126

3227
1. Pull a base image (for example, alpine) to your local environment by running the following command:
3328

@@ -72,34 +67,51 @@ If the list of attack paths has no entries, you can still test this feature by u
7267
helm install dcspmcharts oci://mcr.microsoft.com/mdc/stable/dcspmcharts --version 1.0.0 --namespace mdc-dcspm-demo --create-namespace --set image=<your-image-uri> --set distribution=AZURE
7368
```
7469
75-
#### Verify deployment
70+
### Verify deployment
7671
7772
1. Look for an entry with **mdc-dcspm-demo** as namespace.
78-
1. Go to **Workloads-> Deployments**.
73+
74+
1. Go to **Workloads** > **Deployments**.
75+
7976
1. Verify `pod1` and `pod2` are created 3/3 and **ingress-controller-nginx-ingress-controller** is created 1/1.
77+
8078
1. Go to **Services and Ingresses**.
79+
8180
1. Verify that **service1** and **ingress-controller-nginx-ingress-controller** are listed.
81+
8282
1. Verify one **ingress** is created with an IP address and nginx class.
8383
84+
# [AWS](#tab/aws)
85+
86+
## Prerequisites
87+
88+
- [Defender CSPM enabled for your AWS account](tutorial-enable-cspm-plan.md).
89+
90+
- Access to an Amazon Elastic Kubernetes Service (EKS) cluster.
8491
85-
## [**AWS**](#tab/testing-the-attack-path-and-security-explorer-using-a-mock-vulnerable-container-image-for-aws)
92+
- An Amazon Elastic Container Registry (ECR) repository that the cluster can access.
8693
87-
### Test the attack path and security explorer by using a mock vulnerable container image for AWS
94+
## Test the attack path and security explorer using a mock vulnerable container image
95+
96+
1. Create an Amazon ECR repository named `mdc-mock-0001`.
8897
89-
1. Create an ECR repository named *mdc-mock-0001*.
9098
1. In your AWS account, select **Command line or programmatic access**.
99+
91100
1. Select **Option 1: Set AWS environment variables (Short-term credentials)**.
101+
92102
1. Copy the values for the following credentials:
93103
* *AWS_ACCESS_KEY_ID*
94104
* *AWS_SECRET_ACCESS_KEY*
95105
* *AWS_SESSION_TOKEN*
106+
96107
1. Run the following command to get the authentication token for your Amazon ECR registry. Replace `<REGION>` with the region of your registry and `<ACCOUNT>` with your AWS account ID.
97108
98109
```awscli
99110
aws ecr get-login-password --region <REGION> | docker login --username AWS --password-stdin <ACCOUNT>.dkr.ecr.<REGION>.amazonaws.com
100111
```
101112
102113
1. Create a Docker image that is tagged as vulnerable by name. The image name must include *mdc-mock-0001*.
114+
103115
1. Push the image to your ECR registry. Replace `<ACCOUNT>` and `<REGION>` with your AWS account ID and region.
104116
105117
```awscli
@@ -109,6 +121,7 @@ If the list of attack paths has no entries, you can still test this feature by u
109121
```
110122
111123
1. Connect to your EKS cluster.
124+
112125
1. Configure `kubectl` to work with your EKS cluster. Replace `<your-region>` and `<your-cluster-name>` with your EKS cluster region and name.
113126
114127
```awscli
@@ -123,7 +136,7 @@ If the list of attack paths has no entries, you can still test this feature by u
123136
124137
1. Install the [ngnix ingress Controller](https://docs.nginx.com/nginx-ingress-controller/installation/installing-nic/installation-with-helm/) :
125138
126-
```azurecli
139+
```awscli
127140
helm install ingress-controller oci://ghcr.io/nginxinc/charts/nginx-ingress --version 1.0.1
128141
```
129142
@@ -134,14 +147,24 @@ The Helm chart deploys resources onto your cluster that you can use to infer att
134147
helm install dcspmcharts oci://mcr.microsoft.com/mdc/stable/dcspmcharts --version 1.0.0 --namespace mdc-dcspm-demo --create-namespace --set image=<ACCOUNT>.dkr.ecr.<REGION>.amazonaws.com/mdc-mock-0001 --set distribution=AWS
135148
```
136149
150+
## [GCP](#tab/gcp)
137151
138-
## [**GCP**](#tab/testing-the-attack-path-and-security-explorer-using-a-mock-vulnerable-container-image-for-gcp)
152+
## Prerequisites
139153
140-
### Test the attack path and security explorer by using a mock vulnerable container image for GCP
154+
- [Defender CSPM enabled for your GCP project](tutorial-enable-cspm-plan.md).
155+
156+
- Access to a Google Kubernetes Engine (GKE) cluster.
157+
158+
- A Google Artifact Registry repository that the cluster can access.
159+
160+
## Test the attack path and security explorer using a mock vulnerable container image
141161
142162
1. Sign in to the GCP portal.
163+
143164
1. Search for **Artifact Registry**.
165+
144166
1. Create a GCP repository named *mdc-mock-0001*.
167+
145168
1. Follow the GCP documentation, [Push and pull images](https://cloud.google.com/artifact-registry/docs/docker/pushing-and-pulling), to push the image to your repository. Run these commands:
146169
147170
```docker
@@ -151,7 +174,9 @@ The Helm chart deploys resources onto your cluster that you can use to infer att
151174
```
152175
153176
1. Go to **Kubernetes Engine** > **Clusters**.
177+
154178
1. Select the **Connect** button.
179+
155180
1. Run the following command in the Cloud Shell:
156181
157182
```gcloud-cli
@@ -174,22 +199,33 @@ The Helm chart deploys resources onto your cluster that you can use to infer att
174199
```gcloud-cli
175200
helm install dcspmcharts oci:/mcr.microsoft.com/mdc/stable/dcspmcharts --version 1.0.0 --namespace mdc-dcspm-demo --create-namespace --set image=<IMAGE_URI> --set distribution=GCP
176201
```
177-
178202
---
179203
180204
> [!NOTE]
181-
> It can take up to 24 hours to see results in the cloud security explorer and attack path.
205+
> It can take up to 24 hours for results to appear in Attack path analysis and Cloud Security Explorer.
182206
183-
After you finish testing the attack path, investigate the created attack path by going to **Attack path analysis**, and search for the attack path you created. For more information, see [Identify and remediate attack paths](how-to-manage-attack-path.md).
207+
## View attack paths
184208
185-
### Find container posture issues with cloud security explorer
209+
After deploying the mock scenario, you can view the generated attack path in **Microsoft Defender for Cloud**:
186210
187-
You can build queries in one of the following ways:
211+
1. Sign in to the [Azure portal](https://portal.azure.com/).
212+
213+
1. Go to **Defender for Cloud** > **Attack path analysis**.
214+
215+
1. Locate the attack path related to the deployed resources.
216+
217+
Learn how to [identify and remediate attack paths](how-to-manage-attack-path.md).
188218
189-
- [Explore risks with built-in cloud security explorer templates](how-to-manage-cloud-security-explorer.md#query-templates)
190-
- [Create custom queries with cloud security explorer](how-to-manage-cloud-security-explorer.md#build-a-query)
219+
## Investigate container risks with Cloud Security Explorer
191220
221+
After deploying the mock vulnerable image, you can use Cloud Security Explorer to identify related risks and explore how they contribute to attack paths.
222+
223+
1. Sign in to the [Azure portal](https://portal.azure.com/).
224+
225+
1. Go to **Defender for Cloud** > **Cloud Security Explorer**.
226+
227+
You can build queries in one of the following ways:
192228
193-
## Next steps
229+
- [Use built-in query templates](how-to-manage-cloud-security-explorer.md#query-templates)
194230
195-
- Learn more about the [Microsoft Defender for Cloud plans](defender-for-cloud-introduction.md#cloud-workload-protection-platform-cwpp).
231+
- [Create custom queries](how-to-manage-cloud-security-explorer.md#build-a-query)

0 commit comments

Comments
 (0)