5 ms·
Upon researching this, "() {" will always catch this. If you look at the bash source code, the relevant parsing function checks if an environment variable begi
by meowface 12y ago
Upon researching this, "() {" will always catch this.
If you look at the bash source code, the relevant parsing function checks if an environment variable begins with the literal 4-character string of "() {". That's why it's pretty easy to detect exploits: you can't do anything to evade a filter checking for this in an HTTP header. An HTTP server should not be doing any decoding of an HTTP header that could result in "() {" being obfuscated. This may not apply for attacks against things that aren't web apps, though.
- nitrogen 12y agoUpon researching this, "() {" will always catch this. Unless the input is decoded in some way before reaching an environment variable. E.g. HTML entities, hex escapes (percent or backslash), gzip, ... Best just to patch bash and switch to a different /bin/sh.
- meowface 12y agoI should have said "will always catch this for CGI servers and HTTP headers".