如果您使用 HTTPS,您的 URL 参数将不会被嗅探吗?

发布于 2024-07-22 19:25:38 字数 194 浏览 4 评论 0原文

假设我设置了一个简单的 php Web 服务器,其中包含一个可以通过 HTTPS 访问的页面。 该 URL 具有简单的参数,例如 https://www.example.com/test?abc=123

在这种情况下,这里的参数对于嗅探数据包的人来说真的是安全的吗? 如果服务器不使用任何 SSL 证书,这会是真的吗?

Suppose I setup a simple php web server with a page that can be accessed by HTTPS. The URL has simple parameters, like https://www.example.com/test?abc=123.

Is it true that the parameter here in this case will be safe from people sniffing the packets? And would this be true if the server does not employ any SSL certificate?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

混浊又暗下来 2024-07-29 19:25:38

是的,您的 URL 不会被嗅探; 然而,一个很容易被忽视的漏洞是,如果您的页面引用了任何第三方资源,例如 Google Analytics、添加内容等,您的整个 URL 将被发送到引用来源中的第三方。 如果它确实敏感,则它不属于查询字符串。

至于问题的第二部分,如果服务器上没有证书,则无法使用 SSL。

Yes your URL would be safe from sniffing; however, one hole that is easily overlooken is if your page references any third party resources such as Google Analytics, Add Content anything, your entire URL will be sent to the third party in the referer. If its really sensitive it doesn't belong in the query string.

As for your second part of the question, you can't use SSL if you don't have a certificate on the server.

英雄似剑 2024-07-29 19:25:38

http://answers.google.com/answers/threadview/id/758002.html

HTTPS 建立底层 SSL
在任何 HTTP 数据之前连接
转入。 这确保了所有 URL
数据(主机名除外,
这是用来建立
连接)仅在内部进行
这个加密连接,并且是
免受中间人攻击
攻击方式与任何 HTTPS 相同
数据是。

一个内的所有 HTTP 级别事务
HTTPS 连接在
已建立的 SSL 会话,并且没有
查询数据在之前传输
安全连接已建立。

从外部来看,唯一的数据是
世界可见的是主机名
以及您要连接的端口。
其他一切都只是一个流
使用加密的二进制数据
私钥仅在你们之间共享
和服务器。

在示例中,您提供了您的
浏览器会这样做:

  1. 推导
    主机名(和端口,如果存在)
    来自网址。
  2. 连接到主机。
  3. 检查证书(必须“签名”
    由已知权威机构专门应用
    更正IP地址和端口,并
    当前的)。
  4. 浏览器和服务器
    交换加密数据和
    浏览器收到私钥。

  5. 发出 HTTP 请求并加密
    建立了密码学。
  6. 收到 HTTP 响应。 还加密了。

HTTP 是一个“应用层”
协议。 它承载在
安全层。 根据 SSL
规范,由 Netscape 制定,
它规定没有应用程序层
数据可以被传输,直到安全
连接已建立 - 作为
以下段落概述:

“此时,更改密码规范
消息由客户端发送,并且
客户端复制待处理的密码规范
进入当前的密码规范。 这
然后客户端立即发送
新下留言完毕
算法、密钥和秘密。 在
响应,服务器将发送自己的响应
更改密码规范消息,传输
待处理的当前密码
规范,并发送其完成的消息
根据新的密码规范。 在这
点,握手完成并且
客户端和服务器可能会开始
交换应用层数据。”
http://wp.netscape.com/eng/ssl3/draft302.txt

所以是的。 URL中包含的数据
HTTPS 连接上的查询是
加密。 然而非常差
练习包括此类敏感的
数据作为“GET”中的密码
要求。 虽然不可能
被拦截,数据将被记录
在明文服务器日志中

接收HTTPS服务器,相当
可能也在浏览器历史记录中。 它
浏览器可能也可以使用
插件甚至可能是其他
客户端计算机上的应用程序。
至多 HTTPS URL 可以是
合理地允许包括
会话 ID 或类似的不可重复使用的
多变的。 它不应该包含
静态身份验证令牌。

HTTP连接概念最
这里解释得很清楚:
http://www.ourshop.com/resources/ssl_step1.html

http://answers.google.com/answers/threadview/id/758002.html

HTTPS Establishes an underlying SSL
connection before any HTTP data is
transferred. This ensures that all URL
data (with the exception of hostname,
which is used to establish the
connection) is carried solely within
this encrypted connection, and is
protected from man-in-the-middle
attacks in the same way that any HTTPS
data is.

All HTTP-level transactions within an
HTTPS connection are conducted within
the established SSL session, and no
query data is transferred before the
secure connection is established.

From the outside the only data that is
visible to the world is the hostname
and port you are connecting to.
Everything else is simply a stream of
binary data which is encrypted using a
private key shared only between you
and the server.

In the example you provide your
browser would do this:

  1. Derive
    hostname (and port if present)
    from URL.
  2. Connect to host.
  3. Check certificate (it must be 'signed'
    by a known authority, applied specifically
    to correct IP address and port, and be
    current).
  4. The browser and server
    exchange cryptographic data and the
    browser receives a private key.
  5. The
    HTTP request is made, and encrypted with
    established cryptography.
  6. HTTP response is received. Also encrypted.

