DNS/毒盛/キャッシュ上書き/NS変更毒/デモ2について、ここに記述してください。 <> BINDリゾルバーでは、キャッシュにあるAA flag Answer SectionのNSが上書きされてしまうデモです。 (結論) BINDは毒盛しやすい。 == 前提確認 == キャッシュにあることを確認する。 {{{ $ dig f.flip.e-ontap.com @127.0.0.1 ; <<>> DiG 9.12.3 <<>> f.flip.e-ontap.com @127.0.0.1 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6441 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1220 ; COOKIE: 5533a5c44408662f7b97a1305c22d84177351090fff02b6e (good) ;; QUESTION SECTION: ;f.flip.e-ontap.com. IN A ;; ANSWER SECTION: f.flip.e-ontap.com. 60 IN A 150.42.6.1 ;; Query time: 11 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: 水 12月 26 10:24:17 JST 2018 ;; MSG SIZE rcvd: 91 }}} {{{ tmaeno@u16:~$ dig +norec -t ns flip.e-ontap.com @127.0.0.1 ; <<>> DiG 9.12.3 <<>> +norec -t ns flip.e-ontap.com @127.0.0.1 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24262 ;; flags: qr ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 2 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1220 ; COOKIE: f806034e71c02a2d331a9ae25c22d84fb57fbf4f5355ab81 (good) ;; QUESTION SECTION: ;flip.e-ontap.com. IN NS ;; ANSWER SECTION: flip.e-ontap.com. 3346 IN NS ns.flip.e-ontap.com. ;; ADDITIONAL SECTION: ns.flip.e-ontap.com. 370 IN A 150.42.6.1 ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: 水 12月 26 10:24:31 JST 2018 ;; MSG SIZE rcvd: 106 }}} == テスト == 時刻に注意: ;; WHEN: 水 12月 26 10:25:36 JST 2018 {{{ tmaeno@u16:~$ dig g.flip.e-ontap.com @127.0.0.1 ; <<>> DiG 9.12.3 <<>> g.flip.e-ontap.com @127.0.0.1 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45604 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1220 ; COOKIE: 8ffee66abfd69ae1ef887ca45c22d8906c5a0c23f630af7b (good) ;; QUESTION SECTION: ;g.flip.e-ontap.com. IN A ;; ANSWER SECTION: g.flip.e-ontap.com. 60 IN A 150.42.6.1 ;; Query time: 11 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: 水 12月 26 10:25:36 JST 2018 ;; MSG SIZE rcvd: 91 }}} == どうかな == {{{ tmaeno@u16:~$ dig +norec -t ns flip.e-ontap.com @127.0.0.1 ; <<>> DiG 9.12.3 <<>> +norec -t ns flip.e-ontap.com @127.0.0.1 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9682 ;; flags: qr ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 2 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1220 ; COOKIE: ad9b1a93d89f0a9ba54faf195c22d89571e1ad973a9fe0cc (good) ;; QUESTION SECTION: ;flip.e-ontap.com. IN NS ;; ANSWER SECTION: flip.e-ontap.com. 3276 IN NS ns.flip.internot.jp. ;; ADDITIONAL SECTION: ns.flip.internot.jp. 81695 IN A 150.42.6.5 ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: 水 12月 26 10:25:41 JST 2018 ;; MSG SIZE rcvd: 122 }}} 毒がはいっています。 {{{ $ dig h.flip.e-ontap.com @127.0.0.1 ; <<>> DiG 9.12.3 <<>> h.flip.e-ontap.com @127.0.0.1 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 51456 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1220 ; COOKIE: c71e4949401ae028e211980b5c22d992026eb42db0af0fa1 (good) ;; QUESTION SECTION: ;h.flip.e-ontap.com. IN A ;; ANSWER SECTION: h.flip.e-ontap.com. 60 IN A 150.42.6.5 ;; Query time: 12 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: 水 12月 26 10:29:54 JST 2018 ;; MSG SIZE rcvd: 91 }}}