(no title)
schrodingersCat | 11 years ago
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?
daveloyall|11 years ago
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.
bodyfour|11 years ago
I don't see how this qualifies as much of a vulnerability. Maybe now that bash's imported-function feature is better known we'll see it leveraged as part of a multi-step attack though.
Arkanosis|11 years ago
Do you mean that you run bash -c in zsh, or that you run zsh -c ?
schrodingersCat|11 years ago
unknown|11 years ago
[deleted]
viraptor|11 years ago
unknown|11 years ago
[deleted]
schrodingersCat|11 years ago