Skip to content

Commit 0734fbf

Browse files
committed
Welcome Kubernetes-Goat
0 parents  commit 0734fbf

File tree

179 files changed

+3892
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+3892
-0
lines changed

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Madhu Akula
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+67

access-kubernetes-goat.sh

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/bin/bash
2+
# Author: Madhu Akula
3+
# This program has been created as part of Kuberentes Goat
4+
# Kuberentes Goat Access vulnerable infrastrcuture
5+
6+
# Checking kubectl setup
7+
kubectl version --short > /dev/null 2>&1
8+
if [ $? -eq 0 ];
9+
then
10+
echo "kubectl setup looks good."
11+
else
12+
echo "Please check kubectl setup."
13+
exit;
14+
fi
15+
16+
echo 'Creating port forward for all the Kubernetes Goat resources to locally. We will be using 1230 to 1236 ports locally!'
17+
18+
# Exposing Sensitive keys in code bases Scenario
19+
export POD_NAME=$(kubectl get pods --namespace default -l "app=build-code" -o jsonpath="{.items[0].metadata.name}")
20+
kubectl port-forward $POD_NAME 1230:3000 > /dev/null 2>&1 &
21+
22+
# Exposing DIND(docker-in-docker) exploitation Scenario
23+
export POD_NAME=$(kubectl get pods --namespace default -l "app=health-check" -o jsonpath="{.items[0].metadata.name}")
24+
kubectl port-forward $POD_NAME 1231:80 > /dev/null 2>&1 &
25+
26+
# Exposing SSRF in K8S world Scenario
27+
export POD_NAME=$(kubectl get pods --namespace default -l "app=internal-proxy" -o jsonpath="{.items[0].metadata.name}")
28+
kubectl port-forward $POD_NAME 1232:3000 > /dev/null 2>&1 &
29+
30+
# Exposing Container escape to access host system Scenario
31+
export POD_NAME=$(kubectl get pods --namespace default -l "app=system-monitor" -o jsonpath="{.items[0].metadata.name}")
32+
kubectl port-forward $POD_NAME 1233:8080 > /dev/null 2>&1 &
33+
34+
# Exposing Kubernetes Goat Home
35+
export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=kubernetes-goat-home" -o jsonpath="{.items[0].metadata.name}")
36+
kubectl port-forward $POD_NAME 1234:80 > /dev/null 2>&1 &
37+
38+
# Exposing Attacking private registry Scenario
39+
export POD_NAME=$(kubectl get pods --namespace default -l "app=poor-registry" -o jsonpath="{.items[0].metadata.name}")
40+
kubectl port-forward $POD_NAME 1235:5000 > /dev/null 2>&1 &
41+
42+
# Exposing Attacking private registry Scenario
43+
export POD_NAME=$(kubectl get pods --namespace default -l "app=hunger-check" -o jsonpath="{.items[0].metadata.name}")
44+
kubectl port-forward $POD_NAME 1236:8080 > /dev/null 2>&1 &
45+
46+
47+
echo "Visit http://127.0.0.1:1234 to get started with your Kuberenetes Goat hacking!"

guide/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
book

guide/book.toml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[book]
2+
authors = ["Madhu Akula"]
3+
language = "en"
4+
multilingual = false
5+
src = "src"
6+
title = "Kubernetes Goat"

guide/src/README.md

+3

guide/src/SUMMARY.md

+24

guide/src/about.md

+36

guide/src/getting-involved/readme.md

+18
466 KB

guide/src/images/kubernetes-goat.png

154 KB

guide/src/kubernetes-cluster/gke.md

+35

guide/src/kubernetes-cluster/setup.md

+29

guide/src/kubernetes-goat/setup.md

+24

guide/src/kubernetes/readme.md

+21

guide/src/scenarios/images/sc-1-1.png

56.5 KB

guide/src/scenarios/images/sc-1-2.png

53.2 KB

guide/src/scenarios/images/sc-1-3.png

1.1 MB

guide/src/scenarios/images/sc-1-4.png

746 KB

guide/src/scenarios/images/sc-1-5.png

829 KB
212 KB
865 KB
1.44 MB
1.21 MB
162 KB
891 KB
2.13 MB
72.4 KB
209 KB
99.2 KB
533 KB
636 KB
47.4 KB
91.8 KB
267 KB
127 KB
601 KB
344 KB

guide/src/scenarios/images/sc-1_1.png

530 KB

guide/src/scenarios/images/sc-1_2.png

864 KB

guide/src/scenarios/images/sc-2-1.png

125 KB

guide/src/scenarios/images/sc-2-2.png

158 KB

guide/src/scenarios/images/sc-2-3.png

262 KB

guide/src/scenarios/images/sc-2-4.png

655 KB

guide/src/scenarios/images/sc-2-5.png

392 KB

guide/src/scenarios/images/sc-2-6.png

180 KB

guide/src/scenarios/images/sc-2-7.png

496 KB

guide/src/scenarios/images/sc-3-1.png

212 KB

guide/src/scenarios/images/sc-3-2.png

147 KB

guide/src/scenarios/images/sc-3-3.png

147 KB

guide/src/scenarios/images/sc-3-4.png

165 KB

guide/src/scenarios/images/sc-3-5.png

113 KB

guide/src/scenarios/images/sc-4-1.png

99.2 KB

guide/src/scenarios/images/sc-4-2.png

573 KB

guide/src/scenarios/images/sc-4-3.png

558 KB

guide/src/scenarios/images/sc-4-4.png

303 KB

guide/src/scenarios/images/sc-4-5.png

663 KB

guide/src/scenarios/images/sc-5-1.png

164 KB

guide/src/scenarios/images/sc-5-2.png

544 KB

guide/src/scenarios/images/sc-6-1.png

209 KB

guide/src/scenarios/images/sc-6-2.png

493 KB

guide/src/scenarios/images/sc-7-1.png

37.9 KB

guide/src/scenarios/images/sc-7-2.png

51.7 KB

guide/src/scenarios/images/sc-7-3.png

390 KB

guide/src/scenarios/images/sc-7-4.png

1.17 MB

guide/src/scenarios/images/sc-8-1.png

87.5 KB

guide/src/scenarios/images/sc-8-2.png

33.9 KB

guide/src/scenarios/images/sc-9-1.png

114 KB

guide/src/scenarios/images/sc-9-2.png

206 KB

guide/src/scenarios/images/sc-9-3.png

255 KB

guide/src/scenarios/images/sc-9-4.png

190 KB

guide/src/scenarios/images/sc-9-5.png

401 KB

guide/src/scenarios/images/sc-9-6.png

1.19 MB

guide/src/scenarios/readme.md

+38

0 commit comments

Comments
 (0)