ListenerMoya / TerraformGoat

TerraformGoat is HuoCorp research lab's "Vulnerable by Design" multi cloud deployment tool.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TerraformGoat

License: Apache-2.0 GitHub release Github Stars PRs Welcome tweet

English | 中文

TerraformGoat is HuoCorp research lab's "Vulnerable by Design" multi cloud deployment tool.

Currently supported cloud vendors include Alibaba Cloud, Tencent Cloud, Huawei Cloud, Amazon Web Services, Google Cloud Platform, Microsoft Azure.

🎯 Scenarios

ID Cloud Service Company Types Of Cloud Services Vulnerable Environment
1 Tencent Cloud Object Storage Bucket ACL Writable
2 Tencent Cloud Object Storage Unrestricted File Upload
3 Tencent Cloud Object Storage Bucket Object Traversal
4 Tencent Cloud Elastic Computing Service CVM SSRF
5 Alibaba Cloud Object Storage Object ACL Writable
6 Alibaba Cloud Object Storage Special Bucket Policy
7 Alibaba Cloud Object Storage Bucket Object Traversal
8 Alibaba Cloud Object Storage Unrestricted File Upload
9 Alibaba Cloud Elastic Computing Service ECS SSRF
10 Huawei Cloud Object Storage Object ACL Writable
11 Huawei Cloud Object Storage Special Bucket Policy
12 Huawei Cloud Object Storage Unrestricted File Upload
13 Huawei Cloud Object Storage Bucket Object Traversal
14 Huawei Cloud Elastic Computing Service ECS SSRF
15 Amazon Web Services Object Storage Object ACL Writable
16 Amazon Web Services Object Storage Bucket ACL Writable
17 Amazon Web Services Object Storage Special Bucket Policy
18 Amazon Web Services Object Storage Bucket Object Traversal
19 Amazon Web Services Object Storage Unrestricted File Upload
20 Amazon Web Services Elastic Computing Service EC2 SSRF
21 Amazon Web Services Elastic Computing Service Console Takeover
22 Amazon Web Services Identity and Access Management IAM Privilege Escalation
23 Google Cloud Platform Object Storage Object ACL Writable
24 Google Cloud Platform Object Storage Bucket ACL Writable
25 Google Cloud Platform Object Storage Bucket Object Traversal
26 Google Cloud Platform Object Storage Unrestricted File Upload
27 Google Cloud Platform Elastic Computing Service VM Command Execution
28 Microsoft Azure Object Storage Blob Public Access
29 Microsoft Azure Object Storage Container Blob Traversal
30 Microsoft Azure Elastic Computing Service VM Command Execution

💫 Install

TerraformGoat is built using Dockerfile, so you need to install the Docker environment first. For the Docker installation method, please refer to: https://docs.docker.com/get-docker/

git clone https://github.com/HuoCorp/TerraformGoat.git
cd TerraformGoat
docker build -t terraformgoat:v0.0.2 .

img

After docker build is complete, start and enter the container

docker run -itd --name terraformgoat terraformgoat:v0.0.2
docker exec -it terraformgoat /bin/bash

When entering the container, you need to select the cloud service to run

img

After selecting the cloud service you want to use, the relevant dependencies will be installed. After the relevant dependencies are installed, you can use TerraformGoat.

Using the build of the Alibaba Cloud ECS SSRF vulnerability scenario as a demo:

asciicast

🚀 Uninstall

docker stop terraformgoat
docker rm terraformgoat
docker rmi terraformgoat:v0.0.2

⚠️ Notice

  1. The README of each vulnerable environment is executed within the TerraformGoat container environment, so the TerraformGoat container environment needs to be deployed first.
  2. Due to the horizontal risk of intranet horizontal on the cloud in some scenarios, it is strongly recommended that users use their own test accounts to configure the scenarios, avoid using the cloud account of the production environment, and install TerraformGoat using Dockerfile to isolate the user's local cloud vendor token and the test account token.
  3. TerraformGoat is used for educational purposes only, It is not allowed to use it for illegal and criminal purposes, any consequences arising from TerraformGoat are the responsibility of the person using it, and not the HuoCorp organization.

🎊 Contributing

Contributions are welcomed and greatly appreciated. Further reading — CONTRIBUTING.md for details on contribution workflow.

🪪 License

TerraformGoat is under the Apache 2.0 license. See the LICENSE file for details.

🔮 Stats

Alt

About

TerraformGoat is HuoCorp research lab's "Vulnerable by Design" multi cloud deployment tool.

License:Apache License 2.0


Languages

Language:HCL 87.7%Language:HTML 6.6%Language:Shell 4.5%Language:Dockerfile 1.2%