問合せ $random.foo.com 応答 Answer: なし Authority section: $RANDOMwww.foo.com IN NS www.foo.com Additional section: www.foo.com IN A 6.6.6.6
Unauthenticated RRs received and cached from the least trustworthy of those groupings, that is data from the additional data section, and data from the authority section of a non-authoritative answer, should not be cached in such a way that they would ever be returned as answers to a received query. They may be returned as additional information where appropriate. Ignoring this would allow the trustworthiness of relatively untrustworthy data to be increased without cause or excuse.
問合せ $RANDOM.www.example.com IN A 応答 Authority Section: www.example.com IN NS ns1.attacker.com
NS を持たないノード(サブドメイン名)、あるいはゾーンの世代間同居などにより直接検索される機会の少ないゾーンが、偽の委任情報を毒入れされる脆弱性を持つ。
問合せ $RANDOM.www.example.jp. IN A 本物の応答 否定応答 (SOA) 偽応答 Authority Section: www.example.jp. IN NS ns.poison.nom.
問合せ $RANDOM.ac.jp. IN A 本物の応答 否定応答 (SOA) 偽応答 Authority Section: ac.jp. IN NS ns.poison.nom.
kr 86400 NS b.dns.kr. kr 86400 NS c.dns.kr. kr 86400 NS d.dns.kr. kr 86400 NS e.dns.kr. kr 86400 NS f.dns.kr. kr 86400 NS g.dns.kr. dns.kr 86400 NS b.dns.kr. dns.kr 86400 NS c.dns.kr. dns.kr 86400 NS d.dns.kr. dns.kr 86400 NS e.dns.kr. dns.kr 86400 NS f.dns.kr. dns.kr 86400 NS g.dns.kr.
問合せ $RANDOM.dns.kr. IN A 本物の応答 否定応答 (SOA) 偽応答 Authority Section: dns.kr. IN NS ns.poison.nom.
jp. 86400 SOA z.dns.jp. root.dns.jp. 1445177703 3600 900 1814400 900 jp. 86400 NS a.dns.jp. jp. 86400 NS b.dns.jp. jp. 86400 NS c.dns.jp. jp. 86400 NS d.dns.jp. jp. 86400 NS e.dns.jp. jp. 86400 NS f.dns.jp. jp. 86400 NS g.dns.jp. dns.jp. 86400 SOA z.dns.jp. root.dns.jp. 2015011801 3600 900 1814400 86400 dns.jp. 86400 IN NS nsa.dns.jp. dns.jp. 86400 IN NS nsb.dns.jp. dns.jp. 86400 IN NS nsd.dns.jp. dns.jp. 86400 IN NS nse.dns.jp. dns.jp. 86400 IN NS nsf.dns.jp. dns.jp. 86400 IN NS nsg.dns.jp.(2015011801?)
The challenge for the server is to determine which of the data sets is correct, if one is, and retain that, while ignoring the other. Note that if a server receives an answer containing an RRSet that is identical to that in its cache, with the possible exception of the TTL value, it may, optionally, update the TTL in its cache with the TTL of the received answer. It should do this if the received answer would be considered more authoritative (as discussed in the next section) than the previously cached answer.
RFC2181 5.4.1. Ranking data Trustworthiness shall be, in order from most to least: + Data from a primary zone file, other than glue data, + Data from a zone transfer, other than glue, + The authoritative data included in the answer section of an authoritative reply. + Data from the authority section of an authoritative answer, + Glue from a primary zone, or glue from a zone transfer, + Data from the answer section of a non-authoritative answer, and non-authoritative data from the answer section of authoritative answers, + Additional information from an authoritative answer, Data from the authority section of a non-authoritative answer, Additional information from non-authoritative answers.
権威サーバからの NS は委任元からの NS に優先する
以上より RFC2181 に準拠した実装では以下のような攻撃が可能となる。
問合せ $RANDOM.jp. IN A 本物の応答 NXDOMAIN (SOA) 偽応答 AA flag: 1 Answer Section: $RANDOM.jp. IN A 192.0.2.1 Authority Section: jp. IN NS ns.poison.nom.
問合せ $RANDOM.jp. IN A 本物の応答 NXDOMAIN (SOA) 偽応答 AA flag: 1 Answer Section: $RANDOM.jp. IN A 192.0.2.1 Authority Section: jp. IN NS ns.poison.nom.
問合せ $RANDOM. IN A 本物の応答 NXDOMAIN (SOA) 偽応答 AA flag: 1 Answer Section: $RANDOM. IN A 192.0.2.1 Authority Section: . IN NS ns.poison.nom.
問い合わせ $random.root-servers.net. IN A 本物の応答 NXDOMAIN (SOA) 偽応答 AA flag: 1 Answer Section: $random.root-servers.net. IN A 192.0.2.1 Authority Section: root-servers.net. IN NS ns.poison.nom.
; Auth Authority . 1111 NS [a-m].root-servers.net. ; Auth Authority root-servers.net. 86383 NS ns.poison.nom. (偽権威)root-servers.net. 2222 NS [a-m].root-servers.net.(↑上書きされる) ; glue [a-m].root-servers.net. 2222 A 192.0.2.1
Note that the answer section of an authoritative answer normally contains only authoritative data. However when the name sought is an alias (see section 10.1.1) only the record describing that alias is necessarily authoritative. Clients should assume that other records may have come from the server's cache. Where authoritative answers are required, the client should query again, using the canonical name associated with the alias.
問い合わせ $random.example.jp. IN A 本物の応答 NXDOMAIN (SOA) 偽応答 AA flag: 1 Answer Section: $random.example.jp. IN CNAME www.example.jp. Answer Section: www.example.jp. IN A 192.0.2.1
Easiest, most powerful attack: Can ignore signatures. Suppose an attacker forges a DNS packet from .org, including exactly the same DNSSEC signatures but changing the NS+A records to point to the attacker’s servers. Fact: DNSSEC “verification” won’t notice the change. The signatures say nothing about the NS+A records. The forgery will be accepted.