Conversation
The analysis query checks for DNS consistency using hasAny(union_tls_consistent_ips, dns_answers), however the ctrl join was not correctly mapping the TLS consistency checks to the DNS answers. The root cause is that the observation generation is not performing the correct mapping, since DNS rows are mapped only by IP as the transaction_id in DNS is a fresh one, leading to it greedily picking based on IP instead of tls_server_name. This means that in the event of a redirect (eg. to www.) where the IPs are the same it will be mapped to the wrong fqdn. For the moment as a workaround to the analysis when the hostname field is empty, because it wasn't able to be JOINed correctly, we will default to the tls_server_name. This is a new problem that came to surface with web_connectivity 0.5 that performs additional TLS handshakes for the full redirect chain, hence we had not seen it before.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #191 +/- ##
==========================================
+ Coverage 83.07% 83.13% +0.05%
==========================================
Files 91 91
Lines 6411 6415 +4
==========================================
+ Hits 5326 5333 +7
+ Misses 1085 1082 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The analysis query checks for DNS consistency using hasAny(union_tls_consistent_ips, dns_answers), however the ctrl join was not correctly mapping the TLS consistency checks to the DNS answers.
The root cause is that the observation generation is not performing the correct mapping, since DNS rows are mapped only by IP as the transaction_id in DNS is a fresh one, leading to it greedily picking based on IP instead of tls_server_name. This means that in the event of a redirect (eg. to www.) where the IPs are the same it will be mapped to the wrong fqdn.
For the moment as a workaround to the analysis when the hostname field is empty, because it wasn't able to be JOINed correctly, we will default to the tls_server_name.
This is a new problem that came to surface with web_connectivity 0.5 that performs additional TLS handshakes for the full redirect chain, hence we had not seen it before.
related to: #180