Skip to content

Instantly share code, notes, and snippets.

@sayanee
Created September 29, 2014 03:27
Show Gist options
  • Save sayanee/0dd07f3e03081e755f24 to your computer and use it in GitHub Desktop.
Save sayanee/0dd07f3e03081e755f24 to your computer and use it in GitHub Desktop.
update bash to patch remote code exploitation
#!/bin/bash
# context: http://www.infoq.com/news/2014/09/bash-remote-exploit
# credit: http://stackoverflow.com/questions/16416195/how-do-i-upgrade-bash-in-mac-osx-mountain-lion-and-set-it-the-correct-path
brew upgrade && brew update
brew install bash
mv /bin/bash /bin/bash.old
ln -s /usr/local/bin/bash /bin/bash
bash --version
env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment