Automating Incident Response in AWS with Guard Duty & Lambda

Automating Incident Response in AWS with Guard Duty & Lambda

I had a quick play today Automating Investigations in response to AWS GuardDuty Detections.

Malware > Guard Duty > Lambda Function > Auto Capture and Investigation

Walk-through and sample code below! If you want to test this out yourself, you can now deploy a free trial straight from https://www.cadosecurity.com/free-investigation/

In Guard Duty you can increase how often “repeat alarms” are sent - this is useful for testing (GuardDuty > Settings).

No alt text provided for this image

To trigger the Guard Duty alarms either click “Generate Sample Findings”? (GuardDuty > Settings) or run our tool at https://github.com/cado-security/CloudAndContainerCompromiseSimulator

No alt text provided for this image

Create a Lambda function that is triggered by GuardDuty in EventBridge. I was pleasantly surprised to find it’s just a couple of clicks to hook it up - no need to mess around with SNS or WebHooks!

No alt text provided for this image

For the Lambda function, just get the AWS Instance ID from the event and call the Cado Response API with it:

No alt text provided for this image

For ECS Fargate you’ll need the task name, more on that to come…

This took me about 15 minutes to set up. And what you get from that is… about 10 minutes after the GuardDuty is triggered - Cado goes and collects a full copy of the system before it’s destroyed and hunts through it for logs, malware etc:

No alt text provided for this image
No alt text provided for this image

You can also enable exporting the GuardDuty logs and the Cado output into an S3 bucket, which you can then e.g. import into Splunk through the Splunk AWS app. We can push out tons of logs for a compromised system if you want them all.

No alt text provided for this image

What that means is you now get in your SIEM the original Guard Duty alert from AWS detections on the API & Network side of the house - sitting side by side with the on disk detections, logs, even full file strings contents if you want it.

More on this @ https://www.cadosecurity.com/how-to-add-forensics-to-your-siem-and-start-automating-investigations/



Adam Orton

Head of Cyber Threat Intelligence and Threat Hunting

3 年

Chanaka Seekkuge LLM MSc CEng MIET CISSP EnCE

回复

要查看或添加评论,请登录

Christopher Doman的更多文章

社区洞察

其他会员也浏览了