SlideShare a Scribd company logo
1 of 4
Download to read offline
AWS
Incident Response
Cheat Sheet
With the rapid migration to the cloud,
it’s becoming increasingly difficult to keep track
of all of the different data sources, commands,
and tools available from each Cloud Service
Provider (CSP). This cheat sheet was designed
to provide security professionals with an overview
of key best practices, data sources and tools that
they can have at their disposal when responding
to an incident in an AWS environment.
Introduction
Active Directory
About Cado Security
Cado Security is the provider of the first
cloud forensics and incident response platform.
The platform leverages the scale and speed
of the cloud to automate the end-to-end
incident response process – from data capture
and processing to investigation and response.
There are three domains in an AWS environment that fall under the customers’ responsibility to secure:
Cloud Security Incident Domains
Service domain incidents impact AWS accounts, IAM permissions, resource metadata, billing, and other areas.
They are addressed using AWS API mechanisms and can be caused by configuration or
resource permission issues.
Infrastructure domain incidents involve data or network-related activities within Amazon EC2 instances,
such as processes, data, and VPC traffic. Responding to these incidents requires the ability to acquire data for
forensic analysis, interact with the instance’s operating system, and utilize AWS APIs. Forensic analysis and
investigations can be conducted using AWS APIs and DFIR tools within a dedicated EC2 instance.
Application domain incidents occur in application code or software deployed to services or infrastructure.
They should be addressed in cloud threat detection and response playbooks and can be managed using cloud
tools with automated acquisition, recovery, and deployment. Similar response strategies as the infrastructure
domain may be applicable.
Useful Open Source Tools
AWS_IR is a Python CLI tool used to
automate initial response actions
Margarita Shotgun is used to dump
memory from systems
SANS Investigative Forensic Toolkit
is an all-in-one forensic toolkit
Diffy is a tool for identifying changes
or differences in systems
Automatic Forensics Orchestrator
collects full snapshots of EC2 systems
OSQuery is an endpoint detection
and response tool
SOF-ELK is an analytics platform focused
on the needs of computer forensics
and investigation teams
Prowler is a multi-purpose toolkit
kube-forensics is used to dump
the running pod and all its containers
Invictus-AWS automatically enumerates
and acquires relevant data
Useful List Commands
List AWS regions
aws ec2 describe-regions
List information
about Cloudwatch alarms
aws cloudwatch
describe-alarms | jq -r
‘.MetricAlarms[ ] | .AlarmName+”
“+.Namespace+”
List EC2 instances with
ID, Type, Name
aws ec2 describe-instances | jq
-r
‘.Reservations[].Instances[]|.Inst
anceId+” “+.InstanceType+”
“+(.Tags[] | select(.Key ==
“Name”).Value)’
List security groups
aws ec2
describe-security-groups | jq -r
‘.SecurityGroups[]|.GroupId+”
“+.GroupName’
List Subnets for a VPC
aws ec2 describe-subnets
--filter
Name=vpc-id,Values=<Your_VP
C_ID> | jq -r
‘.Subnets[]|.SubnetId+”
“+.CidrBlock+”
“+(.Tags[]|select(.Key==”Name”
).Value)’
Lists the Logs that
are available in a region
aws logs describe-log-groups
--region <region>
Important Log Types
CloudTrail: Tenant audit logs
CloudTrail Insights: API usage
outside of baselines
CloudWatch Logs: Forwarded logs
from applications and endpoints
GuardDuty: Anomaly detection
within CloudTrail
VPC flow logs: NetFlow logs
from your VPCs
S3 Server access: Logs from
web-based storage access
Route 53: DNS Resolver Logs
Load Balancer Logs: Logs
requests sent to your
Load Balancer
Accessing Logs
Access logs
directly via AWS
web console
Store and search
logs via S3
and Athena
Access logs via
real-time API call
via event hub
Exporting Logs
Via web console: This is very limited. Log files can only be downloaded
one at a time which is a slow process. Further, sorting of files is
unavailable once there are more than 999.
Via CLI: Export logs using the aws cp and aws sync commands.
➔ aws cp command: aws s3 cp s3://
<log_bucket_here>/AWSLogs . --recursive
➔ the aws cp command will copy the logs to the current working
directory, including the contents of subfolders. To copy to another
location replace the ‘.’ with the desired location.
➔ aws sync command: aws s3 sync s3://
<log_bucket_here>/AWSLogs . --recursive
➔ aws sync commands work exactly the same as aws cp commands,
but if there is already a copy of the logs at the destination, it will only
download new log events and update the log file.
Amazon Detective
Log collection
and analytics powered
by machine learning
Amazon CloudWatch
Visualization of
real-time logs in
automated dashboards
AWS Security Hub
A centralized hub
for monitoring
security alerts
AWS SSM
Allows the execution of
tools to gather forensic
data and take actions on
compromised systems
AWS Native Tools
AWS Snapshots
Snapshots in AWS are a crucial
feature when it comes to digital
forensics. They are point-in-time
copies of your Amazon
instances. These snapshots
serve as backups and can be
used for various forensic
investigations.
Create a snapshot:
aws ec2 create-snapshot
--volume-id <volume_id>
--description “Snapshot
created”
aws ec2 create-volume
--availability-zone <DFIR_zone>
--snapshot-id <snapshot_id>
Download Snapshot
(Coldsnap):
coldsnap --region <region>
download <snapshot_id>
image.dd
Mount a Snapshot:
aws ec2 attach-volume
--volume-id <volume_id>
--instance-id <DFIR_instance>
--device </dev/sdX>
Cloudwatch Logs
Cloudwatch automatically collects logs and allows you to query them
in real time. Go to the cloudwatch console > select insight > logs > then
choose your log groups and set your time constraints. Use the
following queries to quickly identify suspicious activity:
List all IAM access
denied attempts
filter errorCode like
/Unauthorized|Denied|Forbidd
en/ | fields awsRegion,
userIdentity.arn, eventSource,
eventName, sourceIPAddress,
userAgent
List the actions an access key
has performed
filter userIdentity.accessKeyId
=”<Access_Key>” | fields
awsRegion, eventSource,
eventName, sourceIPAddress,
userAgent
List IAM actions performed
by a specified IP address
filter sourceIPAddress =
“192.0.2.1” | fields awsRegion,
userIdentity.arn, eventSource,
eventName, sourceIPAddress,
userAgent
IAM Logs
List all IAM user and role
creation events
filter eventName=”CreateUser”
or eventName = “CreateRole” |
fields
requestParameters.userName,
requestParameters.roleName,
responseElements.user.arn,
responseElements.role.arn,
sourceIPAddress, eventTime,
errorCode
List all ‘ListBucket’ events (this
can reveal if an attacker is
trying to access your buckets)
filter eventName =”ListBuckets”
| fields awsRegion, eventSource,
eventName, sourceIPAddress,
userAgent
List reject requests
by IP address
filter action=”REJECT” | stats
count(*) as numRejections by
srcAddr | sort numRejections
desc
List reject requests
originating from inside
your VPC
filter action=”REJECT” and
srcAddr like /^10./ | stats
count(*) as numRejections by
srcAddr | sort numRejections
desc
VPC FLow Logs
List requests originating
from a specific ip address
filter srcAddr = “192.0.2.1” |
fields @timestamp, interfaceId,
dstAddr, dstPort, action
List outgoing requests from
a specific IP address by
number of requests
filter srcAddr = “10.1.1.1” | stats
count(*) as numConnections by
dstAddr | sort numConnections
desc
CloudTail cheat sheet by invictus
SANS posters and cheat sheets
AWS CloudTrail Searching Event logs
in S3, Athena and Cloudwatch
AWS, IAM Your Father
(Part II - Defensive)
Logging and monitoring
in Amazon S3
IAM
Use these commands to quickly view all roles,
users, and groups:
list all roles in JSON format
aws iam list-roles
list all users
aws iam list-users --output table --query
‘Users[*].UserName’
list all groups
aws iam list-groups --output table --query
‘Groups[*].GroupName’
Use these commands to quickly block and unblock
compromised roles, users, groups, or access keys:
block role
aws iam put-role-policy --role-name <ROLE>
--policy-name DenyAll --policy-document ‘{
“Statement”: [ { “Effect”: “Deny”, “Action”: “*”,
“Resource”: “*” } ] }
remove block
aws iam delete-role-policy --role-name <ROLE>
--policy-name DenyAll
block user
aws iam put-user-policy --user-name <USER>
--policy-name DenyAll --policy-document ‘{
“Statement”: [ { “Effect”: “Deny”, “Action”: “*”,
“Resource”: “*” } ] }
remove block
aws iam delete-user-policy --user-name <USER>
--policy-name DenyAll
block group
aws iam put-group-policy --group-name <GROUP>
--policy-name DenyAll --policy-document ‘{
“Statement”: [ { “Effect”: “Deny”, “Action”: “*”,
“Resource”: “*” } ] }
remove block
aws iam delete-group-policy --group-name
<GROUP> --policy-name DenyAll
disable an access key
aws iam update-access-key --access-key-id
<Access_Key> --status Inactive --user-name user
Responding to ESK Incidents
Identify if the compromised system is running on an
EC2 instance or fargate.
For EC2: Follow the steps outlined in the
“Responding to EC2 Incidents” section above.
For Fargate: In this case, it is important to collect all
forensic data before the system is shutdown.
Responding to Lambda Incidents
These can be particularly frustrating to investigate
as the underlying container can not be accessed.
You can however collect:
➔ The code of the Lambda function
➔ Any environment variables it is set to use
➔ Any logs in CloudWatch and CloudTrail
Further reading and resources:
If you’d like to learn more about what
Cado Security is doing to help advance
investigations and incident response in the
cloud, request a demo today.
Digital Forensic Analysis of Amazon
Linux EC2 Instances
AWS ECS: Fully Managed
but Frustrating to Investigate
Responding to EC2 Incidents
Step 1: Prevent data theft by changing the security
group to one that disallows outbound traffic
Step 2: Check if there was an Instance Profile
attached. CloudTrail logs can be used to see if
it was abused to access other resources.
Step 3: Snapshot the Instance to allow
for forensic investigation.

