Files
hacktricks-cloud/src/pentesting-cloud/aws-security/aws-services/aws-cloudformation-and-codestar-enum.md

72 lines
4.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# AWS - CloudFormation & Codestar Enum
{{#include ../../../banners/hacktricks-training.md}}
## CloudFormation
AWS CloudFormation - це сервіс, призначений для **оптимізації управління ресурсами AWS**. Він дозволяє користувачам більше зосереджуватися на своїх додатках, що працюють в AWS, **мінімізуючи час, витрачений на управління ресурсами**. Основною функцією цього сервісу є **шаблон** — описова модель бажаних ресурсів AWS. Після надання цього шаблону CloudFormation відповідає за **постачання та налаштування** вказаних ресурсів. Ця автоматизація сприяє більш ефективному та безпомилковому управлінню інфраструктурою AWS.
### Enumeration
```bash
# Stacks
aws cloudformation list-stacks
aws cloudformation describe-stacks # You could find sensitive information here
aws cloudformation list-stack-resources --stack-name <name>
aws cloudformation get-template --stack-name cloudformationStack
aws cloudformation describe-stack-events --stack-name cloudformationStack
## 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
На наступній сторінці ви можете перевірити, як **зловживати дозволами cloudformation для ескалації привілеїв**:
{{#ref}}
../aws-privilege-escalation/aws-cloudformation-privesc/
{{#endref}}
### Post-Exploitation
Перевірте наявність **секретів** або чутливої інформації в **шаблоні, параметрах та виході** кожного CloudFormation
## Codestar
AWS CodeStar - це сервіс для створення, управління та роботи з проектами розробки програмного забезпечення на AWS. Ви можете швидко розробляти, збирати та розгортати додатки на AWS за допомогою проекту AWS CodeStar. Проект AWS CodeStar створює та **інтегрує AWS сервіси** для вашого інструментального ланцюга розробки проекту. Залежно від вибору шаблону проекту AWS CodeStar, цей інструментальний ланцюг може включати контроль версій, збірку, розгортання, віртуальні сервери або безсерверні ресурси та інше. AWS CodeStar також **управляє дозволами, необхідними для користувачів проекту** (які називаються членами команди).
### Enumeration
```bash
# 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
На наступній сторінці ви можете перевірити, як **зловживати правами codestar для ескалації привілеїв**:
{{#ref}}
../aws-privilege-escalation/aws-codestar-privesc/
{{#endref}}
## References
- [https://docs.aws.amazon.com/cloudformation/](https://docs.aws.amazon.com/cloudformation/)
{{#include ../../../banners/hacktricks-training.md}}