-
Notifications
You must be signed in to change notification settings - Fork 94
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
[fix] JA4L: Handle "impure" TCP flags #24
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
rust/ja4/src/snapshots/ja4__insta@macos_tcp_flags.pcap.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
source: ja4/src/lib.rs | ||
expression: output | ||
--- | ||
- stream: 0 | ||
transport: tcp | ||
src: 172.16.5.16 | ||
dst: 172.67.24.71 | ||
src_port: 61311 | ||
dst_port: 443 | ||
tls_server_name: venarisecurity.com | ||
ja4: t13d2613h2_2802a3db6c62_845d286b0d67 | ||
ja4s: t130200_1301_234ea6891581 | ||
ja4l_c: 62_64 | ||
ja4l_s: 17255_63 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ use crate::{ | |
conf::Conf, | ||
http, ssh, | ||
time::{self, TcpTimestamps, Timestamps, UdpTimestamps}, | ||
tls, FormatFlags, Packet, PacketNum, Proto, Result, | ||
tls, FormatFlags, Packet, Proto, Result, | ||
}; | ||
|
||
/// User-facing record containing data obtained from a TCP or UDP stream. | ||
|
@@ -375,17 +375,3 @@ impl StreamId2<'_> { | |
} | ||
} | ||
} | ||
|
||
/// A fingerprint that was obtained from a single packet. | ||
/// | ||
/// `PacketFingerprint` can represent JA4 (TLS client), JA4S (TLS server), or | ||
/// JA4H (HTTP client) fingerprint. Other types of fingerprints are derived from | ||
/// multiple packets. | ||
#[derive(Debug, Serialize)] | ||
// HACK: Use a configuration parameter to enable serialization of packet numbers. | ||
#[cfg_attr(not(debug_assertions), serde(transparent))] | ||
struct PacketFingerprint { | ||
#[cfg_attr(not(debug_assertions), serde(skip_serializing), allow(dead_code))] | ||
packet: PacketNum, | ||
fp: String, | ||
} | ||
Comment on lines
-379
to
-391
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dead code. I'm surprised that neither compiler nor clippy were able to detect it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previous version (0.15.1) wouldn't generate these JA4L fingerprints.