Skip to content

zeek: implement JA4X (X.509 certificate fingerprinting)#3

Open
pigri wants to merge 1 commit into
mainfrom
feat/zeek-ja4x
Open

zeek: implement JA4X (X.509 certificate fingerprinting)#3
pigri wants to merge 1 commit into
mainfrom
feat/zeek-ja4x

Conversation

@pigri

@pigri pigri commented Jul 14, 2026

Copy link
Copy Markdown

Reproduce / Evidence

Any pcap containing TLS ≤1.2 server certificates works (TLS 1.3 encrypts the
Certificate message, so JA4X is only available for ≤1.2).

tshark — native JA4X (reference)

tshark -r <pcap> -2 -T fields -e ja4.ja4x \
  | sed 's/,.*//' | grep -E '_' | sort -u

zeek — this branch

zeek -C -r <pcap> packages
cat ssl.log | zeek-cut ja4x | grep -E '_' | sort -u

Evidence — leaf-cert JA4X is identical

diff \
  <(tshark -r <pcap> -2 -T fields -e ja4.ja4x | sed 's/,.*//' | grep -E '_' | sort -u) \
  <(zeek -C -r <pcap> packages && cat ssl.log | zeek-cut ja4x | grep -E '_' | sort -u)
# no output => identical

The Zeek ja4x module was an empty stub ("awaiting Zeek object support").
Implement it by reconstructing JA4X from Zeek's x509 events:

- extension OIDs from x509_extension$oid, in certificate order
- issuer/subject RDN OIDs mapped from the DN string and reversed to DER
  order (RFC2253 prints RDNs in reverse)
- each component hashed as sha256(",".join(DER-hex of each OID))[:12]

Emit the leaf-certificate JA4X into ssl.log alongside ja4/ja4s, and enable
JA4X_enabled by default. Validated to reproduce the tshark/wireshark native
ja4.ja4x on real certificates.
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

Successfully merging this pull request may close these issues.

1 participant