这可能是一个理论问题,但如果我要请求以下url:
https://example.com?username=username&password=password
用户名和密码是否存储在DNS服务器导致一个问题,如果DNS服务器被攻陷?
发送数据之前是否创build了握手和安全隧道?
当您尝试连接到https://example.com/?username=username&password=password ,只有example.com通过DNSparsing(没有其他内容发送到DNS服务器)。
之后(因为它是http s ),将与服务器(密钥交换等)进行SSL握手,并且仅在那之后,请求(例如, GET /?username=username&password=password )将通过encryption频道。
DNS查找发生在HTTPS连接之前,但只查找域。 在你的例子中,所有的DNS服务器都知道有人在查找example.com的地址。 它甚至不知道涉及浏览器。
encryption连接确实是在任何数据发送之前创build的; 这包括Host: HTTP头,告诉服务器URL的域部分。 这一点很重要,因为许多网站都可以在一个IP地址上显示,并且在SSL协商发生之前,Web服务器无法知道请求了哪个网站。 现代浏览器实现了SNI ,它在encryption连接之外发送域名(只有域名)。
您自己的答案中包含的引用几乎是正确的:攻击者可以看到远端的IP地址,但除非正在使用SNI,否则不能确定域名。
在HTTP Secure发布后,find了我正在寻找的答案。
Everything in the HTTPS message is encrypted, including the headers, and the request/response load. With the exception of the possible CCA cryptographic attack described in the limitations section below, the attacker can only know the fact that a connection is taking place between the two parties, already known to him, the domain name and IP addresses.