HTTP is an 'Application Layer'
protocol. It is carried on top of the
secure layer. According to the SSL
specification, drawn up by Netscape,
it dictates that no application layer
data may be transmitted until a secure
connection is established - as
outlined in the following paragraph:

"At this point, a change cipher spec
message is sent by the client, and the
client copies the pending Cipher Spec
into the current Cipher Spec. The
client then immediately sends the
finished message under the new
algorithms, keys, and secrets. In
response, the server will send its own
change cipher spec message, transfer
the pending to the current Cipher
Spec, and send its finished message
under the new Cipher Spec. At this
point, the handshake is complete and
the client and server may begin to
exchange application layer data."
http://wp.netscape.com/eng/ssl3/draft302.txt

So yes. The data contained in the URL
query on an HTTPS connection is
encrypted
. However it is very poor
practice to include such sensitive
data as a password in a 'GET'
request. While it cannot be
intercepted, the data would be logged
in plaintext server logs
on the
receiving HTTPS server, and quite
possibly also in browser history. It
is probably also available to browser
plugins
and possibly even other
applications on the client computer.
At most a HTTPS URL could be
reasonably allowed to include a
session ID or similar non-reusable
variable. It should NEVER contain
static authentication tokens.

The HTTP connection concept is most
clearly explained here:
http://www.ourshop.com/resources/ssl_step1.html

眉黛浅 2024-07-29 19:25:38

url:s 将存储在服务器日志和浏览器历史记录中,因此即使它们不可嗅探,它们也远非安全。

The url:s will be stored both in the server logs and in the browser history so even if they aren't sniffable they are far from safe.

荒芜了季节 2024-07-29 19:25:38

在电线上,是的。 在端点(浏览器和服务器)不一定。 SSL/TLS 是传输层安全。 它将加密浏览器和服务器之间的流量。 可以在浏览器端查看数据(例如 BHO)。 一旦它到达服务器端,它当然可供接收者使用,并且只有他对待它的安全性。 如果数据需要安全地超越初始交换并防止客户端窥探,您还应该查看 消息层安全

On the wire, yes. At the end points (browser and server) not necessarily. SSL/TLS is transport layer security. It will encrypt your traffic between the browser and the server. It is possible on the browser-side to peek at the data (a BHO for example). Once it reaches the server-side, it is available to the recipient of course and is only as secure as he treats it. If the data needs to move securely beyond the initial exchange and protected from prying eyes on the client, you should also look at message layer security.

一梦等七年七年为一梦 2024-07-29 19:25:38

取决于您所说的安全的含义

SSL 会加密整个 HTTP 请求/响应,因此 GET 部分中的 URL 将被加密。 这并不能阻止 MITM 攻击和 SSL 会话本身完整性的破坏。 如果使用非权威证书,这会使潜在的攻击媒介变得更简单。

REST 请求标头是否通过 SSL 加密?

是一个类似的问题。

depends on what you mean by safe

SSL encrypts the entire HTTP request/response, so the URL in the GET portion will be encrypted. This does not stop MITM attacks and corruption of the integrity of the SSL session itself. If a non-authoritative certificate is used, this makes potential attack vectors simpler.

Are REST request headers encrypted by SSL?

Is a similar question.

七七 2024-07-29 19:25:38

请求的 URI (/test?abc=123) 作为 HTTP 请求标头的一部分发送到 Web 服务器,并因此被加密。

然而,URL 可能会通过其他方式泄露,通常是网络浏览器工具栏、书签以及向朋友发送链接。 根据您发送的数据的上下文/敏感性,发布数据可能更合适。

我相信 HTTPS 连接需要 SSL 证书,如果您不想购买的话,甚至需要一个自行生成的证书。

希望有点帮助!

The requested URI (/test?abc=123) is sent to the web server as part of the HTTP request header and thus encrypted.

However URLs can leak in other ways, usually web browser toolbars, bookmarks, and sending links to friends. POSTing data may be more appropriate depending on the context/sensitivity of the data you're sending.

I believe an HTTPS connection requires an SSL certificate, even a self-generated one if you don't want to buy one.

Hope that helps a bit!

辞取 2024-07-29 19:25:38

SSL/TSL 是一种传输层安全性,是的,可以使用 BHO(如 @JP 所写)或任何附加组件来选取数据,但也可以使用“浏览器外”HTTP 嗅探器来选取数据。 他们读取winsock32 和应用程序之间的消息传递。 加密发生在winsock32 中,而不是在浏览器中。

看一下(这部分摘自IEinspector的页面):
IEInspector HTTP 分析器是一个非常方便的工具,它允许您监视、跟踪、调试和分析 HTTP/实时HTTPS流量。

The SSL/TSL is a Transport Layer Security, yes the data can be picked with BHO (as @JP wrote) or any add on but also with "out of browser" HTTP sniffers. They read messaging between winsock32 and the application. The encryption takes place in the winsock32 not in the browser.

Take a look (this part was taked from the page of IEinspector):
IEInspector HTTP Analyzer is such a handy tool that allows you to monitor, trace, debug and analyze HTTP/HTTPS traffic in real-time.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文