Skip to content

feat(suricata): carry the JA4 TLS client fingerprint into the report - #29

Open
mjbradford89 wants to merge 1 commit into
developfrom
ja4-suricata-fingerprints
Open

feat(suricata): carry the JA4 TLS client fingerprint into the report#29
mjbradford89 wants to merge 1 commit into
developfrom
ja4-suricata-fingerprints

Conversation

@mjbradford89

@mjbradford89 mjbradford89 commented Aug 20, 2026

Copy link
Copy Markdown

TL;DR

  • Adds "ja4" to the tls_items allowlist in modules/processing/suricata.py, so Suricata's JA4 TLS client fingerprint reaches the CAPE report instead of being computed and discarded.
  • One-token change; the tuple is exploded across lines only because the single line would hit 133 chars, past the 132 configured for black/ruff/flake8.
  • No behaviour change unless app-layer.protocols.tls.ja4-fingerprints is enabled in suricata.yaml — that half lands in the polysando PR below.

Why

tls_items is the allowlist that decides which keys from an eve.json tls record are copied into the report (the event_type == "tls" branch further down). Suricata computes JA4 from 8.0.0 onward when app-layer.protocols.tls.ja4-fingerprints is on, and LOG_TLS_FIELD_JA4 is part of EXTENDED_FIELDS in output-json-tls.c — so the existing extended: yes eve-log config emits it with no additional output configuration. Without "ja4" in this tuple the value is produced by Suricata and dropped here.

Note that unlike ja3/ja3s, which are {hash, string} objects, ja4 is a plain string.

Requires

Pairs with polyswarm/polysando#626, which enables ja4-fingerprints: yes in the CAPE image's suricata.yaml and bumps this submodule pointer. Neither half does anything alone; merge order does not matter.

Suricata computes JA4 for TLS from 8.0.0 onward when
`app-layer.protocols.tls.ja4-fingerprints` is enabled, and logs it in the
eve.json `tls` record — `LOG_TLS_FIELD_JA4` is part of `EXTENDED_FIELDS`, so
the existing `extended: yes` eve-log output emits it with no further output
configuration.

`tls_items` is the allowlist that decides which eve `tls` keys are copied into
the CAPE report (see the loop below at the `event_type == "tls"` branch), so
without "ja4" here Suricata computes the fingerprint and the processing module
immediately discards it.

Unlike ja3/ja3s, which are `{hash, string}` objects, ja4 is a plain string.
The tuple is exploded across lines because appending "ja4" takes the single
line to 133 characters, past the 132 configured for black/ruff/flake8.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant