From 3e0445e17611a1369e9143e4f5e64fcc4e51f7a2 Mon Sep 17 00:00:00 2001 From: headshog Date: Mon, 29 May 2023 18:46:16 +0300 Subject: [PATCH 1/5] fixed numeric truncation error in ndpi_analyze.c --- src/include/ndpi_api.h | 2 +- src/include/ndpi_typedefs.h | 5 +++-- src/lib/ndpi_analyze.c | 10 +++++----- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h index 0a420accb4d..c81ceaa2ace 100644 --- a/src/include/ndpi_api.h +++ b/src/include/ndpi_api.h @@ -1711,7 +1711,7 @@ extern "C" { float ndpi_data_variance(struct ndpi_analyze_struct *s); float ndpi_data_stddev(struct ndpi_analyze_struct *s); float ndpi_data_mean(struct ndpi_analyze_struct *s); - u_int32_t ndpi_data_last(struct ndpi_analyze_struct *s); + u_int64_t ndpi_data_last(struct ndpi_analyze_struct *s); u_int32_t ndpi_data_min(struct ndpi_analyze_struct *s); u_int32_t ndpi_data_max(struct ndpi_analyze_struct *s); float ndpi_data_ratio(u_int32_t sent, u_int32_t rcvd); diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h index 491de0d7908..a3fa832a724 100644 --- a/src/include/ndpi_typedefs.h +++ b/src/include/ndpi_typedefs.h @@ -1803,8 +1803,9 @@ typedef struct { /* **************************************** */ struct ndpi_analyze_struct { - u_int32_t *values; - u_int32_t min_val, max_val, sum_total, num_data_entries, next_value_insert_index; + u_int64_t *values; + u_int64_t min_val, max_val, sum_total; + u_int32_t num_data_entries, next_value_insert_index; u_int16_t num_values_array_len /* length of the values array */; struct { diff --git a/src/lib/ndpi_analyze.c b/src/lib/ndpi_analyze.c index 75b650db58a..18b550a51e6 100644 --- a/src/lib/ndpi_analyze.c +++ b/src/lib/ndpi_analyze.c @@ -41,7 +41,7 @@ void ndpi_init_data_analysis(struct ndpi_analyze_struct *ret, u_int16_t _max_ser ret->num_values_array_len = _max_series_len; if(ret->num_values_array_len > 0) { - len = sizeof(u_int32_t) * ret->num_values_array_len; + len = sizeof(u_int64_t) * ret->num_values_array_len; if((ret->values = ndpi_malloc(len)) != NULL) memset(ret->values, 0, len); else @@ -70,7 +70,7 @@ void ndpi_free_data_analysis(struct ndpi_analyze_struct *d, u_int8_t free_pointe /* ********************************************************************************* */ void ndpi_reset_data_analysis(struct ndpi_analyze_struct *d) { - u_int32_t *values_bkp; + u_int64_t *values_bkp; u_int32_t num_values_array_len_bpk; if(!d) @@ -85,7 +85,7 @@ void ndpi_reset_data_analysis(struct ndpi_analyze_struct *d) { d->num_values_array_len = num_values_array_len_bpk; if(d->values) - memset(d->values, 0, sizeof(u_int32_t)*d->num_values_array_len); + memset(d->values, 0, sizeof(u_int64_t)*d->num_values_array_len); } /* ********************************************************************************* */ @@ -135,7 +135,7 @@ float ndpi_data_average(struct ndpi_analyze_struct *s) { /* ********************************************************************************* */ -u_int32_t ndpi_data_last(struct ndpi_analyze_struct *s) { +u_int64_t ndpi_data_last(struct ndpi_analyze_struct *s) { if((!s) || (s->num_data_entries == 0) || (s->num_values_array_len == 0)) return(0); @@ -264,7 +264,7 @@ void ndpi_data_print_window_values(struct ndpi_analyze_struct *s) { u_int16_t i, n = ndpi_min(s->num_data_entries, s->num_values_array_len); for(i=0; ivalues[i]); + printf("[%u: %llu]", i, s->values[i]); printf("\n"); } From 400bf7c0e3e3fe80f437c53d3ce3c39a60681163 Mon Sep 17 00:00:00 2001 From: headshog Date: Mon, 29 May 2023 18:59:06 +0300 Subject: [PATCH 2/5] fixed numeric truncation error in ndpi_analyze.c x2 --- src/lib/ndpi_analyze.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ndpi_analyze.c b/src/lib/ndpi_analyze.c index 18b550a51e6..05d86ccdf58 100644 --- a/src/lib/ndpi_analyze.c +++ b/src/lib/ndpi_analyze.c @@ -264,7 +264,7 @@ void ndpi_data_print_window_values(struct ndpi_analyze_struct *s) { u_int16_t i, n = ndpi_min(s->num_data_entries, s->num_values_array_len); for(i=0; ivalues[i]); + printf("[%u: %lu]", i, s->values[i]); printf("\n"); } From 0c56a0733484ca47b00daa2f65f25d34555a2882 Mon Sep 17 00:00:00 2001 From: headshog Date: Mon, 29 May 2023 19:06:09 +0300 Subject: [PATCH 3/5] fixed numeric truncation error in ndpi_analyze.c x3 --- src/lib/ndpi_analyze.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ndpi_analyze.c b/src/lib/ndpi_analyze.c index 05d86ccdf58..18b550a51e6 100644 --- a/src/lib/ndpi_analyze.c +++ b/src/lib/ndpi_analyze.c @@ -264,7 +264,7 @@ void ndpi_data_print_window_values(struct ndpi_analyze_struct *s) { u_int16_t i, n = ndpi_min(s->num_data_entries, s->num_values_array_len); for(i=0; ivalues[i]); + printf("[%u: %llu]", i, s->values[i]); printf("\n"); } From b097a6d7aba631592d1e7022f45743ab31b36528 Mon Sep 17 00:00:00 2001 From: headshog Date: Mon, 29 May 2023 19:25:55 +0300 Subject: [PATCH 4/5] fixed numeric truncation error in ndpi_analyze.c and printf format --- src/lib/ndpi_analyze.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/ndpi_analyze.c b/src/lib/ndpi_analyze.c index 18b550a51e6..d9828ad62f2 100644 --- a/src/lib/ndpi_analyze.c +++ b/src/lib/ndpi_analyze.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include /* FLT_EPSILON */ #include "ndpi_api.h" @@ -264,8 +265,8 @@ void ndpi_data_print_window_values(struct ndpi_analyze_struct *s) { u_int16_t i, n = ndpi_min(s->num_data_entries, s->num_values_array_len); for(i=0; ivalues[i]); - + printf("[%u: %" PRIu64 "]", i, s->values[i]); + printf("\n"); } } From 372a741ed5e6789e62ea8c52e358666ff8744b12 Mon Sep 17 00:00:00 2001 From: headshog Date: Tue, 30 May 2023 12:48:36 +0300 Subject: [PATCH 5/5] fixed tests --- tests/cfgs/default/result/collectd.pcap.out | 2 +- .../cfgs/default/result/ipsec_isakmp_esp.pcap.out | 14 +++++++------- tests/cfgs/default/result/softether.pcap.out | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/cfgs/default/result/collectd.pcap.out b/tests/cfgs/default/result/collectd.pcap.out index a9a29579300..474cfddaa40 100644 --- a/tests/cfgs/default/result/collectd.pcap.out +++ b/tests/cfgs/default/result/collectd.pcap.out @@ -25,7 +25,7 @@ collectd 81 109386 8 1 UDP 127.0.0.1:35988 -> 127.0.0.1:25826 [proto: 298/collectd][IP: 0/Unknown][ClearText][Confidence: DPI][DPI packets: 1][cat: System/18][49 pkts/66012 bytes -> 0 pkts/0 bytes][Goodput ratio: 97/0][406.49 sec][Hostname/SNI: devlap.fritz.box][bytes ratio: 1.000 (Upload)][IAT c2s/s2c min/avg/max/stddev: 0/0 8783/0 10000/0 3188/0][Pkt Len c2s/s2c min/avg/max/stddev: 193/0 1347/0 1388/0 167/0][PLAIN TEXT (devlap.fritz.box)][Plen Bins: 0,0,0,0,2,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,83,10,0,0,0,0,0] 2 UDP 127.0.0.1:36832 -> 127.0.0.1:25826 [proto: 298/collectd][IP: 0/Unknown][ClearText][Confidence: DPI][DPI packets: 1][cat: System/18][17 pkts/22755 bytes -> 0 pkts/0 bytes][Goodput ratio: 97/0][134.67 sec][Hostname/SNI: devlap.fritz.box][bytes ratio: 1.000 (Upload)][IAT c2s/s2c min/avg/max/stddev: 0/0 8311/0 10000/0 3518/0][Pkt Len c2s/s2c min/avg/max/stddev: 924/0 1339/0 1384/0 104/0][PLAIN TEXT (devlap.fritz.box)][Plen Bins: 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,0,0,0,0,0,0,0,0,0,0,0,0,5,89,0,0,0,0,0,0] - 3 UDP 192.168.178.35:39576 -> 239.192.74.66:25826 [proto: 298/collectd][IP: 0/Unknown][ClearText][Confidence: Match by port][DPI packets: 6][cat: System/18][6 pkts/8363 bytes -> 0 pkts/0 bytes][Goodput ratio: 97/0][708570048.00 sec][bytes ratio: 1.000 (Upload)][IAT c2s/s2c min/avg/max/stddev: 907/0 839078848/0 4195363456/0 760418176/0][Pkt Len c2s/s2c min/avg/max/stddev: 1274/0 1394/0 1434/0 54/0][PLAIN TEXT (RmBJSP)][Plen Bins: 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,16,0,0,0,33,50,0,0,0,0] + 3 UDP 192.168.178.35:39576 -> 239.192.74.66:25826 [proto: 298/collectd][IP: 0/Unknown][ClearText][Confidence: Match by port][DPI packets: 6][cat: System/18][6 pkts/8363 bytes -> 0 pkts/0 bytes][Goodput ratio: 97/0][708570048.00 sec][bytes ratio: 1.000 (Upload)][IAT c2s/s2c min/avg/max/stddev: 907/0 141714014208/0 4195363456/0 0/0][Pkt Len c2s/s2c min/avg/max/stddev: 1274/0 1394/0 1434/0 54/0][PLAIN TEXT (RmBJSP)][Plen Bins: 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,16,0,0,0,33,50,0,0,0,0] 4 UDP 127.0.0.1:54138 -> 127.0.0.1:25826 [proto: 298/collectd][IP: 0/Unknown][ClearText][Confidence: DPI][DPI packets: 1][cat: System/18][5 pkts/6744 bytes -> 0 pkts/0 bytes][Goodput ratio: 97/0][33.27 sec][Hostname/SNI: devlap.fritz.box][PLAIN TEXT (devlap.fritz.box)][Plen Bins: 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,20,0,20,40,20,0,0,0,0,0] 5 UDP 192.168.178.35:39577 -> 239.192.74.66:25826 [proto: 298/collectd][IP: 0/Unknown][ClearText][Confidence: Match by port][DPI packets: 1][cat: System/18][1 pkts/1408 bytes -> 0 pkts/0 bytes][Goodput ratio: 97/0][< 1 sec][Plen Bins: 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,100,0,0,0,0,0] 6 UDP 127.0.0.1:36064 -> 127.0.0.1:25826 [proto: 298/collectd][IP: 0/Unknown][ClearText][Confidence: DPI][DPI packets: 1][cat: System/18][1 pkts/1368 bytes -> 0 pkts/0 bytes][Goodput ratio: 97/0][< 1 sec][Hostname/SNI: devlap.fritz.box][PLAIN TEXT (devlap.fritz.box)][Plen Bins: 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,100,0,0,0,0,0,0] diff --git a/tests/cfgs/default/result/ipsec_isakmp_esp.pcap.out b/tests/cfgs/default/result/ipsec_isakmp_esp.pcap.out index 2d507d5a01c..4f52fea6340 100644 --- a/tests/cfgs/default/result/ipsec_isakmp_esp.pcap.out +++ b/tests/cfgs/default/result/ipsec_isakmp_esp.pcap.out @@ -26,21 +26,21 @@ IPSec 1080 580682 24 2 UDP 192.168.2.100:14500 <-> 109.237.187.130:4500 [proto: 79/IPSec][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 1][cat: VPN/2][37 pkts/23230 bytes <-> 53 pkts/36862 bytes][Goodput ratio: 93/94][< 1 sec][bytes ratio: -0.227 (Download)][IAT c2s/s2c min/avg/max/stddev: 0/0 51181/32575 761601/761794 163164/132507][Pkt Len c2s/s2c min/avg/max/stddev: 138/122 628/696 1374/1374 489/539][PLAIN TEXT (H.P.RE)][Plen Bins: 0,0,6,13,20,0,6,0,0,0,0,0,0,6,0,0,0,0,1,0,0,0,0,0,0,6,0,0,0,0,0,0,12,0,0,0,0,0,0,0,6,20,0,0,0,0,0,0] 3 UDP 192.168.2.100:10500 <-> 109.237.187.227:500 [proto: 79/IPSec][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 1][cat: VPN/2][54 pkts/44820 bytes <-> 53 pkts/11118 bytes][Goodput ratio: 95/80][< 1 sec][bytes ratio: 0.602 (Upload)][IAT c2s/s2c min/avg/max/stddev: 28/27 689892/698588 12245747/12245747 1998175/2019137][Pkt Len c2s/s2c min/avg/max/stddev: 818/94 830/210 842/330 12/118][PLAIN TEXT (rMpKau6)][Plen Bins: 0,25,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] 4 UDP 192.168.2.100:14500 <-> 109.237.187.195:4500 [proto: 79/IPSec][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 1][cat: VPN/2][42 pkts/30020 bytes <-> 48 pkts/21472 bytes][Goodput ratio: 94/91][15275.72 sec][bytes ratio: 0.166 (Mixed)][IAT c2s/s2c min/avg/max/stddev: 0/0 85008/72283 1429414/1429546 288620/266457][Pkt Len c2s/s2c min/avg/max/stddev: 138/122 715/447 1374/1374 518/432][PLAIN TEXT (@yIwAf)][Plen Bins: 0,0,8,13,26,0,6,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,6,0,4,2,0,0,0,6,0,0,0,0,0,0,0,0,19,0,0,0,0,0,0] - 5 UDP 192.168.2.100:14500 <-> 109.237.187.193:4500 [proto: 79/IPSec][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 1][cat: VPN/2][43 pkts/32226 bytes <-> 47 pkts/14246 bytes][Goodput ratio: 94/86][18892.62 sec][bytes ratio: 0.387 (Upload)][IAT c2s/s2c min/avg/max/stddev: 0/0 66479/111886632 1521662/4249448008 281113/0][Pkt Len c2s/s2c min/avg/max/stddev: 138/122 749/303 1374/1070 516/284][PLAIN TEXT (@7Ac9 )][Plen Bins: 0,0,12,13,27,0,6,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,6,0,0,7,0,0,0,5,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0] - 6 UDP 192.168.2.100:14500 <-> 109.237.187.225:4500 [proto: 79/IPSec][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 1][cat: VPN/2][34 pkts/24848 bytes <-> 41 pkts/17850 bytes][Goodput ratio: 94/90][11474.04 sec][bytes ratio: 0.164 (Mixed)][IAT c2s/s2c min/avg/max/stddev: 0/0 55649/128438992 1440343/4237012657 276939/0][Pkt Len c2s/s2c min/avg/max/stddev: 138/122 731/435 1374/1374 517/426][Risk: ** Malformed Packet **][Risk Score: 10][Risk Info: No server to client traffic / Invalid IPSec/ISAKMP Header][PLAIN TEXT (17Uv 2)][Plen Bins: 0,0,9,13,26,0,6,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,6,0,4,2,0,0,0,6,0,0,0,0,0,0,0,0,18,0,0,0,0,0,0] + 5 UDP 192.168.2.100:14500 <-> 109.237.187.193:4500 [proto: 79/IPSec][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 1][cat: VPN/2][43 pkts/32226 bytes <-> 47 pkts/14246 bytes][Goodput ratio: 94/86][18892.62 sec][bytes ratio: 0.387 (Upload)][IAT c2s/s2c min/avg/max/stddev: 0/0 66479/485440637135486976 1521662/4249448008 281113/0][Pkt Len c2s/s2c min/avg/max/stddev: 138/122 749/303 1374/1070 516/284][PLAIN TEXT (@7Ac9 )][Plen Bins: 0,0,12,13,27,0,6,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,6,0,0,7,0,0,0,5,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0] + 6 UDP 192.168.2.100:14500 <-> 109.237.187.225:4500 [proto: 79/IPSec][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 1][cat: VPN/2][34 pkts/24848 bytes <-> 41 pkts/17850 bytes][Goodput ratio: 94/90][11474.04 sec][bytes ratio: 0.164 (Mixed)][IAT c2s/s2c min/avg/max/stddev: 0/0 55649/558992261317132288 1440343/4237012657 276939/0][Pkt Len c2s/s2c min/avg/max/stddev: 138/122 731/435 1374/1374 517/426][Risk: ** Malformed Packet **][Risk Score: 10][Risk Info: No server to client traffic / Invalid IPSec/ISAKMP Header][PLAIN TEXT (17Uv 2)][Plen Bins: 0,0,9,13,26,0,6,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,6,0,4,2,0,0,0,6,0,0,0,0,0,0,0,0,18,0,0,0,0,0,0] 7 UDP 192.168.2.100:14500 <-> 109.237.187.194:4500 [proto: 79/IPSec][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 1][cat: VPN/2][22 pkts/15216 bytes <-> 23 pkts/8650 bytes][Goodput ratio: 94/89][13749.36 sec][bytes ratio: 0.275 (Upload)][IAT c2s/s2c min/avg/max/stddev: 0/0 60292/56941 1020541/1007809 240062/230637][Pkt Len c2s/s2c min/avg/max/stddev: 138/122 692/376 1374/1374 518/361][Plen Bins: 0,0,8,13,29,0,6,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,6,0,2,6,0,0,0,4,0,0,0,0,0,0,0,0,15,0,0,0,0,0,0] 8 UDP 192.168.2.100:14500 <-> 109.237.187.131:4500 [proto: 79/IPSec][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 1][cat: VPN/2][21 pkts/15042 bytes <-> 24 pkts/7632 bytes][Goodput ratio: 94/87][10912.86 sec][bytes ratio: 0.327 (Upload)][IAT c2s/s2c min/avg/max/stddev: 0/0 27756/24780 439840/418574 106400/93007][Pkt Len c2s/s2c min/avg/max/stddev: 138/122 716/318 1374/1070 518/302][PLAIN TEXT (90dItt)][Plen Bins: 0,0,13,13,27,0,6,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,6,0,0,6,0,0,0,6,0,0,0,0,0,0,0,0,13,0,0,0,0,0,0] - 9 UDP 192.168.2.100:10500 <-> 109.237.187.195:500 [proto: 79/IPSec][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 1][cat: VPN/2][18 pkts/14940 bytes <-> 18 pkts/3816 bytes][Goodput ratio: 95/80][15261.44 sec][bytes ratio: 0.593 (Upload)][IAT c2s/s2c min/avg/max/stddev: 36/36 192067/306025504 998367/4281859929 327148/0][Pkt Len c2s/s2c min/avg/max/stddev: 818/94 830/212 842/330 12/118][Plen Bins: 0,25,0,0,0,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] - 10 UDP 192.168.2.100:10500 <-> 109.237.187.193:500 [proto: 79/IPSec][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 1][cat: VPN/2][16 pkts/13280 bytes <-> 16 pkts/3392 bytes][Goodput ratio: 95/80][18889.28 sec][bytes ratio: 0.593 (Upload)][IAT c2s/s2c min/avg/max/stddev: 39/37 306418/354402720 1523984/4249462086 469614/0][Pkt Len c2s/s2c min/avg/max/stddev: 818/94 830/212 842/330 12/118][Plen Bins: 0,25,0,0,0,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + 9 UDP 192.168.2.100:10500 <-> 109.237.187.195:500 [proto: 79/IPSec][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 1][cat: VPN/2][18 pkts/14940 bytes <-> 18 pkts/3816 bytes][Goodput ratio: 95/80][15261.44 sec][bytes ratio: 0.593 (Upload)][IAT c2s/s2c min/avg/max/stddev: 36/36 192067/1317624635595948032 998367/4281859929 327148/0][Pkt Len c2s/s2c min/avg/max/stddev: 818/94 830/212 842/330 12/118][Plen Bins: 0,25,0,0,0,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + 10 UDP 192.168.2.100:10500 <-> 109.237.187.193:500 [proto: 79/IPSec][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 1][cat: VPN/2][16 pkts/13280 bytes <-> 16 pkts/3392 bytes][Goodput ratio: 95/80][18889.28 sec][bytes ratio: 0.593 (Upload)][IAT c2s/s2c min/avg/max/stddev: 39/37 306418/1537228718622113792 1523984/4249462086 469614/0][Pkt Len c2s/s2c min/avg/max/stddev: 818/94 830/212 842/330 12/118][Plen Bins: 0,25,0,0,0,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] 11 UDP 192.168.2.100:10500 <-> 109.237.187.130:500 [proto: 79/IPSec][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 1][cat: VPN/2][12 pkts/9960 bytes <-> 12 pkts/2544 bytes][Goodput ratio: 95/80][< 1 sec][bytes ratio: 0.593 (Upload)][IAT c2s/s2c min/avg/max/stddev: 35/35 252278/252277 1325428/1325428 408560/408559][Pkt Len c2s/s2c min/avg/max/stddev: 818/94 830/212 842/330 12/118][Plen Bins: 0,25,0,0,0,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] - 12 UDP 192.168.2.100:10500 <-> 109.237.187.225:500 [proto: 79/IPSec][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 1][cat: VPN/2][10 pkts/8300 bytes <-> 10 pkts/2120 bytes][Goodput ratio: 95/80][11474.15 sec][bytes ratio: 0.593 (Upload)][IAT c2s/s2c min/avg/max/stddev: 31/32 6872697/535642016 45333681/4237027358 15713330/0][Pkt Len c2s/s2c min/avg/max/stddev: 818/94 830/212 842/330 12/118][Plen Bins: 0,25,0,0,0,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + 12 UDP 192.168.2.100:10500 <-> 109.237.187.225:500 [proto: 79/IPSec][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 1][cat: VPN/2][10 pkts/8300 bytes <-> 10 pkts/2120 bytes][Goodput ratio: 95/80][11474.15 sec][bytes ratio: 0.593 (Upload)][IAT c2s/s2c min/avg/max/stddev: 31/32 6872697/2305843009213693952 45333681/4237027358 15713330/0][Pkt Len c2s/s2c min/avg/max/stddev: 818/94 830/212 842/330 12/118][Plen Bins: 0,25,0,0,0,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] 13 UDP 192.168.2.100:42593 <-> 109.237.187.193:4500 [proto: 79/IPSec][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 1][cat: VPN/2][6 pkts/3464 bytes <-> 9 pkts/5922 bytes][Goodput ratio: 93/94][< 1 sec][bytes ratio: -0.262 (Download)][IAT c2s/s2c min/avg/max/stddev: 0/0 486/359 1429/1442 536/526][Pkt Len c2s/s2c min/avg/max/stddev: 138/122 577/658 1198/1198 452/478][Plen Bins: 0,0,6,13,13,0,6,0,6,0,0,0,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,34,0,0,0,0,0,0,0,0,0,0,0] 14 UDP 192.168.2.100:43811 <-> 109.237.187.193:4500 [proto: 79/IPSec][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 1][cat: VPN/2][6 pkts/3480 bytes <-> 9 pkts/5778 bytes][Goodput ratio: 93/93][2.75 sec][bytes ratio: -0.248 (Download)][IAT c2s/s2c min/avg/max/stddev: 0/0 512/366 1540/1553 591/565][Pkt Len c2s/s2c min/avg/max/stddev: 138/122 580/642 1150/1150 421/460][PLAIN TEXT ( GZFVi)][Plen Bins: 0,0,6,13,13,0,6,0,0,0,0,6,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41,0,0,0,0,0,0,0,0,0,0,0,0,0] - 15 UDP 192.168.2.100:10500 <-> 109.237.187.194:500 [proto: 79/IPSec][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 1][cat: VPN/2][8 pkts/6640 bytes <-> 8 pkts/1696 bytes][Goodput ratio: 95/80][13749.45 sec][bytes ratio: 0.593 (Upload)][IAT c2s/s2c min/avg/max/stddev: 37/37 224522/713469824 1021965/4279696240 400616/0][Pkt Len c2s/s2c min/avg/max/stddev: 818/94 830/212 842/330 12/118][Plen Bins: 0,25,0,0,0,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + 15 UDP 192.168.2.100:10500 <-> 109.237.187.194:500 [proto: 79/IPSec][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 1][cat: VPN/2][8 pkts/6640 bytes <-> 8 pkts/1696 bytes][Goodput ratio: 95/80][13749.45 sec][bytes ratio: 0.593 (Upload)][IAT c2s/s2c min/avg/max/stddev: 37/37 224522/3074457437244227584 1021965/4279696240 400616/0][Pkt Len c2s/s2c min/avg/max/stddev: 818/94 830/212 842/330 12/118][Plen Bins: 0,25,0,0,0,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] 16 UDP 192.168.2.100:14500 <-> 109.237.187.129:4500 [proto: 79/IPSec][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 1][cat: VPN/2][7 pkts/5014 bytes <-> 8 pkts/2544 bytes][Goodput ratio: 94/87][14.86 sec][bytes ratio: 0.327 (Upload)][IAT c2s/s2c min/avg/max/stddev: 0/0 292/2460 676/13183 264/4802][Pkt Len c2s/s2c min/avg/max/stddev: 138/122 716/318 1374/1070 518/302][PLAIN TEXT (OSfrCu Y)][Plen Bins: 0,0,13,13,27,0,6,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,6,0,0,6,0,0,0,6,0,0,0,0,0,0,0,0,13,0,0,0,0,0,0] 17 UDP 192.168.2.100:14500 <-> 109.237.187.226:4500 [proto: 79/IPSec][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 1][cat: VPN/2][7 pkts/5014 bytes <-> 8 pkts/2544 bytes][Goodput ratio: 94/87][< 1 sec][bytes ratio: 0.327 (Upload)][IAT c2s/s2c min/avg/max/stddev: 0/16 251/2354 683/12812 252/4684][Pkt Len c2s/s2c min/avg/max/stddev: 138/122 716/318 1374/1070 518/302][PLAIN TEXT (LpIBBE)][Plen Bins: 0,0,13,13,27,0,6,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,6,0,0,6,0,0,0,6,0,0,0,0,0,0,0,0,13,0,0,0,0,0,0] 18 UDP 192.168.2.100:41618 <-> 109.237.187.194:4500 [proto: 79/IPSec][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 1][cat: VPN/2][7 pkts/3670 bytes <-> 8 pkts/3652 bytes][Goodput ratio: 92/91][< 1 sec][bytes ratio: 0.002 (Mixed)][IAT c2s/s2c min/avg/max/stddev: 1/0 659/558 2402/2418 908/871][Pkt Len c2s/s2c min/avg/max/stddev: 138/122 524/456 1150/1150 415/408][Plen Bins: 0,0,6,13,27,0,6,0,0,0,0,0,6,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,0,0] - 19 UDP 192.168.2.100:10500 <-> 109.237.187.131:500 [proto: 79/IPSec][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 1][cat: VPN/2][6 pkts/4980 bytes <-> 6 pkts/1272 bytes][Goodput ratio: 95/80][10912.94 sec][bytes ratio: 0.593 (Upload)][IAT c2s/s2c min/avg/max/stddev: 34/35 147192/1059489472 441504/4237516419 208110/0][Pkt Len c2s/s2c min/avg/max/stddev: 818/94 830/212 842/330 12/118][Risk: ** Malformed Packet **][Risk Score: 10][Risk Info: No server to client traffic / Invalid IPSec/ISAKMP Header][Plen Bins: 0,25,0,0,0,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + 19 UDP 192.168.2.100:10500 <-> 109.237.187.131:500 [proto: 79/IPSec][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 1][cat: VPN/2][6 pkts/4980 bytes <-> 6 pkts/1272 bytes][Goodput ratio: 95/80][10912.94 sec][bytes ratio: 0.593 (Upload)][IAT c2s/s2c min/avg/max/stddev: 34/35 147192/4611686018427387904 441504/4237516419 208110/0][Pkt Len c2s/s2c min/avg/max/stddev: 818/94 830/212 842/330 12/118][Risk: ** Malformed Packet **][Risk Score: 10][Risk Info: No server to client traffic / Invalid IPSec/ISAKMP Header][Plen Bins: 0,25,0,0,0,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] 20 UDP 192.168.2.100:41618 <-> 109.237.187.194:500 [proto: 79/IPSec][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 1][cat: VPN/2][4 pkts/1816 bytes <-> 4 pkts/726 bytes][Goodput ratio: 91/77][< 1 sec][bytes ratio: 0.429 (Upload)][IAT c2s/s2c min/avg/max/stddev: 35/37 59/60 104/104 32/31][Pkt Len c2s/s2c min/avg/max/stddev: 378/80 454/182 530/458 65/160][Plen Bins: 0,38,0,0,0,0,0,0,0,0,12,12,0,12,12,12,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] 21 UDP 192.168.2.100:42593 <-> 109.237.187.193:500 [proto: 79/IPSec][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 1][cat: VPN/2][4 pkts/1816 bytes <-> 4 pkts/726 bytes][Goodput ratio: 91/77][< 1 sec][bytes ratio: 0.429 (Upload)][IAT c2s/s2c min/avg/max/stddev: 37/36 98/99 135/138 44/45][Pkt Len c2s/s2c min/avg/max/stddev: 378/80 454/182 530/458 65/160][Plen Bins: 0,38,0,0,0,0,0,0,0,0,12,12,0,12,12,12,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] 22 UDP 192.168.2.100:43811 <-> 109.237.187.193:500 [proto: 79/IPSec][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 1][cat: VPN/2][4 pkts/1816 bytes <-> 4 pkts/726 bytes][Goodput ratio: 91/77][< 1 sec][bytes ratio: 0.429 (Upload)][IAT c2s/s2c min/avg/max/stddev: 42/46 125/126 180/179 60/57][Pkt Len c2s/s2c min/avg/max/stddev: 378/80 454/182 530/458 65/160][Plen Bins: 0,38,0,0,0,0,0,0,0,0,12,12,0,12,12,12,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] diff --git a/tests/cfgs/default/result/softether.pcap.out b/tests/cfgs/default/result/softether.pcap.out index efe93e701d9..e684e17a515 100644 --- a/tests/cfgs/default/result/softether.pcap.out +++ b/tests/cfgs/default/result/softether.pcap.out @@ -23,7 +23,7 @@ Patricia protocols: 8/0 (search/found) Softether 177 21287 4 - 1 UDP 192.168.2.100:51381 <-> 130.158.6.113:5004 [proto: 290/Softether][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 7][cat: VPN/2][60 pkts/6549 bytes <-> 53 pkts/6612 bytes][Goodput ratio: 62/66][15284492.00 sec][Client IP: 90.186.132.133][Client Port: 51381][Hostname: vpn][FQDN: moishele.softether.net][bytes ratio: -0.005 (Mixed)][IAT c2s/s2c min/avg/max/stddev: 0/0 6779570/3173141 3621430369/3621456266 535184640/578624000][Pkt Len c2s/s2c min/avg/max/stddev: 43/69 109/125 522/370 160/114][PLAIN TEXT (90.186.132.133)][Plen Bins: 84,0,0,1,0,0,0,0,1,0,7,0,0,0,0,6,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] + 1 UDP 192.168.2.100:51381 <-> 130.158.6.113:5004 [proto: 290/Softether][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 7][cat: VPN/2][60 pkts/6549 bytes <-> 53 pkts/6612 bytes][Goodput ratio: 62/66][15284492.00 sec][Client IP: 90.186.132.133][Client Port: 51381][Hostname: vpn][FQDN: moishele.softether.net][bytes ratio: -0.005 (Mixed)][IAT c2s/s2c min/avg/max/stddev: 0/0 96258056/107928440 3621430369/3621456266 526500672/568478016][Pkt Len c2s/s2c min/avg/max/stddev: 43/69 109/125 522/370 160/114][PLAIN TEXT (90.186.132.133)][Plen Bins: 84,0,0,1,0,0,0,0,1,0,7,0,0,0,0,6,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 192.168.2.100:51381 <-> 130.158.6.105:5004 [proto: 290/Softether][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 7][cat: VPN/2][16 pkts/2201 bytes <-> 14 pkts/2116 bytes][Goodput ratio: 69/72][238448.62 sec][Client IP: 84.59.132.100][Client Port: 51381][Hostname: vpn][FQDN: moishele.softether.net][bytes ratio: 0.020 (Mixed)][IAT c2s/s2c min/avg/max/stddev: 0/0 18338798/21672040 238159482/238187129 63456764/68468080][Pkt Len c2s/s2c min/avg/max/stddev: 43/69 138/151 522/368 183/130][PLAIN TEXT (opcode)][Plen Bins: 74,0,0,3,0,0,0,0,3,0,10,0,0,0,3,6,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.2.100:51381 <-> 130.158.6.112:5004 [proto: 290/Softether][IP: 0/Unknown][Encrypted][Confidence: DPI][DPI packets: 17][cat: VPN/2][16 pkts/1167 bytes <-> 14 pkts/1250 bytes][Goodput ratio: 42/53][117087.70 sec][Client IP: 2.207.60.163][Client Port: 51381][bytes ratio: -0.034 (Mixed)][IAT c2s/s2c min/avg/max/stddev: 5948/21107 9003169/10639145 116754845/116778948 31105232/33564352][Pkt Len c2s/s2c min/avg/max/stddev: 43/68 73/89 522/366 116/77][PLAIN TEXT (2.207.60.163)][Plen Bins: 93,0,0,0,0,0,0,0,0,0,3,0,0,0,0,3,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 TCP 192.168.2.100:37504 <-> 130.158.75.45:80 [proto: 7.290/HTTP.Softether][IP: 0/Unknown][ClearText][Confidence: DPI][DPI packets: 4][cat: VPN/2][3 pkts/1318 bytes <-> 1 pkts/74 bytes][Goodput ratio: 84/0][0.26 sec][Hostname/SNI: x0.x0.dev.open.servers.ddns.softether-network.net][URL: x0.x0.dev.open.servers.ddns.softether-network.net/ddns/ddns.aspx?v=9291257684825389030][Req Content-Type: application/x-www-form-urlencoded][User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0][PLAIN TEXT (POST /ddns/ddns.asp)][Plen Bins: 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,100,0,0,0,0,0,0,0,0,0,0,0,0,0]