Skip to content

Instantly share code, notes, and snippets.

@lukearmstrong
Created September 25, 2014 18:57
Show Gist options
  • Save lukearmstrong/2fe8cd15b5ded869a29b to your computer and use it in GitHub Desktop.
Save lukearmstrong/2fe8cd15b5ded869a29b to your computer and use it in GitHub Desktop.
shellshock
luke@samsung:~$ env X="() { :;} ; echo busted" /bin/sh -c "echo completed"
completed
luke@samsung:~$ env X="() { :;} ; echo busted" `which bash` -c "echo completed"
busted
completed
luke@samsung:~$ sudo apt-get update && sudo apt-get upgrade -y
...
...
...
luke@samsung:~$ env X="() { :;} ; echo busted" /bin/sh -c "echo completed"
completed
luke@samsung:~$ env X="() { :;} ; echo busted" `which bash` -c "echo completed"
/bin/bash: warning: X: ignoring function definition attempt
/bin/bash: error importing function definition for `X'
completed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment