Skip to content

Commit

Permalink
Merge pull request #100 from teamssix/main
Browse files Browse the repository at this point in the history
docs: update readme
  • Loading branch information
teamssix authored Sep 14, 2022
2 parents 59664d2 + aeaa865 commit b50d48e
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 53 deletions.
46 changes: 23 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,49 +86,49 @@ Depending on the cloud service provider you are using, choose the corresponding
Alibaba Cloud

```bash
docker pull registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat_aliyun:0.0.4
docker run -itd --name terraformgoat_aliyun_0.0.4 registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat_aliyun:0.0.4
docker exec -it terraformgoat_aliyun_0.0.4 /bin/bash
docker pull registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat_aliyun:0.0.5
docker run -itd --name terraformgoat_aliyun_0.0.5 registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat_aliyun:0.0.5
docker exec -it terraformgoat_aliyun_0.0.5 /bin/bash
```

Tencent Cloud

```bash
docker pull registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat_tencentcloud:0.0.4
docker run -itd --name terraformgoat_tencentcloud_0.0.4 registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat_tencentcloud:0.0.4
docker exec -it terraformgoat_tencentcloud_0.0.4 /bin/bash
docker pull registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat_tencentcloud:0.0.5
docker run -itd --name terraformgoat_tencentcloud_0.0.5 registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat_tencentcloud:0.0.5
docker exec -it terraformgoat_tencentcloud_0.0.5 /bin/bash
```

Huawei Cloud

```bash
docker pull registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat_huaweicloud:0.0.4
docker run -itd --name terraformgoat_huaweicloud_0.0.4 registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat_huaweicloud:0.0.4
docker exec -it terraformgoat_huaweicloud_0.0.4 /bin/bash
docker pull registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat_huaweicloud:0.0.5
docker run -itd --name terraformgoat_huaweicloud_0.0.5 registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat_huaweicloud:0.0.5
docker exec -it terraformgoat_huaweicloud_0.0.5 /bin/bash
```

Amazon Web Services

```bash
docker pull registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat_aws:0.0.4
docker run -itd --name terraformgoat_aws_0.0.4 registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat_aws:0.0.4
docker exec -it terraformgoat_aws_0.0.4 /bin/bash
docker pull registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat_aws:0.0.5
docker run -itd --name terraformgoat_aws_0.0.5 registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat_aws:0.0.5
docker exec -it terraformgoat_aws_0.0.5 /bin/bash
```

Google Cloud Platform

```bash
docker pull registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat_gcp:0.0.4
docker run -itd --name terraformgoat_gcp_0.0.4 registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat_gcp:0.0.4
docker exec -it terraformgoat_gcp_0.0.4 /bin/bash
docker pull registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat_gcp:0.0.5
docker run -itd --name terraformgoat_gcp_0.0.5 registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat_gcp:0.0.5
docker exec -it terraformgoat_gcp_0.0.5 /bin/bash
```

Microsoft Azure

```bash
docker pull registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat_azure:0.0.4
docker run -itd --name terraformgoat_azure_0.0.4 registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat_azure:0.0.4
docker exec -it terraformgoat_azure_0.0.4 /bin/bash
docker pull registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat_azure:0.0.5
docker run -itd --name terraformgoat_azure_0.0.5 registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat_azure:0.0.5
docker exec -it terraformgoat_azure_0.0.5 /bin/bash
```

## :page_facing_up: Demo
Expand All @@ -138,12 +138,12 @@ After entering the container, cd to the corresponding scenario directory and you
Here is a demonstration of the [Alibaba Cloud Bucket Object Traversal](https://github.com/HXSecurity/TerraformGoat/tree/main/aliyun/oss/bucket_object_traversal) scenario build.

```bash
docker pull registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat_aliyun:0.0.4
docker run -itd --name terraformgoat_aliyun_0.0.4 registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat_aliyun:0.0.4
docker exec -it terraformgoat_aliyun_0.0.4 /bin/bash
docker pull registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat_aliyun:0.0.5
docker run -itd --name terraformgoat_aliyun_0.0.5 registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat_aliyun:0.0.5
docker exec -it terraformgoat_aliyun_0.0.5 /bin/bash
```

![img](./images/1655118629.png)
![img](./images/1663151143.png)

```bash
cd /TerraformGoat/aliyun/oss/bucket_object_traversal/
Expand Down Expand Up @@ -171,7 +171,7 @@ If you are in a container, first execute the `exit` command to exit the containe
```shell
docker stop $(docker ps -a -q -f "name=terraformgoat*")
docker rm $(docker ps -a -q -f "name=terraformgoat*")
docker rmi $(docker images -a -q -f "reference=registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat*")
docker rmi $(docker images -a -q -f "reference=registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat*")
```

## ⚠️ Notice
Expand Down
46 changes: 23 additions & 23 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,62 +85,62 @@ TerraformGoat 使用 Docker 镜像部署,因此需要 Docker Engine 环境支
阿里云

```bash
docker pull registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat_aliyun:0.0.4
docker run -itd --name terraformgoat_aliyun_0.0.4 registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat_aliyun:0.0.4
docker exec -it terraformgoat_aliyun_0.0.4 /bin/bash
docker pull registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat_aliyun:0.0.5
docker run -itd --name terraformgoat_aliyun_0.0.5 registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat_aliyun:0.0.5
docker exec -it terraformgoat_aliyun_0.0.5 /bin/bash
```

腾讯云

```bash
docker pull registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat_tencentcloud:0.0.4
docker run -itd --name terraformgoat_tencentcloud_0.0.4 registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat_tencentcloud:0.0.4
docker exec -it terraformgoat_tencentcloud_0.0.4 /bin/bash
docker pull registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat_tencentcloud:0.0.5
docker run -itd --name terraformgoat_tencentcloud_0.0.5 registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat_tencentcloud:0.0.5
docker exec -it terraformgoat_tencentcloud_0.0.5 /bin/bash
```

华为云

```bash
docker pull registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat_huaweicloud:0.0.4
docker run -itd --name terraformgoat_huaweicloud_0.0.4 registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat_huaweicloud:0.0.4
docker exec -it terraformgoat_huaweicloud_0.0.4 /bin/bash
docker pull registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat_huaweicloud:0.0.5
docker run -itd --name terraformgoat_huaweicloud_0.0.5 registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat_huaweicloud:0.0.5
docker exec -it terraformgoat_huaweicloud_0.0.5 /bin/bash
```

Amazon Web Services

```bash
docker pull registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat_aws:0.0.4
docker run -itd --name terraformgoat_aws_0.0.4 registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat_aws:0.0.4
docker exec -it terraformgoat_aws_0.0.4 /bin/bash
docker pull registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat_aws:0.0.5
docker run -itd --name terraformgoat_aws_0.0.5 registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat_aws:0.0.5
docker exec -it terraformgoat_aws_0.0.5 /bin/bash
```

Google Cloud Platform

```bash
docker pull registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat_gcp:0.0.4
docker run -itd --name terraformgoat_gcp_0.0.4 registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat_gcp:0.0.4
docker exec -it terraformgoat_gcp_0.0.4 /bin/bash
docker pull registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat_gcp:0.0.5
docker run -itd --name terraformgoat_gcp_0.0.5 registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat_gcp:0.0.5
docker exec -it terraformgoat_gcp_0.0.5 /bin/bash
```

Microsoft Azure

```bash
docker pull registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat_azure:0.0.4
docker run -itd --name terraformgoat_azure_0.0.4 registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat_azure:0.0.4
docker exec -it terraformgoat_azure_0.0.4 /bin/bash
docker pull registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat_azure:0.0.5
docker run -itd --name terraformgoat_azure_0.0.5 registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat_azure:0.0.5
docker exec -it terraformgoat_azure_0.0.5 /bin/bash
```

## :page_facing_up: 演示

进入到容器后,cd 到对应的场景目录,就可以开始部署靶场了,这里以 [阿里云 Bucket 对象遍历](https://github.com/HXSecurity/TerraformGoat/tree/main/aliyun/oss/bucket_object_traversal) 漏洞场景的搭建进行演示:

```bash
docker pull registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat_aliyun:0.0.4
docker run -itd --name terraformgoat_aliyun_0.0.4 registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat_aliyun:0.0.4
docker exec -it terraformgoat_aliyun_0.0.4 /bin/bash
docker pull registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat_aliyun:0.0.5
docker run -itd --name terraformgoat_aliyun_0.0.5 registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat_aliyun:0.0.5
docker exec -it terraformgoat_aliyun_0.0.5 /bin/bash
```

![img](./images/1655118629.png)
![img](./images/1663151143.png)

```bash
cd /TerraformGoat/aliyun/oss/bucket_object_traversal/
Expand Down Expand Up @@ -168,7 +168,7 @@ terraform destroy
```shell
docker stop $(docker ps -a -q -f "name=terraformgoat*")
docker rm $(docker ps -a -q -f "name=terraformgoat*")
docker rmi $(docker images -a -q -f "reference=registry.cn-beijing.aliyuncs.com/huoxian_pub/terraformgoat*")
docker rmi $(docker images -a -q -f "reference=registry.cn-hongkong.aliyuncs.com/huoxian_pub/terraformgoat*")
```

## ⚠️ 注意事项
Expand Down
8 changes: 4 additions & 4 deletions aws/s3/bucket_object_traversal/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ EOF
}

resource "aws_s3_object" "PutObject_Flag" {
bucket = aws_s3_bucket.CreateBucket.id
key = "flag.txt"
source = "./flag.txt"
acl = "public-read-write"
bucket = aws_s3_bucket.CreateBucket.id
key = "flag.txt"
source = "./flag.txt"
acl = "public-read-write"
}


Expand Down
6 changes: 3 additions & 3 deletions aws/s3/special_bucket_policy/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ EOF
}

resource "aws_s3_object" "PutObject_Flag" {
bucket = aws_s3_bucket.CreateBucket.id
key = "flag.txt"
source = "./flag.txt"
bucket = aws_s3_bucket.CreateBucket.id
key = "flag.txt"
source = "./flag.txt"
}


Expand Down
Binary file removed images/1655118629.png
Binary file not shown.
Binary file added images/1663151143.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b50d48e

Please sign in to comment.