Skip to content

Customizations in Malware Protection for EC2 using CloudFormation

0

I want to add the setting to exclude EC2 instances from malware scanning using cdk, but I can't find a way to do it.

This is part of my code

const GDDetector = new CfnDetector(this, GuardDutyDetector-${process.env.NODE_ENV}, { enable: true, // Enable GuardDuty features: [ // Enable only EC2 features, by default GD enabled all { name: "RDS_LOGIN_EVENTS", status: "DISABLED" }, { name: "S3_DATA_EVENTS", status: "DISABLED" }, { name: "EKS_AUDIT_LOGS", status: "DISABLED" }, { name: "EBS_MALWARE_PROTECTION", status: "ENABLED" }, { name: "LAMBDA_NETWORK_LOGS", status: "DISABLED" }, { name: "RUNTIME_MONITORING", status: "DISABLED" } ] });

1 Answer
0

Hello.

EC2 malware scan is "EBS_MALWARE_PROTECTION".
Therefore, if you disable "EBS_MALWARE_PROTECTION", EC2 scanning will not be performed.
https://docs.aws.amazon.com/guardduty/latest/ug/gd-findings-initiate-malware-protection-scan.html?icmpid=docs_console_unmapped

When GuardDuty detects suspicious behavior that is indicative of malware on an Amazon EC2 instance or a container workload that is running on an Amazon EC2 instance, GuardDuty will generate a finding. If this generated finding belongs to the following list of GuardDuty findings, then GuardDuty will automatically initiate malware scan on the Amazon EBS volumes attached to the Amazon EC2 instance that is involved in the finding. After the scan, if GuardDuty detects malware, then it will also generate one or more Malware Protection for EC2 finding types.

What is scanned is described in the document below.
https://docs.aws.amazon.com/guardduty/latest/ug/findings-malware-protection.html

EXPERT

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.