没有任何数据可供显示
| 开源项目社区 | 当前位置 : |
|
| www.trustie.net/open_source_projects | 主页 > 开源项目社区 > nschaind |
|
nschaind
|
| 1 | 0 | 13 |
| 贡献者 | 讨论 | 代码提交 |
nschaindnschaind is a tool that detects if a certain DNS resolver is vulnerable to cache poisoning according to VU#800113 (the Dan Kaminsky bug). This report covers weaknesses in BIND 9, BIND 8 and MS Windows DNS Server. This tool tests only the BIND weaknesses, which are described in VU#252735 and VU#927905 (discovered by Amit Klein).
The value of nschaind over other tools, is that nschaind does not require one to have direct access to the resolver being tested. The resolver must be tricked though into querying the tool, which can be accomplished in many ways.
BackgroundIt comes down to this: bind versions up to 9.4.1 use a fixed source port for queries. This source port is determined at startup. Furthermore, they employ a bad PRNG for query IDs. This leads to predictability of the next query ID. One can exploit these two vulnerabilities together to send a resolver false DNS information, since all of the packet can be constructed and sent before a real server could: cache poisoning.
In order to be vulnerable, a server would have a) the same source port for multiple requests and b)have predictable query IDs. To detect this, I followed the path Amit Klein described in his path: CNAME chaining. The tool acts as a DNS server. When a resolver sends a request for an A or MX record, it answers with a CNAME record within the domain, triggering another query from the resolver. And then, it does that again and again, up to 10 times. In these 10 times, the tool can determine if the source port was the same all the time, and if any of the IDs was predictable. Only when a query ID is even can the tool predict a range of 10 possible next query IDs (again, Amit Klein's approach).
StatusAs of release 0.3, nschaind detects vulnerable BIND 8 and BIND 9 servers.
UsageIn order to use nschaind to test a resolver, one should first startup the nschaind daemon. Then, the resolver in question should be triggered to perform a request to the nschaind server. An easy way to do so is to create a subdomain for which the nschaind server becomes the NS.
Known issuesBIND 8 doesn't like to receive too many chained CNAME responses. In some cases, when prediction cannot be done after sending 8 responses, the resolver will stop querying and no results will be found. This is a rare condition which can be solved by trying again.
This tool is further discussed at drainbamage.nl and in the README file included with release.
标签:
