Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output/TLS: Allow logging of client/server handshake parameters - V4 #12650

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rmcconnell-r7
Copy link
Contributor

@rmcconnell-r7 rmcconnell-r7 commented Feb 21, 2025

Make sure these boxes are checked accordingly before submitting your Pull Request -- thank you.

Contribution style:

Our Contribution agreements:

Changes (if applicable):

Link to ticket: https://redmine.openinfosecfoundation.org/issues/6695

Describe changes:

  • Introduce JSON logging of client handshake parameters
  • Introduce JSON logging of server handshake parameters
  • Enable tracking JA4 fields without ja4-fingerprints being explicitly enabled

Provide values to any of the below to override the defaults.

  • To use an LibHTP, Suricata-Verify or Suricata-Update pull request,
    link to the pull request in the respective _BRANCH variable.
  • Leave unused overrides blank or remove.

SV_REPO=
SV_BRANCH=OISF/suricata-verify#2313
SU_REPO=
SU_BRANCH=
LIBHTP_REPO=
LIBHTP_BRANCH=

Add new custom log fields:

"client_handshake" which logs the following:
1. TLS version used during handshake
2. TLS extensions, excluding GREASE, SNI and ALPN
3. All cipher suites, excluding GREASE
4. All signature algorithms, excluding GREASE

The use-case is for logging TLS handshake parameters in order to survey
them, and so that JA4 hashe can be computed offline (in the case that
they're not already computed for the purposes of rule matching).
"server_handshake" which logs the following:
1. TLS version used during handshake
2. The chosen cipher suite, excluding GREASE
3. TLS extensions, excluding GREASE
The JA4 object can now 'track' the data from each TLS conversation
without the user having to explicitly enabling ja4-fingerprint. This is
to allow for other fields to be output without the JA4, for example
client_handshake.
@rmcconnell-r7
Copy link
Contributor Author

Replaces: #12526

@victorjulien
Copy link
Member

Ci failures for rust clippy are expected currently.

Copy link

codecov bot commented Feb 21, 2025

Codecov Report

Attention: Patch coverage is 98.24561% with 2 lines in your changes missing coverage. Please review.

Project coverage is 80.78%. Comparing base (d61f36c) to head (f0f22e6).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12650      +/-   ##
==========================================
+ Coverage   80.76%   80.78%   +0.01%     
==========================================
  Files         932      931       -1     
  Lines      259381   259448      +67     
==========================================
+ Hits       209484   209589     +105     
+ Misses      49897    49859      -38     
Flag Coverage Δ
fuzzcorpus 56.99% <51.75%> (-0.02%) ⬇️
livemode 19.35% <15.78%> (-0.01%) ⬇️
pcap 44.17% <50.00%> (+0.01%) ⬆️
suricata-verify 63.52% <98.24%> (+0.03%) ⬆️
unittests 58.32% <13.15%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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.

2 participants