dee4 wrote:
Also:
- Should I search for something other than the string "() in the nginx log files?
- Does the fact that I run nginx instead of Apache, and don't have PHP installed, make me any safer?
- Can the exploit be done via Postfix or Dovecot?
1. The () would be constant, although not necessarily preceded by a double quote. The attack value could be anywhere that the web server might stuff it into an environment variable. (Unfortunately I'm not aware of a comprehensive list; here's a
partial one for Apache. I would assume that Apache limits some of these, e.g. REQUEST_METHOD, to valid values only.) As others noted, there are possible vectors that probably don't appear in your access logs (e.g., in the "Host:" header of the HTTP request).
2. Possibly. Presumably (I'm not familiar with it) Nginx does some things differently than Apache. When it comes to CGI there's
a standard, so there's commonality between how web servers behave (if you're using CGI).
3. Any outside-facing server could potentially be vulnerable. I see
some discussion on the
Dovecot mailing list about this, but nothing for
Postfix. My understanding of Postfix is it uses environment variables for
very little, communicating with outside processes via sockets mostly.
The good news for you is that by default, Ubuntu uses dash, not bash, as /bin/sh. You can use
ls -l /bin/sh to double-check. This means that only a network application that
explicitly calls bash would be vulnerable. (For example, MediaWiki runs ImageMagick as an external process using
proc_open(). This uses /bin/sh, so by default on Ubuntu/Debian would use dash, but on CentOS it would be using bash.)