最初在新闻组中被要求提供完整日志:https : //groups.google.com/forum/#!topic/ microsoft.public.windowsxp.general/ Ll32NWComwY
快照显示DNS答案是由伪造服务器真正返回的。
没有任何“事实”。如果您的ISP希望对DNS查询执行MITM(中间人)攻击,则很容易将查询重定向到另一个目标而不通知您(至少不仅仅基于回复的源IP地址) 。
这是概念证明。以下是局域网中主机的防火墙规则:
*nat
-A PREROUTING -p udp --dport 53 -m limit --limit 20/minute -j ACCEPT
-A PREROUTING -p udp --dport 53 -j DNAT --to-destination 192.168.1.1
-A POSTROUTING -p udp --dport 53 -j SNAT --to-source 192.168.1.110
COMMIT
这些规则基本上意味着,如果平均而言,如果存在多个以上的DNS查询,则将查询重定向到特定的主机(在这种情况下,它只是一个“正常”的DNS转发器/服务器,因为它本身不会伪造结果);否则,接受它(即“按原样”路由)。
最后一条规则导致答复首先被路由回它(通过伪装源本身),以便防火墙可以对原始来源的答复源(以及原始来源的答复目标)执行“反向NAT”源)。
这是当我在局域网中的另一台主机上以“中间人”主机作为不存在的DNS服务器的网关进行DNS查询时的结果:
[tom@archlinux ~]$ ssh 192.168.1.143
Last login: Fri Oct 25 14:32:11 2019 from 192.168.1.110
[tom@alarm ~]$ ip r get 200.100.200.100
200.100.200.100 via 192.168.1.110 dev eth0 src 192.168.1.143 uid 1000
cache
[tom@alarm ~]$ while true; do timeout 1 nslookup www.google.com 200.100.200.100; if [ $? -eq 0 ]; then sleep 5; else echo "timeout!"; fi; done
timeout!
timeout!
timeout!
timeout!
timeout!
timeout!
timeout!
Server: 200.100.200.100
Address: 200.100.200.100#53
Non-authoritative answer:
Name: www.google.com
Address: 172.217.26.132
Name: www.google.com
Address: 2404:6800:4005:805::2004
timeout!
timeout!
Server: 200.100.200.100
Address: 200.100.200.100#53
Non-authoritative answer:
Name: www.google.com
Address: 172.217.26.132
Name: www.google.com
Address: 2404:6800:4005:805::2004
timeout!
timeout!
timeout!
Server: 200.100.200.100
Address: 200.100.200.100#53
Non-authoritative answer:
Name: www.google.com
Address: 172.217.26.132
Name: www.google.com
Address: 2404:6800:4005:805::2004
^C
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句