Skip to content

Commit b5dee1f

Browse files
committed
removed custom and kql from AWS
1 parent 76fe391 commit b5dee1f

File tree

6 files changed

+6
-186
lines changed

6 files changed

+6
-186
lines changed

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

Lines changed: 6 additions & 186 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,18 @@ 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/08/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

1313
There are three 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
2016
- Standard assignment: defines the scope, which the standard will evaluate. For example, specific AWS account(s).
2117

22-
You can either use the built-in regulatory compliance standards or create your own custom standards.
23-
2418
## Assign a built-in compliance standard to your AWS account
2519

2620
**To assign a built-in compliance standard to your AWS account**:
@@ -31,189 +25,15 @@ You can either use the built-in regulatory compliance standards or create your o
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.
39-
40-
1. Select **Save**.
41-
42-
## Create a new custom standard for your AWS account
43-
44-
**To create a new custom standard for your AWS account**:
45-
46-
1. Sign in to the [Azure portal](https://portal.azure.com/).
47-
48-
1. Navigate to **Microsoft Defender for Cloud** > **Environment settings**.
49-
50-
1. Select the relevant AWS account.
51-
52-
1. Select **Standards** > **Create** > **Standard**.
32+
1. Enter a name, description and select built-in recommendations from the menu.
5333

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":::
57-
58-
1. Enter a name, description and select which assessments you want to add.
59-
60-
1. Select **Save**.
61-
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.
34+
:::image type="content" source="media/how-to-manage-assessments-standards/create-standard-aws.png" alt-text="Screenshot of the create new standard window.":::
7135

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/)
36+
1. Select **Create**.
21737

21838
## Next steps
21939

-163 KB
Loading
-5.81 KB
Loading
45.5 KB
Loading

0 commit comments

Comments
 (0)