In this workshop you will learn how to implement automated remediations of findings submitted to AWS Security Hub leveraging an open source tool named Cloud Custodian, with no prior knowledge of either required.
However, this workshop is not intended to to provide a complete introduction to writing polices for Cloud Custodian, for that please refer to the Getting Started documentation or alternatively the introductory presentation on Cloud Custodian
The automated remediations in this workshop are implemented as AWS Lambda Functions which get invoked by Cloudwatch Events. The CloudWatch Events are generated by AWS Security Hub as a result of a Console user invoking a Custom Action, or when a finding is imported into Security Hub.
Your feedback is highly desired, please submit a new issue if you run into any problems, even if you figure it out yourself, please report the problem so we can attempt to make this workshop as error proof as possible.
- Level: Intermediate
- Duration: 1 - 2 hours
- CSF Functions: Detect, Respond
- CAF Components: Detective, Responsive
- Prerequisites: AWS Account with an Admin IAM user/role with AWS CLI configured. If you are doing this Workshop as part of an AWS Event where Event Engine is being used, these will be supplied.
You are a Security Engineer who has just been tasked with automating some of the common steps that Security Analysts take when responding to insecure configuration, discovered vulnerabilities, or actual attacks.
For this Workshop you will view source files using Cloud 9 and invoke command lines via it's terminal window connected to an EC2 instance. The automated remediations in this workshop will be deployed by using that terminal window to invoke Cloud Custodian running within a docker container. Each module includes the execution of a Cloud Custodian policy, which is file written in a simple YAML based DSL which defines rules. Most of the policies result in Cloud Custodian dynamically generating and deploying a Lambda Function, then deploying a CloudWatch Event rule with an event filter and a trigger to invoke the same Lambda function it just deployed.
The cloudformation in this workshop sets up the following:
- AWS Cloud 9 Environment with associated ec2 instance.
- IAM policies, Role, and Instance-Profiles.
- An ec2 instance to be used as a test target.
- IAM user to demo ability to disable it's access keys.
- CloudWatch Log Groups
As part of the Workshop, Security Hub and Guard Duty will be enabled.
This workshop is broken up into the following modules below: