Skip to content

Commit c7ec9e4

Browse files
authored
Merge pull request #57 from salesforce/update-readme-before-release
Update README
2 parents 7e063ef + da8d12b commit c7ec9e4

File tree

3 files changed

+57
-27
lines changed

3 files changed

+57
-27
lines changed

README.md

+43-23
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Endgame
22

3-
An AWS Pentesting tool that lets you use one-liner commands to backdoor an AWS account's resources with a rogue AWS account - or to the entire internet 😈
3+
An AWS Pentesting tool that lets you use one-liner commands to backdoor an AWS account's resources with a rogue AWS account - or to the entire Internet 😈
44

55
[![continuous-integration](https://github.com/salesforce/endgame/workflows/continuous-integration/badge.svg?)](https://github.com/salesforce/endgame/actions?query=workflow%3Acontinuous-integration)
66
[![Documentation Status](https://readthedocs.org/projects/endgame/badge/?version=latest)](https://endgame.readthedocs.io/en/latest/?badge=latest)
@@ -12,30 +12,19 @@ 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-
1615
**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.
1716

18-
#### Cheatsheet
19-
20-
```bash
21-
# This will ruin your day
22-
endgame smash --service all --evil-principal "*"
23-
# This will show you how your day could have been ruined
24-
endgame smash --service all --evil-principal "*" --dry-run
25-
# Atone for your sins
26-
endgame smash --service all --evil-principal "*" --undo
27-
# Consider maybe atoning for your sins
28-
endgame smash --service all --evil-principal "*" --undo --dry-run
29-
30-
# List resources available for exploitation
31-
endgame list-resources --service all
32-
# Expose specific resources
33-
endgame expose --service s3 --name computers-were-a-mistake
34-
```
35-
3617
# Endgame: Creating Backdoors in AWS
3718

38-
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.
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:
20+
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))
21+
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))
22+
3. Sharing resources via [AWS Resource Access Manager (RAM)](https://docs.aws.amazon.com/ram/latest/userguide/shareable.html)
23+
24+
Endgame was created to:
25+
* Push [AWS](https://endgame.readthedocs.io/en/latest/recommendations-to-aws/) to improve coverage of AWS Access Analyzer so AWS users can protect themselves.
26+
* 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.
27+
* Help red teams to demonstrate impact of their access.
3928

4029
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.
4130

@@ -82,6 +71,32 @@ Note: At the time of this writing, [AWS Access Analyzer](https://docs.aws.amazon
8271
| [SNS Topics](https://endgame.readthedocs.io/en/latest/risks/sqs/) |||
8372

8473

74+
# Cheatsheet
75+
76+
```bash
77+
# this will ruin your day
78+
endgame smash --service all --evil-principal "*"
79+
# This will show you how your day could have been ruined
80+
endgame smash --service all --evil-principal "*" --dry-run
81+
# Atone for your sins
82+
endgame smash --service all --evil-principal "*" --undo
83+
# Consider maybe atoning for your sins
84+
endgame smash --service all --evil-principal "*" --undo --dry-run
85+
86+
# List resources available for exploitation
87+
endgame list-resources --service all
88+
# Expose specific resources
89+
endgame expose --service s3 --name computers-were-a-mistake
90+
```
91+
92+
# Tutorial
93+
94+
The prerequisite for an attacker running Endgame is they have access to AWS API credentials for the victim account which have privileges to update resource policies.
95+
96+
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).
97+
98+
`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.
99+
85100
## Installation
86101

87102
* pip3
@@ -140,7 +155,10 @@ export AWS_PROFILE="default"
140155

141156
## Step 2: Create Demo Infrastructure
142157

143-
This program makes modifications to live AWS Infrastructure, which can vary from account to account. We have bootstrapped some of this for you using [Terraform](https://www.terraform.io/intro/index.html). **Note: This will create real AWS infrastructure and will cost you money.**
158+
This program makes modifications to live AWS Infrastructure, which can vary from account to account. We have bootstrapped some of this for you using [Terraform](https://www.terraform.io/intro/index.html).
159+
160+
161+
> **Warning: This will create real AWS infrastructure and will cost you money. Be sure to create this in a test account, and destroy the Terraform resources afterwards.**
144162
145163
```bash
146164
# To create the demo infrastructure
@@ -198,7 +216,9 @@ endgame expose --service iam --name test-resource-exposure --undo
198216

199217
## Step 6: Smash your AWS Account to Pieces
200218

201-
* Run the following command to expose every exposable resource in your AWS account.
219+
* To expose every exposable resource in your AWS account, run the following command.
220+
221+
> Warning: If you supply the argument `--evil-principal *` or the environment variable `EVIL_PRINCIPAL=*`, it will expose the account to the internet. If you do this, it is possible that an attacker could assume your privileged IAM roles, take over the other [supported resources](#supported-backdoors) present in that account, or incur a massive bill. As such, you might want to set `--evil-principal` to your own AWS user/role in another account.
202222
203223
```bash
204224
endgame smash --service all --dry-run

docs/index.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
Endgame: Creating Backdoors in AWS
22
==================================
33

4-
An AWS Pentesting tool that lets you use one-liner commands to backdoor an AWS account's resources with a rogue AWS account - or to the entire internet 😈
4+
An AWS Pentesting tool that lets you use one-liner commands to backdoor an AWS account's resources with a rogue AWS account - or share the resources with the entire internet 😈
55

66
<p align="center">
77
<img src="images/endgame.gif">
88
</p>
99

1010

11-
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.
11+
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:
12+
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))
13+
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))
14+
3. Sharing resources via [AWS Resource Access Manager (RAM)](https://docs.aws.amazon.com/ram/latest/userguide/shareable.html)
15+
16+
Endgame was created to:
17+
* Push [AWS](https://endgame.readthedocs.io/en/latest/recommendations-to-aws/) to improve coverage of AWS Access Analyzer so AWS users can protect themselves.
18+
* 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.
19+
* Help red teams to demonstrate impact of their access.
1220

1321
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.md) and observe how you can expose resources across **17 different AWS services** to the internet in a matter of seconds.
1422

endgame/bin/cli.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
@click.version_option(version=__version__)
99
def endgame():
1010
"""
11-
An AWS Pentesting tool that lets you use one-liner commands to backdoor an AWS account's resources with a rogue AWS account - or to the entire internet 😈
11+
An AWS Pentesting tool that lets you use one-liner commands to backdoor an AWS account's resources with a rogue AWS account - or share the resources with the entire internet 😈
1212
"""
1313

1414

@@ -18,7 +18,9 @@ def endgame():
1818

1919

2020
def main():
21-
"""An AWS Pentesting tool that lets you use one-liner commands to backdoor an AWS account's resources with a rogue AWS account - or to the entire internet 😈"""
21+
"""
22+
An AWS Pentesting tool that lets you use one-liner commands to backdoor an AWS account's resources with a rogue AWS account - or share the resources with the entire internet 😈
23+
"""
2224
endgame()
2325

2426

0 commit comments

Comments
 (0)