TLS Decode Error in _process_non_handshake_message
During evaluation of your tool I found that it crashes when you scan the domain xing.com. I used the most recent code from gitlab in a dev environment (pip package has the same issue for me).
cryptolyze tls all xing.com
2023-12-14T07:31:47+0000 Analysis started; protocol="tls", analyzer="all"
2023-12-14T07:31:48+0000 Server offers protocol version TLS 1.2
2023-12-14T07:31:48+0000 Server offers cipher suite TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 (TLS 1.2)
2023-12-14T07:31:48+0000 Server offers cipher suite TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 (TLS 1.2)
2023-12-14T07:31:50+0000 Server offers RSA X.509 public key (with SNI)
2023-12-14T07:31:50+0000 Server offers elliptic-curve PRIME256V1
2023-12-14T07:31:50+0000 Server offers elliptic-curve SECP384R1
2023-12-14T07:31:50+0000 Server offers elliptic-curve SECP521R1
Traceback (most recent call last):
File "/usr/local/bin/cryptolyze", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.8/site-packages/cryptolyzer/__main__.py", line 106, in main
analyzer_result = protocol_handler.analyze(analyzer, target, arguments.socket_timeout)
File "/usr/local/lib/python3.8/site-packages/cryptolyzer/common/analyzer.py", line 114, in analyze
return analyzer.analyze(l7_client, *args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/cryptolyzer/tls/all.py", line 261, in analyze
results.update(self.get_sigalgos_result(analyzable, versions))
File "/usr/local/lib/python3.8/site-packages/cryptolyzer/tls/all.py", line 215, in get_sigalgos_result
return AnalyzerAll._get_result(AnalyzerSigAlgos, analyzable, protocol_version)
File "/usr/local/lib/python3.8/site-packages/cryptolyzer/tls/all.py", line 95, in _get_result
return {analyzer_name: analyzer_class().analyze(analyzable, protocol_version)}
File "/usr/local/lib/python3.8/site-packages/cryptolyzer/tls/sigalgos.py", line 95, in analyze
self._analyze_algorithms(analyzable, client_hello)
File "/usr/local/lib/python3.8/site-packages/cryptolyzer/tls/sigalgos.py", line 70, in _analyze_algorithms
raise e
File "/usr/local/lib/python3.8/site-packages/cryptolyzer/tls/sigalgos.py", line 58, in _analyze_algorithms
l7_client.do_tls_handshake(
File "/usr/local/lib/python3.8/site-packages/cryptolyzer/tls/client.py", line 598, in do_tls_handshake
return self._do_handshake(
File "/usr/local/lib/python3.8/site-packages/cryptolyzer/tls/client.py", line 578, in _do_handshake
l7_client.do_handshake(self, hello_message, record_version, last_handshake_message_type)
File "/usr/local/lib/python3.8/site-packages/cryptolyzer/tls/client.py", line 1444, in do_handshake
self._process_non_handshake_message(record.content_type, message, last_handshake_message_type)
File "/usr/local/lib/python3.8/site-packages/cryptolyzer/tls/client.py", line 1388, in _process_non_handshake_message
raise TlsAlert(message.description)
cryptolyzer.tls.exception.TlsAlert: TlsAlert(description=<TlsAlertDescription.DECODE_ERROR: 50>)
I also pulled the latest docker image and ran it that way, which results in the same error (just to make sure its not some problem isolated to my personal system).
Would be swell if you have a look at it and can confirm. Also happy to provide more version info on system components.
Edited by N H