Skip to content

Commit 4fd5a1f

Browse files
committed
Modified README.md
1 parent 793efe0 commit 4fd5a1f

File tree

2 files changed

+32
-32
lines changed

2 files changed

+32
-32
lines changed

README.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This repository walks you through a scenario covering threat detection and remed
44

55
### Prerequisites
66

7-
* **AWS Account**: Given that you will be simulating attacks and doing remediations, you should run this in a non-production account. After running through these scenarios, you can look at how you can implement GuardDuty and associated remediations in a multi-account structure so you are able to aggregate findings from other accounts and use the service in a more productionized manner.
7+
* **AWS Account**: Given that you will be simulating attacks and doing remediations, you should run this in a non-production account. After running through these scenarios, you can look at how you can implement GuardDuty and associated automated remediation workflows in a multi-account structure so you are able to aggregate findings from other accounts and use the service in a more productionized manner.
88
* **Admin Privileges**: Ensure you are using an AWS IAM User with Admin privileges.
99
* **AWS CLI**: You will be using the AWS CLI for simulating one of the attacks so be sure you have installed on your local machine.
1010

@@ -57,32 +57,32 @@ There are certain findings that will require a baseline (7 - 14 days) to be esta
5757
5858
## Deploy the Environment <a name="deploy"/>
5959

60-
To initiate the scenarios and begin generating GuardDuty findings you need to run the provided CloudFormation template.
60+
To initiate the scenarios and begin generating GuardDuty findings run the provided CloudFormation template.
6161

