An enterprise logistics company runs a fleet of Amazon EC2 instances in a private subnet to process shipping telemetry. The security team must design a threat detection and mitigation system to identify any EC2 instances that attempt to communicate with known malicious command-and-control (C&C) servers. When a threat is detected, the system must immediately block both inbound and outbound communication with the malicious IP address for the affected subnet. Which architectural design meets these requirements while adhering to the AWS Well-Architected Framework?
- Enable Amazon GuardDuty to analyze VPC Flow Logs. Configure an Amazon EventBridge rule that triggers on GuardDuty findings to invoke an AWS Lambda function that adds stateless inbound and outbound DENY rules for the remote IP address to the Network Access Control List (NACL) associated with the private subnet.Answer
- BEnable Amazon GuardDuty to analyze VPC Flow Logs. Configure an Amazon EventBridge rule that triggers on GuardDuty findings to invoke an AWS Lambda function that adds an outbound DENY rule for the remote IP address to the Security Group associated with the EC2 instances in the private subnet.
- CEnable AWS Shield Advanced on the resources in the private subnet. Configure AWS Shield Advanced to automatically detect the malicious outbound traffic and update the subnet's route table to redirect traffic destined for the remote IP address to a blackhole route.
- DEnable AWS WAF on the elastic network interfaces (ENIs) of the EC2 instances in the private subnet. Configure AWS WAF to inspect the outbound traffic payloads and block all packets destined for the malicious IP address.
Answer
Enable Amazon GuardDuty to analyze VPC Flow Logs. Configure an Amazon EventBridge rule that triggers on GuardDuty findings to invoke an AWS Lambda function that adds stateless inbound and outbound DENY rules for the remote IP address to the Network Access Control List (NACL) associated with the private subnet.
The correct architecture uses Amazon GuardDuty to detect the malicious outbound C&C traffic by analyzing VPC Flow Logs. The event triggers an EventBridge rule that invokes an AWS Lambda function. The Lambda function adds inbound and outbound DENY rules to the stateless Network Access Control List (NACL) associated with the private subnet, which effectively blocks the communication at the subnet boundary as required.
Step-by-Step Solution
Key Concept
Security Monitoring, Automated Threat Detection, and Subnet-Level Network Security Controls