none
.NET client not accepting SSL3.0 during SSL handshake process RRS feed

  • Question

  • For my project purpose we have to send https request from .NET client by using HttpWebRequest. 
    Server side SSL3.0  has been selected. In our .NEt Client side TLS1.2 and SSL3.0 has been selected.
    During SSL handshake server sending ServerHello with SSL3.0. But our .NET Client side instead of accepting the SSL 3.0, it sends a "protocol_version"  alert message and close the connection. 

    So based on the result i suspects, .NET client closing the connection to avoid the Poodle(Version Rollback attack) vulnerability.
    But i am unable to find out the references to conclude the behaviour of my .NET client is correct or wrong. 
    Sunday, November 1, 2015 9:07 AM

Answers

  • Try install Fiddler and enable HTTPS decrypt to see.

    For me, when forcing IE to use TLS and let it visit a Win2008 VM with default configuration (TLS not turned on, SSLv3 only) the IE emits header and the server response by something that seems to be deformed data:

    Raw Request:

    CONNECT vm-123456:8888 HTTP/1.0
    User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
    Host: vm-123456:8888
    Content-Length: 0
    DNT: 1
    Connection: Keep-Alive
    Pragma: no-cache
    
    A SSLv3-compatible ClientHello handshake was found. Fiddler extracted the parameters below.
    
    Version: 3.3 (TLS/1.2)
    Random: 56 39 D0 96 DB 62 9B B4 66 30 58 E9 FA 52 4C 04 AA C3 43 CF 1E FD 1C A4 F6 C3 D6 7B EC 58 F2 CC
    "Time": 7/3/2050 9:16:06
    SessionID: empty
    Extensions: 
    	server_name	vm-123456
    	status_request	OCSP - Implicit Responder
    	elliptic_curves	secp256r1 [0x17], secp384r1 [0x18]
    	ec_point_formats	uncompressed [0x0]
    	signature_algs	sha512_rsa, sha512_ecdsa, sha256_rsa, sha384_rsa, sha1_rsa, sha256_ecdsa, sha384_ecdsa, sha1_ecdsa, sha1_dsa
    	renegotiation_info	00
    Ciphers: 
    	[C028]	TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
    	[C027]	TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
    	[C014]	TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA
    	[C013]	TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA
    	[009F]	TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
    	[009E]	TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
    	[009D]	TLS_RSA_WITH_AES_256_GCM_SHA384
    	[009C]	TLS_RSA_WITH_AES_128_GCM_SHA256
    	[003D]	TLS_RSA_WITH_AES_256_CBC_SHA256
    	[003C]	TLS_RSA_WITH_AES_128_CBC_SHA256
    	[0035]	TLS_RSA_AES_256_SHA
    	[002F]	TLS_RSA_AES_128_SHA
    	[C02C]	TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
    	[C02B]	TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
    	[C024]	TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
    	[C023]	TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
    	[C00A]	TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
    	[C009]	TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
    	[006A]	TLS_DHE_DSS_WITH_AES_256_CBC_SHA256
    	[0040]	TLS_DHE_DSS_WITH_AES_128_CBC_SHA256
    	[0038]	TLS_DHE_DSS_WITH_AES_256_SHA
    	[0032]	TLS_DHE_DSS_WITH_AES_128_SHA
    	[000A]	SSL_RSA_WITH_3DES_EDE_SHA
    	[0013]	SSL_DHE_DSS_WITH_3DES_EDE_SHA
    	[0005]	SSL_RSA_WITH_RC4_128_SHA
    	[0004]	SSL_RSA_WITH_RC4_128_MD5
    
    Compression: 
    	[00]	NO_COMPRESSION
    

    Response from Fiddler:

    HTTP/1.0 200 Connection Established
    FiddlerGateway: Direct
    StartTime: 17:32:06.537
    Connection: close
    
    fiddler.network.https> HTTPS handshake to vm-123456 (for #11) failed. System.IO.IOException The handshake failed due to an unexpected packet format.
    
    

    Wednesday, November 4, 2015 9:48 AM
    Answerer

All replies

  • Verraragavan,

    I don't see anything in your post that relates to customizing and programming Microsoft Project but that is the sole focus of this forum. I suggest you delete your post and start with the following:

    https://social.technet.microsoft.com/Forums/en-US/home?category=usingforums

    John

    Sunday, November 1, 2015 3:26 PM
  • John,

    I can't able to find the perfect "Forum Category and Forum" to ask the .NET related query. Could you please help me into this?

    Veeraragavan

    Monday, November 2, 2015 3:58 AM
  • What is your OS version and .NET runtime version?

    FYI, TLS 1.1 and 1.2 is only supported if your application runs .NETv4.5+ on Win7+.

    On the other hand, SSL3 should be fine on WinXP and .NETv2+.

    Now you'll need to tell us what did you do on "Server side SSL3.0  has been selected" step for us to tell you what might be missing.

    Monday, November 2, 2015 8:31 AM
    Answerer
  • cheong00,

    Actually we are using .NET4.5 and Windows7 in our client side. 

    Actually if you select TLS1.2 and TLS1.0 in the client side and TLS1.0 in the server side handshake happens properly and connection established successfully.

    At the same if you select TLS1.2 and SSL3.0 in the client side and SSL3.0 in the server side handshake is not happening.

    Veera.

    Monday, November 2, 2015 9:57 AM
  • You mean something like this one?

    Monday, November 2, 2015 10:47 AM
    Answerer
  • cheong00,

    I have referred the the link which you have shared. In that link server is closing the connection.

    But in our problem client is closing the connection forcefully.

    Additional Information:

    I have tried IE as client with same  TLS1.2 and SSL3.0 combinations and   SSL3.0 in the server side handshake happens properly and connection established successfully.

    Veera.

    Wednesday, November 4, 2015 6:38 AM
  • See if your problem is like this one then.

    Wednesday, November 4, 2015 7:32 AM
    Answerer
  • cheong00,

    Additional Information:

    Actually I have tried many SSL combinations.

    For Example : Select SSL3.0 in the .NET client side and SSL3.0 in the server side handshake happens properly.

    Only if you select TLS1.2 and SSL3.0 in the client side and SSL3.0 in the server side handshake is not happening.

    So It may not certificate related problem.

    Veera.

    Wednesday, November 4, 2015 9:04 AM
  • Try install Fiddler and enable HTTPS decrypt to see.

    For me, when forcing IE to use TLS and let it visit a Win2008 VM with default configuration (TLS not turned on, SSLv3 only) the IE emits header and the server response by something that seems to be deformed data:

    Raw Request:

    CONNECT vm-123456:8888 HTTP/1.0
    User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
    Host: vm-123456:8888
    Content-Length: 0
    DNT: 1
    Connection: Keep-Alive
    Pragma: no-cache
    
    A SSLv3-compatible ClientHello handshake was found. Fiddler extracted the parameters below.
    
    Version: 3.3 (TLS/1.2)
    Random: 56 39 D0 96 DB 62 9B B4 66 30 58 E9 FA 52 4C 04 AA C3 43 CF 1E FD 1C A4 F6 C3 D6 7B EC 58 F2 CC
    "Time": 7/3/2050 9:16:06
    SessionID: empty
    Extensions: 
    	server_name	vm-123456
    	status_request	OCSP - Implicit Responder
    	elliptic_curves	secp256r1 [0x17], secp384r1 [0x18]
    	ec_point_formats	uncompressed [0x0]
    	signature_algs	sha512_rsa, sha512_ecdsa, sha256_rsa, sha384_rsa, sha1_rsa, sha256_ecdsa, sha384_ecdsa, sha1_ecdsa, sha1_dsa
    	renegotiation_info	00
    Ciphers: 
    	[C028]	TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
    	[C027]	TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
    	[C014]	TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA
    	[C013]	TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA
    	[009F]	TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
    	[009E]	TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
    	[009D]	TLS_RSA_WITH_AES_256_GCM_SHA384
    	[009C]	TLS_RSA_WITH_AES_128_GCM_SHA256
    	[003D]	TLS_RSA_WITH_AES_256_CBC_SHA256
    	[003C]	TLS_RSA_WITH_AES_128_CBC_SHA256
    	[0035]	TLS_RSA_AES_256_SHA
    	[002F]	TLS_RSA_AES_128_SHA
    	[C02C]	TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
    	[C02B]	TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
    	[C024]	TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
    	[C023]	TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
    	[C00A]	TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
    	[C009]	TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
    	[006A]	TLS_DHE_DSS_WITH_AES_256_CBC_SHA256
    	[0040]	TLS_DHE_DSS_WITH_AES_128_CBC_SHA256
    	[0038]	TLS_DHE_DSS_WITH_AES_256_SHA
    	[0032]	TLS_DHE_DSS_WITH_AES_128_SHA
    	[000A]	SSL_RSA_WITH_3DES_EDE_SHA
    	[0013]	SSL_DHE_DSS_WITH_3DES_EDE_SHA
    	[0005]	SSL_RSA_WITH_RC4_128_SHA
    	[0004]	SSL_RSA_WITH_RC4_128_MD5
    
    Compression: 
    	[00]	NO_COMPRESSION
    

    Response from Fiddler:

    HTTP/1.0 200 Connection Established
    FiddlerGateway: Direct
    StartTime: 17:32:06.537
    Connection: close
    
    fiddler.network.https> HTTPS handshake to vm-123456 (for #11) failed. System.IO.IOException The handshake failed due to an unexpected packet format.
    
    

    Wednesday, November 4, 2015 9:48 AM
    Answerer
  • Thank you for your reply. Let me ask my question more clearly.

    We need to send https request from C# .NET client by using HttpWebRequest.

    For one of the scenarios of TLS/SSL combination, we do not get the expected result.

    .Net Client side:

    Selected protocols : TLS 1.2 and SSL 3.0

    Server side:

    Selected protocols: SSL 3.0

    Expected behaviour:

    Client sends "Client Hello" with TLS 1.2 version. Server sends "Server Hello" with SSL 3.0 version
    Client accept this SSL 3.0 version and the connection is established.


    Actual behaviour:

    Client sends "Client Hello" with TLS 1.2 version. Server sends "Server Hello" with SSL 3.0 version
    But our .NET Client side instead of accepting the SSL 3.0, it sends a "protocol_version"  alert message and close the connection.
    We have not disabled support for SSL3.0 protocol on windows7. But still, SSL 3.0 fallback from server is not accepted by .NET client. Can you explain what could be the reason.

    Code Snapshot

    1) .Net Client

         ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;

     2) Server

              Only SSL3.0

    Note:

    If both client and server have only SSL 3.0 selected, then connection is established.

    1) .Net Client

         ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;

    2) Server

             Only SSL3.0


    • Edited by Veeraragavan Wednesday, December 9, 2015 6:34 AM Additional Information included
    Monday, December 7, 2015 11:01 AM