A security analyst suspects an EC2 instance is compromised and being used for command and control (C2) communication. Which TWO actions should be performed to preserve evidence while containing the threat?
Trap 1: Terminate the EC2 instance immediately to stop the malicious…
Termination causes the loss of all volatile memory and data stored in ephemeral storage, which is critical for identifying the C2 agent's behavior. Proper incident response requires imaging or isolating the instance while keeping it running or at least preserved on storage to allow for deep forensic analysis.
Trap 2: Reboot the instance to clear any malicious processes running in the…
Rebooting clears the contents of the volatile memory (RAM), where many sophisticated malware variants reside. Any process data, network connections, or injected code stored in memory will be lost upon reboot, significantly hindering the ability to perform accurate memory forensics and identify the root cause of the compromise.
Trap 3: Delete all snapshots to prevent the attacker from accessing them.
Deleting snapshots serves no security purpose and actually destroys evidence that would be used to reconstruct the attack. Security teams need these snapshots to analyze what files were created or modified by the attacker, and deleting them would be a direct violation of standard incident response best practices.
- A
Terminate the EC2 instance immediately to stop the malicious traffic.
Why wrong: Termination causes the loss of all volatile memory and data stored in ephemeral storage, which is critical for identifying the C2 agent's behavior. Proper incident response requires imaging or isolating the instance while keeping it running or at least preserved on storage to allow for deep forensic analysis.
- B
Create a snapshot of the instance's attached EBS volumes for forensic analysis.
Creating an EBS snapshot captures the state of the persistent storage at the time of the incident, preserving all files and logs for later review. This is a standard forensic practice that allows investigators to perform post-mortem analysis without altering the original production environment or losing critical evidence.
- C
Modify the instance security group to restrict all inbound and outbound traffic.
Restricting traffic via a security group effectively isolates the instance from the network, stopping the C2 communication while keeping the instance running for forensic memory capture. This containment method is less destructive than termination, ensuring that the environment remains available for tools that require a running OS.
- D
Reboot the instance to clear any malicious processes running in the background.
Why wrong: Rebooting clears the contents of the volatile memory (RAM), where many sophisticated malware variants reside. Any process data, network connections, or injected code stored in memory will be lost upon reboot, significantly hindering the ability to perform accurate memory forensics and identify the root cause of the compromise.
- E
Delete all snapshots to prevent the attacker from accessing them.
Why wrong: Deleting snapshots serves no security purpose and actually destroys evidence that would be used to reconstruct the attack. Security teams need these snapshots to analyze what files were created or modified by the attacker, and deleting them would be a direct violation of standard incident response best practices.