Re:Gixy: Nginx Configuration Static Analyzer
by mrb on Thursday May 11, 2017 @09:49AM
(#14315945)
It is unsafe to configure Nginx to use any DNS resolver other than 127.0.0.1 ("resolver x.x.x.x") because the transaction ID can be predictible, and Nginx fails to randomize the UDP source port. Gixy should check for that. Strangely the Nginx developers staunchly refuse to consider this a security flaw. See http://blog.zorinaq.com/nginx-resolver-vulns/
[ Parent
| on HN ]
Re:Gixy: Nginx Configuration Static Analyzer
by nonsince on Thursday May 11, 2017 @10:09AM
(#14316096)
This is an excellent writeup (I don't know if it's yours or not). I am frankly baffled that the Nginx team refuses to fix it, since there is a working PoC and it would be almost trivial to fix.
Re:Gixy: Nginx Configuration Static Analyzer
by ericcholis on Thursday May 11, 2017 @02:51PM
(#14318532)
So, what exactly is the best way to mitigate this attack vector? While informative, the post only goes into detail about the attack; not a complete solution for the original intended purpose of the resolver setting.
Is the dnsmasq solution here[1] sufficient? Or, should I edit dhclient.conf to add the desired name servers[2]
[1] https://unix.stackexchange.com/questions/128220/how-do-i-set...
[2] https://unix.stackexchange.com/questions/128220/how-do-i-set...
Using "resolver 127.0.0.1" is an effective mitigation against all issues I documented.
Re:Gixy: Nginx Configuration Static Analyzer
by user5994461 on Thursday May 11, 2017 @01:32PM
(#14317881)
It is more than unsafe. It is plain stupid.
There is no resolver running on 127.0.0.1 ... except on a couple of systems. If I have to make an educated guess, the guy who wrote that is running on Ubuntu.
You don't understand. The recommendation is to INSTALL and CONFIGURE a resolver service accessible via the loopback address. Whether you run a resolver locally or forward/tunnel securely to a remote trusted resolver is irrelevant.
Re:Gixy: Nginx Configuration Static Analyzer
by pbarnes_1 on Thursday May 11, 2017 @03:33PM
(#14318806)
It takes 10 seconds to install unbound.
Re:Gixy: Nginx Configuration Static Analyzer
by omginternets on Thursday May 11, 2017 @05:02PM
(#14319492)
>It takes 10 seconds to install unbound.
And a lot longer to ensure people know to do this.
Re:Gixy: Nginx Configuration Static Analyzer
by Something1234 on Thursday May 11, 2017 @08:25PM
(#14320581)
Why does an HTTP server need to have a dns resolver? What purpose does it serve?
It's only needed if you configure proxy_pass http://<domain name> ... (and probably other forms of _pass, such as fcgi_pass)
If you use a specific IP, resolver is not needed.