Package org.microproxy.extras
Class TlsFingerprints
java.lang.Object
org.microproxy.extras.TlsFingerprints
TLS client fingerprints of a
ClientHello, as access logs show them (
%TLS_JA3_FINGERPRINT%, %TLS_JA4_FINGERPRINT%): JA3, the MD5 of the hello's version,
cipher suites, extensions, groups and point formats, and JA4, a readable prefix and two
truncated SHA-256 hashes of the sorted cipher suites and extensions. GREASE values (RFC 8701)
are left out of both, as the algorithms say.-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringja3(ClientHello hello) The JA3 fingerprint: the lowercase hex MD5 ofja3String(org.microproxy.ClientHello).static Stringja3String(ClientHello hello) The JA3 string:version,ciphers,extensions,groups,point_formats, each list's values in decimal, in the hello's order, separated by-.static Stringja4(ClientHello hello) The JA4 fingerprint of a hello sent over TCP.static Stringja4(ClientHello hello, boolean quic) The JA4 fingerprint:a_b_c, whereais the transport (tfor TCP,qfor QUIC), the highest TLS version offered (13,12, ...),dwith SNI oriwithout, the counts of cipher suites and extensions (two digits each), and the first and last characters of the first ALPN protocol (00without);bis the first 12 hex digits of the SHA-256 of the sorted cipher suites (4-digit hex, comma separated);cthe same of the sorted extensions without SNI and ALPN, followed by_and the signature algorithms in their order when there are any.
-
Method Details
-
ja3String
The JA3 string:version,ciphers,extensions,groups,point_formats, each list's values in decimal, in the hello's order, separated by-.- Parameters:
hello- the ClientHello- Returns:
- the JA3 string, or
nullwhen the hello cannot be read
-
ja3
The JA3 fingerprint: the lowercase hex MD5 ofja3String(org.microproxy.ClientHello).- Parameters:
hello- the ClientHello- Returns:
- the fingerprint, or
nullwhen the hello cannot be read
-
ja4
The JA4 fingerprint of a hello sent over TCP.- Parameters:
hello- the ClientHello- Returns:
- the fingerprint, or
nullwhen the hello cannot be read
-
ja4
The JA4 fingerprint:a_b_c, whereais the transport (tfor TCP,qfor QUIC), the highest TLS version offered (13,12, ...),dwith SNI oriwithout, the counts of cipher suites and extensions (two digits each), and the first and last characters of the first ALPN protocol (00without);bis the first 12 hex digits of the SHA-256 of the sorted cipher suites (4-digit hex, comma separated);cthe same of the sorted extensions without SNI and ALPN, followed by_and the signature algorithms in their order when there are any.- Parameters:
hello- the ClientHelloquic- whether the hello came in QUIC Initial packets- Returns:
- the fingerprint, or
nullwhen the hello cannot be read
-