DTLS: fix exclusion of DTLS protocol

Add an helper to exclude a generic protocol
This commit is contained in:
Nardi Ivan
2022-07-20 19:16:18 +02:00
committed by Ivan Nardi
parent a9204eb936
commit d66aa49787
45 changed files with 57 additions and 45 deletions
+1
View File
@@ -227,6 +227,7 @@
#endif /* NDPI_ENABLE_DEBUG_MESSAGES */
#define NDPI_EXCLUDE_PROTO(mod,flow) ndpi_exclude_protocol(mod, flow, NDPI_CURRENT_PROTO, __FILE__, __FUNCTION__, __LINE__)
#define NDPI_EXCLUDE_PROTO_EXT(mod,flow,proto) ndpi_exclude_protocol(mod, flow, proto, __FILE__, __FUNCTION__, __LINE__)
/**
* macro for getting the string len of a static string
+2 -2
View File
@@ -67,7 +67,7 @@ static void ndpi_search_mining_udp(struct ndpi_detection_module_struct *ndpi_str
}
}
ndpi_exclude_protocol(ndpi_struct, flow, NDPI_PROTOCOL_MINING, __FILE__, __FUNCTION__, __LINE__);
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
}
/* ************************************************************************** */
@@ -159,7 +159,7 @@ static void ndpi_search_mining_tcp(struct ndpi_detection_module_struct *ndpi_str
}
}
ndpi_exclude_protocol(ndpi_struct, flow, NDPI_PROTOCOL_MINING, __FILE__, __FUNCTION__, __LINE__);
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
}
/* ************************************************************************** */
+2 -2
View File
@@ -63,8 +63,8 @@ void ndpi_search_smb_tcp(struct ndpi_detection_module_struct *ndpi_struct, struc
}
}
ndpi_exclude_protocol(ndpi_struct, flow, NDPI_PROTOCOL_SMBV1, __FILE__, __FUNCTION__, __LINE__);
ndpi_exclude_protocol(ndpi_struct, flow, NDPI_PROTOCOL_SMBV23, __FILE__, __FUNCTION__, __LINE__);
NDPI_EXCLUDE_PROTO_EXT(ndpi_struct, flow, NDPI_PROTOCOL_SMBV1);
NDPI_EXCLUDE_PROTO_EXT(ndpi_struct, flow, NDPI_PROTOCOL_SMBV23);
}
+3 -1
View File
@@ -1187,7 +1187,9 @@ static int ndpi_search_tls_udp(struct ndpi_detection_module_struct *ndpi_struct,
packet->payload_packet_len = p_len; /* Restore */
if(no_dtls || change_cipher_found) {
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
NDPI_EXCLUDE_PROTO_EXT(ndpi_struct, flow, NDPI_PROTOCOL_DTLS);
flow->check_extra_packets = 0;
flow->extra_packets_func = NULL;
return(0); /* That's all */
} else {
return(1); /* Keep working */
Binary file not shown.
+1 -1
View File
@@ -6,7 +6,7 @@ Confidence Unknown : 14 (flows)
Confidence Match by port : 5 (flows)
Confidence Match by IP : 1 (flows)
Confidence DPI : 177 (flows)
Num dissector calls: 5065 (25.71 diss/flow)
Num dissector calls: 5055 (25.66 diss/flow)
Unknown 24 6428 14
DNS 2 378 1
+1 -1
View File
@@ -2,7 +2,7 @@ Guessed flow protos: 1
DPI Packets (UDP): 5 (5.00 pkts/flow)
Confidence Unknown : 1 (flows)
Num dissector calls: 171 (171.00 diss/flow)
Num dissector calls: 167 (167.00 diss/flow)
Unknown 5 850 1
+1 -1
View File
@@ -2,7 +2,7 @@ Guessed flow protos: 1
DPI Packets (UDP): 2 (2.00 pkts/flow)
Confidence Unknown : 1 (flows)
Num dissector calls: 112 (112.00 diss/flow)
Num dissector calls: 111 (111.00 diss/flow)
Unknown 2 212 1
+1 -1
View File
@@ -3,7 +3,7 @@ Guessed flow protos: 0
DPI Packets (TCP): 12 (6.00 pkts/flow)
DPI Packets (UDP): 116 (4.00 pkts/flow)
Confidence DPI : 31 (flows)
Num dissector calls: 4102 (132.32 diss/flow)
Num dissector calls: 4044 (130.45 diss/flow)
Google 23 11743 2
EAQ 174 10092 29
+2 -2
View File
@@ -1,13 +1,13 @@
Guessed flow protos: 12
DPI Packets (TCP): 161 (7.32 pkts/flow)
DPI Packets (UDP): 83 (2.24 pkts/flow)
DPI Packets (UDP): 82 (2.22 pkts/flow)
DPI Packets (other): 10 (1.00 pkts/flow)
Confidence Unknown : 2 (flows)
Confidence Match by port : 5 (flows)
Confidence Match by IP : 1 (flows)
Confidence DPI : 61 (flows)
Num dissector calls: 1170 (16.96 diss/flow)
Num dissector calls: 1161 (16.83 diss/flow)
Unknown 19 1054 2
DNS 32 3655 16
+1 -1
View File
@@ -3,7 +3,7 @@ Guessed flow protos: 3
DPI Packets (UDP): 13 (1.62 pkts/flow)
Confidence Match by port : 3 (flows)
Confidence DPI : 5 (flows)
Num dissector calls: 378 (47.25 diss/flow)
Num dissector calls: 373 (46.62 diss/flow)
collectd 81 109386 8
@@ -2,7 +2,7 @@ Guessed flow protos: 0
DPI Packets (UDP): 256 (1.04 pkts/flow)
Confidence DPI : 245 (flows)
Num dissector calls: 21885 (89.33 diss/flow)
Num dissector calls: 21874 (89.28 diss/flow)
DNScrypt 488 309562 245
+1 -1
View File
@@ -2,7 +2,7 @@ Guessed flow protos: 0
DPI Packets (UDP): 6 (2.00 pkts/flow)
Confidence DPI : 3 (flows)
Num dissector calls: 351 (117.00 diss/flow)
Num dissector calls: 348 (116.00 diss/flow)
DNScrypt 6 4300 3
@@ -2,7 +2,7 @@ Guessed flow protos: 0
DPI Packets (UDP): 2 (2.00 pkts/flow)
Confidence DPI : 1 (flows)
Num dissector calls: 118 (118.00 diss/flow)
Num dissector calls: 117 (117.00 diss/flow)
DNScrypt 6 2380 1
+1 -1
View File
@@ -1,4 +1,4 @@
Guessed flow protos: 1
Guessed flow protos: 0
DPI Packets (UDP): 7 (7.00 pkts/flow)
Confidence DPI : 1 (flows)
+1 -1
View File
@@ -7,7 +7,7 @@ Confidence Unknown : 595 (flows)
Confidence Match by port : 1 (flows)
Confidence Match by IP : 1 (flows)
Confidence DPI : 163 (flows)
Num dissector calls: 64728 (85.17 diss/flow)
Num dissector calls: 64111 (84.36 diss/flow)
Unknown 1423 119577 595
MDNS 18 1632 2
+1 -1
View File
@@ -3,7 +3,7 @@ Guessed flow protos: 3
DPI Packets (UDP): 7 (2.33 pkts/flow)
Confidence Unknown : 1 (flows)
Confidence Match by port : 2 (flows)
Num dissector calls: 373 (124.33 diss/flow)
Num dissector calls: 369 (123.00 diss/flow)
Unknown 5 428 1
GTP 2 424 2
+1 -1
View File
@@ -5,7 +5,7 @@ DPI Packets (UDP): 4 (2.00 pkts/flow)
Confidence Unknown : 1 (flows)
Confidence Match by port : 6 (flows)
Confidence DPI : 8 (flows)
Num dissector calls: 234 (15.60 diss/flow)
Num dissector calls: 232 (15.47 diss/flow)
Unknown 3 502 1
ntop 80 36401 4
+1 -1
View File
@@ -2,7 +2,7 @@ Guessed flow protos: 0
DPI Packets (UDP): 7 (3.50 pkts/flow)
Confidence DPI : 2 (flows)
Num dissector calls: 274 (137.00 diss/flow)
Num dissector calls: 269 (134.50 diss/flow)
IMO 100 35380 2
+1 -1
View File
@@ -5,7 +5,7 @@ DPI Packets (UDP): 55 (1.77 pkts/flow)
DPI Packets (other): 5 (1.00 pkts/flow)
Confidence Unknown : 1 (flows)
Confidence DPI : 50 (flows)
Num dissector calls: 563 (11.04 diss/flow)
Num dissector calls: 562 (11.02 diss/flow)
Unknown 2 120 1
MDNS 17 7012 5
+1 -1
View File
@@ -4,7 +4,7 @@ DPI Packets (UDP): 6 (1.50 pkts/flow)
DPI Packets (other): 4 (1.00 pkts/flow)
Confidence Unknown : 2 (flows)
Confidence DPI : 6 (flows)
Num dissector calls: 308 (38.50 diss/flow)
Num dissector calls: 306 (38.25 diss/flow)
Unknown 4 1696 2
Kontiki 3278 3852324 2
+1 -1
View File
@@ -5,7 +5,7 @@ DPI Packets (UDP): 35 (2.33 pkts/flow)
DPI Packets (other): 2 (1.00 pkts/flow)
Confidence Match by IP : 6 (flows)
Confidence DPI : 15 (flows)
Num dissector calls: 1310 (62.38 diss/flow)
Num dissector calls: 1295 (61.67 diss/flow)
ICMP 30 2100 2
Nintendo 890 320242 12
+1 -1
View File
@@ -3,7 +3,7 @@ Guessed flow protos: 0
DPI Packets (TCP): 6 (6.00 pkts/flow)
DPI Packets (UDP): 5 (2.50 pkts/flow)
Confidence DPI : 3 (flows)
Num dissector calls: 394 (131.33 diss/flow)
Num dissector calls: 391 (130.33 diss/flow)
OpenVPN 298 57111 3
+1 -1
View File
@@ -5,7 +5,7 @@ DPI Packets (UDP): 201 (4.57 pkts/flow)
Confidence Unknown : 34 (flows)
Confidence Match by port : 2 (flows)
Confidence DPI : 71 (flows)
Num dissector calls: 6427 (60.07 diss/flow)
Num dissector calls: 6270 (58.60 diss/flow)
Unknown 990 378832 34
HTTP 377 402676 46
+1 -1
View File
@@ -3,7 +3,7 @@ Guessed flow protos: 1
DPI Packets (UDP): 12 (1.20 pkts/flow)
Confidence Match by IP : 1 (flows)
Confidence DPI : 9 (flows)
Num dissector calls: 208 (20.80 diss/flow)
Num dissector calls: 206 (20.60 diss/flow)
GMail 413 254874 1
YouTube 85 76193 5
@@ -2,7 +2,7 @@ Guessed flow protos: 1
DPI Packets (UDP): 10 (10.00 pkts/flow)
Confidence Unknown : 1 (flows)
Num dissector calls: 182 (182.00 diss/flow)
Num dissector calls: 173 (173.00 diss/flow)
Unknown 10 7479 1
+1 -1
View File
@@ -2,7 +2,7 @@ Guessed flow protos: 0
DPI Packets (UDP): 24 (2.00 pkts/flow)
Confidence DPI : 12 (flows)
Num dissector calls: 1404 (117.00 diss/flow)
Num dissector calls: 1392 (116.00 diss/flow)
RakNet 66 9600 12
+1 -1
View File
@@ -2,7 +2,7 @@ Guessed flow protos: 0
DPI Packets (UDP): 10 (2.00 pkts/flow)
Confidence DPI : 5 (flows)
Num dissector calls: 582 (116.40 diss/flow)
Num dissector calls: 577 (115.40 diss/flow)
RX 132 26475 5
+1 -1
View File
@@ -2,7 +2,7 @@ Guessed flow protos: 0
DPI Packets (UDP): 9 (9.00 pkts/flow)
Confidence DPI : 1 (flows)
Num dissector calls: 210 (210.00 diss/flow)
Num dissector calls: 203 (203.00 diss/flow)
SIP 30 5592 1
+1 -1
View File
@@ -7,7 +7,7 @@ Confidence Unknown : 61 (flows)
Confidence Match by port : 27 (flows)
Confidence Match by IP : 1 (flows)
Confidence DPI : 204 (flows)
Num dissector calls: 31676 (108.11 diss/flow)
Num dissector calls: 31670 (108.09 diss/flow)
Unknown 1575 272476 61
DNS 2 267 1
+1 -1
View File
@@ -6,7 +6,7 @@ DPI Packets (other): 5 (1.00 pkts/flow)
Confidence Unknown : 45 (flows)
Confidence Match by port : 22 (flows)
Confidence DPI : 200 (flows)
Num dissector calls: 25957 (97.22 diss/flow)
Num dissector calls: 25954 (97.21 diss/flow)
Unknown 850 152468 45
DNS 2 267 1
+1 -1
View File
@@ -2,7 +2,7 @@ Guessed flow protos: 0
DPI Packets (UDP): 2 (2.00 pkts/flow)
Confidence DPI : 1 (flows)
Num dissector calls: 117 (117.00 diss/flow)
Num dissector calls: 116 (116.00 diss/flow)
Skype_Teams 5 339 1
+1 -1
View File
@@ -6,7 +6,7 @@ DPI Packets (other): 1 (1.00 pkts/flow)
Confidence Match by port : 8 (flows)
Confidence Match by IP : 5 (flows)
Confidence DPI : 39 (flows)
Num dissector calls: 1866 (35.88 diss/flow)
Num dissector calls: 1857 (35.71 diss/flow)
DNS 26 2848 7
HTTP 450 294880 19
+9
View File
@@ -0,0 +1,9 @@
Guessed flow protos: 0
DPI Packets (UDP): 4 (4.00 pkts/flow)
Confidence DPI : 1 (flows)
Num dissector calls: 134 (134.00 diss/flow)
Google 33 6292 1
1 UDP 192.168.12.169:49153 <-> 142.250.82.99:3478 [proto: 78.126/STUN.Google][ClearText][Confidence: DPI][cat: Web/5][18 pkts/2856 bytes <-> 15 pkts/3436 bytes][Goodput ratio: 74/82][2.12 sec][bytes ratio: -0.092 (Mixed)][IAT c2s/s2c min/avg/max/stddev: 8/0 88/153 699/625 177/222][Pkt Len c2s/s2c min/avg/max/stddev: 107/76 159/229 588/1240 107/297][PLAIN TEXT (BwlkYDtFJ)][Plen Bins: 0,6,57,21,6,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0]
+1 -1
View File
@@ -5,7 +5,7 @@ DPI Packets (other): 2 (1.00 pkts/flow)
Confidence DPI (partial) : 1 (flows)
Confidence DPI (cache) : 2 (flows)
Confidence DPI : 20 (flows)
Num dissector calls: 1846 (80.26 diss/flow)
Num dissector calls: 1818 (79.04 diss/flow)
ICMP 53 5186 2
GoogleHangoutDuo 40 2720 4
+1 -1
View File
@@ -7,7 +7,7 @@ Confidence Unknown : 1 (flows)
Confidence Match by IP : 1 (flows)
Confidence DPI (partial) : 1 (flows)
Confidence DPI : 80 (flows)
Num dissector calls: 1164 (14.02 diss/flow)
Num dissector calls: 1140 (13.73 diss/flow)
Unknown 4 456 1
DNS 10 1357 5
+1 -1
View File
@@ -3,7 +3,7 @@ Guessed flow protos: 0
DPI Packets (TCP): 4 (4.00 pkts/flow)
DPI Packets (UDP): 4 (4.00 pkts/flow)
Confidence DPI : 2 (flows)
Num dissector calls: 159 (79.50 diss/flow)
Num dissector calls: 156 (78.00 diss/flow)
TeamViewer 1298 704218 2
+1 -1
View File
@@ -3,7 +3,7 @@ Guessed flow protos: 5
DPI Packets (UDP): 93 (1.94 pkts/flow)
Confidence Unknown : 2 (flows)
Confidence DPI : 46 (flows)
Num dissector calls: 1678 (34.96 diss/flow)
Num dissector calls: 1652 (34.42 diss/flow)
Unknown 304 72496 2
DNS 8 716 4
+1 -1
View File
@@ -2,7 +2,7 @@ Guessed flow protos: 0
DPI Packets (UDP): 13 (1.86 pkts/flow)
Confidence DPI : 7 (flows)
Num dissector calls: 302 (43.14 diss/flow)
Num dissector calls: 296 (42.29 diss/flow)
TFTP 107 31296 7
+1 -1
View File
@@ -5,7 +5,7 @@ DPI Packets (UDP): 27 (1.93 pkts/flow)
DPI Packets (other): 2 (1.00 pkts/flow)
Confidence Match by IP : 4 (flows)
Confidence DPI : 25 (flows)
Num dissector calls: 701 (24.17 diss/flow)
Num dissector calls: 699 (24.10 diss/flow)
DNS 8 1267 4
MDNS 4 412 1
+1 -1
View File
@@ -5,7 +5,7 @@ DPI Packets (UDP): 17 (8.50 pkts/flow)
Confidence Match by port : 1 (flows)
Confidence Match by IP : 3 (flows)
Confidence DPI : 53 (flows)
Num dissector calls: 1087 (19.07 diss/flow)
Num dissector calls: 1072 (18.81 diss/flow)
HTTP 22 3182 2
TLS 106 11841 8
+1 -1
View File
@@ -5,7 +5,7 @@ DPI Packets (UDP): 44 (3.14 pkts/flow)
Confidence Match by port : 13 (flows)
Confidence Match by IP : 8 (flows)
Confidence DPI : 23 (flows)
Num dissector calls: 925 (21.02 diss/flow)
Num dissector calls: 904 (20.55 diss/flow)
DNS 6 630 3
HTTP 19 2275 5
+1 -1
View File
@@ -2,7 +2,7 @@ Guessed flow protos: 0
DPI Packets (UDP): 4 (4.00 pkts/flow)
Confidence DPI : 1 (flows)
Num dissector calls: 140 (140.00 diss/flow)
Num dissector calls: 138 (138.00 diss/flow)
WireGuard 2399 734182 1
+1 -1
View File
@@ -5,7 +5,7 @@ DPI Packets (UDP): 25 (1.47 pkts/flow)
DPI Packets (other): 2 (1.00 pkts/flow)
Confidence Match by IP : 2 (flows)
Confidence DPI : 31 (flows)
Num dissector calls: 937 (28.39 diss/flow)
Num dissector calls: 936 (28.36 diss/flow)
DNS 2 205 1
MDNS 1 87 1
+1 -1
View File
@@ -5,7 +5,7 @@ DPI Packets (UDP): 75 (25.00 pkts/flow)
DPI Packets (other): 1 (1.00 pkts/flow)
Confidence Match by IP : 3 (flows)
Confidence DPI : 2 (flows)
Num dissector calls: 943 (188.60 diss/flow)
Num dissector calls: 871 (174.20 diss/flow)
ICMP 27 1890 1
Zoom 11950 9004950 4