Translated ['src/pentesting-cloud/aws-security/aws-privilege-escalation/

This commit is contained in:
Translator
2025-01-05 10:37:39 +00:00
parent 5a592e06b5
commit c8f89a4bb7

View File

@@ -4,7 +4,7 @@
通过这些权限,您可以**滥用 codestar IAM 角色**来通过**cloudformation 模板**执行**任意操作**。
要利用这一点,您需要创建一个**可从被攻击账户访问的 S3 存储桶**。上传一个名为 `toolchain.json` 的文件。该文件应包含**cloudformation 模板漏洞**。以下内容可用于将托管策略设置为您控制的用户,并**赋予其管理员权限**
要利用这一点,您需要创建一个**可从被攻击账户访问的 S3 存储桶**。上传一个名为 `toolchain.json` 的文件。该文件应包含**cloudformation 模板漏洞**。以下内容可用于将托管策略设置为您控制的用户,并**赋予其管理员权限**
```json:toolchain.json
{
"Resources": {
@@ -81,6 +81,6 @@ aws codestar create-project \
--source-code file://$SOURCE_CODE_PATH \
--toolchain file://$TOOLCHAIN_PATH
```
此漏洞基于**这些权限的Pacu漏洞** [https://github.com/RhinoSecurityLabs/pacu/blob/2a0ce01f075541f7ccd9c44fcfc967cad994f9c9/pacu/modules/iam\_\_privesc_scan/main.py#L1997](https://github.com/RhinoSecurityLabs/pacu/blob/2a0ce01f075541f7ccd9c44fcfc967cad994f9c9/pacu/modules/iam__privesc_scan/main.py#L1997) 在其中,您可以找到为角色创建管理员管理策略的变体,而不是为用户创建。
此漏洞基于**Pacu对这些权限的利用**[https://github.com/RhinoSecurityLabs/pacu/blob/2a0ce01f075541f7ccd9c44fcfc967cad994f9c9/pacu/modules/iam\_\_privesc_scan/main.py#L1997](https://github.com/RhinoSecurityLabs/pacu/blob/2a0ce01f075541f7ccd9c44fcfc967cad994f9c9/pacu/modules/iam__privesc_scan/main.py#L1997) 在其中,您可以找到为角色创建管理员管理策略的变体,而不是为用户创建。
{{#include ../../../../banners/hacktricks-training.md}}