Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Shellshock Bash Patcher for Debian/Ubuntu (Rundeck-compatible)
env x='() { :;}; echo vulnerable' bash -c "echo this is a test" | grep vulnerable > /dev/null 2>&1
if [ $? -eq 1 ]; then
echo "Not vulnerable. Machine is safe."
exit 0
echo -n "Vulnerable. Version: "
/bin/bash --version
echo "Installing patch."
sudo apt-get update && sudo apt-get install bash
if [ $? -eq 0 ]; then
echo -n "Patching complete: "
/bin/bash --version
exit 0
echo "Error updating bash binary. Please check it manually!!"
exit 1

This comment has been minimized.

Copy link
Owner Author

@martinseener martinseener commented Sep 25, 2014

How to use with Rundeck?

  1. Create a new job
  2. Insert code as "Script"
  3. Select all nodes to be checked/patched
  4. Run it!

This comment has been minimized.

Copy link

@ahonor ahonor commented Sep 26, 2014

Sweet !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment