Commit graph

448 commits

Author SHA1 Message Date
Ivan Nardi
0d38bd167e blizzard: improve detection of generic battle.net traffic 2025-03-30 20:22:09 +02:00
Ivan Nardi
153391da66 blizzard: add detection of Overwatch2 2025-03-30 20:22:09 +02:00
Ivan Nardi
092a6e10d0 WoW: update detection
Remove the specific dissector and use the Blizzard's generic one.
For the time being, keep `NDPI_PROTOCOL_WORLDOFWARCRAFT`
2025-03-30 20:22:09 +02:00
Ivan Nardi
56ac5bf48b
Rework the old Starcraft code to identify traffic from generic Blizzard games (#2776)
Remove `NDPI_PROTOCOL_STARCRAFT` and add a generic `NDPI_PROTOCOL_BLIZZARD`.
2025-03-25 17:16:10 +01:00
Ivan Nardi
b1edfdbf5c
Remove NDPI_FULLY_ENCRYPTED flow risk (#2779)
Use `NDPI_OBFUSCATED_TRAFFIC` instead; this way, all the obfuscated
traffic is identified via `NDPI_OBFUSCATED_TRAFFIC` flow risk.

Disable fully-encryption detection by default, like all the obfuscation
heuristics.
2025-03-25 17:00:03 +01:00
Ivan Nardi
a8ddc4d368
Remove NDPI_TLS_SUSPICIOUS_ESNI_USAGE flow risk (#2778)
That flow risk was introduced in 79b89d2866
but we can now use the generic `NDPI_TLS_SUSPICIOUS_EXTENSION` instead:
ESNI is quite suspicious nowadays in itself (i.e. even without SNI).
Note that ESNI support has been removed in cae9fb9989
2025-03-25 16:59:32 +01:00
Ivan Nardi
f2be78561b
armagetron: update code (#2777) 2025-03-25 13:22:52 +01:00
Luca Deri
e9f9b92926 Added initial LLM traffic recognition 2025-03-24 19:19:21 +01:00
Ivan Nardi
91fd1bccd2
Rework the old MapleStory code to identify traffic from generic Nexon games (#2773)
Remove `NDPI_PROTOCOL_MAPLESTORY` and add a generic
`NDPI_PROTOCOL_NEXON`
2025-03-19 17:58:42 +01:00
Ivan Nardi
70728b3425
FastCGI: use specific metadata, not the HTTP ones (#2774)
We are going to use HTTP metadata only for real HTTP traffic; FastCGI
should be the only protocol using them improperly
2025-03-19 16:22:53 +01:00
Ivan Nardi
e2ed61524b
Avoid duplicated Microsoft domains (#2770)
Update the list

Close #2767
2025-03-18 11:56:50 +01:00
Ivan Nardi
0fe81c842f
TLS: avoid sub-classification for RDP flows (#2769)
These flows are already classified as TLS.RDP.
This change also fix a memory leak

```
Direct leak of 62 byte(s) in 1 object(s) allocated from:
   #0 0x5883d762429f in __interceptor_malloc /src/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:68:3
   #1 0x5883d76fe46a in ndpi_malloc ndpi/src/lib/ndpi_memory.c:57:46
   #2 0x5883d76fe46a in ndpi_strdup ndpi/src/lib/ndpi_memory.c:110:13
   #3 0x5883d77adcd6 in ndpi_compute_ja4 ndpi/src/lib/protocols/tls.c:2298:46
   #4 0x5883d77ab2ec in processClientServerHello ndpi/src/lib/protocols/tls.c:3314:10
   #5 0x5883d77a4c51 in processTLSBlock ndpi/src/lib/protocols/tls.c:1319:5
```
Found by oss-fuzz.
See: https://oss-fuzz.com/testcase-detail/5244512192757760
2025-03-14 15:13:29 +01:00
Ivan Nardi
66a194c0d3 Sync unit tests results 2025-03-11 11:32:16 +01:00
Ivan Nardi
b02e85f7ee
Merge pull request #2760 from IvanNardi/internal_giveup
Add a new internal function `internal_giveup()`
2025-03-11 11:20:34 +01:00
Toni
6a591b67aa
Add GearUP Booster protocol dissector (heuristic based). (#2765)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2025-03-07 20:05:44 +01:00
Toni
d5dd8e02ef
Add GearUP Booster application protocol. (#2764)
protocol dissector will follow

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2025-03-06 19:41:31 +01:00
Ivan Nardi
34dcf18128 Add a new internal function internal_giveup()
This function is always called once for every flow, as last code
processing the flow itself.

As a first usage example, check here if the flow is unidirectional
(instead of checking it at every packets)
2025-03-05 20:51:06 +01:00
Ivan Nardi
086d41c22e Fix function checking if a packet is multicast 2025-03-04 19:40:24 +01:00
Ivan Nardi
fbb7b8c578 custom rules: try to have a coherent behaviour
Custom rules with *new* protocols are checked "first": if there is a
match, the first packet of the flow provides a complete and final
classification.

The same logic should apply to custom rules with "existing" protocols:
if there is match, nDPI shouldn't do anything else.

Remove the `tcp:3000@ntop` custom rule.

Fix the default port for ElasticSearch (in the protocol file)
2025-03-04 18:15:00 +01:00
Ivan Nardi
85fb7eb2e5 Flow risk infos are always exported "in order" (by flow risk id)
This way, the `ndpiReader` output doesn't change if we change the
internal logic about the order we set/check the various flow risks.

Note that the flow risk *list* is already printed by `ndpiReader`
in order.
2025-03-04 13:23:58 +01:00
Ivan Nardi
c040faef08 ICMP: move all the logic to the proper dissector file
There are no reasons to keep entropy calculation and sanity checks code
on the "guessing" algorithm.
BTW, this change also fix the entropy calculation for non TCP/UDP/ICMP
flows
2025-02-28 19:11:59 +01:00
Luca Deri
b162e5406e Added valid TLS extensions that used to trigger invalid risks 2025-02-27 20:19:39 +01:00
Luca Deri
beea70d689 Improved Tor detection 2025-02-24 22:14:41 +01:00
Ivan Nardi
78c648d0fa Sync unit tests results 2025-02-24 20:18:07 +01:00
Luca Deri
050ea7e229 Improved Tor exit node download and added IPv6 support 2025-02-24 19:57:46 +01:00
Luca Deri
4c15036e3d Improved Google PlayStore detection 2025-02-24 18:41:24 +01:00
Ivan Nardi
084a5808d5
UBNTAC2: rework detection (#2744) 2025-02-23 17:51:51 +01:00
Toni
5858e1debf
Add LagoFast protocol dissector. (#2743)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2025-02-23 13:13:38 +01:00
Ivan Nardi
2d3f08362e
RTP: payload type info should be set only for real RTP flows (#2742) 2025-02-22 13:35:40 +01:00
Ivan Nardi
6c00422f5c
Update the capture length of the ssdp example (#2741)
Some old libpcap versions don't handle pcap files with capture length
bigger than 262144 bytes

```
 ERROR: could not open pcap file: invalid interface capture length 524288, bigger than maximum of 262144
```
2025-02-21 19:47:17 +01:00
Ivan Nardi
551930bc5a
Create a new protocol id to handle Mozilla/Firefox generic traffic (#2740)
Close #2738
2025-02-21 19:18:01 +01:00
Luca
cbfc20d2d5 Updated test result 2025-02-21 14:11:22 +01:00
Luca Deri
30c3613f2f Improved RTP dissection with EVS and other mobile voice codecs 2025-02-20 22:59:23 +01:00
Luca Deri
9ee24d5bc1 Updated test rsults after RTP payload extraction 2025-02-19 11:40:00 +01:00
Luca Deri
2c414f1b28 Fixed bug in domain name computation 2025-02-17 21:50:19 +00:00
Ivan Nardi
491698fe02
DNS: rework "extra-dissection" code (#2735) 2025-02-17 13:57:50 +01:00
Ivan Nardi
86af01c74d
DNS: fix message parsing (#2732) 2025-02-16 17:19:43 +01:00
Ivan Kapranov
ccb15db9b3
Implement SSDP Metadata export (#2729)
Close #2524
2025-02-16 17:04:16 +01:00
Ivan Nardi
d51b6ab049
DNS: fix parsing of hostname for empty response messages (#2731) 2025-02-16 14:32:56 +01:00
Ivan Nardi
7dc5890c0f
DNS: rework adding entries to the FPC-DNS cache (#2730)
Try to populate the FPC-DNS cache using directly the info from the current
packet, and not from the metadata saved in `struct ndpi_flow_struct`. This
will be important when adding monitoring support
2025-02-16 13:33:08 +01:00
Ivan Nardi
c458c42712
DNS: improved detection and handling of TCP packets (#2728) 2025-02-15 22:28:47 +01:00
Ivan Nardi
15b84b4192
DNS: rework code (#2727) 2025-02-15 21:57:34 +01:00
Ivan Kapranov
e4521440ab
Added RUTUBE (#2725) 2025-02-15 16:03:58 +01:00
Ivan Nardi
9bf513b342
DNS: fix dissection (#2726) 2025-02-15 15:13:01 +01:00
Ivan Nardi
091e1423e2
DNS: set NDPI_MALFORMED_PACKET risk if the answer message is invalid (#2724)
We already set the same flow risk for invalid request messages
2025-02-15 14:23:45 +01:00
Ivan Nardi
3dbc6d2523
DNS: faster exclusion (#2719) 2025-02-12 17:42:00 +01:00
Ivan Nardi
dba7e9a8ec
DNS: try to simplify the code (#2718)
Set the classification in only one place in the code.
2025-02-12 09:48:35 +01:00
Ivan Nardi
baca06bfd2
ndpiReader: print more DNS information (#2717) 2025-02-11 18:16:55 +01:00
Ivan Nardi
1dccaf37b0
DNS: fix check for DGA domain (#2716)
If we have a (potential) valid sub-classification, we shoudn't check for
DGA, even if the subclassification itself is disabled!
2025-02-11 15:48:53 +01:00
Ivan Nardi
73d1856525
DNS: disable subclassification by default (#2715)
Prelimary change to start supporting multiple DNS transactions on the
same flow
2025-02-11 13:50:00 +01:00