# output TLS transaction where the session is resumed using a
# session id
#session-resumption: no
+ # ja4 hashes in tls records will never be logged unless
+ # the following is set to on. (Default off)
+ # ja4: off
# custom allows to control which tls fields that are included
# in eve-log
#custom: [subject, issuer, session_resumed, serial, fingerprint, sni, version, not_before, not_after, certificate, chain]
- ike
# BitTorrent DHT logging.
- bittorrent-dht
+ - quic:
+ # ja4 hashes in crecords will never be logged unless
+ # the following is set to on. (Default off)
+ # ja4: off
- ssh
- stats:
totals: yes # stats for all threads merged together
<datasets_security>` and :ref:`Datasets File Locations
<datasets_file_locations>` for more information.
- Lua rules are now disabled by default (change also introduced in 6.0.13), see :ref:`lua-detection`.
+- Support for JA4 has been added. JA4 hashes will be computed when explicitly enabled or a rule uses
+ `ja4.hash`. JA4 hashes are output under a restricted set of conditions (see below):
Removals
~~~~~~~~
For more information, refer to:
https://redmine.openinfosecfoundation.org/issues/1275.
+- JA4 hashes are output under a restricted set of conditions when JA4 is dynamically or explicitly enabled:
+
+ - Alerts: The signature causing the alert contains the `ja4.hash` keyword
+ - Logs: With QUIC logs iff outputs.quic.ja4 is enabled (default off)
+ - Logs: With TLS logs iff outputs.tls.ja4 is enabled (default off)
+
Deprecations
~~~~~~~~~~~~
- Multiple "include" fields in the configuration file will now issue a
#include "output.h"
#include "output-json.h"
#include "app-layer.h"
+#include "app-layer-ssl.h"
#include "app-layer-parser.h"
#include "output-json-quic.h"
#include "rust.h"
typedef struct LogQuicFileCtx_ {
LogFileCtx *file_ctx;
OutputJsonCtx *eve_ctx;
+ bool log_ja4;
} LogQuicFileCtx;
typedef struct JsonQuicLogThread_ {
if (unlikely(js == NULL)) {
return TM_ECODE_OK;
}
- if (!rs_quic_to_json(tx, false, js)) {
+
+ LogQuicFileCtx *quic_ctx = thread->quiclog_ctx;
+ if (!rs_quic_to_json(tx, quic_ctx->log_ja4, js)) {
jb_free(js);
return TM_ECODE_FAILED;
}
SCFree(quiclog_ctx);
return result;
}
+
+ /* In 7.0.x, ja4 hash is only logged when requested */
+ quiclog_ctx->log_ja4 = false;
+ const char *ja4 = ConfNodeLookupChildValue(conf, "ja4");
+ if (ja4 && ConfValIsTrue(ja4)) {
+ quiclog_ctx->log_ja4 = true;
+ }
output_ctx->data = quiclog_ctx;
output_ctx->DeInit = OutputQuicLogDeInitCtxSub;
}
/* log extended */
else if (tls_ctx->flags & LOG_TLS_EXTENDED) {
- JsonTlsLogJSONExtended(js, ssl_state, false);
+ JsonTlsLogJSONExtended(js, ssl_state, tls_ctx->fields & LOG_TLS_FIELD_JA4);
}
/* log basic */
else {
JsonTlsLogJSONBasic(js, ssl_state);
+ /* add ja4 hash */
+ if (tls_ctx->fields & LOG_TLS_FIELD_JA4)
+ JsonTlsLogSCJA4(js, ssl_state);
}
/* print original application level protocol when it have been changed
}
}
+ /* In 7.0.x, ja4 hash is only logged when requested */
+ const char *ja4 = ConfNodeLookupChildValue(conf, "ja4");
+ if (ja4 && ConfValIsTrue(ja4)) {
+ tls_ctx->fields = LOG_TLS_FIELD_JA4;
+ }
+
const char *session_resumption = ConfNodeLookupChildValue(conf, "session-resumption");
if (session_resumption == NULL || ConfValIsTrue(session_resumption)) {
tls_ctx->flags |= LOG_TLS_SESSION_RESUMPTION;
#include "app-layer-ssl.h"
void JsonTlsLogJSONBasic(JsonBuilder *js, SSLState *ssl_state);
-void JsonTlsLogJSONExtended(JsonBuilder *js, SSLState *ssl_state, bool is_alert);
+void JsonTlsLogJSONExtended(JsonBuilder *js, SSLState *ssl_state, bool log_ja4);
#endif /* __OUTPUT_JSON_TLS_H__ */
# output TLS transaction where the session is resumed using a
# session id
#session-resumption: no
+ # ja4 hashes in tls records will never be logged unless
+ # the following is set to on. (Default off)
+ # ja4: off
# custom controls which TLS fields that are included in eve-log
#custom: [subject, issuer, session_resumed, serial, fingerprint, sni, version, not_before, not_after, certificate, chain, ja3, ja3s, ja4]
- files:
- snmp
- rfb
- sip
- - quic
+ - quic:
+ # ja4 hashes in quic records will never be logged unless
+ # the following is set to on. (Default off)
+ # ja4: off
- dhcp:
enabled: yes
# When extended mode is on, all DHCP messages are logged