Technique:TLS client fingerprinting
| On this wiki | Facts · Code · Notes · Topics |
|---|
Identifying the TLS client library or application behind a connection from its Client Hello: how the JA3 (MD5) and JA4 (sha256-truncated) strings are built, GREASE handling, and what a matching fingerprint does and does not prove.
Idea
The TLS Client Hello is sent in clear text and its content (versions, cipher suite list, extensions, curves, ALPN) depends on the TLS library and its configuration, so it identifies the client stack rather than the destination. Useful when a captured stream (see Technique:Reversing network protocols) is TLS and you want to know whether the program uses Library:OpenSSL, Library:Mbed TLS, Schannel, Go's crypto/tls, a browser engine, etc. Compare your fingerprint with public lists.
JA3 (salesforce/ja3, BSD-3-Clause)
String = SSLVersion,Ciphers,Extensions,EllipticCurves,EllipticCurvePointFormats, fields joined by , and values within a field by -, all as decimal numbers in the order they appear in the Client Hello; the MD5 of that string is the JA3 hash. SSLVersion is the handshake version field (769 = 0x0301, 771 = 0x0303). Empty lists give empty fields (769,4-5-10,,,). GREASE values (0x0a0a, 0x1a1a, 0x2a2a, ... 0xfafa) are dropped from every list. Examples from the README: 769,47-53-5-10-49161-49162-49171-49172-50-56-19-4,0-10-11,23-24-25,0 hashes to ada70206e40642a3e4461f35503241d5, and 769,4-5-10-9-100-98-3-6-19-18-99,,, to de350869b8c85de67a350c8d186f11e6. JA3S is the server side: SSLVersion,Cipher,Extensions of the Server Hello. The project is no longer maintained by Salesforce.
Weakness: modern browsers and some libraries randomise the extension order, which changes JA3 on every connection; that is why JA4 sorts.
JA4 (FoxIO-LLC/ja4, TLS client part under BSD-3-Clause)
Format a_b_c such as t13d1516h2_8daaf6152771_b186095e22b6:
- a (10 chars): protocol
tTLS over TCP,qQUIC,dDTLS; two-digit version from the highest value of the supported_versions extension (0x002b) if present, else the Client Hello version (130x0304,12,11,10,s3SSL 3.0,s2,d10xfeff,d20xfefd,d30xfefc,00unknown);dif an SNI extension (0x0000) exists,iif not; two-digit cipher count; two-digit extension count (capped at 99; GREASE not counted, SNI and ALPN counted); first and last character of the first ALPN value (h2,h1for http/1.1,00if none; non-alphanumeric bytes use hex digits). - b: first 12 hex chars of sha256 over the cipher suite hex codes (4 lowercase hex digits, comma separated) sorted ascending, GREASE removed, SCSV 0x00ff kept. No ciphers gives
000000000000. - c: first 12 hex chars of sha256 over the extension codes sorted ascending with SNI (0000) and ALPN (0010) removed, then
_, then the signature algorithm codes in original order (no underscore if there are none).
Example from the spec: ciphers 1301,1302,1303,c02b,c02f,c02c,c030,cca9,cca8,c013,c014,009c,009d,002f,0035 sort to 002f,0035,...,cca9 and hash to 8daaf6152771.
Licensing note
In the ja4 repository only the TLS client fingerprint JA4 is BSD-3-Clause (LICENSE-JA4); the other members of the family (JA4S, JA4H, JA4X, JA4T, JA4SSH and so on) are under the non-commercial FoxIO License 1.1. Check before copying code.
What a match means
A match says the Client Hello has the same shape as a known client, not that it is that program: libraries are shared, applications may pin a library version, proxies terminate TLS, and impersonation libraries copy browser hellos on purpose. Treat it as a lead (Unverified: marking of specific products from public lists is not included here).
Code & repositories
- https://github.com/salesforce/ja3 @
502cc6395811c54743b0561419d61900a6df3ff7· license: BSD-3-Clause
JA3 and JA3S TLS fingerprint specification (README), Python and Zeek implementations, lists of known fingerprints.
Tested on: source read, not run: source only · checked 2026-10-18; archived; last activity 2025-05-01 - https://github.com/FoxIO-LLC/ja4 @
c6469a7b0dbf8fe963810162429fbfd9d1acc4d5· license: BSD-3-Clause (declared by the contributor; GitHub's detector did not recognize LICENSE)
JA4 TLS client fingerprint specification (technical_details/JA4.md) and implementations; the other JA4+ members are under the FoxIO License 1.1.
Tested on: source read, not run: source only · checked 2026-10-18; last activity 2026-10-06
Pitfalls
- Ignore GREASE everywhere, including in counts.
- JA3 numbers are decimal; JA4 uses 4-digit hex.
- Fragmented Client Hello (large post-quantum key shares) may need TCP reassembly or QUIC CRYPTO frame reassembly before hashing.