-
Notifications
You must be signed in to change notification settings - Fork 87
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
rust ja4h not sorting cookies right #58
Comments
@awick Thanks for reporting this! 🙏🏻
JA4H calculation
cookie-pairs:
cookie-names:
Comma-separated list of sorted cookie-names:
Helper function:
JA4H_c:
Comma-separated list of sorted cookie-pairs:
JA4H_d:
|
* [fix] Generate a JA4SSH fingerprint every 200 _SSH_ packets * Fix calculation of JA4H_c Related issue: #58
So we should double check with John, but I think _d is RIGHT with wireshark and arkime, because for d you should use the same order of cookies as with c. You can NOT sort the cookie pairs directly, you have to walk thru the _c list and form the _d list because = comes before - when sorting. That particular capture is a good test case. So everyone agrees C is: The means D should be NOT |
Don't sort cookie-strings. Instead, split the cookie-pair on the first `'='` and sort the vector of `(cookie-name, cookie-value)`. Kudos to @awick for reporting the bug and explaining the correct semantics! Closes FoxIO-LLC#58
wireshark & arkime agree for 7th session of https://github.com/arkime/arkime/raw/main/tests/pcap/single-packets.pcap
rust:
ja4h_r: ge11cr06enus_Accept,Accept-Language,User-Agent,Accept-Encoding,Host,Connection_pardot,visitor_id413862-hash,visitor_id413862_pardot=tee2foreb3fefpgvk8u1056vt3,visitor_id413862-hash=1f00bdb076b5fb707c70254849819ec1797d3e27cef91a61a9488cb7ca0ebf77f226caa4075591b2591bf9a1ccdf29432c67379b,visitor_id413862=286585660
arkime:
"ja4h":["ge11cr06enus_8c2f9ef95269_d23bf79698dc_69e42fa741fe"]
"ja4h_r":["ge11cr06enus_Accept,Accept-Language,User-Agent,Accept-Encoding,Host,Connection_pardot,visitor_id413862,visitor_id413862-hash_pardot=tee2foreb3fefpgvk8u1056vt3,visitor_id413862=286585660,visitor_id413862-hash=1f00bdb076b5fb707c70254849819ec1797d3e27cef91a61a9488cb7ca0ebf77f226caa4075591b2591bf9a1ccdf29432c67379b"]
wireshark:
JA4H: ge11cr06enus_8c2f9ef95269_d23bf79698dc_69e42fa741fe
JA4H Raw [truncated]: ge11cr06enus_Accept,Accept-Language,User-Agent,Accept-Encoding,Host,Connection_pardot,visitor_id413862,visitor_id413862-hash_pardot=tee2foreb3fefpgvk8u1056vt3,visitor_id413862=286585660,visitor_id413862-hash=1f00bdb07
The text was updated successfully, but these errors were encountered: