Skip to content

Latest commit

 

History

History
89 lines (61 loc) · 4.74 KB

aws-cloudformation-and-codestar-enum.md

File metadata and controls

89 lines (61 loc) · 4.74 KB

AWS - CloudFormation & Codestar Enum

Support HackTricks and get benefits!

CloudFormation

AWS CloudFormation is a service that helps you model and set up your AWS resources so that you can spend less time managing those resources and more time focusing on your applications that run in AWS. You create a template that describes all the AWS resources that you want, and CloudFormation takes care of provisioning and configuring those resources for you.

Enumeration

# Stacks
aws cloudformation list-stacks
aws cloudformation describe-stacks # You could find sensitive information here
aws cloudformation list-stack-resources --stack-name <name>

## Show params and outputs 
aws cloudformation describe-stacks | jq ".Stacks[] | .StackId, .StackName, .Parameters, .Outputs"

# Export
aws cloudformation list-exports
aws cloudformation list-imports --export-name <x_name>

# Stack Sets
aws cloudformation list-stack-sets
aws cloudformation describe-stack-set --stack-set-name <name>
aws cloudformation list-stack-instances --stack-set-name <name>
aws cloudformation list-stack-set-operations --stack-set-name <name>
aws cloudformation list-stack-set-operation-results --stack-set-name <name> --operation-id <id>

Privesc

In the following page you can check how to abuse cloudformation permissions to escalate privileges:

{% content-ref url="../aws-privilege-escalation/aws-cloudformation-privesc/" %} aws-cloudformation-privesc {% endcontent-ref %}

Post-Exploitation

Check for secrets or sensitive information in the template, parameters & output of each CloudFormation

Codestar

AWS CodeStar is a service for creating, managing, and working with software development projects on AWS. You can quickly develop, build, and deploy applications on AWS with an AWS CodeStar project. An AWS CodeStar project creates and integrates AWS services for your project development toolchain. Depending on your choice of AWS CodeStar project template, that toolchain might include source control, build, deployment, virtual servers or serverless resources, and more. AWS CodeStar also manages the permissions required for project users (called team members).

Enumeration

# Get projects information
aws codestar list-projects
aws codestar describe-project --id <project_id>
aws codestar list-resources --project-id <project_id>
aws codestar list-team-members --project-id <project_id>

 aws codestar list-user-profiles
 aws codestar describe-user-profile --user-arn <arn>

Privesc

In the following page you can check how to abuse codestar permissions to escalate privileges:

{% content-ref url="../aws-privilege-escalation/aws-codestar-privesc/" %} aws-codestar-privesc {% endcontent-ref %}

Support HackTricks and get benefits!