Skip to content

Commit da8d12b

Browse files
authored
Merge branch 'main' into update-readme-before-release
2 parents 89ac94b + 7e063ef commit da8d12b

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

README.md

+16-7
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ An AWS Pentesting tool that lets you use one-liner commands to backdoor an AWS a
1212
<img src="docs/images/endgame.gif">
1313
</p>
1414

15-
**TLDR**: `endgame smash --service all` to create backdoors across your entire AWS account - either to a rogue IAM user/role or to the entire internet.
15+
**TL;DR**: `endgame smash --service all` to create backdoors across your entire AWS account - either to a rogue IAM user/role or to the entire Internet.
1616

1717
# Endgame: Creating Backdoors in AWS
1818

19-
Endgame abuses AWS's resource permission model to grant rogue users (or the internet) access to an AWS account's resources with a single command. It does this through one of three methods:
19+
Endgame abuses AWS's resource permission model to grant rogue users (or the Internet) access to an AWS account's resources with a single command. It does this through one of three methods:
2020
1. Modifying [resource-based policies](https://endgame.readthedocs.io/en/latest/resource-policy-primer/) (such as [S3 Bucket policies](https://docs.aws.amazon.com/AmazonS3/latest/userguide/WebsiteAccessPermissionsReqd.html#bucket-policy-static-site) or [Lambda Function policies](https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html#permissions-resource-xaccountinvoke))
2121
2. Resources that can be made public through sharing APIs (such as [Amazon Machine Images (AMIs)](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sharingamis-explicit.html), [EBS disk snapshots](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html), and [RDS database snapshots](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ShareSnapshot.html))
2222
3. Sharing resources via [AWS Resource Access Manager (RAM)](https://docs.aws.amazon.com/ram/latest/userguide/shareable.html)
@@ -26,7 +26,7 @@ Endgame was created to:
2626
* Show [blue teams](https://endgame.readthedocs.io/en/latest/recommendations-to-blue-teams/) and developers what kind of damage can be done by overprivileged/leaked accounts.
2727
* Help red teams to demonstrate impact of their access.
2828

29-
Endgame demonstrates (with a bit of shock and awe) how simple human errors in excessive permissions (such a granting `s3:*` access instead of `s3:GetObject`) can be abused by attackers. These are not new attacks, but AWS's ability to **detect** _and_ **prevent** these attacks falls short of what customers need to protect themselves. This is what inspired us to write this tool. Follow the [Tutorial](#tutorial) and observe how you can expose resources across **17 different AWS services** to the internet in a matter of seconds.
29+
Endgame demonstrates (with a bit of shock and awe) how simple human errors in excessive permissions (such a granting `s3:*` access instead of `s3:GetObject`) can be abused by attackers. These are not new attacks, but AWS's ability to **detect** _and_ **prevent** these attacks falls short of what customers need to protect themselves. This is what inspired us to write this tool. Follow the [Tutorial](#tutorial) and observe how you can expose resources across **17 different AWS services** to the Internet in a matter of seconds.
3030

3131
The resource types that can be exposed are of high value to attackers. This can include:
3232
* Privileged compute access (by exposing who can invoke `lambda` functions)
@@ -37,7 +37,7 @@ The resource types that can be exposed are of high value to attackers. This can
3737
* Logging endpoints (`cloudwatch` resource policies)
3838
* Search and analytics engines (`elasticsearch` clusters)
3939

40-
Endgame is an attack tool, but it was written with a specific purpose. We wrote this tool with desired outcomes for the following audiences:
40+
Endgame is an attack tool, but it was written with a specific purpose. We wrote this tool for the following audiences:
4141
1. **AWS**: We want AWS to empower their customers with the capabilities to fight these attacks. Our recommendations are outlined in the [Recommendations to AWS](#recommendations-to-aws) section.
4242
2. **AWS Customers and their customers**: It is better to have risks be more easily understood and know how to mitigate those risks than to force people to fight something novel. By increasing awareness about Resource Exposure and excessive permissions, we can protect ourselves against attacks where the attackers previously held the advantage and AWS customers were previously left blind.
4343
3. **Blue Teams**: Defense teams can leverage the guidance around user-agent detection, API call detection, and behavioral detection outlined in the [Recommendations to Blue Teams](#recommendations-to-blue-teams) section.
@@ -49,7 +49,7 @@ Endgame can create backdoors for resources in any of the services listed in the
4949

5050
Note: At the time of this writing, [AWS Access Analyzer](https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-resources.html) does **NOT** support auditing **11 out of the 18 services** that Endgame attacks. Given that Access Analyzer is intended to detect this exact kind of violation, we kindly suggest to the AWS Team that they support all resources that can be attacked using Endgame. 😊
5151

52-
| Backdoor Resource Type | Support | [AWS Access Analyzer Support][1] |
52+
| Backdoor Resource Type | Endgame | [AWS Access Analyzer Support][1] |
5353
|---------------------------------------------------------|---------|----------------------------------|
5454
| [ACM Private CAs](https://endgame.readthedocs.io/en/latest/risks/acm-pca/) |||
5555
| [CloudWatch Resource Policies](https://endgame.readthedocs.io/en/latest/risks/logs/) |||
@@ -112,7 +112,7 @@ brew tap salesforce/endgame https://github.com/salesforce/endgame
112112
brew install endgame
113113
```
114114

115-
Now you should be able to execute Endgame from command line by running `endgame --help`.
115+
Now you should be able to execute Endgame from the command line by running `endgame --help`.
116116

117117
### Shell Completion
118118

@@ -128,11 +128,20 @@ eval "$(_ENDGAME_COMPLETE=source endgame)"
128128
eval "$(_ENDGAME_COMPLETE=source_zsh endgame)"
129129
```
130130

131+
# Tutorial
132+
133+
The prerequisite for an attacker running Endgame is that they have access to AWS API credentials for the victim account which have privileges to update resource policies.
134+
135+
Endgame can run in two modes, `expose` or `smash`. The less-destructive `expose` mode is surgical, updating the resource policy on a single attacker-defined resource to include a back door to a principal they control (or the Internet if they're mean).
136+
137+
`smash`, on the other hand, is more destructive (and louder). `smash` can run on a single service or all supported services. In either case, for each service it enumerates a list of resources in that region, reads the current resource policy on each, and applies a new policy which includes the "evil principal" the attacker has specified. The net effect of this is that depending on the privileges they have in the victim account, an attacker can insert dozens of back doors which are not controlled by the victim's IAM policies.
138+
139+
131140
## Step 1: Setup
132141

133142
* First, authenticate to AWS CLI using credentials to the victim's account.
134143

135-
* Set the environment variables for `EVIL_PRINCIPAL` (required). Optionally, set the environment variables for `AWS_REGION` and `AWS_PROFILE`
144+
* Set the environment variables for `EVIL_PRINCIPAL` (required). Optionally, set the environment variables for `AWS_REGION` and `AWS_PROFILE`.
136145

137146
```bash
138147
# Set `EVIL_PRINCIPAL` environment variable to the rogue IAM User or

0 commit comments

Comments
 (0)