Skip to content

Commit 56d3166

Browse files
carlospolopgitbook-bot
authored andcommitted
GITBOOK-485: change request with no subject merged in GitBook
1 parent dfb0cbc commit 56d3166

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pentesting-cloud/aws-security/aws-privilege-escalation/aws-codebuild-privesc.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ In a **Codebuild container** the file `/codebuild/output/tmp/env.sh` contains al
101101

102102
This file contains the **env variable `AWS_CONTAINER_CREDENTIALS_RELATIVE_URI`** which contains the **URL path** to access the credentials. It will be something like this `/v2/credentials/2817702c-efcf-4485-9730-8e54303ec420`
103103

104-
 Add that to the URL **`http://169.254.170.2/`** and you will be able to dump the role credentials.
104+
Add that to the URL **`http://169.254.170.2/`** and you will be able to dump the role credentials.
105105

106106
Moreover, it also contains the **env variable `ECS_CONTAINER_METADATA_URI`** which contains the complete URL to get **metadata info about the container**.
107107
{% endhint %}
@@ -276,6 +276,10 @@ aws codebuild start-build --project-name <project-name>
276276

277277
**Impact:** Direct privesc to the role used by the AWS CodeBuild worker that usually has high privileges.
278278

279+
{% hint style="warning" %}
280+
Note that the buildspec could be expected in zip format, so an attacker would need to download, unzip, modify the `buildspec.yml` from the root directory, zip again and upload
281+
{% endhint %}
282+
279283
More details could be found [here](https://www.shielder.com/blog/2023/07/aws-codebuild--s3-privilege-escalation/).
280284

281285
**Potential Impact:** Direct privesc to attached AWS Codebuild roles.

0 commit comments

Comments
 (0)