TLS fingerprints
Compute JA3, JA3S, and JA4 TLS fingerprints from raw handshake bytes or extracted fields
- Connector software
- Free and open source
- Service credentials
- Not needed
- Query Farm hosting
- Available · $10/month organization minimum
Use with an agent
Install the Orchard skill in your project to help your agent find connectors, configure them, and verify SQL results.
npx skills add Query-farm/vgi-skills --skill orchard
Copy this request into your coding agent to get started.
Use https://query.farm/products/orchard/connectors/tlsfp/index.md to help me query TLS fingerprints with DuckDB or Haybarn 2.0.1 and VGI protocol 3.4. Ask only for missing details about the result I need or whether I want local execution, self-hosting or Query Farm hosting. Check the connector's actual hosting availability, credentials and input requirements. Read one format of each needed reference and the exact object declarations before writing SQL. Use a released connector, and distinguish a saved example result from anything you actually execute. If you cannot run the query, tell me what remains to verify.
Identify TLS clients from handshake fingerprints
Use binary files containing raw TLS ClientHello handshake messages, including the handshake header. These functions do not read whole PCAP files.
SELECT filename, tlsfp.main.ja3(content) AS ja3, tlsfp.main.ja4(content) AS ja4
FROM read_blob('captures/*.bin');
Quick start
Choose where to run TLS fingerprints, then follow the steps below.
The connector runs alongside DuckDB or Haybarn. No Query Farm account is needed.
1. Install the vgi extension
Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.
SET allow_extension_repositories = 'allowed';
CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
WITH PREFIX 'https://duckdb-extensions.query.farm';
INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;
INSTALL vgi FROM community;
LOAD vgi;
2. Attach the connector
Attach the release directly
Downloads the latest release for your platform and caches it locally.
ATTACH 'tlsfp' AS tlsfp (
TYPE vgi,
LOCATION 'github-auto://Query-farm/vgi-tlsfp'
);
Attach the signed image
Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.
ATTACH 'tlsfp' AS tlsfp (
TYPE vgi,
LOCATION 'oci://ghcr.io/query-farm/vgi-tlsfp:0.5.0'
);
3. Run a query
SELECT filename, tlsfp.main.ja3(content) AS ja3, tlsfp.main.ja4(content) AS ja4
FROM read_blob('captures/*.bin');
Run the connector on a server you manage. You operate the service and choose who can connect.
1. Deploy the connector on your server
Follow the connector’s deployment instructions. Use its supported HTTP transport, or launch it remotely over SSH. The connection guide explains both options.
2. Install the vgi extension
Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.
SET allow_extension_repositories = 'allowed';
CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
WITH PREFIX 'https://duckdb-extensions.query.farm';
INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;
INSTALL vgi FROM community;
LOAD vgi;
3. Attach the connector
For an HTTP deployment, replace the example URL with your endpoint. Add the authentication options your deployment requires. For SSH, use the SSH connection instructions.
ATTACH 'tlsfp' AS tlsfp
(TYPE vgi, LOCATION 'https://your-connector.example.com');
4. Run a query
SELECT filename, tlsfp.main.ja3(content) AS ja3, tlsfp.main.ja4(content) AS ja4
FROM read_blob('captures/*.bin');
Query Farm operates TLS fingerprints for your team. Hosting has a $10 monthly minimum per organization; usage counts toward it. From $2.97 per instance-month ($10 monthly minimum).
1. Create your hosted connector
Open the console, choose your organization and deployment size, and add any service credentials there.
2. Install the vgi extension
SET allow_extension_repositories = 'allowed';
CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
WITH PREFIX 'https://duckdb-extensions.query.farm';
INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;
INSTALL vgi FROM community;
LOAD vgi;
3. Attach your deployment
Copy the ATTACH statement from your deployment in the console and run it in DuckDB or Haybarn. Use tlsfp as the catalog alias for the query below.
4. Run a query
SELECT filename, tlsfp.main.ja3(content) AS ja3, tlsfp.main.ja4(content) AS ja4
FROM read_blob('captures/*.bin');
Technical details
- Verified connector release
- v0.5.0
- Engine
- 2.0.1
- VGI protocol
- 3.4.0
- Verified on
- December 1, 2026
Pin a version for production
When running the connector yourself, keep a specific release until you’re ready to upgrade. Replace the ATTACH statement above with this one and follow the same extension and credential setup.
Attach the release directly
Uses the verified release each time you attach the connector.
ATTACH 'tlsfp' AS tlsfp (
TYPE vgi,
LOCATION 'github-auto://Query-farm/[email protected]'
);
Attach the signed image
Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.
ATTACH 'tlsfp' AS tlsfp (
TYPE vgi,
LOCATION 'oci://ghcr.io/query-farm/vgi-tlsfp:0.5.0'
);
Overview
TLS client/server fingerprinting (JA3, JA3S, JA4 TLS-client) as pure SQL scalars over raw handshake bytes.
Compute JA3, JA3S, and the base JA4 (TLS-client) fingerprints directly in DuckDB SQL from raw ClientHello/ServerHello bytes — or from fields you already extracted with Zeek/pcap tooling. Apply a fingerprint to a column of captured handshakes and GROUP BY it to surface a C2 or bot family, then JOIN the resulting VARCHAR hashes to certificate and flow data to pivot from a fingerprint to the certs and flows behind it.
Every function is pure, deterministic compute — no network, no state. Each fingerprint offers two input modes: pass the raw handshake record (the worker parses it) or the component fields. Malformed or truncated bytes return NULL per row rather than failing the query, and an is_tls_handshake(bytes) guard scalar lets you filter first. The *_string/*_raw companions expose the pre-hash JA3 string and the un-hashed JA4_r form for audit and custom re-hashing, and parse_client_hello decodes the handshake into a struct of its fields.
Licensing: only the patent-free fingerprints are implemented — JA3/JA3S (BSD-3) and base JA4 TLS-client (BSD-3, patent-disclaimed). The JA4+ suite (JA4S/JA4H/JA4L/JA4X/JA4SSH, FoxIO License 1.1, patent-pending) and JARM are intentionally NOT implemented.
Sources and references
- JA3 / JA3S (Salesforce)
- JA4 (FoxIO) — see the JA4 technical details
- RFC 8446 — TLS 1.3 handshake messages
- RFC 8701 — GREASE values, ignored by the fingerprints
Catalog
Everything tlsfp exposes once attached — read straight from the worker's
released build.
main 10 functions
TLS fingerprint functions: ja3/ja3s/ja4 and their string/raw/from-parts companions, parse_client_hello, and the is_tls_handshake guard.
Schema examples (8)
Cluster a set of captured ClientHellos by their JA3 and JA4 fingerprints, most frequent first — the headline threat-hunting query.
SELECT tlsfp.main.ja3(client_hello) AS ja3,
tlsfp.main.ja4(client_hello) AS ja4, count(*) AS n
FROM (VALUES (from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e636f6d000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100')), (from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e636f6d000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100'))) AS t(client_hello)
GROUP BY 1, 2
ORDER BY n DESC;
Compute the JA3S server fingerprint of a captured ServerHello.
SELECT tlsfp.main.ja3s(from_hex('020000360303222222222222222222222222222222222222222222222222222222222222222200c02f00000eff01000100001000050003026832')) AS ja3s;
Compute JA3 from ClientHello fields already parsed by a tool such as Zeek (no raw bytes needed).
SELECT tlsfp.main.ja3_from_parts(771, [47, 53, 4865], [0, 11, 10], [29, 23], [0]) AS ja3;
Decode a ClientHello and project its SNI host name and cipher-suite list.
SELECT (tlsfp.main.parse_client_hello(from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e636f6d000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100'))).sni AS sni,
(tlsfp.main.parse_client_hello(from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e636f6d000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100'))).ciphers AS ciphers;
4 more examples
Fingerprint only the rows that structurally look like TLS handshakes, skipping junk bytes with the is_tls_handshake guard.
SELECT tlsfp.main.ja4(pkt) AS ja4
FROM (VALUES (from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e636f6d000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100')), (from_hex('00'))) AS t(pkt)
WHERE tlsfp.main.is_tls_handshake(pkt);
Pivot from a JA4 fingerprint to the server names it contacted: drop non-handshake rows with is_tls_handshake, group the rest by ja4, and collect each fingerprint's distinct SNI host names from parse_client_hello. Two ClientHellos from the same client stack (to example.com and example.org) collapse to one JA4 with both names; the junk row is dropped.
WITH h AS (SELECT pkt FROM (VALUES (from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e636f6d000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100')), (from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e6f7267000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100')), (from_hex('00'))) AS t(pkt) WHERE tlsfp.main.is_tls_handshake(pkt)) SELECT tlsfp.main.ja4(pkt) AS ja4, count(*) AS handshakes, list_sort(list(DISTINCT (tlsfp.main.parse_client_hello(pkt)).sni)) AS server_names
FROM h
GROUP BY 1
ORDER BY handshakes DESC, ja4;
Profile TLS sessions by their JA3/JA3S client-server pair (the classic C2-detection pairing): fingerprint the ClientHello with ja3 and the ServerHello with ja3s for each captured session, then count sessions per pair.
SELECT tlsfp.main.ja3(s.client_hello) AS ja3,
tlsfp.main.ja3s(s.server_hello) AS ja3s, count(*) AS sessions
FROM (VALUES (1, from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e636f6d000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100'), from_hex('020000360303222222222222222222222222222222222222222222222222222222222222222200c02f00000eff01000100001000050003026832')), (2, from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e6f7267000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100'), from_hex('020000360303222222222222222222222222222222222222222222222222222222222222222200c02f00000eff01000100001000050003026832'))) AS s(session_id, client_hello, server_hello)
GROUP BY 1, 2
ORDER BY sessions DESC, ja3, ja3s;
Audit a JA3 fingerprint: show the pre-hash ja3_string next to ja3 and confirm the fingerprint is exactly the MD5 of that string.
SELECT tlsfp.main.ja3_string(c.client_hello) AS ja3_string,
tlsfp.main.ja3(c.client_hello) AS ja3,
md5(tlsfp.main.ja3_string(c.client_hello)) = tlsfp.main.ja3(c.client_hello) AS hash_matches
FROM (VALUES (from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e636f6d000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100'))) AS c(client_hello)
ORDER BY ja3;
is_tls_handshake (bytes BLOB)
Return TRUE if the bytes look like a TLS ClientHello/ServerHello handshake (optionally wrapped in a TLS record), else FALSE; NULL input → NULL
Filter a column to plausible TLS handshakes before fingerprinting.
SELECT tlsfp.main.is_tls_handshake(from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e636f6d000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100'));
ja3 (client_hello BLOB)
Compute the JA3 fingerprint (MD5, 32 hex) of a raw TLS ClientHello; NULL if the bytes do not parse
Compute the JA3 fingerprint of a captured ClientHello.
SELECT tlsfp.main.ja3(from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e636f6d000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100'));
SELECT tlsfp.main.ja3(from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e636f6d000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100')) AS ja3;
SELECT tlsfp.main.ja3_from_parts(771, [47,53,4865], [0,11,10], [29,23], [0]) AS ja3;
ja3_from_parts (version INTEGER, ciphers INTEGER[], extensions INTEGER[], curves INTEGER[], point_formats INTEGER[])
Compute the JA3 fingerprint (MD5, 32 hex) from already-extracted ClientHello fields (version, ciphers, extensions, curves, point_formats)
Compute JA3 from fields already parsed by Zeek/pcap tooling.
SELECT tlsfp.main.ja3_from_parts(771, [47,53,4865], [0,11,10], [29,23], [0]);
ja3_string (client_hello BLOB)
Return the pre-hash JA3 string (version,ciphers,extensions,curves,point_formats) of a raw ClientHello; NULL if it does not parse
Inspect the un-hashed JA3 string for audit/debugging.
SELECT tlsfp.main.ja3_string(from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e636f6d000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100'));
Audit a JA3 fingerprint: show the pre-hash ja3_string next to ja3 and confirm the fingerprint is exactly the MD5 of that string.
SELECT tlsfp.main.ja3_string(c.client_hello) AS ja3_string,
tlsfp.main.ja3(c.client_hello) AS ja3,
md5(tlsfp.main.ja3_string(c.client_hello)) = tlsfp.main.ja3(c.client_hello) AS hash_matches
FROM (VALUES (from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e636f6d000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100'))) AS c(client_hello)
ORDER BY ja3;
ja3s (server_hello BLOB)
Compute the JA3S fingerprint (MD5, 32 hex) of a raw TLS ServerHello; NULL if the bytes do not parse
Fingerprint the server side of a handshake with JA3S.
SELECT tlsfp.main.ja3s(from_hex('020000360303222222222222222222222222222222222222222222222222222222222222222200c02f00000eff01000100001000050003026832'));
Profile TLS sessions by their JA3/JA3S client-server pair (the classic C2-detection pairing): fingerprint the ClientHello with ja3 and the ServerHello with ja3s for each captured session, then count sessions per pair.
SELECT tlsfp.main.ja3(s.client_hello) AS ja3,
tlsfp.main.ja3s(s.server_hello) AS ja3s, count(*) AS sessions
FROM (VALUES (1, from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e636f6d000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100'), from_hex('020000360303222222222222222222222222222222222222222222222222222222222222222200c02f00000eff01000100001000050003026832')), (2, from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e6f7267000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100'), from_hex('020000360303222222222222222222222222222222222222222222222222222222222222222200c02f00000eff01000100001000050003026832'))) AS s(session_id, client_hello, server_hello)
GROUP BY 1, 2
ORDER BY sessions DESC, ja3, ja3s;
ja3s_from_parts (version INTEGER, cipher INTEGER, extensions INTEGER[])
Compute the JA3S fingerprint (MD5, 32 hex) from already-extracted ServerHello fields (version, selected cipher, extensions)
Compute JA3S from fields already parsed by Zeek/pcap tooling.
SELECT tlsfp.main.ja3s_from_parts(771, 49199, [65281, 16]);
ja4 (client_hello BLOB)
Compute the JA4 (base TLS-client) fingerprint of a raw TLS ClientHello; NULL if the bytes do not parse
Compute the JA4 fingerprint of a captured ClientHello.
SELECT tlsfp.main.ja4(from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e636f6d000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100'));
Pivot from a JA4 fingerprint to the server names it contacted: drop non-handshake rows with is_tls_handshake, group the rest by ja4, and collect each fingerprint's distinct SNI host names from parse_client_hello. Two ClientHellos from the same client stack (to example.com and example.org) collapse to one JA4 with both names; the junk row is dropped.
WITH h AS (SELECT pkt FROM (VALUES (from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e636f6d000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100')), (from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e6f7267000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100')), (from_hex('00'))) AS t(pkt) WHERE tlsfp.main.is_tls_handshake(pkt)) SELECT tlsfp.main.ja4(pkt) AS ja4, count(*) AS handshakes, list_sort(list(DISTINCT (tlsfp.main.parse_client_hello(pkt)).sni)) AS server_names
FROM h
GROUP BY 1
ORDER BY handshakes DESC, ja4;
ja4_from_parts (version INTEGER, ciphers INTEGER[], extensions INTEGER[], sig_algs INTEGER[], alpn VARCHAR)
Compute the JA4 (base TLS-client) fingerprint from already-extracted ClientHello fields (effective TLS version, ciphers, extensions, signature algorithms, ALPN)
Compute JA4 from fields already parsed by Zeek/pcap tooling.
SELECT tlsfp.main.ja4_from_parts(772, [4865,4866], [0,43,13], [1027,2052], 'h2');
ja4_raw (client_hello BLOB)
Return the un-hashed JA4_r string (ja4_a_
Inspect the un-hashed JA4_r string for audit/debugging.
SELECT tlsfp.main.ja4_raw(from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e636f6d000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100'));
parse_client_hello (client_hello BLOB)
Decode a raw TLS ClientHello into STRUCT(version, sni, ciphers, extensions, curves, alpn); NULL struct if the bytes do not parse
-
versionINTEGER
-
sniVARCHAR
-
ciphersINTEGER[]
-
extensionsINTEGER[]
-
curvesINTEGER[]
-
alpnVARCHAR[]
Decode the fingerprint-relevant fields of a ClientHello.
SELECT (tlsfp.main.parse_client_hello(from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e636f6d000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100'))).sni;
Try these queries
Cluster a set of captured ClientHellos by their JA3 and JA4 fingerprints, most frequent first — the headline threat-hunting query.
SELECT tlsfp.main.ja3(client_hello) AS ja3,
tlsfp.main.ja4(client_hello) AS ja4, count(*) AS n
FROM (VALUES (from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e636f6d000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100')), (from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e636f6d000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100'))) AS t(client_hello)
GROUP BY 1, 2
ORDER BY n DESC
Compute the JA3S server fingerprint of a captured ServerHello.
SELECT tlsfp.main.ja3s(from_hex('020000360303222222222222222222222222222222222222222222222222222222222222222200c02f00000eff01000100001000050003026832')) AS ja3s
Uses ja3s
Compute JA3 from ClientHello fields already parsed by a tool such as Zeek (no raw bytes needed).
SELECT tlsfp.main.ja3_from_parts(771, [47, 53, 4865], [0, 11, 10], [29, 23], [0]) AS ja3
Uses ja3_from_parts
Decode a ClientHello and project its SNI host name and cipher-suite list.
SELECT (tlsfp.main.parse_client_hello(from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e636f6d000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100'))).sni AS sni,
(tlsfp.main.parse_client_hello(from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e636f6d000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100'))).ciphers AS ciphers
Uses parse_client_hello
Fingerprint only the rows that structurally look like TLS handshakes, skipping junk bytes with the is_tls_handshake guard.
SELECT tlsfp.main.ja4(pkt) AS ja4
FROM (VALUES (from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e636f6d000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100')), (from_hex('00'))) AS t(pkt)
WHERE tlsfp.main.is_tls_handshake(pkt)
Uses ja4is_tls_handshake
Pivot from a JA4 fingerprint to the server names it contacted: drop non-handshake rows with is_tls_handshake, group the rest by ja4, and collect each fingerprint's distinct SNI host names from parse_client_hello. Two ClientHellos from the same client stack (to example.com and example.org) collapse to one JA4 with both names; the junk row is dropped.
WITH h AS (SELECT pkt FROM (VALUES (from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e636f6d000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100')), (from_hex('010000cf030311111111111111111111111111111111111111111111111111111111111111110000200a0a002f0035009c009d130113021303c013c014c02bc02cc02fc030cca8cca90100008600000010000e00000b6578616d706c652e6f7267000500050100000000000a000a0008001d001700180019000b00020100000d0012001004030804040105030805050108060601001000050003026832001200000015000000170000001b00001a1a000000230000002b0007060a0a03040303002d000201000033000044690000ff01000100')), (from_hex('00'))) AS t(pkt) WHERE tlsfp.main.is_tls_handshake(pkt)) SELECT tlsfp.main.ja4(pkt) AS ja4, count(*) AS handshakes, list_sort(list(DISTINCT (tlsfp.main.parse_client_hello(pkt)).sni)) AS server_names
FROM h
GROUP BY 1
ORDER BY handshakes DESC, ja4
14 more examples in the Catalog, each listed under the table or function it uses.
TLS fingerprints is an independent open-source connector from Query.Farm. It is not affiliated with, endorsed by or sponsored by the services, projects or organisations it works with. Product names, logos and trademarks belong to their respective owners.
Related workers
Disassembler
Security & forensics
Disassemble binaries and shellcode, then triage their sections, imports, strings, and MITRE ATT&CK capabilities
Indicators of compromise
Security & forensics
Pull indicators of compromise out of threat reports and defang or refang them safely
Threat intel
Security & forensics
Classify IPs, domains, URLs, and file hashes offline, then enrich them against threat-intel reputation feeds