Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mismatching JA3 when comparing multiple implementations #55

Open
mhofstra opened this issue Nov 2, 2023 · 3 comments
Open

Mismatching JA3 when comparing multiple implementations #55

mhofstra opened this issue Nov 2, 2023 · 3 comments

Comments

@mhofstra
Copy link

mhofstra commented Nov 2, 2023

When testing with this plugin, I get JA3s that don't match other implementations. Here's a PCAP of my testing (against latest master in docker): ja3-test.pcap.tgz.

The output from this plugin:

2023-11-02T18:26:33+00:00

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36

772,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,0-17513-11-45-51-18-65281-10-35-27-5-23-16-43-13-21,29-23-24,

efc7fcf303f23e80cbfcec938522f671

The output above is clearly missing the formats field of EC.

Analysing the pcap in Wireshark gives me a hash of 4ab55dd80cd12bd8221f0afe9feecf50 from the JA3 771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,0-17513-11-45-51-18-65281-10-35-27-5-23-16-43-13-21,29-23-24,0

I also get different results when I compare hashes when testing with curl compared to https://check.ja3.zone/ and https://tls.browserleaks.com/tls

@cowsay
Copy link

cowsay commented Nov 4, 2023

There is two differences:

771,
4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,0-17513-11-45-51-18-65281-10-35-27-5-23-16-43-13-21,29-23-24,
0

  1. Wireshark and others use Handshake version instead of actual TLS connection version, but this is constant (for backward compatibility reasons) it will be always 771 even using TLS 1.3
    image
    0x0303 is 771

  2. EC point format, nginx-ssl-ja3 parses 0 as empty, others use 0
    image

So you can normalize this yourself if you need:

  1. If first chunk is >771, use 771
  2. If last chunk is empty, use 0

@fooinha
Copy link
Owner

fooinha commented Nov 6, 2023

👀

@climagabriel
Copy link

-    ja3->version = SSL_version(ssl);
+    ja3->version = SSL_client_version(ssl);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants