A security team suspects that an attacker has compromised an EC2 instance and is using it to launch outbound DDoS attacks. The team needs to quickly isolate the instance while preserving forensic data. Which combination of actions should the team take? (Choose TWO.)
Trap 1: Modify the network ACL for the subnet to deny all outbound traffic.
Modifying the network ACL to deny all outbound traffic is not the correct approach because NACLs are stateless and apply at the subnet level, meaning every instance in that subnet is affected, not just the compromised one. This creates a broad denial-of-service for legitimate workloads in the subnet and, because NACLs are stateless, you must also carefully configure inbound rules to allow return traffic, making the change complex and error-prone. It fails to provide the targeted, instance-specific containment that a security group rule offers.
Trap 2: Detach the instance from the Auto Scaling group.
Detaching the instance from the Auto Scaling group does not affect network access or running state; it only removes the instance from the group's lifecycle and scale-in/out management. The compromised instance continues to run and remains fully reachable on its current network path, so the attacker can still communicate with it and exfiltrate data. This action primarily prevents the ASG from replacing or terminating the instance, but it provides no isolation or containment for the compromise.
Trap 3: Terminate the EC2 instance immediately.
Terminating the EC2 instance immediately is inappropriate because it destroys volatile forensic evidence such as running processes, memory contents, and open network connections, and it makes any required root cause analysis difficult or impossible. Since termination is irreversible and removes the instance from the environment entirely, incident responders lose the ability to harvest indicators of compromise from the live system. A proper incident response approach would first isolate the instance and preserve its storage before considering any destructive action.
- A
Apply a restrictive security group that blocks all outbound traffic.
Applying a restrictive security group that blocks all outbound traffic is the right containment step because security groups act as a stateful instance-level firewall. This prevents the compromised EC2 instance from establishing new outbound connections to a command-and-control server or performing data exfiltration, while leaving the instance running so forensic artifacts like memory and processes can be collected. Inbound rules can still permit limited SSH access from approved forensic workstations, allowing incident responders to investigate without fully disconnecting the instance.
- B
Modify the network ACL for the subnet to deny all outbound traffic.
Why wrong: Modifying the network ACL to deny all outbound traffic is not the correct approach because NACLs are stateless and apply at the subnet level, meaning every instance in that subnet is affected, not just the compromised one. This creates a broad denial-of-service for legitimate workloads in the subnet and, because NACLs are stateless, you must also carefully configure inbound rules to allow return traffic, making the change complex and error-prone. It fails to provide the targeted, instance-specific containment that a security group rule offers.
- C
Create a snapshot of the EBS volumes attached to the EC2 instance.
Creating a snapshot of the EBS volumes attached to the instance is a vital preservation step because snapshots capture a point-in-time, block-level copy of the disk without stopping or interrupting the instance. The snapshot can be mounted and analyzed on a separate forensic instance, allowing investigators to inspect files, malware, and logs without risking the original evidence. Even if the instance is later terminated or reconstructed, the snapshot preserves the exact state of the volumes for legal or investigative purposes.
- D
Detach the instance from the Auto Scaling group.
Why wrong: Detaching the instance from the Auto Scaling group does not affect network access or running state; it only removes the instance from the group's lifecycle and scale-in/out management. The compromised instance continues to run and remains fully reachable on its current network path, so the attacker can still communicate with it and exfiltrate data. This action primarily prevents the ASG from replacing or terminating the instance, but it provides no isolation or containment for the compromise.
- E
Terminate the EC2 instance immediately.
Why wrong: Terminating the EC2 instance immediately is inappropriate because it destroys volatile forensic evidence such as running processes, memory contents, and open network connections, and it makes any required root cause analysis difficult or impossible. Since termination is irreversible and removes the instance from the environment entirely, incident responders lose the ability to harvest indicators of compromise from the live system. A proper incident response approach would first isolate the instance and preserve its storage before considering any destructive action.