views:

86

answers:

3

Say I was trying to access https://www.secretplace.com/really/really/secret.php, what's actually sent in plain text before the SSL session is established?

Does the browser intervene, see that I want https, initiate a SSL session with secretplace.com (i.e. without passing the path in plain text) and only after the SSL session is set up pass the path?

Just curious.

+2  A: 

HTTP Secure

The level of protection depends on the correctness of the implementation of the web browser and the server software and the actual cryptographic algorithms supported.

Also, HTTPS is vulnerable when applied to publicly-available static content. The entire site can be indexed using a web crawler, and the URI of the encrypted resource can be inferred by knowing only the intercepted request/response size. This allows an attacker to have access to the plaintext (the publicly-available static content), and the encrypted text (the encrypted version of the static content), permitting a cryptographic attack.

Because SSL operates below HTTP and has no knowledge of higher-level protocols, SSL servers can only strictly present one certificate for a particular IP/port combination. This means that, in most cases, it is not feasible to use name-based virtual hosting with HTTPS. A solution called Server Name Indication (SNI) exists which sends the hostname to the server before encrypting the connection, although many older browsers don't support this extension. Support for SNI is available since Firefox 2, Opera 8, and Internet Explorer 7 on Windows Vista.

abmv
A: 

The request is made by your browser to https://url:443, and that's in the clear. Then the server and client will negotiate a ciphersuite to protect the data. Normally, this will include a symmetric encryption algorithm (eg; 3DES or RC4 or AES) and a message authentication code (such as HMAC-SHA1) to detect tampering. Note that technically, both of these are optional, it IS possible to have SSL with no encryption but unlikely today.

Once the client (your browser) and the web server have agreed on a ciphersuite and keys are determined, the rest of the conversation is protected.

To be honest, I would hook up a protocol analyzer and watch it all unfold before your eyes!!

Remember, that SSL is at the Transport layer of the TCP/IP stack, it's below the browser data, so it's all protected.

Hope that helps.

Michael Howard-MSFT
Where you say `url` in `https://url:443` above I believe `domain-or-ip` would be a better description. The domain name is not "in the clear" in the SSL connection, but would be likely be through a separate DNS lookup. The ip address of the server you are connecting to definitely is visible.
awatts
Note that if you do specify a raw IP in the 'url', the client application will not be able to verify that you are connecting to the right (i.e. non-evil) server. This is because the server proves it's identity with a certificate issued for some set of DNS domain names, not IP addresses.
Marsh Ray
+2  A: 

In general, the name of the server you are talking to is leaked ("stackoverflow.com"). This was probably leaked via DNS before SSL/TLS could begin connecting, though.

The server's certificate is leaked. Any client certificate you sent (not a common configuration) may or may not have been sent in-the-clear. An active attacker (man-in-the-middle) could probably just ask your browser for it and receive it anyway.

The path portion of the URL ("/questions/2146863/how-much-data-is-leaked-from-ssl-connection") should NOT be leaked. It is passed encrypted and secure (assuming the client and server are set up correctly and you didn't click-through any certificate errors).

The other poster is correct, that there are possible traffic analysis attacks which may be able to deduce some things about static content. If the site is very large and dynamic (say stackoverflow.com) I suspect that it could be quite difficult to get much useful info out of it. However, if there are only a few files with distinctive sizes, which downloads could be obvious.

Form POST data should NOT be leaked. Although usual caveats apply if you are transmitting objects of known sizes.

Timing attacks may reveal some information. For example, an attacker ccould put stress on various parts of the application (e.g., a certain database table) or pre-load some static files from the disk and watch how your connection slows down or speeds up in response.

This is an information "leak" but probably not a big deal for most sites.

Marsh Ray