Skip to content

Commit 75815da

Browse files
authored
Merge pull request #229902 from ElazarK/WI69169-deprecate-assessments
removed custom and kql from AWS
2 parents bdb8c6d + 1d10530 commit 75815da

13 files changed

+35
-263
lines changed

articles/defender-for-cloud/how-to-manage-aws-assessments-standards.md

Lines changed: 18 additions & 178 deletions
Original file line numberDiff line numberDiff line change
@@ -3,217 +3,57 @@ title: Manage AWS assessments and standards
33
titleSuffix: Defender for Cloud
44
description: Learn how to create custom security assessments and standards for your AWS environment.
55
ms.topic: how-to
6-
ms.date: 02/07/2023
6+
ms.date: 03/09/2023
77
---
88

99
# Manage AWS assessments and standards
1010

11-
Security standards contain comprehensive sets of security recommendations to help secure your cloud environments. Security teams can use the readily available standards such as AWS CIS 1.2.0, AWS CIS 1.5.0, AWS Foundational Security Best Practices, and AWS PCI DSS 3.2.1, or create custom standards to meet specific internal requirements.
11+
Security standards contain comprehensive sets of security recommendations to help secure your cloud environments. Security teams can use the readily available standards such as AWS CIS 1.2.0, AWS CIS 1.5.0, AWS Foundational Security Best Practices, and AWS PCI DSS 3.2.1.
1212

13-
There are three types of resources that are needed to create and manage assessments:
13+
There are two types of resources that are needed to create and manage assessments:
1414

15-
- Assessment:
16-
- assessment details such as name, description, severity, remediation logic, etc.
17-
- assessment logic in KQL
18-
- the standard it belongs to
1915
- Standard: defines a set of assessments
20-
- Standard assignment: defines the scope, which the standard will evaluate. For example, specific AWS account(s).
16+
- Standard assignment: defines the scope, which the standard evaluates. For example, specific AWS account(s).
2117

22-
You can either use the built-in regulatory compliance standards or create your own custom standards.
18+
## Create a custom compliance standard to your AWS account
2319

24-
## Assign a built-in compliance standard to your AWS account
25-
26-
**To assign a built-in compliance standard to your AWS account**:
20+
**To create a custom compliance standard to your AWS account**:
2721

