Skip to content

Instantly share code, notes, and snippets.

@svetlyak40wt
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save svetlyak40wt/2c83077cbfdae9d731df to your computer and use it in GitHub Desktop.
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.
# 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