You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/defender-for-cloud/alert-validation.md
+65-10Lines changed: 65 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,7 @@
2
2
title: Alert validation in Microsoft Defender for Cloud | Microsoft Docs
3
3
description: Learn how to validate that your security alerts are correctly configured in Microsoft Defender for Cloud
4
4
ms.topic: how-to
5
-
ms.author: benmansheim
6
-
author: bmansheim
7
-
ms.date: 12/12/2021
5
+
ms.date: 07/04/2022
8
6
9
7
---
10
8
# Alert validation in Microsoft Defender for Cloud
@@ -18,7 +16,7 @@ For more information, see [Security alerts in Defender for Cloud](alerts-overvie
18
16
19
17
## Generate sample security alerts
20
18
21
-
If you're using the new, preview alerts experience as described in [Manage and respond to security alerts in Microsoft Defender for Cloud](managing-and-responding-alerts.md), you can create sample alerts in a few clicks from the security alerts page in the Azure portal.
19
+
If you're using the new, preview alerts experience as described in [Manage and respond to security alerts in Microsoft Defender for Cloud](managing-and-responding-alerts.md), you can create sample alerts from the security alerts page in the Azure portal.
22
20
23
21
Use sample alerts to:
24
22
@@ -74,15 +72,72 @@ After the Log Analytics agent is installed on your machine, follow these steps f
74
72
75
73
## Simulate alerts on Kubernetes <aname="validate-kubernetes"></a>
76
74
77
-
If you've integrated Azure Kubernetes Service with Defender for Cloud, you can test that your alerts are working with the following kubectl command:
75
+
Defender for Containers provides security alerts for both your clusters and underlying cluster nodes. Defender for Containers accomplishes this by monitoring both the control plane (API server) and the containerized workload.
78
76
79
-
`kubectl get pods --namespace=asc-alerttest-662jfi039n`
77
+
You can tell if your alert is related to the control plan or the containerized workload based on its prefix. Control plane security alerts have a prefix of `K8S_`, while security alerts for runtime workload in the clusters have a prefix of `K8S.NODE_`.
80
78
81
-
For more information about defending your Kubernetes nodes and clusters, see [Overview of Microsoft Defender for Containers](defender-for-containers-introduction.md)
79
+
You can simulate alerts for both of the control plane, and workload alerts with the following steps.
80
+
81
+
### Simulate control plane alerts (K8S_ prefix)
82
+
83
+
**Prerequisites**
84
+
85
+
- Ensure the Defender for Containers plan is enabled.
86
+
-**ARC only** - Ensure the defender extension is installed.
87
+
-**EKS or GKE only** - Ensure the default audit log collection auto-provisioning options are enabled.
88
+
89
+
**To simulate a Kubernetes control plane security alert**:
90
+
91
+
1. Run the following command from the cluster:
92
+
93
+
```bash
94
+
kubectl get pods --namespace=asc-alerttest-662jfi039n
95
+
```
96
+
97
+
You'll get the following response: `No resource found`.
98
+
99
+
1. Wait 30 minutes.
100
+
101
+
1. In the Azure portal, navigate to the Defender for Cloud's alerts page.
102
+
103
+
1. On the relevant Kubernetes cluster, locate the following alert `Microsoft Defender for Cloud test alert for K8S (not a threat)`
104
+
105
+
### Simulate workload alerts (K8S.NODE_ prefix)
106
+
107
+
**Prerequisites**
108
+
109
+
- Ensure the Defender for Containers plan is enabled.
110
+
- Ensure the Defender profile\extension is installed
111
+
112
+
**To simulate a a Kubernetes workload security alert**:
113
+
114
+
1. Access one of the `azuredefender-publisher-<XXX>` pods deployed in your Kubernetes cluster.
1. Select an executable, copy it to a convenient location and rename it to `./asc_alerttest_662jfi039n`. For example:
126
+
`cp /bin/echo ./asc_alerttest_662jfi039n`.
127
+
128
+
1. Execute the file `./asc_alerttest_662jfi039n testing eicar pipe`.
129
+
130
+
1. Wait 10 minutes.
131
+
132
+
1. In the Azure portal, navigate to the Defender for Cloud's alerts page.
133
+
134
+
1. On the relevant AKS cluster, locate the following alert `Microsoft Defender for Cloud test alert (not a threat)`.
135
+
136
+
You can also learn more about defending your Kubernetes nodes and clusters with [Microsoft Defender for Containers](defender-for-containers-introduction.md).
82
137
83
138
## Next steps
84
139
This article introduced you to the alerts validation process. Now that you're familiar with this validation, try the following articles:
85
140
86
-
*[Validating Azure Key Vault threat detection in Microsoft Defender for Cloud](https://techcommunity.microsoft.com/t5/azure-security-center/validating-azure-key-vault-threat-detection-in-azure-security/ba-p/1220336)
87
-
*[Managing and responding to security alerts in Microsoft Defender for Cloud](managing-and-responding-alerts.md) - Learn how to manage alerts, and respond to security incidents in Defender for Cloud.
88
-
*[Understanding security alerts in Microsoft Defender for Cloud](./alerts-overview.md) - Learn about the different types of security alerts.
141
+
- [Validating Azure Key Vault threat detection in Microsoft Defender for Cloud](https://techcommunity.microsoft.com/t5/azure-security-center/validating-azure-key-vault-threat-detection-in-azure-security/ba-p/1220336)
142
+
- [Managing and responding to security alerts in Microsoft Defender forCloud](managing-and-responding-alerts.md) - Learn how to manage alerts, and respond to security incidentsin Defender for Cloud.
143
+
- [Understanding security alerts in Microsoft Defender for Cloud](./alerts-overview.md)
0 commit comments