Interview Prep/AWS/Security Services and Data Protection

How do you respond to a compromised EC2 instance?

AdvancedProductionSecurity Services and Data Protection
Answer
  1. Contain without destroying evidence: replace its security groups with an isolation SG (no inbound or outbound), detach it from the ASG and load balancer, tag it as quarantined.
  2. Revoke credentials: deny active sessions on the instance role (revoke older sessions), rotate any secrets it could read.
  3. Preserve: snapshot EBS volumes, capture memory if you have tooling, collect logs and Flow Logs.
  4. Investigate in an isolated forensics account (Amazon Detective helps build the timeline).
  5. Rebuild from a clean AMI; never "clean" the instance.
aws All AWS questions

More on Security Services and Data Protection