6262
Region| Deploy
6363
------|-----
64-
US West 2 (Oregon) | [![Deploy CFN Template in us-west-2](./images/deploy-to-aws.png)](https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/new?stackName=GuardDuty-Example&templateURL=https://s3-us-west-2.amazonaws.com/sa-security-specialist-workshops-us-west-2/guardduty-hands-on/guardduty-cfn-template.yml)
64+
US West 2 (Oregon) | [![Deploy CFN Template in us-west-2](./images/deploy-to-aws.png)](https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/new?stackName=GuardDuty-Hands-On&templateURL=https://s3-us-west-2.amazonaws.com/sa-security-specialist-workshops-us-west-2/guardduty-hands-on/guardduty-cfn-template.yml)
6565

66-
1. Click the **Deploy to AWS** button above. This will automatically take you to the AWS Management Console to run the template (in us-west-2). If you prefer, you can also just use the template found in this repo (guardduty-cfn-template.yml).
66+
1. Click the **Deploy to AWS** button above. This will automatically take you to the AWS Management Console to run the template. If you prefer, you can also just use the template found in this repo (guardduty-cfn-template.yml).
6767
2. On the **Specify Details** section enter the necessary parameters as shown below.
6868
![Parameters](images/screenshot4.png "Parameters")
6969
3. Once you have entered your parameters click **Next**, then **Next** again \(leave everything on this page at the default\).
7070
4. Finally, acknowledge the template will create IAM roles and click **Create**. This will bring you back to the CloudFormation console. You can refresh the page to see the stack starting to create.
7171
5. You will get an email from SNS asking you to confirm the Subscription. Confirm this so you can receive email alerts from GuardDuty.
7272

73-
The initial findings will begin to show up in GuardDuty about 10 minutes after the CloudFormation stack creation completes.
73+
The initial findings will begin to show up in GuardDuty 10 minutes after the CloudFormation stack creation completes.
7474

7575
### What is Created?
7676

7777
The CloudFormation template will create the following resources:
78-
* Three [Amazon EC2](https://aws.amazon.com/ec2/) Instances (all using a t2.micro instance type)
78+
* Three [Amazon EC2](https://aws.amazon.com/ec2/) Instances (and supporting network infrastructure)
7979
* Two Instances that contain the name “*Compromised Instance*
8080
* One instance that contains the name “*Malicious Instance*
8181
* [AWS IAM Role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) For EC2 which will have permissions to SSM Parameter Store and DynamoDB
8282
* One [Amazon SNS Topic](https://docs.aws.amazon.com/sns/latest/dg/GettingStarted.html) so you will be able to receive notifications
8383
* Three [AWS CloudWatch Event](https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/WhatIsCloudWatchEvents.html) rules for triggering the appropriate notification or remediation
8484
* Two [AWS Lambda](https://aws.amazon.com/lambda/) functions that will be used for remediating findings and will have permissions to modify Security Groups and revoke active IAM Role sessions (on only the IAM Role associated with this scenario)
85-
* [AWS Systems Manager Parameter Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-paramstore.html) values with the IAM temporary security credentials details (only used to easily retrieve credentials for the purposes of this scenario).
85+
* [AWS Systems Manager Parameter Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-paramstore.html) value for storing a fake database password.
8686

8787
> Make sure the CloudFormation stack is in a **CREATE_COMPLETE** status before moving on.
8888
@@ -130,7 +130,7 @@ If you view your local aws credentials file, you should now see an [attacker] pr
130130
131131
Now that you have your named profile you can use it to make API calls. Use the commands below to query different services to see what you have access to (don't be surprised if you see some access denied responses):
132132
133-
**Let's see if we have any IAM permissions:**
133+
**Do you have any IAM permissions:**
134134
```
135135
aws iam get-user --profile attacker
136136

@@ -144,7 +144,7 @@ aws dynamodb list-tables --profile attacker
144144
aws dynamodb describe-table --table-name GuardDuty-Example-Customer-DB --profile attacker
145145
```
146146
147-
**Can we query the data?**
147+
**Can you query the data?**
148148
```
149149
aws dynamodb scan --table-name GuardDuty-Example-Customer-DB --profile attacker
150150

@@ -188,29 +188,34 @@ Shortly after the first email, you receive a second email indicating that the sa
188188
189189
![Attack Scenario 1](images/attack1.png "Attack Scenario 1")
190190
191+
When Alice setup the hook for notifications she only included certain information about the finding because she had also setup a Lambda function to automatically isolate the instance and send out the details of the remediation. Since the finding has been remediated you decide you still want to take a closer look at the setup Alice currently has in place.
192+
191193
### Browse to the GuardDuty Console to Investigate
192194
193-
When Alice setup the hook for notifications she only included certain information about the finding because she had also setup a Lambda function to automatically isolate the instance and send out the details of the remediation. Since the finding has been remediated you decide you still want to take a closer look at the setup Alice currently has in place.
194-
1. Navigate to the [GuardDuty console](https://us-west-2.console.aws.amazon.com/guardduty/home?) and click on **Findings** in the navigation pane on the left.
195+
> Although you can view the GuardDuty findings in the console, most customers aggregate all of their findings across their regions and accounts to a central security information and event management (SIEM) system for analysis and remediation. A common approach for aggregating these findings is to setup GuardDuty in a [Master/Member](https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_accounts.html) relationship and then use a workflow including CloudWatch Event Rules and Lambda Functions to push findings to your SIEM or a centralized logging framework. There are also partner solutions that publish Lambda Function Blueprints to make it easier to consolidate findings.
196+
197+
1. Navigate to the [GuardDuty console](https://us-west-2.console.aws.amazon.com/guardduty/home?).
195198
196199
> If there is nothing displayed click the refresh button.
197200
198-
2. A finding should show up with the text **UnauthorizedAccess:EC2/MaliciousIPCaller.Custom**.
201+
2. A finding should show up with the type **UnauthorizedAccess:EC2/MaliciousIPCaller.Custom**.
199202
200203
> Based on the format you reviewed earlier can you determine the security issue by the finding type?
201204
202205
![GuardDuty Finding](images/screenshot5.png "GuardDuty Finding")
203206
204207
The finding type indicates that an EC2 instance in your environment is communicating outbound to an IP address included on a [custom threat list](https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_upload_lists.html). Click on **Lists** in the left navigation to view the custom threat list Alice added.
205208
206-
> GuardDuty uses managed threat intelligence provided by AWS Security and third-party providers, such as ProofPoint and CrowdStike. You can expand the monitoring scope of GuardDuty by configuring it to use your own custom trusted IP lists and threat lists.
209+
> GuardDuty uses managed threat intelligence provided by AWS Security and third-party providers, such as ProofPoint and CrowdStike. You can expand the monitoring scope of GuardDuty by configuring it to use your own custom trusted IP lists and threat lists. If you setup a Master/Member GuardDuty relationship, users from the Master GuardDuty account can manage trusted IP lists and threats lists and they are inherited by the member accounts. Users from the member accounts are not able to modify the lists.
210+
211+
Users from master GuardDuty accounts can upload and manage trusted IP lists and threat lists. Users from member GuardDuty accounts CANNOT upload and manage lists. Trusted IP lists and threat lists that are uploaded by the master account are imposed on GuardDuty functionality in its member accounts.
207212
208213
**Scenario Notes:**
209214
* The EC2 instance indicated by this finding is actually just connecting to an [Elastic IP](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html) (EIP) on another instance in the same VPC to keep the scenario localized to your environment. The CloudFormation template automatically created the threat list and added the EIP for the malicious instance to the list.
210215
211216
### View the CloudWatch Event Rule
212217
213-
Alice used CloudWatch Event Rules to send the email you received about the findings and also to take remediations steps. Next, you decide to examine the CloudWatch Events console to understand what Alice configured and to see how the remediation was triggered.
218+
Alice used CloudWatch Event Rules to send the email you received about the findings and also to take remediations steps. Examine the CloudWatch Events console to understand what Alice configured and to see how the remediation was triggered.
214219
215220
1. Navigate to the [CloudWatch console](https://us-west-2.console.aws.amazon.com/cloudwatch/home?) and on the left navigation, under the **Events** section, click **Rules**.
216221
@@ -230,7 +235,7 @@ The Lambda function is what handles the remediation logic for this finding. Alic
230235
231236
![Lambda Function](images/screenshot8.png "Lambda Function")
232237
233-
Scroll down to view the code for this function (walking through the code logic is outside the scope of this scenario). You can also click the **Monitoring** tab and view the invocation of the function.
238+
Scroll down to view the code for this function (walking through the code logic is outside the scope of this scenario). You can also click the **Monitoring** tab and view the invocation details for this function.
234239
235240
> What permissions does the Lambda Function need to perform the remediation?
236241
@@ -247,51 +252,46 @@ Next, double check the effects of the remediation to ensure the instance is isol
247252
248253
> **GuardDuty-Example: Compromised Instance: Scenario 1**.
249254
250-
3. After reviewing the remediation Lambda Function you know that the instance should now have the Security Group with a name that starts with **GuardDuty-Example-ForensicSecurityGroup**. Under the **Description** tab verify the instance has this security group.
255+
3. After reviewing the remediation Lambda Function you know that the instance should now have the Security Group with a name that includes **ForensicSecurityGroup**. Under the **Description** tab verify the instance has this security group.
251256
252-
> Initially, all three of the instances launched by the CloudFormation template were in the Security Group that starts with the name **GuardDuty-Example-TargetSecurityGroup**. The Lambda function removed this one instance from the TargetSecurityGroup and added it to the ForensicsSecurityGroup to isolate the instance.
257+
> Initially, all three of the instances launched by the CloudFormation template were in the Security Group with a name that includes **TargetSecurityGroup**. The Lambda function removed the TargetSecurityGroup from the instance and added the ForensicsSecurityGroup to isolate the instance.
253258
254-
4. Click on the **GuardDuty-Example-ForensicSecurityGroup** and view the ingress and egress rules.
259+
4. Click on the **ForensicSecurityGroup** and view the ingress and egress rules.
255260
256261
### Questions
257-
258-
After running through Alice's remediation workflow for this particular you start thinking about the following questions:
259262
* Which data source did GuardDuty use to identity this threat?
260-
* What would you change about the automated remediation Alice put in place?
261263
* Will isolating the instance have any effect on an application running on the instance?
262-
* Were the alerts detailed enough?
264+
* How could you add more detail to the email notifications?
263265
264266
## Scenario 2 – Compromised IAM Credentials (Simulated) <a name="attack2"/>
265267
266-
You have completed the examination of the first attack, confirmed it was properly remediated, and then sat back to take your first sip of coffee for the day when you notice an additional email about new findings. The first of the new findings indicates that an API call was made using IAM credentials from your AWS account from a malicious IP address.
268+
You have completed the examination of the first attack, confirmed it was properly remediated, and then sat back to take your first sip of coffee for the day when you notice an additional email about new findings. The first of the new findings indicates that an API call was made using AWS IAM credentials from an IP address on a custom threat list.
267269
268270
**Scenario Note**:
269-
* None of your IAM credentials have actually been compromised or exposed in any way. The finding is the result of an EC2 instance using an IAM Role for EC2 and with an EIP that is in the custom threat list making API calls on your behalf.
271+
* None of your IAM credentials have actually been compromised or exposed in any way. The finding is the result of an EC2 instance using an IAM Users credentials to make API calls and the EIP for the instance is on your custom threat list.
270272
271273
### Diagram of the Simulated Attack and Detection
272274
273275
![Attack 2](images/attack2.png "Attack2")
274276
275277
### Browse to the GuardDuty Console to Investigate
276278
277-
> Although you can view the GuardDuty findings in the console, most customers aggregate all of their findings across their accounts and regions to a central security information and event management (SIEM) system for analysis and remediation. A common approach for aggregating these findings is to setup GuardDuty in a [Master/Member](https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_accounts.html) relationship and then use a workflow including CloudWatch Event Rules and Lambda Functions to push findings to your SIEM or a centralized logging framework. There are also partner solutions that publish Lambda Function Blueprints to make it easier to consolidate findings.
278-
279279
To view the findings:
280280
281-
1. Navigate to the [GuardDuty console](https://us-west-2.console.aws.amazon.com/guardduty/home?) and then, in the navigation pane on the left, choose **Current**.
282-
2. Click the ![Refresh](images/refreshicon.png "Refresh") icon to refresh the GuardDuty console. You should now see additional findings that related to **Recon:IAMUser** and **UnauthorizedAccess:IAMUser**.
281+
1. Navigate to the [GuardDuty console](https://us-west-2.console.aws.amazon.com/guardduty/home?).
282+
2. Click the ![Refresh](images/refreshicon.png "Refresh") icon to refresh the GuardDuty console. You should now see additional findings that are related to **Recon:IAMUser** and **UnauthorizedAccess:IAMUser**.
283283
284-
> Based on the format you reviewed earlier can you determine the security issue by the finding type?
284+
> Based on the format you reviewed earlier can you determine the security issues by the finding type?
285285
286-
3. Click on the **UnauthorizedAccess:IAMUser** finding to view the full details.
286+
3. Click on the **UnauthorizedAccess:IAMUser/MaliciousIPCaller.Custom** finding to view the full details.
287287
288288
![GuardDuty Finding](images/screenshot10.png "GuardDuty Finding")
289289
290-
You can see the finding details include information about what happened, what AWS resources were involved in the suspicious activity, when this activity took place, and other additional information. Under **Resource Affected**, find the name of AWS IAM **User Name** associated with this finding.
290+
You can see the finding details include information about what happened, what AWS resources were involved in the suspicious activity, when this activity took place, and other additional information. Under **Resource Affected**, find the **User Name** associated with this finding.
291291
292292
This finding indicates that the IAM credentials (of the user you found above) are possibly compromised because API calls using those credentials are being made from an IP address on a custom threat list.
293293
294-
> What actions did this AWS IAM User take? You can see under **Action** and then **API** that a **GetParameters** API call but how you view the rest of the actions this user made over the past hour or day? GuardDuty is able to analyze large volumes of data and identity true threats in your environment but from investigation and remediation stand point it is still important to correlate other data to understand the full scope of the threat. In this case an analyst would use the details in this finding to pinpoint historical user activity in CloudTrail.
294+
> What actions did this AWS IAM User take? You can see under **Action** and then **API** that a **GetParameters** API call was made but how can you view the rest of the actions made by this user over the past hour or day? GuardDuty is able to analyze large volumes of data and identity true threats in your environment but from an investigation and remediation stand point it is still important to correlate other data to understand the full scope of the threat. In this case an analyst would use the details in this finding to pinpoint historical user activity in CloudTrail.
295295
296296
**Scenario Note**:
297297
* These IAM findings are being generated by the “malicious EC2” instance making API calls. These API calls generate findings because the EIP of that instance is in a custom threat list.

images/attack1.png

-2.39 KB
Loading

0 commit comments

Comments
 (0)