Last active
August 29, 2015 14:07
-
-
Save svetlyak40wt/2c83077cbfdae9d731df to your computer and use it in GitHub Desktop.
How to check with Salt if your servers are in danger because of ShellShock.
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
# first check | |
sudo salt '*' cmd.run \ | |
'bash -c "echo Bash Test"' \ | |
'env={"VAR": "() { :;}; echo Bash is vulnerable.", "FUNCTION()": "() { :;}; echo Bash is vulnerable."}' | |
# and then upgrade if needed | |
sudo salt '*' cmd.run \ | |
'apt-get update && apt-get install --only-upgrade bash' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment