Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2207,6 +2207,27 @@
fi
fi

AC_ARG_ENABLE(ja3,
AS_HELP_STRING([--disable-ja3], [Disable JA3 support]),
[enable_ja3="$enableval"],
[enable_ja3=yes])
if test "$enable_ja3" = "yes"; then
AC_DEFINE([HAVE_JA3],[1],[JA3 enabled])
enable_ja3="yes"
fi
AM_CONDITIONAL([HAVE_JA3], [test "x$enable_ja3" != "xno"])

AC_ARG_ENABLE(ja4,
AS_HELP_STRING([--disable-ja4], [Disable JA4 support]),
[enable_ja4="$enableval"],
[enable_ja4=yes])
if test "$enable_ja4" = "yes"; then
AC_DEFINE([HAVE_JA4],[1],[JA4 enabled])
enable_ja4="yes"
fi
AM_CONDITIONAL([HAVE_JA4], [test "x$enable_ja4" != "xno"])


# Check for lz4
enable_liblz4="yes"
AC_CHECK_LIB(lz4, LZ4F_createCompressionContext, , enable_liblz4="no")
Expand Down Expand Up @@ -2660,6 +2681,8 @@ SURICATA_BUILD_CONF="Suricata Configuration:
LUA support: ${enable_lua}
libluajit: ${enable_luajit}
GeoIP2 support: ${enable_geoip}
JA3 support: ${enable_ja3}
JA4 support: ${enable_ja4}
Non-bundled htp: ${enable_non_bundled_htp}
Hyperscan support: ${enable_hyperscan}
Libnet support: ${enable_libnet}
Expand Down
15 changes: 12 additions & 3 deletions doc/userguide/output/eve/eve-json-format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1045,8 +1045,9 @@ If extended logging is enabled the following fields are also included:
* "notafter": The NotAfter field from the TLS certificate
* "ja3": The JA3 fingerprint consisting of both a JA3 hash and a JA3 string
* "ja3s": The JA3S fingerprint consisting of both a JA3 hash and a JA3 string
* "ja4": The JA4 client fingerprint for TLS

JA3 must be enabled in the Suricata config file (set 'app-layer.protocols.tls.ja3-fingerprints' to 'yes').
JA3 and JA4 must be enabled in the Suricata config file (set 'app-layer.protocols.tls.ja3-fingerprints'/'app-layer.protocols.tls.ja4-fingerprints' to 'yes').

In addition to this, custom logging also allows the following fields:

Expand Down Expand Up @@ -2915,11 +2916,14 @@ Fields
* "cyu": List of found CYUs in the packet
* "cyu[].hash": CYU hash
* "cyu[].string": CYU string
* "ja3": The JA3 fingerprint consisting of both a JA3 hash and a JA3 string
* "ja3s": The JA3S fingerprint consisting of both a JA3 hash and a JA3 string
* "ja4": The JA4 client fingerprint for QUIC

Examples
~~~~~~~~

Example of QUIC logging with a CYU hash:
Example of QUIC logging with CYU, JA3 and JA4 hashes (note that the JA4 hash is only an example to illustrate the format and does not correlate with the others):

::

Expand All @@ -2931,7 +2935,12 @@ Example of QUIC logging with a CYU hash:
"hash": "7b3ceb1adc974ad360cfa634e8d0a730",
"string": "46,PAD-SNI-STK-SNO-VER-CCS-NONC-AEAD-UAID-SCID-TCID-PDMD-SMHL-ICSL-NONP-PUBS-MIDS-SCLS-KEXS-XLCT-CSCT-COPT-CCRT-IRTT-CFCW-SFCW"
}
]
],
"ja3": {
"hash": "324f8c50e267adba4b5dd06c964faf67",
"string": "771,4865-4866-4867,51-43-13-27-17513-16-45-0-10-57,29-23-24,"
},
"ja4": "q13d0310h3_55b375c5d22e_cd85d2d88918"
}

Event type: DHCP
Expand Down
2 changes: 1 addition & 1 deletion doc/userguide/output/eve/eve-json-output.rst
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ YAML::
extended: yes # enable this for extended logging information
# custom allows to control which tls fields that are included
# in eve-log
#custom: [subject, issuer, serial, fingerprint, sni, version, not_before, not_after, certificate, chain, ja3, ja3s]
#custom: [subject, issuer, serial, fingerprint, sni, version, not_before, not_after, certificate, chain, ja3, ja3s, ja4]

The default is to log certificate subject and issuer. If ``extended`` is
enabled, then the log gets more verbose.
Expand Down
2 changes: 1 addition & 1 deletion doc/userguide/rules/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Suricata Rules
dns-keywords
tls-keywords
ssh-keywords
ja3-keywords
ja-keywords
modbus-keyword
dcerpc-keywords
dhcp-keywords
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
JA3 Keywords
============
JA3/JA4 Keywords
================

Suricata comes with a JA3 integration (https://github.com/salesforce/ja3). JA3 is used to fingerprint TLS clients.
Suricata comes with JA3 (https://github.com/salesforce/ja3) and
JA4 (https://github.com/FoxIO-LLC/ja4) integration.
JA3 and JA4 are used to fingerprint TLS and QUIC clients.

JA3 must be enabled in the Suricata config file (set 'app-layer.protocols.tls.ja3-fingerprints' to 'yes').
Support must be enabled in the Suricata config file (set
``app-layer.protocols.tls.ja{3,4}-fingerprints`` to ``yes``). If it is not
explicitly disabled (``no``) , it will be enabled if a loaded rule requires it.
Note that JA3/JA4 support can also be disabled at compile time; it is possible to
use the ``requires: feature ja{3,4};`` keyword to skip rules if no JA3/JA4 support is
present.

ja3.hash
--------
Expand Down Expand Up @@ -71,3 +78,19 @@ Example::
``ja3s.string`` is a 'sticky buffer'.

``ja3s.string`` can be used as ``fast_pattern``.

ja4.hash
--------

Match on JA4 hash (e.g. ``q13d0310h3_55b375c5d22e_cd85d2d88918``).

Example::

alert quic any any -> any any (msg:"match JA4 hash"; \
ja4.hash; content:"q13d0310h3_55b375c5d22e_cd85d2d88918"; \
sid:100001;)

``ja4.hash`` is a 'sticky buffer'.

``ja4.hash`` can be used as ``fast_pattern``.

6 changes: 6 additions & 0 deletions etc/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3060,6 +3060,9 @@
},
"additionalProperties": false
},
"ja4": {
"type": "string"
},
"sni": {
"description": "Server Name Indication",
"type": "string"
Expand Down Expand Up @@ -5594,6 +5597,9 @@
}
},
"additionalProperties": false
},
"ja4": {
"type": "string"
}
},
"additionalProperties": false
Expand Down
2 changes: 2 additions & 0 deletions rust/Cargo.toml.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ lua_int8 = ["lua"]
strict = []
debug = []
debug-validate = []
ja3 = []
ja4 = []

[dependencies]
nom7 = { version="7.0", package="nom" }
Expand Down
8 changes: 8 additions & 0 deletions rust/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ if HAVE_LUA
RUST_FEATURES += lua $(LUA_INT8)
endif

if HAVE_JA3
RUST_FEATURES += ja3
endif

if HAVE_JA4
RUST_FEATURES += ja4
endif

if DEBUG
RUST_FEATURES += debug
endif
Expand Down
Loading