44 of 50 in All Controls
aws

Enable GuardDuty Malware Protection

IDAWS-SEC-005
Severity
high
Automation
Auto
Category
security
Enforcementrecommended
Complexity / Impact
low(none impact)
Risk Profile
medium likelihood(low residual)
Cloud Scopeaws:root
Environments
all
Target Resources
AWS::GuardDuty::DetectorAWS::EC2::VolumeAWS::EC2::Instance
Services
guarddutyebsec2organizations
Tags
threat-detectionguarddutymalwareebslanding-zone
Frameworks
NIST 800-53ISO 27001PCI DSSSOC 2AWS FSBP
Depends On
Governance
Cloud Security (quarterly)
Created
2026-05-03
Last Updated
2026-11-20

Specification & Description

Enable Amazon GuardDuty Malware Protection for EC2 (EBS_MALWARE_PROTECTION) across all AWS Organizations member accounts to run agentless EBS volume scans when GuardDuty detects suspicious instance or container activity.

Technical Specifications

GuardDuty Malware Protection automatically creates temporary replica snapshots of attached EBS volumes (both encrypted and unencrypted) when behavioral findings indicate potential EC2 instance or container compromise, scanning them agentlessly without impacting production workload performance.

1. Organization-Wide Activation and Service-Linked Role

  • Enable EBS_MALWARE_PROTECTION with AutoEnable = ALL from the GuardDuty delegated administrator account.
  • GuardDuty requires the service-linked role AWSServiceRoleForAmazonGuardDutyMalwareProtection (malware-protection.guardduty.amazonaws.com) in member accounts to create and scan replica snapshots.

2. Snapshot Retention and Tag Filtering

  • Configure EbsSnapshotPreservation (RETENTION_WITH_FINDING or NO_RETENTION) so snapshots are preserved for forensic investigation when malware is detected.
  • Use ScanResourceCriteria include or exclude tags where cost control or compliance boundaries require selective scanning.

Security Rationale

Signature-based endpoint agents can be disabled by an attacker or miss fileless or post-exploitation payloads on EC2 instances. Agentless, event-triggered EBS scanning provides independent forensic visibility from outside the guest operating system.

Business & Security Impact

Without GuardDuty Malware Protection, responders lack automated payload identification on compromised EC2 instances and must perform manual snapshot acquisition and offline malware analysis, slowing containment.

Operational & Implementation Notes

If SCPs restrict IAM role creation in member accounts, explicitly allow iam:CreateServiceLinkedRole for malware-protection.guardduty.amazonaws.com so GuardDuty can create AWSServiceRoleForAmazonGuardDutyMalwareProtection. Use tag-based ScanResourceCriteria exclusions in non-production accounts if scan volume requires cost containment.

Compliance Framework Mappings (5)

Regulatory baselines and industry standards mapped to this control specification.

Beta
Framework / StandardMapped Requirements & ControlsControls
NIST 800-53 Rev 5NIST 800-53
SI-3SI-4
2
ISO 27001:2022ISO 27001
A.8.7A.8.16
2
PCI DSS v4.0PCI DSS
5.2.111.5.1
2
SOC 2SOC 2
CC6.8CC7.2
2
AWS Foundational Security Best PracticesAWS FSBP
GuardDuty.8
1

* Compliance framework mappings are provided for informational architectural reference. Always verify control alignment against your organization's formal audit requirements.

Automated Detection & Rule Logic

Detection Engine: aws-api • Automated: Yes

Query the GuardDuty delegated administrator detector, organization configuration, and malware scan settings to confirm EBS_MALWARE_PROTECTION is ENABLED, organization AutoEnable is ALL, and snapshot preservation matches organizational forensic policy.

AWS CLI: Verify GuardDuty Malware Protection Status, Auto-Enable, and Scan Settingsbash
DETECTOR_ID=$(aws guardduty list-detectors \
  --region "$HOME_REGION" \
  --query "DetectorIds[0]" \
  --output text)

