Last active
August 29, 2015 14:06
-
-
Save Caffe1neAdd1ct/2666ed3241b0249c8209 to your computer and use it in GitHub Desktop.
Bash CVE shellshock testing script
This file contains hidden or 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 | |
| INJECTION="All your bash" | |
| OUTPUT=$(env x='() { :;}; echo '"$INJECTION"'' bash -c "echo are belong to us." 2>&1); | |
| if [[ $OUTPUT == *"$INJECTION"* ]] | |
| then | |
| echo -e "WARNING THIS SERVER IS VULNERABLE - UPDATE BASH NOW." | |
| else | |
| echo -e "All clear you can relax!"; | |
| fi |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run using:
CentOS / Fedora:
Ubuntu / Debian