Commit graph

160 commits

Author SHA1 Message Date
Ivan Nardi
1fdb6df2b1
Fix FPC confidence with custom rules (#3008) 2025-10-23 12:29:39 +02:00
Ivan Nardi
01836e0071
Proper handling of internal/external ids in FPC; fix FPC with custom rules (#3007) 2025-10-22 21:28:12 +02:00
Ivan Nardi
faca0a6565 ndpiReader: improve statistics 2025-10-22 20:34:29 +02:00
Luca Deri
5abe185e2c Added support for urlXXXX@proto in protos.txt
Fixed varisous protocol mapping in custom protocols definition
2025-10-22 09:00:58 +02:00
Ivan Nardi
6eb63d9cf9
tests: fixed protocol ids for all custom rules (#3000)
To ease PR/Commit comparisons
2025-10-20 14:59:15 +02:00
Ivan Nardi
9d22805954
Add statistics about hash data structures (#2995) 2025-10-17 20:39:15 +02:00
Ivan Nardi
c9dfc946ff example: fix some proto ids in custom rules to ease unit test differences 2025-10-02 11:06:43 +02:00
kalinda
e1c0d8ba64
Add Matter protocol dissector (#2957)
Co-authored-by: Ivan Nardi <nardi.ivan@gmail.com>
2025-09-23 15:20:48 +02:00
Toni
6f05ddbcc4
Add Samsung SDP protocol dissector (#2966)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2025-09-15 08:40:17 +02:00
Toni
6eb9249f01
Add TriStation dissector (#2964)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2025-09-11 16:20:55 +02:00
Ivan Nardi
efccc7d5e4
Rework flow breed (#2926)
Right now, there is, in essence, a static mapping between flow protocols
and flow breeds.
Make it dynamic: allow to have different flows, with the same
classification but differents breeds. This is the same logic that we
already have for categories....

Preliminary work to support breed in category lists.

API change from the app POV: to get the flow breed don't use anymore
`ndpi_get_proto_breed()`, but access directly `struct ndpi_proto->breed`

The functions `ndpi_domain_classify_*()` and
`ndpi_get_host_domain_suffix()` now have a `u_int32_t` parameter as
`class_id` (instead of `u_int_16_t`), with the following logic:
```
class_id = (breed << 16) | category
```
instead of the old:
```
class_id = category
```
Please note that this change is back-compatible: if you are not
interested into breeds, you don't need to update the application code.
2025-09-02 16:54:34 +02:00
Ivan Nardi
f4995e5d5f Revert "Always compute nDPI fingerprint (#2950)"
This reverts commit 2531c2555e.
2025-08-31 19:07:13 +02:00
Ivan Nardi
2531c2555e
Always compute nDPI fingerprint (#2950) 2025-08-31 16:11:56 +02:00
Ivan Nardi
087c558202 Rework calling check_tcp_flags() and check_probing_attempt() 2025-08-13 10:58:40 +02:00
Toni
470d0d6323
Add Mudfish protocol dissector (#2932)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2025-08-06 21:07:27 +02:00
Ivan Nardi
8dd2220116
Add the concept of protocols stack: more than 2 protocols per flow (#2913)
The idea is to remove the limitation of only two protocols ("master" and
"app") in the flow classifcation.
This is quite handy expecially for STUN flows and, in general, for any
flows where there is some kind of transitionf from a cleartext protocol
to TLS: HTTP_PROXY -> TLS/Youtube; SMTP -> SMTPS (via STARTTLS msg).

In the vast majority of the cases, the protocol stack is simply
Master/Application.

Examples of real stacks (from the unit tests)  different from the standard
"master/app":
* "STUN.WhatsAppCall.SRTP": a WA call
* "STUN.DTLS.GoogleCall": a Meet call
* "Telegram.STUN.DTLS.TelegramVoip": a Telegram call
* "SMTP.SMTPS.Google": a SMTP connection to Google server started in
  cleartext and updated to TLS
* "HTTP.Google.ntop": a HTTP connection to a Google domain (match via
  "Host" header) and to a ntop server (match via "Server" header)

The logic to create the stack is still a bit coarse: we have a decade of
code try to push everything in only ywo protocols... Therefore, the
content of the stack is still **highly experimental** and might change
in the next future; do you have any suggestions?

It is quite likely that the legacy fields "master_protocol" and
"app_protocol" will be there for a long time.

Add some helper to use the stack:
```
ndpi_stack_get_upper_proto();
ndpi_stack_get_lower_proto();
bool ndpi_stack_contains(struct ndpi_proto_stack *s, u_int16_t proto_id);
bool ndpi_stack_is_tls_like(struct ndpi_proto_stack *s);
bool ndpi_stack_is_http_like(struct ndpi_proto_stack *s);

```

Be sure new stack logic is compatible with legacy code:
```
assert(ndpi_stack_get_upper_proto(&flow->detected_protocol.protocol_stack) ==
       ndpi_get_upper_proto(flow->detected_protocol));
assert(ndpi_stack_get_lower_proto(&flow->detected_protocol.protocol_stack) ==
       ndpi_get_lower_proto(flow->detected_protocol));
```
2025-08-01 10:05:50 +02:00
Ivan Nardi
44b9a2da81
ndpiReader: add breed to flow information (#2924) 2025-07-30 18:46:28 +02:00
Toni
a913e914e5
Added EasyWeather protocol dissector (#2912)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2025-07-03 12:28:48 +02:00
Ivan Nardi
86c591af6a
Bittorrent: update default ports (#2902) 2025-06-23 19:38:31 +02:00
Ivan Nardi
aa6dcad15e
ndpiReader: print categories summary (#2895) 2025-06-21 12:41:00 +02:00
Vladimir Gavrilov
aba60ac354
Add GLBP dissector (#2879)
GLBP is a Cisco proprietary first-hop redundancy protocol similar to HSRP and VRRP, but with additional load balancing capabilities.
2025-06-10 15:26:10 +02:00
Vladimir Gavrilov
40fe26b2f1
Add Hamachi protocol detection support (#2860) 2025-06-02 14:00:31 +02:00
Ivan Nardi
2c9ed8faaa
ospf, ipsec: use different ids for protocols at layer3 (#2838)
Don't use the same id for the same protocol identified via L3 info or
via standard TCP/UDP detection (example: ospf ip_proto 0x59 or TCP port
2604)

Before:
```
ivan@ivan-Precision-3591:~/svnrepos/nDPI(dev)$ ./example/ndpiReader -H | grep -wE 'OSPF|IPSec|AH|ESP|IP_OSPF'
 79       79 IPSec                  UDP        X        Safe         VPN                500,4500                        500
 85       85 OSPF                              X        Acceptable   Network            -                               2604
```

After:
```
ivan@ivan-Precision-3591:~/svnrepos/nDPI(ospf-ipsec)$ ./example/ndpiReader -H | grep -wE 'OSPF|IPSec|AH|ESP|IP_OSPF'
 79       79 IPSec                  UDP        X        Safe         VPN                500,4500                        500
 85       85 IP_OSPF                           X        Acceptable   Network            -                               -
116      116 AH                                X        Safe         VPN                -                               -
117      117 ESP                               X        Safe         VPN                -                               -
184      184 OSPF                   TCP        X        Safe         Network            -                               2604
```
2025-05-21 16:43:50 +02:00
Vladimir Gavrilov
0a3c8f2464
Drop GW1 support and add basic GW2 detection (#2836) 2025-05-21 11:45:31 +02:00
0xA50C1A1
af4af11afc Rename Lotus Notes to HCL Notes for product consistency 2025-05-15 21:43:34 +02:00
Vladimir Gavrilov
4b47f7c669
Add kick.com support (#2813) 2025-05-14 21:06:12 +02:00
Vladimir Gavrilov
b3be9f16dc
Add Rockstar Games detection (#2805) 2025-04-28 19:54:00 +02:00
Vladimir Gavrilov
6312e4c9aa
Add Microsoft Delivery Optimization protocol (#2799) 2025-04-28 13:40:21 +02:00
Ivan Nardi
9283ebc1c9
Add a new specific ID for generic Ubiquity traffic (#2796) 2025-04-16 14:36:56 +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
Luca Deri
e9f9b92926 Added initial LLM traffic recognition 2025-03-24 19:19:21 +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
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
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
Toni
5858e1debf
Add LagoFast protocol dissector. (#2743)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2025-02-23 13:13:38 +01:00
Ivan Kapranov
e4521440ab
Added RUTUBE (#2725) 2025-02-15 16:03:58 +01:00
Luca Deri
511228d36d Added DigitalOcean protocol 2025-01-17 18:26:27 +01:00
Vladimir Gavrilov
674428d824
Add Vivox support (#2668) 2025-01-11 19:37:31 +01:00
Evgeny Shtanov
74792e49c8
Add support Yandex Alice (#2633)
Co-authored-by: Evgeny Shtanov <evg.shtanov@gmail.comm>
Co-authored-by: Ivan Nardi <nardi.ivan@gmail.com>
2024-11-29 14:13:36 +01:00
Ivan Nardi
7330f65939 Add support for Paramount+ streaming service 2024-11-25 14:01:55 +01:00
Ivan Nardi
1140d28c3d Sync unit tests results 2024-11-21 09:53:10 +01:00
Luca
4fd12278b1 Added DICOM support
Testing pcaps courtesy of https://github.com/virtalabs/tapirx.git
2024-11-15 18:45:51 +01:00
Luca Deri
3ce8d0e508
Implemented Mikrotik discovery protocol dissection and metadata extraction (#2618) 2024-11-14 23:34:31 +01:00
Ivan Nardi
59ee1fe115
Add support for some Chinese shopping platforms (Temu, Shein and Taobao) (#2615)
Extend content match list
2024-11-12 20:11:07 +01:00
Vladimir Gavrilov
137d87fd87
Add Naver protocol support (#2610) 2024-11-01 14:56:25 +01:00
Vladimir Gavrilov
dc125dc2a8
Add Paltalk protocol support (#2606) 2024-10-28 16:57:05 +01:00
Luca Deri
14b076a58b Improved TCP fingerprint 2024-10-20 22:25:55 +02:00
Luca Deri
0cc84e4fdd Improved TCP fingepring calculation
Adde basidc OS detection based on TCP fingerprint
2024-10-18 23:47:34 +02:00