scapy icon indicating copy to clipboard operation
scapy copied to clipboard

Custom array of Extension

Open vovabush opened this issue 3 years ago • 0 comments

Brief description

Can't send my array of Extension in Client Hello packet SSL.

Scapy version

2.4.5rc1.dev245

Python version

3.10.4

Operating system

Windows 10

Additional environment information

No response

How to reproduce

  1. Install Tomcat>9.0.50 and setup sslProtocol="TLS" in server.xml.
  2. Try to connect with server by python script.

Hello, I'm trying to send my extension in a hello client package. I do this with the following code:

from scapy.layers.tls.handshake import *
from scapy.layers.tls.automaton_cli import TLSClientAutomaton
from scapy.layers.tls.extensions import *
supported_groups = ["secp384r1", "x448"]
supported_groups.append("x25519")
ext1 = [
  TLS_Ext_ExtendedMasterSecret(len=0),
  TLS_Ext_SupportedVersion_CH(versions=["TLS 1.3"]),
  TLS_Ext_RenegotiationInfo(renegotiated_connection=0),
  TLS_Ext_SupportedGroups(groups=supported_groups)
  ]
a = TLS13ClientHello(ciphers=[0x1301, 0x1302, 0x1303, 0x1304, 0x1305, 0x1306], ext=ext1)
t = TLSClientAutomaton(server="192.168.252.132", dport=443, client_hello=a, version="tls13")
t.run()

But in Client Hello i saw this Extensions:

image

And in console output i saw "Missing TLS 1.3 EncryptedExtensions message!":

image

I already read this issue, but my server is Tomcat with sslProtocol="TLS" and when i try to connect with it in TLS v1.2 I get Handshake Error.

Question: How can I send my arrya of Extension?

Actual result

No response

Expected result

No response

Related resources

No response

vovabush avatar May 23 '22 09:05 vovabush