More Related Content

What's hot

An Introduction to the AWS Well Architected Framework - Webinar
An Introduction to the AWS Well Architected Framework - WebinarAn Introduction to the AWS Well Architected Framework - Webinar
An Introduction to the AWS Well Architected Framework - WebinarAmazon Web Services
 
Access Control for the Cloud: AWS Identity and Access Management (IAM) (SEC20...
Access Control for the Cloud: AWS Identity and Access Management (IAM) (SEC20...Access Control for the Cloud: AWS Identity and Access Management (IAM) (SEC20...
Access Control for the Cloud: AWS Identity and Access Management (IAM) (SEC20...Amazon Web Services
 
AWS Webcast - What is Cloud Computing with AWS
AWS Webcast - What is Cloud Computing with AWSAWS Webcast - What is Cloud Computing with AWS
AWS Webcast - What is Cloud Computing with AWSAmazon Web Services
 
Joel Schuweiler_AWS IAM Identity Center (Single Sign On).pptx
Joel Schuweiler_AWS IAM Identity Center (Single Sign On).pptxJoel Schuweiler_AWS IAM Identity Center (Single Sign On).pptx
Joel Schuweiler_AWS IAM Identity Center (Single Sign On).pptxAWS Chicago
 
AWS IAM and security
AWS IAM and securityAWS IAM and security
AWS IAM and securityErik Paulsson
 
Top 10 AWS Identity and Access Management (IAM) Best Practices (SEC301) | AWS...
Top 10 AWS Identity and Access Management (IAM) Best Practices (SEC301) | AWS...Top 10 AWS Identity and Access Management (IAM) Best Practices (SEC301) | AWS...
Top 10 AWS Identity and Access Management (IAM) Best Practices (SEC301) | AWS...Amazon Web Services
 
Introduction to Identity and Access Management (IAM)
Introduction to Identity and Access Management (IAM)Introduction to Identity and Access Management (IAM)
Introduction to Identity and Access Management (IAM)Amazon Web Services
 
Introducing AWS Elastic Beanstalk
Introducing AWS Elastic BeanstalkIntroducing AWS Elastic Beanstalk
Introducing AWS Elastic BeanstalkAmazon Web Services
 

What's hot (20)

Security Best Practices on AWS
Security Best Practices on AWSSecurity Best Practices on AWS
Security Best Practices on AWS
 
An Introduction to the AWS Well Architected Framework - Webinar
An Introduction to the AWS Well Architected Framework - WebinarAn Introduction to the AWS Well Architected Framework - Webinar
An Introduction to the AWS Well Architected Framework - Webinar
 
Aws VPC
Aws VPCAws VPC
Aws VPC
 
AWS Security by Design
AWS Security by Design AWS Security by Design
AWS Security by Design
 
Aws landing zone
Aws landing zoneAws landing zone
Aws landing zone
 
Fundamentals of AWS Security
Fundamentals of AWS SecurityFundamentals of AWS Security
Fundamentals of AWS Security
 
Access Control for the Cloud: AWS Identity and Access Management (IAM) (SEC20...
Access Control for the Cloud: AWS Identity and Access Management (IAM) (SEC20...Access Control for the Cloud: AWS Identity and Access Management (IAM) (SEC20...
Access Control for the Cloud: AWS Identity and Access Management (IAM) (SEC20...
 
AWS Security Best Practices
AWS Security Best PracticesAWS Security Best Practices
AWS Security Best Practices
 
Amazon API Gateway
Amazon API GatewayAmazon API Gateway
Amazon API Gateway
 
AWS Webcast - What is Cloud Computing with AWS
AWS Webcast - What is Cloud Computing with AWSAWS Webcast - What is Cloud Computing with AWS
AWS Webcast - What is Cloud Computing with AWS
 
Joel Schuweiler_AWS IAM Identity Center (Single Sign On).pptx
Joel Schuweiler_AWS IAM Identity Center (Single Sign On).pptxJoel Schuweiler_AWS IAM Identity Center (Single Sign On).pptx
Joel Schuweiler_AWS IAM Identity Center (Single Sign On).pptx
 
AWS IAM and security
AWS IAM and securityAWS IAM and security
AWS IAM and security
 
AWS Cloud trail
AWS Cloud trailAWS Cloud trail
AWS Cloud trail
 
Amazon S3 Masterclass
Amazon S3 MasterclassAmazon S3 Masterclass
Amazon S3 Masterclass
 
AWS Cloud Watch
AWS Cloud WatchAWS Cloud Watch
AWS Cloud Watch
 
Top 10 AWS Identity and Access Management (IAM) Best Practices (SEC301) | AWS...
Top 10 AWS Identity and Access Management (IAM) Best Practices (SEC301) | AWS...Top 10 AWS Identity and Access Management (IAM) Best Practices (SEC301) | AWS...
Top 10 AWS Identity and Access Management (IAM) Best Practices (SEC301) | AWS...
 
AWS Lambda
AWS LambdaAWS Lambda
AWS Lambda
 
Python3 (boto3) for aws
Python3 (boto3) for awsPython3 (boto3) for aws
Python3 (boto3) for aws
 
Introduction to Identity and Access Management (IAM)
Introduction to Identity and Access Management (IAM)Introduction to Identity and Access Management (IAM)
Introduction to Identity and Access Management (IAM)
 
Introducing AWS Elastic Beanstalk
Introducing AWS Elastic BeanstalkIntroducing AWS Elastic Beanstalk
Introducing AWS Elastic Beanstalk
 

Similar to AWS Incident Response Cheat Sheet.pdf

Automating Security in Cloud Workloads with DevSecOps
Automating Security in Cloud Workloads with DevSecOps Automating Security in Cloud Workloads with DevSecOps
Automating Security in Cloud Workloads with DevSecOps Kristana Kane
 
Azure Incident Response Cheat Sheet.pdf
Azure Incident Response Cheat Sheet.pdfAzure Incident Response Cheat Sheet.pdf
Azure Incident Response Cheat Sheet.pdfChristopher Doman
 
Amazon Web Services Security
Amazon Web Services SecurityAmazon Web Services Security
Amazon Web Services SecurityJason Chan
 
Incident Response in the Cloud | AWS Public Sector Summit 2017
Incident Response in the Cloud | AWS Public Sector Summit 2017Incident Response in the Cloud | AWS Public Sector Summit 2017
Incident Response in the Cloud | AWS Public Sector Summit 2017Amazon Web Services
 
Building a GDPR-compliant architecture on AWS.pdf
Building a GDPR-compliant architecture on AWS.pdfBuilding a GDPR-compliant architecture on AWS.pdf
Building a GDPR-compliant architecture on AWS.pdfZen Bit Tech
 
Incident Response: Preparing and Simulating Threat Response
Incident Response: Preparing and Simulating Threat ResponseIncident Response: Preparing and Simulating Threat Response
Incident Response: Preparing and Simulating Threat ResponseAmazon Web Services
 
Gestire la sicurezza nel Cloud: come iniziare ad implementare un processo Dev...
Gestire la sicurezza nel Cloud: come iniziare ad implementare un processo Dev...Gestire la sicurezza nel Cloud: come iniziare ad implementare un processo Dev...
Gestire la sicurezza nel Cloud: come iniziare ad implementare un processo Dev...Amazon Web Services
 
(SEC308) Wrangling Security Events In The Cloud
(SEC308) Wrangling Security Events In The Cloud(SEC308) Wrangling Security Events In The Cloud
(SEC308) Wrangling Security Events In The CloudAmazon Web Services
 
Best Practices for Managing Security Operations in AWS - AWS July 2016 Webina...
Best Practices for Managing Security Operations in AWS - AWS July 2016 Webina...Best Practices for Managing Security Operations in AWS - AWS July 2016 Webina...
Best Practices for Managing Security Operations in AWS - AWS July 2016 Webina...Amazon Web Services
 
best aws training in bangalore
best aws training in bangalorebest aws training in bangalore
best aws training in bangalorerajkamal560066
 
AWS July Webinar Series - Troubleshooting Operational and Security Issues in ...
AWS July Webinar Series - Troubleshooting Operational and Security Issues in ...AWS July Webinar Series - Troubleshooting Operational and Security Issues in ...
AWS July Webinar Series - Troubleshooting Operational and Security Issues in ...Amazon Web Services
 
Integrating_Cloud_Development_Security_And_Operations.pdf
Integrating_Cloud_Development_Security_And_Operations.pdfIntegrating_Cloud_Development_Security_And_Operations.pdf
Integrating_Cloud_Development_Security_And_Operations.pdfAmazon Web Services
 
(SEC318) AWS CloudTrail Deep Dive
(SEC318) AWS CloudTrail Deep Dive(SEC318) AWS CloudTrail Deep Dive
(SEC318) AWS CloudTrail Deep DiveAmazon Web Services
 
(DVO303) Scaling Infrastructure Operations with AWS
(DVO303) Scaling Infrastructure Operations with AWS(DVO303) Scaling Infrastructure Operations with AWS
(DVO303) Scaling Infrastructure Operations with AWSAmazon Web Services
 
SEC303 Automating Security in Cloud Workloads with DevSecOps
SEC303 Automating Security in Cloud Workloads with DevSecOpsSEC303 Automating Security in Cloud Workloads with DevSecOps
SEC303 Automating Security in Cloud Workloads with DevSecOpsAmazon Web Services
 
AWS Cyber Security Best Practices
AWS Cyber Security Best PracticesAWS Cyber Security Best Practices
AWS Cyber Security Best PracticesDoiT International
 
AWS re:Invent 2016: Automating Security Event Response, from Idea to Code to ...
AWS re:Invent 2016: Automating Security Event Response, from Idea to Code to ...AWS re:Invent 2016: Automating Security Event Response, from Idea to Code to ...
AWS re:Invent 2016: Automating Security Event Response, from Idea to Code to ...Amazon Web Services
 

Similar to AWS Incident Response Cheat Sheet.pdf (20)

Automating Security in Cloud Workloads with DevSecOps
Automating Security in Cloud Workloads with DevSecOps Automating Security in Cloud Workloads with DevSecOps
Automating Security in Cloud Workloads with DevSecOps
 
Azure Incident Response Cheat Sheet.pdf
Azure Incident Response Cheat Sheet.pdfAzure Incident Response Cheat Sheet.pdf
Azure Incident Response Cheat Sheet.pdf
 
Amazon Web Services Security
Amazon Web Services SecurityAmazon Web Services Security
Amazon Web Services Security
 
SEC301 Security @ (Cloud) Scale
SEC301 Security @ (Cloud) ScaleSEC301 Security @ (Cloud) Scale
SEC301 Security @ (Cloud) Scale
 
Incident Response in the Cloud | AWS Public Sector Summit 2017
Incident Response in the Cloud | AWS Public Sector Summit 2017Incident Response in the Cloud | AWS Public Sector Summit 2017
Incident Response in the Cloud | AWS Public Sector Summit 2017
 
Building a GDPR-compliant architecture on AWS.pdf
Building a GDPR-compliant architecture on AWS.pdfBuilding a GDPR-compliant architecture on AWS.pdf
Building a GDPR-compliant architecture on AWS.pdf
 
Incident Response: Preparing and Simulating Threat Response
Incident Response: Preparing and Simulating Threat ResponseIncident Response: Preparing and Simulating Threat Response
Incident Response: Preparing and Simulating Threat Response
 
Gestire la sicurezza nel Cloud: come iniziare ad implementare un processo Dev...
Gestire la sicurezza nel Cloud: come iniziare ad implementare un processo Dev...Gestire la sicurezza nel Cloud: come iniziare ad implementare un processo Dev...
Gestire la sicurezza nel Cloud: come iniziare ad implementare un processo Dev...
 
Sec301 Security @ (Cloud) Scale
Sec301 Security @ (Cloud) ScaleSec301 Security @ (Cloud) Scale
Sec301 Security @ (Cloud) Scale
 
(SEC308) Wrangling Security Events In The Cloud
(SEC308) Wrangling Security Events In The Cloud(SEC308) Wrangling Security Events In The Cloud
(SEC308) Wrangling Security Events In The Cloud
 
Best Practices for Managing Security Operations in AWS - AWS July 2016 Webina...
Best Practices for Managing Security Operations in AWS - AWS July 2016 Webina...Best Practices for Managing Security Operations in AWS - AWS July 2016 Webina...
Best Practices for Managing Security Operations in AWS - AWS July 2016 Webina...
 
best aws training in bangalore
best aws training in bangalorebest aws training in bangalore
best aws training in bangalore
 
AWS July Webinar Series - Troubleshooting Operational and Security Issues in ...
AWS July Webinar Series - Troubleshooting Operational and Security Issues in ...AWS July Webinar Series - Troubleshooting Operational and Security Issues in ...
AWS July Webinar Series - Troubleshooting Operational and Security Issues in ...
 
Integrating_Cloud_Development_Security_And_Operations.pdf
Integrating_Cloud_Development_Security_And_Operations.pdfIntegrating_Cloud_Development_Security_And_Operations.pdf
Integrating_Cloud_Development_Security_And_Operations.pdf
 
(SEC318) AWS CloudTrail Deep Dive
(SEC318) AWS CloudTrail Deep Dive(SEC318) AWS CloudTrail Deep Dive
(SEC318) AWS CloudTrail Deep Dive
 
9 Security Best Practices
9 Security Best Practices9 Security Best Practices
9 Security Best Practices
 
(DVO303) Scaling Infrastructure Operations with AWS
(DVO303) Scaling Infrastructure Operations with AWS(DVO303) Scaling Infrastructure Operations with AWS
(DVO303) Scaling Infrastructure Operations with AWS
 
SEC303 Automating Security in Cloud Workloads with DevSecOps
SEC303 Automating Security in Cloud Workloads with DevSecOpsSEC303 Automating Security in Cloud Workloads with DevSecOps
SEC303 Automating Security in Cloud Workloads with DevSecOps
 
AWS Cyber Security Best Practices
AWS Cyber Security Best PracticesAWS Cyber Security Best Practices
AWS Cyber Security Best Practices
 
AWS re:Invent 2016: Automating Security Event Response, from Idea to Code to ...
AWS re:Invent 2016: Automating Security Event Response, from Idea to Code to ...AWS re:Invent 2016: Automating Security Event Response, from Idea to Code to ...
AWS re:Invent 2016: Automating Security Event Response, from Idea to Code to ...
 

More from Christopher Doman

Five Reasons Why You Need Cloud Investigation & Response Automation
Five Reasons Why You Need Cloud Investigation & Response AutomationFive Reasons Why You Need Cloud Investigation & Response Automation
Five Reasons Why You Need Cloud Investigation & Response AutomationChristopher Doman
 
A New Perspective on Resource-Level Cloud Forensics
A New Perspective on Resource-Level Cloud ForensicsA New Perspective on Resource-Level Cloud Forensics
A New Perspective on Resource-Level Cloud ForensicsChristopher Doman
 
Cloud Forensics and Incident Response Training.pdf
Cloud Forensics and Incident Response Training.pdfCloud Forensics and Incident Response Training.pdf
Cloud Forensics and Incident Response Training.pdfChristopher Doman
 
AWS Guard Duty Forensics & Incident Response.pdf
AWS Guard Duty Forensics & Incident Response.pdfAWS Guard Duty Forensics & Incident Response.pdf
AWS Guard Duty Forensics & Incident Response.pdfChristopher Doman
 
EKS Forensics & Incident Response.pdf
EKS Forensics & Incident Response.pdfEKS Forensics & Incident Response.pdf
EKS Forensics & Incident Response.pdfChristopher Doman
 
AWS IAM Forensics & Incident Response
AWS IAM Forensics & Incident ResponseAWS IAM Forensics & Incident Response
AWS IAM Forensics & Incident ResponseChristopher Doman
 
AWS Forensics & Incident Response
AWS Forensics & Incident ResponseAWS Forensics & Incident Response
AWS Forensics & Incident ResponseChristopher Doman
 
Lambda Forensics & Incident Response.pdf
Lambda Forensics & Incident Response.pdfLambda Forensics & Incident Response.pdf
Lambda Forensics & Incident Response.pdfChristopher Doman
 
Case Studies Denonia - Lambda DFIR.pdf
Case Studies Denonia - Lambda DFIR.pdfCase Studies Denonia - Lambda DFIR.pdf
Case Studies Denonia - Lambda DFIR.pdfChristopher Doman
 
Cloud Security Fundamentals for Forensics and Incident Response.pdf
Cloud Security Fundamentals for Forensics and Incident Response.pdfCloud Security Fundamentals for Forensics and Incident Response.pdf
Cloud Security Fundamentals for Forensics and Incident Response.pdfChristopher Doman
 
AWS Detective Forensics & Incident Response.pdf
AWS Detective Forensics & Incident Response.pdfAWS Detective Forensics & Incident Response.pdf
AWS Detective Forensics & Incident Response.pdfChristopher Doman
 
Google Cloud Forensics & Incident Response
Google Cloud Forensics & Incident ResponseGoogle Cloud Forensics & Incident Response
Google Cloud Forensics & Incident ResponseChristopher Doman
 
GKE Forensics & Incident Response.pdf
GKE Forensics & Incident Response.pdfGKE Forensics & Incident Response.pdf
GKE Forensics & Incident Response.pdfChristopher Doman
 
AWS SSM Forensics and Incident Response
AWS SSM Forensics and Incident ResponseAWS SSM Forensics and Incident Response
AWS SSM Forensics and Incident ResponseChristopher Doman
 
Kubernetes Docker Forensics & Incident Response.pdf
Kubernetes Docker Forensics & Incident Response.pdfKubernetes Docker Forensics & Incident Response.pdf
Kubernetes Docker Forensics & Incident Response.pdfChristopher Doman
 
Case Studies TeamTNT - AWS & Container Cryptomining Worm DFIR.pdf
Case Studies TeamTNT - AWS & Container Cryptomining Worm DFIR.pdfCase Studies TeamTNT - AWS & Container Cryptomining Worm DFIR.pdf
Case Studies TeamTNT - AWS & Container Cryptomining Worm DFIR.pdfChristopher Doman
 
EC2 Forensics & Incident Response.pdf
EC2 Forensics & Incident Response.pdfEC2 Forensics & Incident Response.pdf
EC2 Forensics & Incident Response.pdfChristopher Doman
 
ECS Forensics & Incident Response
ECS Forensics & Incident ResponseECS Forensics & Incident Response
ECS Forensics & Incident ResponseChristopher Doman
 
Azure Forensics & Incident Response
Azure Forensics & Incident ResponseAzure Forensics & Incident Response
Azure Forensics & Incident ResponseChristopher Doman
 

More from Christopher Doman (20)

Five Reasons Why You Need Cloud Investigation & Response Automation
Five Reasons Why You Need Cloud Investigation & Response AutomationFive Reasons Why You Need Cloud Investigation & Response Automation
Five Reasons Why You Need Cloud Investigation & Response Automation
 
A New Perspective on Resource-Level Cloud Forensics
A New Perspective on Resource-Level Cloud ForensicsA New Perspective on Resource-Level Cloud Forensics
A New Perspective on Resource-Level Cloud Forensics
 
Cloud Forensics Tools
Cloud Forensics ToolsCloud Forensics Tools
Cloud Forensics Tools
 
Cloud Forensics and Incident Response Training.pdf
Cloud Forensics and Incident Response Training.pdfCloud Forensics and Incident Response Training.pdf
Cloud Forensics and Incident Response Training.pdf
 
AWS Guard Duty Forensics & Incident Response.pdf
AWS Guard Duty Forensics & Incident Response.pdfAWS Guard Duty Forensics & Incident Response.pdf
AWS Guard Duty Forensics & Incident Response.pdf
 
EKS Forensics & Incident Response.pdf
EKS Forensics & Incident Response.pdfEKS Forensics & Incident Response.pdf
EKS Forensics & Incident Response.pdf
 
AWS IAM Forensics & Incident Response
AWS IAM Forensics & Incident ResponseAWS IAM Forensics & Incident Response
AWS IAM Forensics & Incident Response
 
AWS Forensics & Incident Response
AWS Forensics & Incident ResponseAWS Forensics & Incident Response
AWS Forensics & Incident Response
 
Lambda Forensics & Incident Response.pdf
Lambda Forensics & Incident Response.pdfLambda Forensics & Incident Response.pdf
Lambda Forensics & Incident Response.pdf
 
Case Studies Denonia - Lambda DFIR.pdf
Case Studies Denonia - Lambda DFIR.pdfCase Studies Denonia - Lambda DFIR.pdf
Case Studies Denonia - Lambda DFIR.pdf
 
Cloud Security Fundamentals for Forensics and Incident Response.pdf
Cloud Security Fundamentals for Forensics and Incident Response.pdfCloud Security Fundamentals for Forensics and Incident Response.pdf
Cloud Security Fundamentals for Forensics and Incident Response.pdf
 
AWS Detective Forensics & Incident Response.pdf
AWS Detective Forensics & Incident Response.pdfAWS Detective Forensics & Incident Response.pdf
AWS Detective Forensics & Incident Response.pdf
 
Google Cloud Forensics & Incident Response
Google Cloud Forensics & Incident ResponseGoogle Cloud Forensics & Incident Response
Google Cloud Forensics & Incident Response
 
GKE Forensics & Incident Response.pdf
GKE Forensics & Incident Response.pdfGKE Forensics & Incident Response.pdf
GKE Forensics & Incident Response.pdf
 
AWS SSM Forensics and Incident Response
AWS SSM Forensics and Incident ResponseAWS SSM Forensics and Incident Response
AWS SSM Forensics and Incident Response
 
Kubernetes Docker Forensics & Incident Response.pdf
Kubernetes Docker Forensics & Incident Response.pdfKubernetes Docker Forensics & Incident Response.pdf
Kubernetes Docker Forensics & Incident Response.pdf
 
Case Studies TeamTNT - AWS & Container Cryptomining Worm DFIR.pdf
Case Studies TeamTNT - AWS & Container Cryptomining Worm DFIR.pdfCase Studies TeamTNT - AWS & Container Cryptomining Worm DFIR.pdf
Case Studies TeamTNT - AWS & Container Cryptomining Worm DFIR.pdf
 
EC2 Forensics & Incident Response.pdf
EC2 Forensics & Incident Response.pdfEC2 Forensics & Incident Response.pdf
EC2 Forensics & Incident Response.pdf
 
ECS Forensics & Incident Response
ECS Forensics & Incident ResponseECS Forensics & Incident Response
ECS Forensics & Incident Response
 
Azure Forensics & Incident Response
Azure Forensics & Incident ResponseAzure Forensics & Incident Response
Azure Forensics & Incident Response
 

Recently uploaded

Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 

Recently uploaded (20)

Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 

AWS Incident Response Cheat Sheet.pdf

  • 1. AWS Incident Response Cheat Sheet With the rapid migration to the cloud, it’s becoming increasingly difficult to keep track of all of the different data sources, commands, and tools available from each Cloud Service Provider (CSP). This cheat sheet was designed to provide security professionals with an overview of key best practices, data sources and tools that they can have at their disposal when responding to an incident in an AWS environment. Introduction Active Directory About Cado Security Cado Security is the provider of the first cloud forensics and incident response platform. The platform leverages the scale and speed of the cloud to automate the end-to-end incident response process – from data capture and processing to investigation and response. There are three domains in an AWS environment that fall under the customers’ responsibility to secure: Cloud Security Incident Domains Service domain incidents impact AWS accounts, IAM permissions, resource metadata, billing, and other areas. They are addressed using AWS API mechanisms and can be caused by configuration or resource permission issues. Infrastructure domain incidents involve data or network-related activities within Amazon EC2 instances, such as processes, data, and VPC traffic. Responding to these incidents requires the ability to acquire data for forensic analysis, interact with the instance’s operating system, and utilize AWS APIs. Forensic analysis and investigations can be conducted using AWS APIs and DFIR tools within a dedicated EC2 instance. Application domain incidents occur in application code or software deployed to services or infrastructure. They should be addressed in cloud threat detection and response playbooks and can be managed using cloud tools with automated acquisition, recovery, and deployment. Similar response strategies as the infrastructure domain may be applicable. Useful Open Source Tools AWS_IR is a Python CLI tool used to automate initial response actions Margarita Shotgun is used to dump memory from systems SANS Investigative Forensic Toolkit is an all-in-one forensic toolkit Diffy is a tool for identifying changes or differences in systems Automatic Forensics Orchestrator collects full snapshots of EC2 systems OSQuery is an endpoint detection and response tool SOF-ELK is an analytics platform focused on the needs of computer forensics and investigation teams Prowler is a multi-purpose toolkit kube-forensics is used to dump the running pod and all its containers Invictus-AWS automatically enumerates and acquires relevant data
  • 2. Useful List Commands List AWS regions aws ec2 describe-regions List information about Cloudwatch alarms aws cloudwatch describe-alarms | jq -r ‘.MetricAlarms[ ] | .AlarmName+” “+.Namespace+” List EC2 instances with ID, Type, Name aws ec2 describe-instances | jq -r ‘.Reservations[].Instances[]|.Inst anceId+” “+.InstanceType+” “+(.Tags[] | select(.Key == “Name”).Value)’ List security groups aws ec2 describe-security-groups | jq -r ‘.SecurityGroups[]|.GroupId+” “+.GroupName’ List Subnets for a VPC aws ec2 describe-subnets --filter Name=vpc-id,Values=<Your_VP C_ID> | jq -r ‘.Subnets[]|.SubnetId+” “+.CidrBlock+” “+(.Tags[]|select(.Key==”Name” ).Value)’ Lists the Logs that are available in a region aws logs describe-log-groups --region <region> Important Log Types CloudTrail: Tenant audit logs CloudTrail Insights: API usage outside of baselines CloudWatch Logs: Forwarded logs from applications and endpoints GuardDuty: Anomaly detection within CloudTrail VPC flow logs: NetFlow logs from your VPCs S3 Server access: Logs from web-based storage access Route 53: DNS Resolver Logs Load Balancer Logs: Logs requests sent to your Load Balancer Accessing Logs Access logs directly via AWS web console Store and search logs via S3 and Athena Access logs via real-time API call via event hub Exporting Logs Via web console: This is very limited. Log files can only be downloaded one at a time which is a slow process. Further, sorting of files is unavailable once there are more than 999. Via CLI: Export logs using the aws cp and aws sync commands. ➔ aws cp command: aws s3 cp s3:// <log_bucket_here>/AWSLogs . --recursive ➔ the aws cp command will copy the logs to the current working directory, including the contents of subfolders. To copy to another location replace the ‘.’ with the desired location. ➔ aws sync command: aws s3 sync s3:// <log_bucket_here>/AWSLogs . --recursive ➔ aws sync commands work exactly the same as aws cp commands, but if there is already a copy of the logs at the destination, it will only download new log events and update the log file. Amazon Detective Log collection and analytics powered by machine learning Amazon CloudWatch Visualization of real-time logs in automated dashboards AWS Security Hub A centralized hub for monitoring security alerts AWS SSM Allows the execution of tools to gather forensic data and take actions on compromised systems AWS Native Tools
  • 3. AWS Snapshots Snapshots in AWS are a crucial feature when it comes to digital forensics. They are point-in-time copies of your Amazon instances. These snapshots serve as backups and can be used for various forensic investigations. Create a snapshot: aws ec2 create-snapshot --volume-id <volume_id> --description “Snapshot created” aws ec2 create-volume --availability-zone <DFIR_zone> --snapshot-id <snapshot_id> Download Snapshot (Coldsnap): coldsnap --region <region> download <snapshot_id> image.dd Mount a Snapshot: aws ec2 attach-volume --volume-id <volume_id> --instance-id <DFIR_instance> --device </dev/sdX> Cloudwatch Logs Cloudwatch automatically collects logs and allows you to query them in real time. Go to the cloudwatch console > select insight > logs > then choose your log groups and set your time constraints. Use the following queries to quickly identify suspicious activity: List all IAM access denied attempts filter errorCode like /Unauthorized|Denied|Forbidd en/ | fields awsRegion, userIdentity.arn, eventSource, eventName, sourceIPAddress, userAgent List the actions an access key has performed filter userIdentity.accessKeyId =”<Access_Key>” | fields awsRegion, eventSource, eventName, sourceIPAddress, userAgent List IAM actions performed by a specified IP address filter sourceIPAddress = “192.0.2.1” | fields awsRegion, userIdentity.arn, eventSource, eventName, sourceIPAddress, userAgent IAM Logs List all IAM user and role creation events filter eventName=”CreateUser” or eventName = “CreateRole” | fields requestParameters.userName, requestParameters.roleName, responseElements.user.arn, responseElements.role.arn, sourceIPAddress, eventTime, errorCode List all ‘ListBucket’ events (this can reveal if an attacker is trying to access your buckets) filter eventName =”ListBuckets” | fields awsRegion, eventSource, eventName, sourceIPAddress, userAgent List reject requests by IP address filter action=”REJECT” | stats count(*) as numRejections by srcAddr | sort numRejections desc List reject requests originating from inside your VPC filter action=”REJECT” and srcAddr like /^10./ | stats count(*) as numRejections by srcAddr | sort numRejections desc VPC FLow Logs List requests originating from a specific ip address filter srcAddr = “192.0.2.1” | fields @timestamp, interfaceId, dstAddr, dstPort, action List outgoing requests from a specific IP address by number of requests filter srcAddr = “10.1.1.1” | stats count(*) as numConnections by dstAddr | sort numConnections desc
  • 4. CloudTail cheat sheet by invictus SANS posters and cheat sheets AWS CloudTrail Searching Event logs in S3, Athena and Cloudwatch AWS, IAM Your Father (Part II - Defensive) Logging and monitoring in Amazon S3 IAM Use these commands to quickly view all roles, users, and groups: list all roles in JSON format aws iam list-roles list all users aws iam list-users --output table --query ‘Users[*].UserName’ list all groups aws iam list-groups --output table --query ‘Groups[*].GroupName’ Use these commands to quickly block and unblock compromised roles, users, groups, or access keys: block role aws iam put-role-policy --role-name <ROLE> --policy-name DenyAll --policy-document ‘{ “Statement”: [ { “Effect”: “Deny”, “Action”: “*”, “Resource”: “*” } ] } remove block aws iam delete-role-policy --role-name <ROLE> --policy-name DenyAll block user aws iam put-user-policy --user-name <USER> --policy-name DenyAll --policy-document ‘{ “Statement”: [ { “Effect”: “Deny”, “Action”: “*”, “Resource”: “*” } ] } remove block aws iam delete-user-policy --user-name <USER> --policy-name DenyAll block group aws iam put-group-policy --group-name <GROUP> --policy-name DenyAll --policy-document ‘{ “Statement”: [ { “Effect”: “Deny”, “Action”: “*”, “Resource”: “*” } ] } remove block aws iam delete-group-policy --group-name <GROUP> --policy-name DenyAll disable an access key aws iam update-access-key --access-key-id <Access_Key> --status Inactive --user-name user Responding to ESK Incidents Identify if the compromised system is running on an EC2 instance or fargate. For EC2: Follow the steps outlined in the “Responding to EC2 Incidents” section above. For Fargate: In this case, it is important to collect all forensic data before the system is shutdown. Responding to Lambda Incidents These can be particularly frustrating to investigate as the underlying container can not be accessed. You can however collect: ➔ The code of the Lambda function ➔ Any environment variables it is set to use ➔ Any logs in CloudWatch and CloudTrail Further reading and resources: If you’d like to learn more about what Cado Security is doing to help advance investigations and incident response in the cloud, request a demo today. Digital Forensic Analysis of Amazon Linux EC2 Instances AWS ECS: Fully Managed but Frustrating to Investigate Responding to EC2 Incidents Step 1: Prevent data theft by changing the security group to one that disallows outbound traffic Step 2: Check if there was an Instance Profile attached. CloudTrail logs can be used to see if it was abused to access other resources. Step 3: Snapshot the Instance to allow for forensic investigation.