From a1c3d05a74af8a278909d486e331a00c178a38a1 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Wed, 6 Jul 2022 00:02:46 +0200 Subject: [PATCH] Added another RiotGames signature. Signed-off-by: Toni Uhlig --- src/lib/protocols/riotgames.c | 8 ++++++++ tests/pcap/riotgames.pcap | Bin 1248 -> 5580 bytes tests/result/riotgames.pcap.out | 22 ++++++++++++---------- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/lib/protocols/riotgames.c b/src/lib/protocols/riotgames.c index 31c9889f5..40dddd7b6 100644 --- a/src/lib/protocols/riotgames.c +++ b/src/lib/protocols/riotgames.c @@ -57,6 +57,14 @@ void ndpi_search_riotgames(struct ndpi_detection_module_struct *ndpi_struct, return; } + if (packet->payload_packet_len == 53 && + ntohl(get_u_int32_t(packet->payload, packet->payload_packet_len - 4)) == 0xea23460c && + ntohl(get_u_int32_t(packet->payload, packet->payload_packet_len - 8)) == 0x3cb11f2d) + { + ndpi_int_riotgames_add_connection(ndpi_struct, flow); + return; + } + /* * Please add new patterns for games made by RiotGames here */ diff --git a/tests/pcap/riotgames.pcap b/tests/pcap/riotgames.pcap index aeb855cf46b4685f3500b4902636906c4efef659..81db9d488480f8eace885c493f87ea3ba1a47c79 100644 GIT binary patch literal 5580 zcmcJS3pkW%8-QO7O0lLg4ofqYHVipLw5uA2#IO1PflgO=VLI<&QyEVdtJ{p-^X0fsBZO8O zQWb=-*WuA6f@IJNkL|vG6utS{TJyCuv~@I`x4A6T#oj|eW@x1=-OY8Avlm6h#)Iza z?e0wXRHZDKuZz8zqO#n>hr$@W@p9he>Fnm}LUHyU{lA75)x~wAwzjXfDz+K6fDh~$ zqpv`KYcVVWv49m*EsCz~S;26`t|9y)GL#7{CxiMsdaOxk8A4Xl%?Je${nPW3gk8?` zn+vgZ6&2882K8**DQ%XHF#!ntR@C*__Wb&3HIarF$r|iAW>azQr+ixtdqMmboPXi_ z@dLX&1@T*P{`v36_gk`C5dRg<|MUCtZ4d7k#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uxkjOnbIU_H{R>> zxN5I?Z5OBZ-B|6ji78nszPmE6kj$iJEw2rG9d)tra65CA>?`aG17`u#1q)cfJUq>X zX^dS%@Z?hWatGvc_8qQVQtt17TwcR+i889?+M*>QZ{EQcu=4L1+03#P;F!m5sX5Fs%D0JK^T~5r4kB1k- mO911^6!7?Pj+^0L1&ln5kxSaHXOTbLl2+zz=C!+Ll<^leHUdZh delta 336 zcmX@3{eV;T%Hd55nHX3Y5P*e&5y;t5YMqpj&d6W{WE)MMC?GPqmqU>kBznV_iNOXa zYBO1pMP%|r4sBlUZwr$u_OLVf0Y&}5YHc}f!J-@3IG~~+wQGT*?f(`g-B^RHR+bAQ z`eHXXlGF0U;w@68QKKb8Z-03Hr=c@-g|3mK8Z;Ulj$0C-PZ AIsgCw diff --git a/tests/result/riotgames.pcap.out b/tests/result/riotgames.pcap.out index 872bec80d..f721f235a 100644 --- a/tests/result/riotgames.pcap.out +++ b/tests/result/riotgames.pcap.out @@ -1,14 +1,16 @@ Guessed flow protos: 0 -DPI Packets (UDP): 7 (1.00 pkts/flow) -Confidence DPI : 7 (flows) +DPI Packets (UDP): 9 (1.00 pkts/flow) +Confidence DPI : 9 (flows) -RiotGames 14 1000 7 +RiotGames 44 3953 9 - 1 UDP 192.168.2.100:50004 <-> 162.249.72.1:8181 [proto: 302/RiotGames][ClearText][Confidence: DPI][cat: Game/8][1 pkts/78 bytes <-> 1 pkts/78 bytes][Goodput ratio: 46/46][0.04 sec][Plen Bins: 0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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:54231 <-> 43.229.65.1:7998 [proto: 302/RiotGames][ClearText][Confidence: DPI][cat: Game/8][1 pkts/78 bytes <-> 1 pkts/78 bytes][Goodput ratio: 46/46][0.27 sec][Plen Bins: 0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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:58106 <-> 162.249.72.1:8181 [proto: 302/RiotGames][ClearText][Confidence: DPI][cat: Game/8][1 pkts/78 bytes <-> 1 pkts/78 bytes][Goodput ratio: 46/46][0.05 sec][Plen Bins: 0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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 192.168.2.100:62854 <-> 162.249.72.1:8181 [proto: 302/RiotGames][ClearText][Confidence: DPI][cat: Game/8][1 pkts/78 bytes <-> 1 pkts/78 bytes][Goodput ratio: 46/46][0.02 sec][Plen Bins: 0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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 192.168.2.100:63038 <-> 43.229.65.1:7998 [proto: 302/RiotGames][ClearText][Confidence: DPI][cat: Game/8][1 pkts/78 bytes <-> 1 pkts/78 bytes][Goodput ratio: 46/46][0.27 sec][Plen Bins: 0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.2.100:48526 <-> 213.179.216.242:50004 [proto: 302/RiotGames][ClearText][Confidence: DPI][cat: Game/8][1 pkts/50 bytes <-> 1 pkts/60 bytes][Goodput ratio: 16/13][0.06 sec][Plen Bins: 100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.2.100:61099 <-> 66.22.241.8:50004 [proto: 302/RiotGames][ClearText][Confidence: DPI][cat: Game/8][1 pkts/50 bytes <-> 1 pkts/60 bytes][Goodput ratio: 16/13][0.06 sec][Plen Bins: 100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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:59956 <-> 162.249.72.1:7194 [proto: 302/RiotGames][ClearText][Confidence: DPI][cat: Game/8][10 pkts/1106 bytes <-> 5 pkts/387 bytes][Goodput ratio: 62/46][5.50 sec][bytes ratio: 0.482 (Upload)][IAT c2s/s2c min/avg/max/stddev: 0/30 684/10 1033/30 438/14][Pkt Len c2s/s2c min/avg/max/stddev: 87/75 111/77 259/87 50/5][Plen Bins: 0,93,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,0,0,0,0,0,0,0,0,0] + 2 UDP 192.168.2.100:49298 <-> 162.249.72.1:7194 [proto: 302/RiotGames][ClearText][Confidence: DPI][cat: Game/8][6 pkts/712 bytes <-> 9 pkts/748 bytes][Goodput ratio: 65/49][2.43 sec][bytes ratio: -0.025 (Mixed)][IAT c2s/s2c min/avg/max/stddev: 28/31 283/132 994/203 372/82][Pkt Len c2s/s2c min/avg/max/stddev: 81/66 119/83 259/181 63/35][Plen Bins: 33,54,0,0,6,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,0,0,0,0,0,0,0,0,0] + 3 UDP 192.168.2.100:50004 <-> 162.249.72.1:8181 [proto: 302/RiotGames][ClearText][Confidence: DPI][cat: Game/8][1 pkts/78 bytes <-> 1 pkts/78 bytes][Goodput ratio: 46/46][0.04 sec][Plen Bins: 0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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 192.168.2.100:54231 <-> 43.229.65.1:7998 [proto: 302/RiotGames][ClearText][Confidence: DPI][cat: Game/8][1 pkts/78 bytes <-> 1 pkts/78 bytes][Goodput ratio: 46/46][0.27 sec][Plen Bins: 0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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 192.168.2.100:58106 <-> 162.249.72.1:8181 [proto: 302/RiotGames][ClearText][Confidence: DPI][cat: Game/8][1 pkts/78 bytes <-> 1 pkts/78 bytes][Goodput ratio: 46/46][0.05 sec][Plen Bins: 0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.2.100:62854 <-> 162.249.72.1:8181 [proto: 302/RiotGames][ClearText][Confidence: DPI][cat: Game/8][1 pkts/78 bytes <-> 1 pkts/78 bytes][Goodput ratio: 46/46][0.02 sec][Plen Bins: 0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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.2.100:63038 <-> 43.229.65.1:7998 [proto: 302/RiotGames][ClearText][Confidence: DPI][cat: Game/8][1 pkts/78 bytes <-> 1 pkts/78 bytes][Goodput ratio: 46/46][0.27 sec][Plen Bins: 0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + 8 UDP 192.168.2.100:48526 <-> 213.179.216.242:50004 [proto: 302/RiotGames][ClearText][Confidence: DPI][cat: Game/8][1 pkts/50 bytes <-> 1 pkts/60 bytes][Goodput ratio: 16/13][0.06 sec][Plen Bins: 100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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:61099 <-> 66.22.241.8:50004 [proto: 302/RiotGames][ClearText][Confidence: DPI][cat: Game/8][1 pkts/50 bytes <-> 1 pkts/60 bytes][Goodput ratio: 16/13][0.06 sec][Plen Bins: 100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]