2822
1. Sign in to the [Azure portal](https://portal.azure.com/).
2923

3024
1. Navigate to **Microsoft Defender for Cloud** > **Environment settings**.
3125

3226
1. Select the relevant AWS account.
3327

34-
1. Select **Standards** > **Add** > **Standard**.
28+
1. Select **Standards** > **+ Create** > **Standard**.
3529

3630
:::image type="content" source="media/how-to-manage-assessments-standards/aws-add-standard.png" alt-text="Screenshot that shows you where to navigate to in order to add an AWS standard." lightbox="media/how-to-manage-assessments-standards/aws-add-standard-zoom.png":::
3731

38-
1. Select a built-in standard from the drop-down menu.
32+
1. Enter a name, description and select built-in recommendations from the drop-down menu.
33+
34+
:::image type="content" source="media/how-to-manage-assessments-standards/create-standard-aws.png" alt-text="Screenshot of the Create new standard window.":::
3935

40-
1. Select **Save**.
36+
1. Select **Create**.
4137

42-
## Create a new custom standard for your AWS account
38+
## Assign a built-in compliance standard to your AWS account
4339

44-
**To create a new custom standard for your AWS account**:
40+
**To assign a built-in compliance standard to your AWS account**:
4541

4642
1. Sign in to the [Azure portal](https://portal.azure.com/).
4743

4844
1. Navigate to **Microsoft Defender for Cloud** > **Environment settings**.
4945

5046
1. Select the relevant AWS account.
5147

52-
1. Select **Standards** > **Create** > **Standard**.
53-
54-
1. Select **New standard**.
55-
56-
:::image type="content" source="media/how-to-manage-assessments-standards/new-aws-standard.png" alt-text="Screenshot that shows you where to select a new AWS standard." lightbox="media/how-to-manage-assessments-standards/new-aws-standard.png":::
48+
1. Select **Standards**.
5749

58-
1. Enter a name, description and select which assessments you want to add.
50+
1. Select the **three dot button** for the built-in standard you want to assign.
5951

60-
1. Select **Save**.
52+
:::image type="content" source="media/how-to-manage-assessments-standards/aws-built-in.png" alt-text="Screenshot that shows where the three dot button is located on the screen." lightbox="media/how-to-manage-assessments-standards/aws-built-in.png":::
6153

62-
## Assign a built-in assessment to your AWS account
63-
64-
**To assign a built-in assessment to your AWS account**:
65-
66-
1. Sign in to the [Azure portal](https://portal.azure.com/).
67-
68-
1. Navigate to **Microsoft Defender for Cloud** > **Environment settings**.
69-
70-
1. Select the relevant AWS account.
54+
1. Select **Assign standard**.
7155

72-
1. Select **Standards** > **Add** > **Assessment**.
73-
74-
:::image type="content" source="media/how-to-manage-assessments-standards/aws-assessment.png" alt-text="Screenshot that shows where to navigate to, to select an AWS assessment." lightbox="media/how-to-manage-assessments-standards/aws-assessment.png":::
75-
76-
1. Select **Existing assessment**.
77-
78-
1. Select all relevant assessments from the drop-down menu.
79-
80-
1. Select the standards from the drop-down menu.
81-
82-
1. Select **Save**.
83-
84-
## How to build a query
85-
86-
The last row of the query should return all the original columns (don’t use ‘project’, ‘project-away'). End the query with an iff statement that defines the healthy or unhealthy conditions: `| extend HealthStatus = iff([boolean-logic-here], 'UNHEALTHY','HEALTHY')`.
87-
88-
### Sample KQL queries
89-
90-
When building a KQL query, you should use the following table structure:
91-
92-
```kusto
93-
- TimeStamp
94-
2021-10-07T10:30:21.403732Z
95-
- SdksInfo
96-
{
97-
"AWSSDK.EC2": "3.7.5.2"
98-
}
99-
100-
- RecordProviderInfo
101-
{
102-
"CloudName": "AWS",
103-
"CspmDiscoveryCloudRoleArn": "arn:aws:iam::123456789123:role/CSPMMonitoring",
104-
"Type": "MultiCloudDiscoveryServiceDataCollector",
105-
"HierarchyIdentifier": "123456789123",
106-
"ConnectorId": "b3113210-63f9-43c5-a6a7-f14a2a5b3cd0"
107-
}
108-
- RecordOrganizationInfo
109-
{
110-
"Type": "MyOrganization",
111-
"TenantId": "bda8bc53-d9f8-4248-b9a9-3a6c7fe0b92f",
112-
"SubscriptionId": "69444886-de6b-40c5-8b43-065f739fffb9",
113-
"ResourceGroupName": "MyResourceGroupName"
114-
}
115-
116-
- CorrelationId
117-
4f5e50e1d92c400caf507036a1237c72
118-
- RecordRegionalInfo
119-
{
120-
"Type": "MultiCloudRegion",
121-
"RegionUniqueName": "eu-west-2",
122-
"RegionDisplayName": "EU West (London)",
123-
"IsGlobalForRecord": false
124-
}
125-
126-
- RecordIdentifierInfo
127-
{
128-
"Type": "MultiCloudDiscoveryServiceDataCollector",
129-
"RecordNativeCloudUniqueIdentifier": "arn:aws:ec2:eu-west-2:123456789123:elastic-ip/eipalloc-1234abcd5678efef9",
130-
"RecordAzureUniqueIdentifier": "/subscriptions/69444886-de6b-40c5-8b43-065f739fffb9/resourcegroups/MyResourceGroupName/providers/Microsoft.Security/securityconnectors/b3113210-63f9-43c5-a6a7-f14a2a5b3cd0/securityentitydata/aws-ec2-elastic-ip-eipalloc-1234abcd5678efef9-eu-west-2",
131-
"RecordIdentifier": "eipalloc-1234abcd5678efef9-eu-west-2",
132-
"ResourceProvider": "EC2",
133-
"ResourceType": "elastic-ip"
134-
}
135-
- Record
136-
{
137-
"AllocationId": "eipalloc-1234abcd5678efef9",
138-
"AssociationId": "eipassoc-234abcd5678efef90",
139-
"CarrierIp": null,
140-
"CustomerOwnedIp": null,
141-
"CustomerOwnedIpv4Pool": null,
142-
"Domain": {
143-
"Value": "vpc"
144-
},
145-
"InstanceId": "i-0a8fcc00493c4625d",
146-
"NetworkBorderGroup": "eu-west-2",
147-
"NetworkInterfaceId": "eni-34abcd5678efef901",
148-
"NetworkInterfaceOwnerId": "123456789123",
149-
"PrivateIpAddress": "172.31.21.88",
150-
"PublicIp": "19.218.211.431",
151-
"PublicIpv4Pool": "amazon",
152-
"Tags": [
153-
{
154-
"Value": "arn:aws:cloudformation:eu-west-2:123456789123:stack/awseb-e-sjuh4tkr7a-stack/4ff15da0-2512-11ec-ab59-023b28e97f64",
155-
"Key": "aws:cloudformation:stack-id"
156-
},
157-
{
158-
"Value": "e-sjuh4tkr7a",
159-
"Key": "elasticbeanstalk:environment-id"
160-
},
161-
{
162-
"Value": "AWSEBEIP",
163-
"Key": "aws:cloudformation:logical-id"
164-
},
165-
{
166-
"Value": "awseb-e-sjuh4tkr7a-stack",
167-
"Key": "aws:cloudformation:stack-name"
168-
},
169-
{
170-
"Value": "Mebrennetest3-env",
171-
"Key": "elasticbeanstalk:environment-name"
172-
},
173-
{
174-
"Value": "Mebrennetest3-env",
175-
"Key": "Name"
176-
}
177-
]
178-
}
179-
```
180-
181-
> [!NOTE]
182-
> The `Record` field contains the data structure as it is returned from the AWS API. Use this field to define conditions which will determine if the resource is healthy or unhealthy.
183-
>
184-
> You can access internal properties of `Record` filed using a dot notation. For example: `| extend EncryptionType = Record.Encryption.Type`.
185-
186-
**Stopped EC2 instances should be removed after a specified time period**
187-
188-
```kusto
189-
EC2_Instance
190-
| extend State = tolower(tostring(Record.State.Name.Value))
191-
| extend StoppedTime = todatetime(tostring(Record.StateTransitionReason))
192-
| extend HealthStatus = iff(not(State == 'stopped' and StoppedTime < ago(30d)), 'HEALTHY', 'UNHEALTHY')
193-
```
194-
195-
**EC2 subnets should not automatically assign public IP addresses**
196-
197-
198-
```kusto
199-
EC2_Subnet
200-
| extend MapPublicIpOnLaunch = tolower(tostring(Record.MapPublicIpOnLaunch))
201-
| extend HealthStatus = iff(MapPublicIpOnLaunch == 'false' ,'HEALTHY', 'UNHEALTHY')
202-
```
203-
204-
**EC2 instances should not use multiple ENIs**
205-
206-
```kusto
207-
EC2_Instance
208-
| extend NetworkInterfaces = parse_json(Record)['NetworkInterfaces']
209-
| extend NetworkInterfaceCount = array_length(parse_json(NetworkInterfaces))
210-
| extend HealthStatus = iff(NetworkInterfaceCount == 1 ,'HEALTHY', 'UNHEALTHY')
211-
```
212-
213-
You can use the following links to learn more about Kusto queries:
214-
- [KQL quick reference](/azure/data-explorer/kql-quick-reference)
215-
- [Kusto Query Language (KQL) overview](/azure/data-explorer/kusto/query/)
216-
- [Must Learn KQL](https://azurecloudai.blog/2021/11/17/must-learn-kql-part-1-tools-and-resources/)
56+
1. Select **Yes**.
21757

21858
## Next steps
21959

articles/defender-for-cloud/how-to-manage-gcp-assessments-standards.md

Lines changed: 17 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,128 +1,60 @@
11
---
22
title: Manage GCP assessments and standards
33
titleSuffix: Defender for Cloud
4-
description: Learn how to create custom security assessments and standards for your GCP environment.
4+
description: Learn how to create standards for your GCP environment.
55
ms.topic: how-to
6-
ms.date: 01/24/2023
6+
ms.date: 03/08/2023
77
---
88

99
# Manage GCP assessments and standards
1010

1111
Security standards contain comprehensive sets of security recommendations to help secure your cloud environments. Security teams can use the readily available regulatory standards such as GCP CIS 1.1.0, GCP CIS and 1.2.0, or create custom standards to meet specific internal requirements.
1212

13-
There are three types of resources that are needed to create and manage assessments:
13+
There are two types of resources that are needed to create and manage standards:
1414

15-
- Assessment:
16-
- assessment details such as name, description, severity, remediation logic, etc.
17-
- assessment logic in KQL
18-
- the standard it belongs to
1915
- Standard: defines a set of assessments
20-
- Standard assignment: defines the scope, which the standard will evaluate. For example, specific GCP projects.
16+
- Standard assignment: defines the scope, which the standard evaluates. For example, specific GCP projects.
2117

22-
You can either use the built-in compliance standards or create your own custom standards or built-in assessments.
18+
## Create a custom compliance standard to your GCP project
2319

24-
## Assign a built-in compliance standard to your GCP project
25-
26-
**To assign a built-in compliance standard to your GCP project**:
20+
**To create a custom compliance standard to your GCP project**:
2721

2822
1. Sign in to the [Azure portal](https://portal.azure.com/).
2923

3024
1. Navigate to **Microsoft Defender for Cloud** > **Environment settings**.
3125

3226
1. Select the relevant GCP project.
3327

34-
1. Select **Standards** > **Add** > **Standard**.
28+
1. Select **Standards** > **+ Create** > **Standard**.
3529

3630
:::image type="content" source="media/how-to-manage-assessments-standards/gcp-standard.png" alt-text="Screenshot that shows you where to navigate to, to add a GCP standard." lightbox="media/how-to-manage-assessments-standards/gcp-standard-zoom.png":::
3731

38-
1. Select a built-in standard from the drop-down menu.
32+
1. Enter a name, description and select built-in recommendations from the drop-down menu.
3933

4034
:::image type="content" source="media/how-to-manage-assessments-standards/drop-down-menu.png" alt-text="Screenshot that shows you the standard options you can choose from the drop-down menu." lightbox="media/how-to-manage-assessments-standards/drop-down-menu.png":::
4135

42-
1. Select **Save**.
43-
44-
## Create a new custom standard for your GCP project
45-
46-
**To create a new custom standard for your GCP project**:
47-
48-
1. Sign in to the [Azure portal](https://portal.azure.com/).
49-
50-
1. Navigate to **Microsoft Defender for Cloud** > **Environment settings**.
51-
52-
1. Select the relevant GCP project.
53-
54-
1. Select **Standards** > **Add** > **Standard**.
55-
56-
1. Select **New standard**.
57-
58-
1. Enter a name, description and select which assessments you want to add.
59-
60-
1. Select **Save**.
36+
1. Select **Create**.
6137

62-
## Assign a built-in assessment to your GCP project
38+
## Assign a built-in compliance standard to your GCP project
6339

64-
**To assign a built-in assessment to your GCP project**:
40+
**To assign a built-in compliance standard to your GCP project**:
6541

6642
1. Sign in to the [Azure portal](https://portal.azure.com/).
6743

6844
1. Navigate to **Microsoft Defender for Cloud** > **Environment settings**.
6945

7046
1. Select the relevant GCP project.
7147

72-
1. Select **Standards** > **Add** > **Assessment**.
73-
74-
:::image type="content" source="media/how-to-manage-assessments-standards/gcp-assessment.png" alt-text="Screenshot that shows where to navigate to, to select GCP assessment." lightbox="media/how-to-manage-assessments-standards/gcp-assessment.png":::
75-
76-
1. Select **Existing assessment**.
77-
78-
1. Select all relevant assessments from the drop-down menu.
79-
80-
1. Select the standards from the drop-down menu.
81-
82-
1. Select **Save**.
83-
84-
## How to build a query
85-
86-
The last row of the query should return all the original columns (don’t use ‘project’, ‘project-away). End the query with an iff statement that defines the healthy or unhealthy conditions: `| extend HealthStatus = iff([boolean-logic-here], 'UNHEALTHY','HEALTHY')`.
87-
88-
### Sample KQL queries
89-
90-
**Ensure that Cloud Storage buckets have uniform bucket-level access enabled**
91-
92-
```kusto
93-
let UnhealthyBuckets = Storage_Bucket
94-
| extend RetentionPolicy = Record.retentionPolicy
95-
| where isnull(RetentionPolicy) or isnull(RetentionPolicy.isLocked) or tobool(RetentionPolicy.isLocked)==false
96-
| project BucketName = RecordIdentifierInfo.CloudNativeResourceName; Logging_LogSink
97-
| extend Destination = split(Record.destination,'/')[0]
98-
| where Destination == 'storage.googleapis.com'
99-
| extend LogBucketName = split(Record.destination,'/')[1]
100-
| extend HealthStatus = iff(LogBucketName in(UnhealthyBuckets), 'UNHEALTHY', 'HEALTHY')"
101-
```
102-
103-
**Ensure VM disks for critical VMs are encrypted**
104-
105-
```kusto
106-
Compute_Disk
107-
| extend DiskEncryptionKey = Record.diskEncryptionKey
108-
| extend IsVmNotEncrypted = isempty(tostring(DiskEncryptionKey.sha256))
109-
| extend HealthStatus = iff(IsVmNotEncrypted ,'UNHEALTHY' ,'HEALTHY')"
110-
```
48+
1. Select **Standards**.
11149

112-
**Ensure Compute instances are launched with Shielded VM enabled**
50+
1. Select the **three dot button** for the built-in standard you want to assign.
11351

114-
```kusto
115-
Compute_Instance
116-
| extend InstanceName = tostring(Record.id)
117-
| extend ShieldedVmExist = tostring(Record.shieldedInstanceConfig.enableIntegrityMonitoring) =~ 'true' and tostring(Record.shieldedInstanceConfig.enableVtpm) =~ 'true'
118-
| extend HealthStatus = iff(ShieldedVmExist, 'HEALTHY', 'UNHEALTHY')"
119-
```
52+
:::image type="content" source="media/how-to-manage-assessments-standards/gcp-built-in.png" alt-text="Screenshot that shows where the three dot button is located on the screen." lightbox="media/how-to-manage-assessments-standards/gcp-built-in.png":::
12053

121-
You can use the following links to learn more about Kusto queries:
122-
- [KQL quick reference](/azure/data-explorer/kql-quick-reference)
123-
- [Kusto Query Language (KQL) overview](/azure/data-explorer/kusto/query/)
124-
- [Must Learn KQL](https://azurecloudai.blog/2021/11/17/must-learn-kql-part-1-tools-and-resources/)
54+
1. Select **Assign standard**.
12555

56+
1. Select **Yes**.
57+
12658
## Next steps
12759

12860
In this article, you learned how to manage your assessments and standards in Defender for Cloud.
-163 KB
Loading
-5.81 KB
Loading
60.4 KB
Loading
45.5 KB
Loading
11.8 KB
Loading
65.2 KB
Loading

0 commit comments

Comments
 (0)