Articles
|
|
Ahmeket
Jul 29 2005, 08:09 PM
I've been pondering a thing and it's the security one is granted when using a proxy in the following way:
Me -> Proxy -> Server(only accept SSL)
Now it's quite obvious that the Proxy -> server needs to talk with SSL, but how exactly does it work? Is my connection to the proxy secure too, or am I sending in plaintext to the Proxy and only the last part is through SSL.
For example using a proxy server to connect to an IRC-server that supports SSL, is the stuff sent to the proxy in plaintext and easily viewable by the proxy owner?
click
Jul 29 2005, 08:54 PM
Actually, your question is a lot more complicated then you think. Firstly, you need to identify how your proxy works.
For example, the MS ISA Proxy service supports only HTTP connections. When initiating an SSL session, the proxy will first begin the session for both the client and the server, but then will establish a direct-connection tunnel. Oppositely, when working with a SOCKS proxy, the session is already being tunneled, and therefore is not filtered at all.
When working with IRC, you session is already tunneled through the proxy, so the SSL just acts as a tunnel inside a tunnel. For more information on this, check out: h**p://www.mirc.co.uk/ssl.html
Really, your question needs to be narrowed down a lot more to be answered accurately: - What type of proxy is this? - What is your relation (network proximity) to the proxy? - What service(s) are you trying to tunnel? - Are you using chaining?
Eventually, anything can be done. Hope this helped!
Ahmeket
Jul 30 2005, 01:33 AM
I'm not really into the whole proxy thing, so I'm sorry for being a bit unclear. What I'm interested in is if I connect to an SSL IRC server through a proxy (HTTP) will the proxy be able to intercept what I type without needing to unencrypt it.
Basicly I've two theories. 1. SSL to the proxy, proxy SSL to the server, so the proxy really sees what you type in plain text. 2. SSL straight to server in some weird way through the proxy, even if the proxy sniffs you it won't understand anything because it's crypted.
stay
Jul 30 2005, 02:05 PM
a proxy normally only redirects traffic, maybe it modifies some headers, but that's all. encryption is done by your browser/irc program. therefore it also has the ssl dlls!
what should be possible, is to trick out local proxys which redirect your traffic encrypted to a remote proxy (whererom it's then normally send to the target, except you use a ssl connection), e.g. the TOR project. browser - local proxy - local tor (ssl) - remote proxy (ssl till here) - target (only ssl if website or whatever uses ssl) so here you could sniff at the local proxy (except you visit e.g. a ssl site or the program itself somehow crypts the traffic). but somehow i didn't get it to sniff local traffic (local to local), somebody can help me with this? also i didn't find a good local proxy server where i can enter another proxy for redirection (the TOR proxy), with socksyfing it gets complex, especially if the first part (browser) doesn't support socks/proxy...
Ahmeket
Jul 30 2005, 02:48 PM
So basicly you're saying that under normal circumstances the proxy only redirects the traffic and won't be able to read the encrypted messages.
ceder
Jul 30 2005, 03:32 PM
QUOTE So basicly you're saying that under normal circumstances the proxy only redirects the traffic and won't be able to read the encrypted messages. Several weeks ago, I tried to sniff my connection on my proxy ( socks 5 ). I was connected to an IRC server with SSL and all I saw was crypted.
assom
Aug 2 2005, 05:26 PM
We r using the Bluecoat Proxy here. the only way to make ssl connection is to tunnel them hrough port 443. but we r promised to get an ssl termination in the comming software release. so the connection will be terminated in the proxy and then reinitilized to the ssl server outside. but still i dont think we will be able to decrypt it, cos now all i can c r small encrypted packets passing at port 443.
SSL Protocol V. 3.0QUOTE(http://wp.netscape.com/eng/ssl3/4-APPN.HTM#F) Appendix F F. Security analysis The SSL protocol is designed to establish a secure connection between a client and a server communicating over an insecure channel. This document makes several traditional assumptions, including that attackers have substantial computational resources and cannot obtain secret information from sources outside the protocol. Attackers are assumed to have the ability to capture, modify, delete, replay, and otherwise tamper with messages sent over the communication channel. This appendix outlines how SSL has been designed to resist a variety of attacks.
F.1 Handshake protocol The handshake protocol is responsible for selecting a CipherSpec and generating a MasterSecret, which together comprise the primary cryptographic parameters associated with a secure session. The handshake protocol can also optionally authenticate parties who have certificates signed by a trusted certificate authority.
F.1.1 Authentication and key exchange SSL supports three authentication modes: authentication of both parties, server authentication with an unauthenticated client, and total anonymity. Whenever the server is authenticated, the channel should be secure against man-in-the-middle attacks, but completely anonymous sessions are inherently vulnerable to such attacks. Anonymous servers cannot authenticate clients, since the client signature in the certificate verify message may require a server certificate to bind the signature to a particular server.
If the server is authenticated, its certificate message must provide a valid certificate chain leading to an acceptable certificate authority. Similarly, authenticated clients must supply an acceptable certificate to the server. Each party is responsible for verifying that the other's certificate is valid and has not expired or been revoked.
The general goal of the key exchange process is to create a pre_master_secret known to the communicating parties and not to attackers. The pre_master_secret will be used to generate the master_secret (see Section 8.1). The master_secret is required to generate the finished messages, encryption keys, and MAC secrets (see Sections 7.6.9 and 8.2.2). By sending a correct finished message, parties thus prove that they know the correct pre_master_secret.
F.1.1.1 Anonymous key exchange Completely anonymous sessions can be established using RSA, Diffie-Hellman, or Fortezza for key exchange.
With anonymous RSA, the client encrypts a pre_master_secret with the server's uncertified public key extracted from the server key exchange message. The result is sent in a client key exchange message. Since eavesdroppers do not know the server's private key, it will be infeasible for them to decode the pre_master_secret.
With Diffie-Hellman or Fortezza, the server's public parameters are contained in the server key exchange message and the client's are sent in the client key exchange message. Eavesdroppers who do not know the private values should not be able to find the Diffie-Hellman result (i.e. the pre_master_secret) or the Fortezza token encryption key (TEK).
Warning: Completely anonymous connections only provide protection against passive eavesdropping. Unless an independent tamper-proof channel is used to verify that the finished messages were not replaced by an attacker, server authentication is required in environments where active man-in-the-middle attacks are a concern.
F.1.1.2 RSA key exchange and authentication With RSA, key exchange and server authentication are combined. The public key may be either contained in the server's certificate or may be a temporary RSA key sent in a server key exchange message. When temporary RSA keys are used, they are signed by the server's RSA or DSS certificate. The signature includes the current ClientHello.random, so old signatures and temporary keys cannot be replayed. Servers may use a single temporary RSA key for multiple negotiation sessions.
Note:The temporary RSA key option is useful if servers need large certificates but must comply with government-imposed size limits on keys used for key exchange.
After verifying the server's certificate, the client encrypts a pre_master_secret with the server's public key. By successfully decoding the pre_master_secret and producing a correct finished message, the server demonstrates that it knows the private key corresponding to the server certificate.
When RSA is used for key exchange, clients are authenticated using the certificate verify message (see Section 7.6.8). The client signs a value derived from the master_secret and all preceding handshake messages. These handshake messages include the server certificate, which binds the signature to the server, and ServerHello.random, which binds the signature to the current handshake process.
F.1.1.3 Diffie-Hellman key exchange with authentication When Diffie-Hellman key exchange is used, the server can either supply a certificate containing fixed Diffie-Hellman parameters or can use the client key exchange message to send a set of temporary Diffie-Hellman parameters signed with a DSS or RSA certificate. Temporary parameters are hashed with the hello.random values before signing to ensure that attackers do not replay old parameters. In either case, the client can verify the certificate or signature to ensure that the parameters belong to the server.
If the client has a certificate containing fixed Diffie-Hellman parameters, its certificate contains the information required to complete the key exchange. Note that in this case the client and server will generate the same Diffie-Hellman result (i.e., pre_master_secret)every time they communicate. To prevent the pre_master_secret from staying in memory any longer than necessary, it should be converted into the master_secret as soon as possible. Client Diffie-Hellman parameters must be compatible with those supplied by the server for the key exchange to work.
If the client has a standard DSS or RSA certificate or is unauthenticated, it sends a set of temporary parameters to the server in the client key exchange message, then optionally uses a certificate verify message to authenticate itself.
F.1.1.4 Fortezza Fortezza's design is classified, but at the protocol level it is similar to Diffie-Hellman with fixed public values contained in certificates. The result of the key exchange process is the token encryption key (TEK), which is used to wrap data encryption keys, client write key, server write key, and master secret encryption key. The data encryption keys are not derived from the pre_master_secret because unwrapped keys are not accessible outside the token. The encrypted pre_master_secret is sent to the server in a client key exchange message.
F.1.2 Version rollback attacks Because SSL Version 3.0 includes substantial improvements over SSL Version 2.0, attackers may try to make Version 3.0-capable clients and servers fall back to Version 2.0. This attack is occurring if (and only if) two Version 3.0-capable parties use an SSL 2.0 handshake.
Although the solution using non-random PKCS #1 block type 2 message padding is inelegant, it provides a reasonably secure way for Version 3.0 servers to detect the attack. This solution is not secure against attackers who can brute force the key and substitute a new ENCRYPTED-KEY-DATA message containing the same key (but with normal padding) before the application specified wait threshold has expired. Parties concerned about attacks of this scale should not be using 40-bit encryption keys anyway. Altering the padding of the least-significant 8 bytes of the PKCS padding does not impact security, since this is essentially equivalent to increasing the input block size by 8 bytes.
F.1.3 Detecting attacks against the handshake protocol An attacker might try to influence the handshake exchange to make the parties select different encryption algorithms than they would normally choose. Because many implementations will support 40-bit exportable encryption and some may even support null encryption or MAC algorithms, this attack is of particular concern.
For this attack, an attacker must actively change one or more handshake messages. If this occurs, the client and server will compute different values for the handshake message hashes. As a result, the parties will not accept each others' finished messages. Without the master_secret, the attacker cannot repair the finished messages, so the attack will be discovered.
F.1.4 Resuming sessions When a connection is established by resuming a session, new ClientHello.random and ServerHello.random values are hashed with the session's master_secret. Provided that the master_secret has not been compromised and that the secure hash operations used to produce the encryption keys and MAC secrets are secure, the connection should be secure and effectively independent from previous connections. Attackers cannot use known encryption keys or MAC secrets to compromise the master_secret without breaking the secure hash operations (which use both SHA and MD5).
Sessions cannot be resumed unless both the client and server agree. If either party suspects that the session may have been compromised, or that certificates may have expired or been revoked, it should force a full handshake. An upper limit of 24 hours is suggested for session ID lifetimes, since an attacker who obtains a master_secret may be able to impersonate the compromised party until the corresponding session ID is retired. Applications that may be run in relatively insecure environments should not write session IDs to stable storage. F.1.5 MD5 and SHA SSL uses hash functions very conservatively. Where possible, both MD5 and SHA are used in tandem to ensure that non-catastrophic flaws in one algorithm will not break the overall protocol. F.2 Protecting application data The master_secret is hashed with the ClientHello.random and ServerHello.random to produce unique data encryption keys and MAC secrets for each connection. Fortezza encryption keys are generated by the token, and are not derived from the master_secret.
Outgoing data is protected with a MAC before transmission. To prevent message replay or modification attacks, the MAC is computed from the MAC secret, the sequence number, the message length, the message contents, and two fixed character strings. The message type field is necessary to ensure that messages intended for one SSL Record Layer client are not redirected to another. The sequence number ensures that attempts to delete or reorder messages will be detected. Since sequence numbers are 64-bits long, they should never overflow. Messages from one party cannot be inserted into the other's output, since they use independent MAC secrets. Similarly, the server-write and client-write keys are independent so stream cipher keys are used only once.
If an attacker does break an encryption key, all messages encrypted with it can be read. Similarly, compromise of a MAC key can make message modification attacks possible. Because MACs are also encrypted, message-alteration attacks generally require breaking the encryption algorithm as well as the MAC.
Note: MAC secrets may be larger than encryption keys, so messages can remain tamper resistant even if encryption keys are broken.
F.3 Final notes For SSL to be able to provide a secure connection, both the client and server systems, keys, and applications must be secure. In addition, the implementation must be free of security errors.
The system is only as strong as the weakest key exchange and authentication algorithm supported, and only trustworthy cryptographic functions should be used. Short public keys, 40-bit bulk encryption keys, and anonymous servers should be used with great caution. Implementations and users must be careful when deciding which certificates and certificate authorities are acceptable; a dishonest certificate authority can do tremendous damage.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
|
|