aws guardduty get-detector \
  --detector-id "$DETECTOR_ID" \
  --region "$HOME_REGION" \
  --query "{DetectorStatus:Status,MalwareProtection:Features[?Name=='EBS_MALWARE_PROTECTION'].Status | [0]}" \
  --output json

aws guardduty describe-organization-configuration \
  --detector-id "$DETECTOR_ID" \
  --region "$HOME_REGION" \
  --query "Features[?Name=='EBS_MALWARE_PROTECTION'].{Name:Name,AutoEnable:AutoEnable}" \
  --output json

aws guardduty get-malware-scan-settings \
  --detector-id "$DETECTOR_ID" \
  --region "$HOME_REGION" \
  --query "{SnapshotPreservation:EbsSnapshotPreservation,Criteria:ScanResourceCriteria}" \
  --output json

Preventative Enforcement Policies

SCP: Prevent GuardDuty Malware Protection Disablement and Tamperingjson
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "ProtectGuardDutyMalwareProtection",
      "Effect": "Deny",
      "Action": [
        "guardduty:UpdateOrganizationConfiguration",
        "guardduty:UpdateDetector",
        "guardduty:UpdateMalwareScanSettings",
        "guardduty:DeleteDetector",
        "guardduty:DisassociateFromAdministratorAccount"
      ],
      "Resource": "*",
      "Condition": {
        "ArnNotLike": {
          "aws:PrincipalArn": [
            "arn:aws:iam::*:role/LandingZoneAdminRole"
          ]
        }
      }
    }
  ]
}

Remediation Guide & Automation

In the GuardDuty delegated administrator (Security) account, enable the `EBS_MALWARE_PROTECTION` feature on the administrator detector, set organization auto-enablement to `ALL`, and configure snapshot preservation via `RETENTION_WITH_FINDING`.

Step-by-Step Instructions

  1. In the GuardDuty delegated administrator (Security) account, enable EBS_MALWARE_PROTECTION on the administrator detector.
  2. Update the GuardDuty organization configuration with EBS_MALWARE_PROTECTION AutoEnable set to ALL for existing and new member accounts.
  3. Set EbsSnapshotPreservation to RETENTION_WITH_FINDING (and optionally configure ScanResourceCriteria tag filters) to retain evidence for malware findings.
  4. Integrate GuardDuty malware findings with Security Hub and automated EC2 isolation playbooks.
AWS CLI: Enable GuardDuty Malware Protection and Snapshot Retentionbash
# Run in the GuardDuty Delegated Administrator (Security) account
DETECTOR_ID=$(aws guardduty list-detectors \
  --region "$HOME_REGION" \
  --query "DetectorIds[0]" \
  --output text)

aws guardduty update-detector \
  --detector-id "$DETECTOR_ID" \
  --features Name=EBS_MALWARE_PROTECTION,Status=ENABLED \
  --region "$HOME_REGION"

aws guardduty update-organization-configuration \
  --detector-id "$DETECTOR_ID" \
  --auto-enable-organization-members ALL \
  --features Name=EBS_MALWARE_PROTECTION,AutoEnable=ALL \
  --region "$HOME_REGION"

aws guardduty update-malware-scan-settings \
  --detector-id "$DETECTOR_ID" \
  --ebs-snapshot-preservation RETENTION_WITH_FINDING \
  --region "$HOME_REGION"
Terraform: Enable GuardDuty Malware Protection Featurehcl
variable "guardduty_detector_id" {
  type        = string
  description = "GuardDuty detector ID in the Security delegated administrator account."
}

resource "aws_guardduty_detector_feature" "ebs_malware_protection" {
  detector_id = var.guardduty_detector_id
  name        = "EBS_MALWARE_PROTECTION"
  status      = "ENABLED"
}

resource "aws_guardduty_organization_configuration_feature" "ebs_malware_protection" {
  detector_id = var.guardduty_detector_id
  name        = "EBS_MALWARE_PROTECTION"
  auto_enable = "ALL"

  depends_on = [aws_guardduty_detector_feature.ebs_malware_protection]
}

We value your privacy

We use analytics cookies to understand how visitors interact with our site and to improve the user experience. You can choose to accept or decline these cookies.