|
|
|
|
|
by schrodingersCat
4289 days ago
|
|
I just tried this in zsh 5.0.6 (x86_64-apple-darwin13.3.0). It reports vulnerable as well. edit: Yes, this feature works when formatted correctly for zsh as "function ls () { echo vulnerable }". However, I was wrong in that zsh -c will not run the function (of course running "ls" in the same session will). I'm going to call this not a problem. edit: When trying this one-liner in zsh: "env x='() { :;}; echo vulnerable' zsh -c 'echo hello'" (as suggested by https://superuser.com/questions/816622/does-the-shellshock-b...), the output indicates my shell is vulnerable. Could someone please try and replicate? |
|
This is how you define a shell function and then use it in sub-scripts.
As the author noted, using this as an exploit requires control of the variable names, and common tools (httpd, dhclient, etc) that set variables in environment have explicit naming conventions in place to prevent this.
To be clear: I'll change my tune if someone finds a way to exploit this remotely.