CycleTLS icon indicating copy to clipboard operation
CycleTLS copied to clipboard

Customizable CipherSuites and Extensions

Open aj3423 opened this issue 2 years ago • 4 comments

Description

In the image below, the left side is captured from an app on android 13, the right side is sent from CycleTls.

cycletls

Some problems:

  1. How to remove the "GREASE" in Cipher Suite?
  2. How to remove the "GREASE" in Extension List?
  3. Fix the extension PreSharedKey? Found in the source:

utils.go 241: "41": &utls.GenericExtension{Id: 41}, //FIXME pre_shared_key

I see it's implemented in utls There is another golang tls library requests using it as:

"41": &utls.UtlsPreSharedKeyExtension{}`

  1. Customize extension detail, for example the SignatureAlgorithms(9 algorithms with phone but 11 with CycleTls), and lots of extensions are different in detail, need a way for customizing. The "requests" library mentioned above supports it like:
	req := url.NewRequest()
	req.TLSExtensions = transport.ToTLSExtensions(&transport.Extensions{
		SupportedSignatureAlgorithms: []string{
			"ECDSAWithP256AndSHA256", // 0x403
			// ...
			"PKCS1WithSHA1",          // 0x201
		},
		DelegatedCredentials: []string{
			"ECDSAWithP256AndSHA256", // 0x403
			// ...
			"ECDSAWithSHA1",          // 0x203
		},
		SupportedVersions: []string{
			"1.3",
			"1.2",
			"1.1",
			"1.0",
		},
		KeyShareCurves: []string{
			"X25519",
		},
	})

Any idea? Thanks.

Environment: Linux, Golang 1.21.0

Issue Type

Feature Request

Operating System

Linux

Node Version

None

Golang Version

Other

Relevant Log Output

No response

aj3423 avatar Oct 20 '23 23:10 aj3423

I'll get this implemented, out of curiosity what are you using to inspect a mobile phones cypher suites?

Danny-Dasilva avatar Oct 23 '23 16:10 Danny-Dasilva

@Danny-Dasilva Thanks. In the image it's Wireshark, I captured packets with PCAPDroid on the phone, it can dump packets to a .pcap file, then transfer it to PC and open with Wireshark.

aj3423 avatar Oct 23 '23 23:10 aj3423

any updates?

samuelscheit avatar Dec 11 '23 23:12 samuelscheit

UtlsPreSharedKeyExtension in the requests library above and in utls doesn't get returned when testing against most ja3 sites such as https://tls.peet.ws/, I'm looking into a fix still. The issues with grease should be resolved, and a fully configurable interface is being written

Danny-Dasilva avatar Jan 04 '24 18:01 Danny-Dasilva