Skill 2.2.4

Respond to affected resources by containing and eradicating threats, and recover resources (for example, by implementing network containment controls, restoring backups)

Key Concepts

EC2: attach an isolation security group with no rules (and a NACL deny to cut tracked connections), remove the instance from Auto Scaling and load balancers, enable termination protection, and snapshot volumes. IAM: deactivate keys, attach a deny policy, revoke active role sessions. S3: Block Public Access, fix bucket policies, rotate any exposed secrets. Containers: isolate the pod or task and cordon the node.

Eradicate by rebuilding from trusted AMIs and infrastructure as code rather than cleaning compromised hosts, and fix the root cause (patch, close the port, remove the over-broad policy). Recover from AWS Backup recovery points, snapshots or S3 versions, then monitor closely for reinfection.