From 5019022e13ac1f807d818ab4c8d6aafc1bd7d66d Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Mon, 31 Jul 2023 07:44:43 +0200 Subject: DNS: extract geolocation information, if available (#2065) The option NSID (RFC5001) is used by Google DNS to report the airport code of the metro where the DNS query is handled. This option is quite rare, but the added overhead in DNS code is pretty much zero for "normal" DNS traffic --- tests/cfgs/default/pcap/dns-google-nsid.pcapng | Bin 0 -> 2888 bytes .../cfgs/default/result/dns-google-nsid.pcapng.out | 33 +++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 tests/cfgs/default/pcap/dns-google-nsid.pcapng create mode 100644 tests/cfgs/default/result/dns-google-nsid.pcapng.out (limited to 'tests') diff --git a/tests/cfgs/default/pcap/dns-google-nsid.pcapng b/tests/cfgs/default/pcap/dns-google-nsid.pcapng new file mode 100644 index 000000000..b5442483a Binary files /dev/null and b/tests/cfgs/default/pcap/dns-google-nsid.pcapng differ diff --git a/tests/cfgs/default/result/dns-google-nsid.pcapng.out b/tests/cfgs/default/result/dns-google-nsid.pcapng.out new file mode 100644 index 000000000..979ce883a --- /dev/null +++ b/tests/cfgs/default/result/dns-google-nsid.pcapng.out @@ -0,0 +1,33 @@ +Guessed flow protos: 0 + +DPI Packets (UDP): 14 (2.00 pkts/flow) +Confidence DPI : 7 (flows) +Num dissector calls: 7 (1.00 diss/flow) +LRU cache ookla: 0/0/0 (insert/search/found) +LRU cache bittorrent: 0/0/0 (insert/search/found) +LRU cache zoom: 0/0/0 (insert/search/found) +LRU cache stun: 0/0/0 (insert/search/found) +LRU cache tls_cert: 0/0/0 (insert/search/found) +LRU cache mining: 0/0/0 (insert/search/found) +LRU cache msteams: 0/0/0 (insert/search/found) +LRU cache stun_zoom: 0/0/0 (insert/search/found) +Automa host: 12/8 (search/found) +Automa domain: 12/0 (search/found) +Automa tls cert: 0/0 (search/found) +Automa risk mask: 6/0 (search/found) +Automa common alpns: 0/0 (search/found) +Patricia risk mask: 6/0 (search/found) +Patricia risk: 0/0 (search/found) +Patricia protocols: 3/3 (search/found) + +DNS 6 952 3 +ntop 4 514 2 +Wikipedia 4 704 2 + + 1 UDP [2001:b07:a3d:c112:b332:20d:89ab:105e]:41624 <-> [2001:4860:4860::8844]:53 [proto: 5/DNS][IP: 0/Unknown][ClearText][Confidence: DPI][DPI packets: 2][cat: Network/14][1 pkts/106 bytes <-> 1 pkts/314 bytes][Goodput ratio: 41/80][0.01 sec][::][GeoLocation: mil][PLAIN TEXT (servers)][Plen Bins: 0,50,0,0,0,0,0,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + 2 UDP [2a03:b0c0:2:d0::360:4001]:44924 <-> [2001:4860:4860::8888]:53 [proto: 5.176/DNS.Wikipedia][IP: 0/Unknown][ClearText][Confidence: DPI][DPI packets: 2][cat: Network/14][1 pkts/123 bytes <-> 1 pkts/256 bytes][Goodput ratio: 49/75][0.20 sec][Hostname/SNI: www.wikipedia.it][18.67.39.58][GeoLocation: ams][PLAIN TEXT (wikipedia)][Plen Bins: 0,50,0,0,0,0,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + 3 UDP 192.168.1.29:62500 <-> 8.8.4.4:53 [proto: 5.176/DNS.Wikipedia][IP: 126/Google][ClearText][Confidence: DPI][DPI packets: 2][cat: Network/14][1 pkts/91 bytes <-> 1 pkts/234 bytes][Goodput ratio: 53/82][0.27 sec][Hostname/SNI: www.wikipedia.it][108.157.194.28][PLAIN TEXT (wikipedia)][Plen Bins: 0,50,0,0,0,0,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + 4 UDP [2a03:b0c0:2:d0::360:4001]:43660 <-> [2001:4860:4860::8888]:53 [proto: 5/DNS][IP: 0/Unknown][ClearText][Confidence: DPI][DPI packets: 2][cat: Network/14][1 pkts/124 bytes <-> 1 pkts/169 bytes][Goodput ratio: 50/63][0.01 sec][Hostname/SNI: www.wireshark.org][104.26.10.240][GeoLocation: ams][PLAIN TEXT (wireshark)][Plen Bins: 0,50,0,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + 5 UDP [2a03:b0c0:2:d0::360:4001]:46618 <-> [2001:4860:4860::8888]:53 [proto: 5.26/DNS.ntop][IP: 0/Unknown][ClearText][Confidence: DPI][DPI packets: 2][cat: Network/14][1 pkts/119 bytes <-> 1 pkts/164 bytes][Goodput ratio: 47/62][0.02 sec][Hostname/SNI: www.ntop.org][178.62.197.130][GeoLocation: ams][PLAIN TEXT (digitalocean)][Plen Bins: 0,50,0,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + 6 UDP 192.168.1.29:51166 <-> 8.8.4.4:53 [proto: 5/DNS][IP: 126/Google][ClearText][Confidence: DPI][DPI packets: 2][cat: Network/14][1 pkts/92 bytes <-> 1 pkts/147 bytes][Goodput ratio: 54/71][0.02 sec][Hostname/SNI: www.wireshark.org][104.26.10.240][PLAIN TEXT (wireshark)][Plen Bins: 0,50,0,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + 7 UDP 192.168.1.29:58580 <-> 8.8.4.4:53 [proto: 5.26/DNS.ntop][IP: 126/Google][ClearText][Confidence: DPI][DPI packets: 2][cat: Network/14][1 pkts/87 bytes <-> 1 pkts/144 bytes][Goodput ratio: 51/70][0.03 sec][Hostname/SNI: www.ntop.org][178.62.197.130][GeoLocation: mil][PLAIN TEXT (digitalocean)][Plen Bins: 0,50,0,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] -- cgit v1.2.3