CloudFormation is an extremely useful service that has been maturing quite a bit recently. It essentially lets you write code that is then translated into AWS resources, allowing you to easily spin up and down your resources and track those resources from a central location. CloudFormation seems to suffer from some of the same issues regular source code does, including hardcoded secrets, overly permissive deployments, and more, which we will cover here.
There are many things to look at when pentesting CloudFormation. The following list is what we will cover in this section:
- Stack parameters
- Stack output values
- Stack termination protection
- Deleted stacks
- Stack exports
- Stack templates
- Passed roles
For this section, we have spun up a simple LAMP stack, based off the simple LAMP stack CloudFormation sample template, but with a few modifications.
The...