Compare commits

...
284 Commits
Author SHA1 Message Date
Luca Deri 299fc4d1ff Improved AESNI check 2022-10-26 14:02:09 +02:00
Luca Deri 13b9a27e83 Leak fix 2022-10-26 12:23:57 +02:00
Alfredo Cardigliano 0aeb97492c Degine libdir for EL9 2022-09-13 11:19:22 +02:00
Alfredo Cardigliano 9b775fc100 Replace obsolete linux macro 2022-09-13 10:42:30 +02:00
Luca Deri d2e7673a1e Improved AES-NI check 2022-08-30 16:38:36 +02:00
Luca Deri 3dc1129cb2 Fixes AES-NI presence check 2022-08-29 17:46:35 +02:00
Luca dd8953cb64 Added pointer checks
Added -O2 (lost in release)
2022-07-14 18:13:42 +02:00
Luca Deri 2c5258b19d Version 4.4 2022-07-06 12:44:31 +02:00
Toni 175f863665 Label SMTP w/ STARTTLS as SMTPS *and* dissect TLS clho. (#1639)
* Label SMTP w/ STARTTLS as SMTPS *and* dissect TLS clho.

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>

* Revert "SMTP with STARTTLS is now identified as SMTPS"

This reverts commit 52d987b603.

* Revert "Compilation fix"

This reverts commit c019946f60.

* Sync unit tests.

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-07-06 12:40:25 +02:00
Luca Deri c019946f60 Compilation fix 2022-07-05 17:38:32 +02:00
Ivan Nardi 7645909460 Fix handling of NDPI_UNIDIRECTIONAL_TRAFFIC risk (#1636) 2022-07-05 17:01:00 +02:00
Luca Deri 52d987b603 SMTP with STARTTLS is now identified as SMTPS 2022-07-05 17:00:21 +02:00
Toni f4a1739f9c Detect SMTPs w/ STARTTLS as TLS and dissect client/server hello. Fixes #1630. (#1637)
* FTP needs to get updated as well as it has similiar STARTTLS semantics -> follow-up

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-07-05 16:35:23 +02:00
Toni 388dfb8e13 Run regression tests from different locations at the same time w/o side effects on the results. (#1638)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-07-05 15:08:59 +02:00
Luca Deri 7fa8d882d8 Exported username in flow information 2022-07-04 22:52:54 +02:00
Luca Deri 461589517e Updated ndpi_check_flow_risk_exceptions() signature 2022-07-04 21:38:38 +02:00
Luca Deri e7a5eaecde Cleaned-up issuer DN check code adding
u_int8_t ndpi_check_issuerdn_risk_exception(struct ndpi_detection_module_struct *ndpi_str, char *issuerDN);

Added new API function for checking nDPI-configured exceptions
u_int8_t ndpi_check_flow_risk_exception(struct ndpi_detection_module_struct *ndpi_str,
                                        u_int num_params,
                                        ndpi_risk_params **params);
2022-07-04 18:41:01 +02:00
Luca Deri 8ff2860601 Set CiscoVPN as a network protocol 2022-07-04 18:41:01 +02:00
Toni Uhlig b3ab66020f Updated JA3/SSL fingerprints.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-07-04 16:05:22 +02:00
Toni Uhlig b3d3e3b210 Replaced malicious JA3-md5/SSL-cert-sha1 ac automata with hashmaps.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-07-04 16:05:22 +02:00
Toni 4ff8aa48b2 Added UltraSurf protocol dissector. (#1618)
* TLSv1.3 UltraSurf flows are not detected by now

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-07-04 16:04:53 +02:00
Ivan Nardi 5aa3d9126f Add two new confidence values: confidence by partial DPI (#1632)
Used for all classifications based on partial/incomplete DPI
information, i.e. all classifications done in `ndpi_detection_giveup()`.
2022-07-04 13:56:51 +02:00
Ivan Nardi 4445989588 Update host content list match (#1633)
Improve classifications of Outlook, Cachefly, Cloudflare, Tiktok and
Cybersecurity.
2022-07-04 13:21:11 +02:00
Toni a1de0285eb Sync Psiphon unit test. (#1634)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-07-04 13:20:44 +02:00
Toni 75f7da5c26 Added Psiphon detection patterns. See #566 and #1099. (#1631)
* The traces are not up to date, but this is the best we got so far.

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-07-04 10:34:54 +02:00
Ivan Nardi 192a32207c OCSP: improve detection (#1629) 2022-07-04 07:22:56 +02:00
Toni a74fc089c4 Added i3D and RiotGames protocol dissectors. (#1609)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-07-03 20:43:30 +02:00
Ivan Nardi faaff58620 TargusDataspeed: avoid false positives (#1628)
TargusDataspeed dissector doesn't perform any real DPI checks but it only
looks at the TCP/UDP ports.
Delete it, and use standard logic to classify these flows by port.
2022-07-03 20:28:58 +02:00
Ivan Nardi 50c0212df1 Update ASN/IPs lists (#1627) 2022-07-03 19:50:47 +02:00
Ivan Nardi b5fb2066cb bins: add support for 64bit bins (#1626) 2022-07-03 19:25:15 +02:00
Ivan Nardi 422d002542 Skinny: rework and improve classification (#1625) 2022-07-03 19:25:00 +02:00
Ivan Nardi eed47acfc8 Skype_Teams, Mining, SnapchatCall: fix flow category (#1624) 2022-07-03 18:51:16 +02:00
Ivan Nardi 77ac58e553 Minor changes in how classification results are set (#1623)
Protocol classification should always be set via
`ndpi_set_detected_protocol()`: this way, the values in
`flow->detected_protocol_stack[]` are always coherent.
2022-07-03 18:45:24 +02:00
Ivan Nardi 060e894d5b Usenet: improve dissection (#1622) 2022-07-03 18:08:04 +02:00
Ivan Nardi fdb1649a49 Fix category for mail sessions (#1621)
Close #629
2022-07-03 17:47:58 +02:00
Ivan Nardi 5fe6087686 TLS: add support for old DTLS versions and for detection of mid-sessions (#1619) 2022-07-03 17:44:17 +02:00
Ivan Nardi 5f6fa6d164 Fix a compilation warning (#1620)
With clang-15 (nightly build)
```
In file included from ndpi_bitmap.c:39:
./third_party/src/roaring.cc:14233:13: warning: variable 'run_count' set but not used [-Wunused-but-set-variable]
        int run_count = 0;
```
2022-07-03 17:43:38 +02:00
Toni Uhlig 69ccb39741 Generate profiling results as PNG.
* use -ltcmalloc_and_profiler and try to get rid of LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libprofiler.so

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-07-03 17:38:43 +02:00
lns f2d1edbedf gprof test/CI integration
Signed-off-by: lns <matzeton@googlemail.com>
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-07-03 17:38:43 +02:00
Toni 1a01e8dc68 Improved TFTP. Dissect Read/Write Request filenames. (#1617)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-07-03 14:37:05 +02:00
Toni 5ca82ad84b Added TSAN support. (#1613)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-07-03 14:35:21 +02:00
Toni 59b00b00a7 Fix byte-order issue during ndpiReader tcp/udp src/dst port serialization. Fixes #1608. (#1614)
* fixed possible memory leak caused by an invalid call to `node_proto_guess_walker()` during serialization
 * execute serialization code while running regression tests

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-07-03 11:16:52 +02:00
Toni 7c5c811eb0 Added Cloudflare WARP detection patterns. (#1615) (#1616)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-07-02 14:57:56 +02:00
Luca Deri 008a1790e4 Fixed SMTP default port 587 2022-07-02 11:49:22 +02:00
Toni bb72aa4767 Added TunnelBear VPN detection patterns. (#1615)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-07-01 13:19:17 +02:00
Luca Deri 8f6a006e36 Updated (C) 2022-06-30 14:53:47 +02:00
Luca Deri 6cf7838295 Removed space from "Genshin Impact" 2022-06-30 14:50:05 +02:00
Toni c96f4512fa sync unit tests (#1612)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-06-30 09:37:30 +02:00
Luca Deri 5f1caeb54e Fix after the protocol name update 2022-06-28 17:26:11 +02:00
Luca d393fb969d Renamed Z39.50 -> Z3950 as the '.' breaks the naming convention
QUIC is a network protocol
2022-06-28 17:20:58 +02:00
Luca Deri 227ab5c105 Enhanced TLS risk info reported to users 2022-06-28 00:01:00 +02:00
Luca Deri 4296ec969a Added default port for syslog TCP 2022-06-27 18:36:56 +02:00
Ivan Nardi b2b61011ae Fix compilation and sync unit tests results (#1606) 2022-06-20 14:27:13 +02:00
Luca Deri ab09b8ce2e Added unidirectional traffic flow risk 2022-06-20 00:22:13 +02:00
Toni c287eb835b Improved SOAP via HTTP. (#1605)
Signed-off-by: lns <matzeton@googlemail.com>
2022-06-18 17:19:16 +02:00
Toni 6cd8f8cc6d Improved GenshinImpact protocol dissector. (#1604)
Signed-off-by: lns <matzeton@googlemail.com>
2022-06-18 15:11:59 +02:00
Toni 432de5eb57 Added collectd dissector (again). (#1601)
Signed-off-by: lns <matzeton@googlemail.com>
2022-06-17 19:56:33 +02:00
Toni 9c8b2d63da Replaced nDPI's internal hashmap with uthash. (#1602)
Signed-off-by: lns <matzeton@googlemail.com>
2022-06-17 19:50:31 +02:00
Toni 20a29c393f Improved IPSec/ISAKMP detection. (#1600)
Signed-off-by: lns <matzeton@googlemail.com>
2022-06-16 09:16:18 +02:00
Luca c43360f8e6 Added new test pcaps 2022-06-15 18:57:46 +02:00
claudio_burrafatoandToni c73a0988cd Add some statistics to ndpiReader (#1587)
* Add some statistics to ndpiReader

The purpose of this version of ndpiReader is too adding some other statistics printed by ndpiReader. In this simple version the domain names(in the flows) that are collected are:
flow-> ssh_tls.server_info
flow-> host_server_name
and are placed in a UT_hash_table, ordering them by number of occurrences.

* Update example/ndpiReader.c

Co-authored-by: Toni <matzeton@googlemail.com>

* Update example/ndpiReader.c

Co-authored-by: Toni <matzeton@googlemail.com>

* Update example/ndpiReader.c

Co-authored-by: Toni <matzeton@googlemail.com>

* Update example/ndpiReader.c

Co-authored-by: Toni <matzeton@googlemail.com>

* Update example/ndpiReader.c

Co-authored-by: Toni <matzeton@googlemail.com>

* Update example/ndpiReader.c

Co-authored-by: Toni <matzeton@googlemail.com>

* Update example/ndpiReader.c

Co-authored-by: Toni <matzeton@googlemail.com>

* Update example/ndpiReader.c

Co-authored-by: Toni <matzeton@googlemail.com>

* Update example/ndpiReader.c

Co-authored-by: Toni <matzeton@googlemail.com>

* Update example/ndpiReader.c

Co-authored-by: Toni <matzeton@googlemail.com>

* Update example/ndpiReader.c

Co-authored-by: Toni <matzeton@googlemail.com>

* Update example/ndpiReader.c

Co-authored-by: Toni <matzeton@googlemail.com>

* Update ndpiReader.c

* Update ndpiReader.c

* Update ndpiReader.c

* Update ndpiReader.c

Co-authored-by: Toni <matzeton@googlemail.com>
2022-06-15 16:36:25 +02:00
Ivan Nardi e2cc08bfe5 Add support for PIM (Protocol Indipendent Multicast) protocol (#1599)
Close #1598
2022-06-15 12:25:26 +02:00
Toni d1773cc8e3 Improved WhatsApp detection. (#1595)
Signed-off-by: lns <matzeton@googlemail.com>
2022-06-14 20:06:48 +02:00
Ivan Nardi bdf54d725b Fix invalid memory access (#1596)
We can access `flow->protos` union only after checking the protocol.

Checking `flow->detected_protocol.master_protocol` is redundant because
we already check it in `is_ndpi_proto`

```
AddressSanitizer:DEADLYSIGNAL
=================================================================
==29739==ERROR: AddressSanitizer: SEGV on unknown address 0x000000353820 (pc 0x7f9b64dd2717 bp 0x7fff161a52f0 sp 0x7fff161a4aa8 T0)
==29739==The signal is caused by a READ memory access.
    #0 0x7f9b64dd2717  /build/glibc-SzIz7B/glibc-2.31/string/../sysdeps/x86_64/multiarch/strlen-avx2.S:96
    #1 0x555c65e597d8 in __interceptor_strlen (/home/ivan/svnrepos/nDPI/fuzz/fuzz_ndpi_reader_with_main+0x6407d8) (BuildId: 11ac8ec30f1d49fb0276c9b03368e491505d2bba)
    #2 0x555c65fd85fa in ndpi_strdup /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:269:13
    #3 0x555c65f3e8c6 in process_ndpi_collected_info /home/ivan/svnrepos/nDPI/example/reader_util.c:1188:36
    #4 0x555c65f52cab in packet_processing /home/ivan/svnrepos/nDPI/example/reader_util.c:1567:2
    #5 0x555c65f4b632 in ndpi_workflow_process_packet /home/ivan/svnrepos/nDPI/example/reader_util.c:2110:10
    #6 0x555c65f04d29 in LLVMFuzzerTestOneInput /home/ivan/svnrepos/nDPI/fuzz/fuzz_ndpi_reader.c:109:7
    #7 0x555c65f054bb in main /home/ivan/svnrepos/nDPI/fuzz/fuzz_ndpi_reader.c:181:17
    #8 0x7f9b64c6e082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
    #9 0x555c65e4253d in _start (/home/ivan/svnrepos/nDPI/fuzz/fuzz_ndpi_reader_with_main+0x62953d) (BuildId: 11ac8ec30f1d49fb0276c9b03368e491505d2bba)

```

Found by oss-fuzzer.
See: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=48020
2022-06-14 11:44:32 +02:00
Ivan Nardi 8dcaa5c0e1 DNS: fix TTL check and sync unit test results (#1594) 2022-06-14 09:29:16 +02:00
Luca Deri defe7d7f79 Updated DNS alert triggered only with TTL == 0 2022-06-14 00:13:05 +02:00
Luca Deri 831562c141 Restored ndpi_set_proto_defaults() prototype
Updated test results
2022-06-13 23:53:32 +02:00
Luca Deri 7a172ce11e Added check for DGA names that resolve to a valid record 2022-06-13 23:42:07 +02:00
Luca Deri cf5873ffd7 Improved DNS traffic analysis
Added ability to identify application and network protocols
2022-06-13 23:19:47 +02:00
Luca Deri 32428026d6 Added DNS record TTL check 2022-06-13 17:05:56 +02:00
Toni df0ff9bcbd Added gprof CPU/HEAP profiling support. (#1592)
* Some small auto{conf,make} improvements

Signed-off-by: lns <matzeton@googlemail.com>
2022-06-12 21:00:41 +02:00
Toni 341f58fd80 Removed Makefile references to legacy code. (#1589)
- feature removed with f5545a80f9

Signed-off-by: lns <matzeton@googlemail.com>
2022-06-08 13:37:11 +02:00
Luca Deri 11babc7ea3 Added Pragmatic General Multicast (PGM) protocol detection 2022-06-08 09:11:22 +02:00
Toni bb3c2e82de Dissect host line if SSDP contains such. (#1586)
Signed-off-by: lns <matzeton@googlemail.com>
2022-06-07 11:15:47 +02:00
Toni 938e89ca33 Reimplemented 1kxun application protocol. (#1585)
Signed-off-by: lns <matzeton@googlemail.com>
2022-06-06 18:04:49 +02:00
Toni df78e67518 Prevent compilation failure if, for whatever reason, NDPI_API_VERSION is empty. (#1584)
- This is not a fix for #1494, just an improvment.

Signed-off-by: lns <matzeton@googlemail.com>
2022-06-06 15:53:48 +02:00
Toni 0b3f8ed849 Fixed syslog false negatives. (#1582)
- RSH vs Syslog may still happen for midstream traffic

Signed-off-by: lns <matzeton@googlemail.com>
2022-06-05 23:01:56 +02:00
Ivan Nardi 1d492c9ed8 Fix some debug messages (#1583)
Increase max number of flows handled during fuzzing
2022-06-05 14:45:21 +02:00
Luca Deri 59c084b166 Updated test results 2022-06-05 11:34:10 +02:00
Luca Deri 2202365b95 Fixed invalid DHCP dissection 2022-06-05 11:19:28 +02:00
Luca Deri b6ae9642d3 Fixed DHCP dissection bug 2022-06-05 11:14:23 +02:00
Toni 7419cfee64 Added RSH dissector. Fixes #202. (#1581)
- added syslog false-positive pcap that was missing in 09fbe0a64a
 - added NDPI_ARRAY_LENGTH() macro, usable on `type var[]` declarations

Signed-off-by: lns <matzeton@googlemail.com>
2022-06-04 19:12:53 +02:00
Ivan Nardi 338427d712 Add support for GoTo products (mainly GoToMeeting) (#1580)
There is some overlap with Citrix protocol.
2022-06-04 14:30:52 +02:00
Toni ff8e1e197e Fix syslog heap overflow introduced in 09fbe0a64a. (#1579)
- fixes #1578

Signed-off-by: lns <matzeton@googlemail.com>
2022-06-04 08:47:47 +02:00
Toni 09fbe0a64a Fixed syslog false positives. (#1577)
* syslog: removed unnecessary/unreliable printable string check
 * added `ndpi_isalnum()`
 * splitted `ndpi_is_printable_string()` into `ndpi_is_printable_buffer()` and `ndpi_normalize_printable_string()`

Signed-off-by: lns <matzeton@googlemail.com>
2022-06-03 18:21:29 +02:00
Toni 6149c0f880 Fix heap buffer overflow mentioned in #1574. (#1576)
Signed-off-by: lns <matzeton@googlemail.com>
2022-06-02 13:07:09 +02:00
Ivan Nardi 4ff1bf29df TLS: fix use-of-uninitialized-value error (#1573)
Proper fix for the error already reported in 9040bc74

```
Uninitialized bytes in __interceptor_strlen at offset 3 inside [0x7ffc7a147390, 4)
==111876==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x55e3e4f32e5b in ndpi_strdup /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:268:13
    #1 0x55e3e4ef7391 in ndpi_set_risk /home/ivan/svnrepos/nDPI/src/lib/ndpi_utils.c:2254:12
    #2 0x55e3e5022fdf in processClientServerHello /home/ivan/svnrepos/nDPI/src/lib/protocols/tls.c:1523:8
    #3 0x55e3e503af44 in processTLSBlock /home/ivan/svnrepos/nDPI/src/lib/protocols/tls.c:865:5
    #4 0x55e3e50397cd in ndpi_search_tls_tcp /home/ivan/svnrepos/nDPI/src/lib/protocols/tls.c:1024:2
    #5 0x55e3e503570c in ndpi_search_tls_wrapper /home/ivan/svnrepos/nDPI/src/lib/protocols/tls.c:2453:5
    #6 0x55e3e4f84a6a in check_ndpi_detection_func /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:5150:6
    #7 0x55e3e4f85778 in check_ndpi_tcp_flow_func /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:5198:12
    #8 0x55e3e4f851e1 in ndpi_check_flow_func /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:5217:12
    #9 0x55e3e4f96c7a in ndpi_detection_process_packet /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:6076:15
    #10 0x55e3e4ed91ef in LLVMFuzzerTestOneInput /home/ivan/svnrepos/nDPI/fuzz/fuzz_process_packet.c:29:5
    #11 0x55e3e4eda27e in main /home/ivan/svnrepos/nDPI/fuzz/fuzz_process_packet.c:101:17
    #12 0x7f5cb3146082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
    #13 0x55e3e4e5140d in _start (/home/ivan/svnrepos/nDPI/fuzz/fuzz_process_packet_with_main+0xa340d) (BuildId: 0c02c433e039970dd13a60382b94dd5a8e19f625)
```
2022-06-02 00:15:52 +02:00
Toni eac11030ac Removed README.nDPI as it does not provide any new information not covered by README.md (#1572)
Signed-off-by: lns <matzeton@googlemail.com>
2022-05-31 22:11:48 +02:00
Toni 00c62a7c3c Removed LGTM ql query for packet payload integer arithmetic. (#1570)
* Detection is unreliable and results in too much false-positives (and false-negatives!)

Signed-off-by: lns <matzeton@googlemail.com>
2022-05-31 16:46:44 +02:00
Toni d8d806c79f Force roaring bitmap to use ndpi memory wrappers. (#1569)
GCC analyzer won't complain about possible use-after-free (false positive).

 * tests/do.sh prints word diff's only once and not the same over and over again
 * sync unit tests

Signed-off-by: lns <matzeton@googlemail.com>
2022-05-31 12:06:01 +02:00
Ivan Nardi 9040bc74c9 TLS: fix stack-buffer-overflow error (#1567)
```
==300852==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7f108951f060 at pc 0x5641db0ee78c bp 0x7fff3b10b910 sp 0x7fff3b10b0d0
WRITE of size 116 at 0x7f108951f060 thread T0
    #0 0x5641db0ee78b in __interceptor_strncpy (/home/ivan/svnrepos/nDPI/fuzz/fuzz_process_packet_with_main+0x64e78b) (BuildId: 23cb34bbaf8ac11eb97563bbdc12e29ead9fb0fa)
    #1 0x5641db28efad in tlsCheckUncommonALPN /home/ivan/svnrepos/nDPI/src/lib/protocols/tls.c:1224:7
    #2 0x5641db27ec76 in processClientServerHello /home/ivan/svnrepos/nDPI/src/lib/protocols/tls.c:1533:6
    #3 0x5641db295677 in processTLSBlock /home/ivan/svnrepos/nDPI/src/lib/protocols/tls.c:865:5
    #4 0x5641db2935bb in ndpi_search_tls_tcp /home/ivan/svnrepos/nDPI/src/lib/protocols/tls.c:1024:2
    #5 0x5641db28f692 in ndpi_search_tls_wrapper /home/ivan/svnrepos/nDPI/src/lib/protocols/tls.c:2446:5
    #6 0x5641db1d87ce in check_ndpi_detection_func /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:5150:6
    #7 0x5641db1d91e4 in check_ndpi_tcp_flow_func /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:5198:12
    #8 0x5641db1d8e87 in ndpi_check_flow_func /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:5217:12
    #9 0x5641db1eb4a7 in ndpi_detection_process_packet /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:6076:15
    #10 0x5641db140b45 in LLVMFuzzerTestOneInput /home/ivan/svnrepos/nDPI/fuzz/fuzz_process_packet.c:29:5
    #11 0x5641db14130b in main /home/ivan/svnrepos/nDPI/fuzz/fuzz_process_packet.c:101:17
    #12 0x7f108bcab082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
    #13 0x5641db07f46d in _start (/home/ivan/svnrepos/nDPI/fuzz/fuzz_process_packet_with_main+0x5df46d) (BuildId: 23cb34bbaf8ac11eb97563bbdc12e29ead9fb0fa)

Address 0x7f108951f060 is located in stack of thread T0 at offset 96 in frame
    #0 0x5641db28ec4f in tlsCheckUncommonALPN /home/ivan/svnrepos/nDPI/src/lib/protocols/tls.c:1204

  This frame has 1 object(s):
    [32, 96) 'str' (line 1218) <== Memory access at offset 96 overflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
      (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow (/home/ivan/svnrepos/nDPI/fuzz/fuzz_process_packet_with_main+0x64e78b) (BuildId: 23cb34bbaf8ac11eb97563bbdc12e29ead9fb0fa) in __interceptor_strncpy
Shadow bytes around the buggy address:
```

Avoid zeroing the entire string.

Found by oss-fuzzer
See: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=47730
2022-05-31 10:33:42 +02:00
Luca Deri 354addd693 Updated risk results 2022-05-30 23:28:59 +02:00
Luca Deri b306a4b8ed Improved message for known proto on non std port 2022-05-30 23:23:18 +02:00
Luca Deri b3bf695723 Added check 2022-05-30 22:39:23 +02:00
Toni 00ee364a7e Updated README.md (#1562)
* make check great again (not so much)
 * make doc/doc-view
 * CI updates

Signed-off-by: lns <matzeton@googlemail.com>
2022-05-30 19:48:05 +02:00
Ivan Nardi ca115774c9 TLS: fix use-of-uninitialized-value error (#1566)
```
Uninitialized bytes in __interceptor_strlen at offset 0 inside [0x7ffc987443a0, 7)
==282918==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x5651277e001b in ndpi_strdup /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:268:13
    #1 0x5651277a45c1 in ndpi_set_risk /home/ivan/svnrepos/nDPI/src/lib/ndpi_utils.c:2254:12
    #2 0x5651278cfaa6 in processClientServerHello /home/ivan/svnrepos/nDPI/src/lib/protocols/tls.c:1515:8
    #3 0x5651278e7834 in processTLSBlock /home/ivan/svnrepos/nDPI/src/lib/protocols/tls.c:865:5
    #4 0x5651278e60bd in ndpi_search_tls_tcp /home/ivan/svnrepos/nDPI/src/lib/protocols/tls.c:1024:2
    #5 0x5651278e1ffc in ndpi_search_tls_wrapper /home/ivan/svnrepos/nDPI/src/lib/protocols/tls.c:2445:5
    #6 0x565127831c2a in check_ndpi_detection_func /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:5150:6
    #7 0x565127832938 in check_ndpi_tcp_flow_func /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:5198:12
    #8 0x5651278323a1 in ndpi_check_flow_func /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:5217:12
    #9 0x565127843e3a in ndpi_detection_process_packet /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:6076:15
    #10 0x56512778641f in LLVMFuzzerTestOneInput /home/ivan/svnrepos/nDPI/fuzz/fuzz_process_packet.c:29:5
    #11 0x5651277874ae in main /home/ivan/svnrepos/nDPI/fuzz/fuzz_process_packet.c:101:17
    #12 0x7f4c46794082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
    #13 0x5651276fe40d in _start (/home/ivan/svnrepos/nDPI/fuzz/fuzz_process_packet_with_main+0xa340d)
```
Found by oss-fuzzer
See: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=47728
2022-05-30 19:40:47 +02:00
Luca Deri 912b69af60 Redefined type name to avoid conflicts 2022-05-30 18:29:08 +02:00
Luca 34ede63c15 Added ability to return risk info in JSON format in ndpi_get_flow_risk_info() 2022-05-30 17:54:30 +02:00
Toni 48065d80e9 Support word diff for tests/do.sh for better readability. (#1565)
* Sync unit tests

Signed-off-by: lns <matzeton@googlemail.com>
2022-05-30 17:33:03 +02:00
Toni 32750271c3 Prohibit MPEG-DASH to set HTTP as application protocol. (#1560)
Signed-off-by: lns <matzeton@googlemail.com>
2022-05-30 14:54:27 +02:00
Ivan Nardi c4f50b2cda HTTP: fix heap-buffer-overflow error (#1564)
```
==222479==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60b000014739 at pc 0x55af06f2364f bp 0x7ffd7b6f4bf0 sp 0x7ffd7b6f4378
READ of size 12 at 0x60b000014739 thread T0
    #0 0x55af06f2364e in printf_common(void*, char const*, __va_list_tag*) asan_interceptors.cpp.o
    #1 0x55af06f24f70 in __interceptor_snprintf (/home/ivan/svnrepos/nDPI/fuzz/fuzz_ndpi_reader_with_main+0x613f70) (BuildId: f6545ec2bd7663bc3f16aeeb87bddc64d173a2a8)
    #2 0x55af0720927f in ndpi_check_http_header /home/ivan/svnrepos/nDPI/src/lib/protocols/http.c:982:2
    #3 0x55af071f4797 in ndpi_check_http_tcp /home/ivan/svnrepos/nDPI/src/lib/protocols/http.c:1219:5
    #4 0x55af071f05c5 in ndpi_search_http_tcp /home/ivan/svnrepos/nDPI/src/lib/protocols/http.c:1402:3
    #5 0x55af07080d1e in check_ndpi_detection_func /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:5150:6
    #6 0x55af07081734 in check_ndpi_tcp_flow_func /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:5198:12
    #7 0x55af070813d7 in ndpi_check_flow_func /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:5217:12
    #8 0x55af070939f7 in ndpi_detection_process_packet /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:6076:15
    #9 0x55af06fc7e1f in packet_processing /home/ivan/svnrepos/nDPI/example/reader_util.c:1541
    #10 0x55af06fc7e1f in ndpi_workflow_process_packet /home/ivan/svnrepos/nDPI/example/reader_util.c:2110
    #11 0x55af06fc2859 in LLVMFuzzerTestOneInput /home/ivan/svnrepos/nDPI/fuzz/fuzz_ndpi_reader.c:109:7
    #12 0x55af06fc2feb in main /home/ivan/svnrepos/nDPI/fuzz/fuzz_ndpi_reader.c:181:17
    #13 0x7efe5eaac082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
    #14 0x55af06f0055d in _start (/home/ivan/svnrepos/nDPI/fuzz/fuzz_ndpi_reader_with_main+0x5ef55d) (BuildId: f6545ec2bd7663bc3f16aeeb87bddc64d173a2a8)

0x60b000014739 is located 0 bytes to the right of 105-byte region [0x60b0000146d0,0x60b000014739)
allocated by thread T0 here:
    #0 0x55af06f84bae in malloc (/home/ivan/svnrepos/nDPI/fuzz/fuzz_ndpi_reader_with_main+0x673bae) (BuildId: f6545ec2bd7663bc3f16aeeb87bddc64d173a2a8)
    #1 0x55af06fc2673 in LLVMFuzzerTestOneInput /home/ivan/svnrepos/nDPI/fuzz/fuzz_ndpi_reader.c:103:31
    #2 0x55af06fc2feb in main /home/ivan/svnrepos/nDPI/fuzz/fuzz_ndpi_reader.c:181:17
    #3 0x7efe5eaac082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16

```
Fiund by oss-fuzzer.
See: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=47724
2022-05-30 14:39:01 +02:00
Ivan Nardi 3b825fca6d Certificate timestamps should be printed in UTC (#1563)
This way, the CI results are consistent
2022-05-30 13:43:05 +02:00
Luca Deri 897f8314b2 Fixed dispay bug for risk_info 2022-05-30 01:12:38 +02:00
Luca Deri 1da9f1a36f Updated tests results
Code cleanup
2022-05-30 00:54:17 +02:00
Luca Deri f25deeccb1 Added RiskInfo string 2022-05-30 00:32:32 +02:00
Ivan Nardi a9d7cc4841 Fix dissection of IPv4 header (#1561)
See: https://github.com/ntop/nDPI/runs/6643914510?check_suite_focus=true

Convert al the `MIN(a,b)` calls to `ndpi_min(a,b)`
2022-05-29 22:39:48 +02:00
Ivan Nardi 9c1a53f39f Dazn: add support for Dazn streaming service (#1559)
Update .gitignore file
2022-05-29 17:47:16 +02:00
Luca Deri 406ac81a37 Compilation fixes for old ggc's 2022-05-29 16:40:16 +02:00
Luca Deri dfbe863f4e Comment 2022-05-29 16:35:08 +02:00
Luca Deri 1093aafa5f Added detection for WordPress exploits
Fixed ndpi_iph_is_valid_and_not_fragmented() that was bugged with non UDP traffic
2022-05-29 16:31:26 +02:00
Toni 6b7b23b01d Use Doxygen to generate the API documentation. (#1558)
* Integrated Doxygen documentation into Sphinx

Signed-off-by: lns <matzeton@googlemail.com>
2022-05-29 13:44:52 +02:00
Toni 33f9729ee4 Added MPEG-DASH dissector. Fixes #1223. (#1555)
* Improved HTTP POST detection
 * Refactored subprotocol detection

Signed-off-by: lns <matzeton@googlemail.com>
2022-05-29 13:12:13 +02:00
Toni cfd23e8819 Fixed HTTP lower/upper protocol mess for Aimini/IPP. (#1557)
* If HTTP was already detected, there is no need to overwrite the detection again

Signed-off-by: lns <matzeton@googlemail.com>
2022-05-28 16:31:35 +02:00
Luca Deri 77dc884a4c Compilation fixes for old gcc compiler 2022-05-28 16:06:34 +02:00
Luca Deri 7e3d061428 Compilation fixes 2022-05-27 17:35:30 +02:00
Luca Deri 6d543808ad Version cut fix 2022-05-27 16:58:39 +02:00
Luca Deri 02ba12b0de Fixes compilation issues on RedHat systems 2022-05-26 23:34:34 +02:00
Ivan Nardi f81f0c5e69 Sync unit test results (#1554) 2022-05-26 20:15:30 +02:00
Luca Deri cedbd32030 Updated SkypeCall -> Skype_TeamsCall 2022-05-26 19:27:12 +02:00
Luca Deri 1645fea85c Fixed false positives with NATS 2022-05-26 19:01:13 +02:00
Toni 78dfe959cb Added script to compare and verify the output of `make dist'. (#1551)
This fixes some build/test issues resulting when using tarballs.

 * nDPI uses autotools (especially autoconf) in a wrong way, see #1163

Signed-off-by: lns <matzeton@googlemail.com>
2022-05-26 15:07:22 +02:00
Toni 9614b66b44 Replaced obsolete autoconf macros. (#1553)
Signed-off-by: lns <matzeton@googlemail.com>
2022-05-26 11:31:09 +02:00
Toni 7010d17ccc Fixed windows-latest build error. (#1552)
* The warning itself looks like a bug

Signed-off-by: lns <matzeton@googlemail.com>
2022-05-26 10:19:57 +02:00
Luca Deri 83e1ea2506 Improved invalid host detection 2022-05-24 21:17:33 +02:00
Luca Deri 0c703ef8eb Added invalid SNI check in QUIC 2022-05-24 19:51:49 +02:00
Luca Deri 4f9dee164e Improved detection of invalid SNI and hostnames in TLS, HTTP 2022-05-24 19:47:54 +02:00
Luca Deri 2560260a41 Added room for storing information used by custom third-party dissectors 2022-05-19 23:24:42 +02:00
lns 8b750686c9 Moved RTSP http patterns to the protocol source file.
Signed-off-by: lns <matzeton@googlemail.com>
2022-05-19 19:58:11 +02:00
Toni Uhlig dae7986a37 Yet another approach to fix #1499 (basically a copy&pasta from @socketpair).
* Related to #1545, #1494 and #1189 as well

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-05-16 16:54:18 +02:00
Toni Uhlig 3c08a3c875 Removed MacOS XCode integration.
* It is outdated (from 2018) and will most likely not work anymore
   due to changed protocol files and outdated API usage in the example integration
 * Removal is the only option besides fixing those issues and
   provide a CI integration for future automatic checks

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-05-16 16:54:18 +02:00
Toni Uhlig 7162bf6abf Moved mgcp.pcapng to tests/pcap/ instead of tests/
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-05-16 16:54:18 +02:00
Ivan Nardi f822aad8b0 DNS-over-QUIC: update default port (#1548)
Final RFC (https://www.rfc-editor.org/rfc/rfc9250.txt) changed the
default port to 853 (from the 784 used on the early drafts).
Since there is at least one deployed implementation still stuck at
draft-02, keep also the old value, for the time being.
2022-05-12 14:31:26 +02:00
Toni 054d151373 Improved Viber (TCP) detection. (#1547)
Signed-off-by: lns <matzeton@googlemail.com>
2022-05-10 21:37:03 +02:00
Toni 704920414a Improved Xiaomi HTTP detection. (#1546)
* Merged Xiaomi pcap files

Signed-off-by: lns <matzeton@googlemail.com>
2022-05-10 11:10:04 +02:00
Toni 6fc29b3ae8 Removed TLS patterns in the CiscoVPN aka Anyconnect dissector as mentioned in PR #1534. (#1543)
Signed-off-by: lns <matzeton@googlemail.com>
2022-05-09 10:29:52 +02:00
Toni 915ffebade Added Softether(-VPN) DDNS service detection. (#1544)
Signed-off-by: lns <matzeton@googlemail.com>
2022-05-09 08:16:19 +02:00
Toni 4319d760e0 Improved TLS alert detection. (#1542)
Signed-off-by: lns <matzeton@googlemail.com>
2022-05-08 20:33:59 +02:00
Toni 34882d9cf0 Improved TLS application data detection. (#1541)
* #1532 did fx TLS appdata detection only partially
 * use flow->l4.tcp.tls.message.buffer_used instead of packet->payload

Signed-off-by: lns <matzeton@googlemail.com>
2022-05-08 19:56:08 +02:00
Toni b2648a45a3 Added Edgecast and Cachefly CDNs. (#1540)
* Improved ASN update script
 * Ran `utils/update_every_lists.sh'
 * `tests/do.sh.in' prints the amount of failed pcap(s)
 * `utils/asn_update.sh' prints the amount of failed download(s)

Signed-off-by: lns <matzeton@googlemail.com>
2022-05-07 09:33:25 +02:00
Toni 87f93ea4fd Replaced ndpiReader's libjson-c support with libnDPI's internal serialization interface. (#1535)
* Fixes #1528
 * Serialization Interface should also fuzzed
 * libjson-c may only be used in the unit test to verify the internal serialization interface
 * Serialization Interface supports tlv(broken), csv and json
 * Unit test does work again and requires libjson-c

Signed-off-by: lns <matzeton@googlemail.com>
2022-05-07 09:26:09 +02:00
Ivan Nardi 2e0dedbaae Fix compilation (if --enable-debug-messages is used) (#1539) 2022-05-04 18:43:37 +02:00
Luca Deri 434c38c74d Added extra check to make sure that the guessed protocol is the one we expect and not another one 2022-05-04 16:27:36 +02:00
Luca Deri 5996cf1725 Fixes bug that prevents triggering alerts for traffic on non-standard ports that have been defined in the custom protocols file
Fixes https://github.com/ntop/ntopng/issues/6458
2022-05-04 16:07:05 +02:00
Luca Deri 81a367f1ae Fixes outdated description 2022-05-04 16:06:50 +02:00
Luca Deri 5dcb9c1c16 Modified risk labels 2022-05-04 12:10:01 +02:00
Toni d5b922cfe4 Added some Pluralsight Hostnames/SNIs. May fix #1501. (#1538)
Signed-off-by: lns <matzeton@googlemail.com>
2022-05-03 13:20:44 +02:00
Luca Deri 65dd052a61 Updated RRD dependencies 2022-05-03 12:37:22 +02:00
Toni 47d6a65522 Improved suspicious http user agent detection. (#1537)
Signed-off-by: lns <matzeton@googlemail.com>
2022-05-02 19:17:32 +02:00
Luca Deri c8f72ef764 Added ndpi_get_flow_error_code() API call
Fixed typo
2022-05-02 10:51:08 +02:00
Toni 02d0b5fe13 Improved AES-NI check. (#1536)
* A library should not open a subshell

Signed-off-by: lns <matzeton@googlemail.com>
2022-04-30 20:46:20 +02:00
Luca Deri e4318ffc2d Improved AES-NI check on Linux to avoid crashes on CPUs that do
not support it (e.g. Intel Celeron N2930)
2022-04-29 14:50:21 +02:00
Ivan Nardi 71636dcafd Sync unit tests results (#1533) 2022-04-27 18:22:11 +02:00
Toni 10161448bc Improved TLS application data detection. (#1532)
Signed-off-by: lns <matzeton@googlemail.com>
2022-04-27 17:22:53 +02:00
Luca Deri 3ad989f6a8 Added BPF filtering for discarding non-IP packets 2022-04-27 17:05:33 +02:00
Luca Deri 3d755fce73 String messages have been shrinked 2022-04-27 10:28:06 +02:00
Luca Deri a7c1152397 Added ability to store custom category file in patricia tree 2022-04-26 14:42:31 +02:00
Alfredo Cardigliano e8d81123cc Add ndpi_json_string_escape to the API 2022-04-26 12:25:34 +02:00
Ivan Nardi d5005f584c Raknet: fix heap-buffer-overflow (#1531)
```
==120637==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x606000000488 at pc 0x55a0598d97ec bp 0x7ffcfe13f2e0 sp 0x7ffcfe13f2d8
READ of size 2 at 0x606000000488 thread T0
    #0 0x55a0598d97eb in ndpi_search_raknet /home/ivan/svnrepos/nDPI/src/lib/protocols/raknet.c:152:38
    #1 0x55a05966c48e in check_ndpi_detection_func /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:5060:6
    #2 0x55a05966e428 in check_ndpi_udp_flow_func /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:5119:10
    #3 0x55a05966dddc in ndpi_check_flow_func /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:5152:12
    #4 0x55a05967fa7a in ndpi_detection_process_packet /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:5971:15
    #5 0x55a05962b860 in LLVMFuzzerTestOneInput /home/ivan/svnrepos/nDPI/fuzz/fuzz_process_packet.c:24:3
    #6 0x55a05962bd9b in main /home/ivan/svnrepos/nDPI/fuzz/fuzz_process_packet.c:84:17
    #7 0x7f4aad7d80b2 in __libc_start_main /build/glibc-sMfBJT/glibc-2.31/csu/../csu/libc-start.c:308:16
    #8 0x55a05956b46d in _start (/home/ivan/svnrepos/nDPI/fuzz/fuzz_process_packet_with_main+0x5d746d) (BuildId: 9429d3d08edc3836e5536f93c07f140716d8b82e)

0x606000000488 is located 9 bytes to the right of 63-byte region [0x606000000440,0x60600000047f)
allocated by thread T0 here:
    #0 0x55a0595ee80e in malloc (/home/ivan/svnrepos/nDPI/fuzz/fuzz_process_packet_with_main+0x65a80e) (BuildId: 9429d3d08edc3836e5536f93c07f140716d8b82e)
    #1 0x55a05962bd06 in main /home/ivan/svnrepos/nDPI/fuzz/fuzz_process_packet.c:70:17
    #2 0x7f4aad7d80b2 in __libc_start_main /build/glibc-sMfBJT/glibc-2.31/csu/../csu/libc-start.c:308:16
```

Found by oss-fuzz
See: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=47000
2022-04-25 19:01:11 +02:00
Toni bc2ad3407a Added generic user agent setter. (#1530)
* ndpiReader: Print user agent if one was set and not just for certain protocols.

Signed-off-by: lns <matzeton@googlemail.com>
2022-04-25 13:00:50 +02:00
Ivan Nardi 075bce5f3d XIAOMI: add detection of Xiaomi traffic (#1529)
Most of the credits should go to @utoni (see #1521)
2022-04-25 11:00:02 +02:00
Toni ac0f50b561 Added RakNet protocol dissector. (#1527)
* Frame Set PDU's do not get fully dissected for the sake of simplicity

Signed-off-by: lns <matzeton@googlemail.com>
2022-04-24 13:08:57 +02:00
Luca Deri 9d31b7450b Code cleanup (removed redundancy) 2022-04-22 19:03:50 +02:00
Toni d5ae9170ba Tiny gnutella improvement if gtk-gnutella used. (#1525)
Signed-off-by: lns <matzeton@googlemail.com>
2022-04-22 18:33:27 +02:00
Toni 824c343602 Updated `utils/whatsapp_ip_addresses_download.sh' to scrape the required IP addresses/ranges. (#1524)
* Replaced return statements in `utils/*.sh' with exit's (such scripts should never source'd)
 * Ran `utils/update_every_lists.sh'

Signed-off-by: lns <matzeton@googlemail.com>
2022-04-22 13:27:41 +02:00
Ivan Nardi 42909673ce Add some scripts to easily update some IPs lists (#1522)
Follow-up of 8b062295

Add a new protocol id for generic Tencent/Wechat flows
2022-04-21 20:43:52 +02:00
Toni ddc256b09e Reduce ndpiReader's -h' spam. -H' does this job now. (#1523)
Signed-off-by: lns <matzeton@googlemail.com>
2022-04-21 20:43:36 +02:00
Toni c1d46ebc4e Added proprietary Agora Software Defined Real-time Network (SD-RTN) protocol dissector. (#1520)
Signed-off-by: lns <matzeton@googlemail.com>
2022-04-20 18:31:28 +02:00
Toni dbf2fb8c9f Added Toca Boca protocol dissector. (#1517)
Signed-off-by: lns <matzeton@googlemail.com>
2022-04-19 19:32:49 +02:00
Toni a83ca555fb Removed superfluous ifdef'd includes. (#1519)
Signed-off-by: lns <matzeton@googlemail.com>
2022-04-19 17:51:48 +02:00
Toni fa79f07d15 Improved sflow protocol detection false-positives. (#1518)
Signed-off-by: lns <matzeton@googlemail.com>
2022-04-19 17:46:40 +02:00
Ivan Nardi 739dfc54b0 Kerberos: fix Undefined-shift error (#1516)
Similar to the error fixed in 4775be3d
Found by oss-fuzz.
See: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=46713
2022-04-18 20:54:13 +02:00
Luca Deri 8b2c9860be DGA improvements 2022-04-16 09:56:08 +02:00
Zied Aouini 9c8a3f270a Minor fix. 2022-04-15 18:01:34 +02:00
Zied Aouini fba75a3cf5 Merge pull request #1491 from utoni/fix/windows-msys2
Fixed msys2 build and re-activated CI Mingw-w64 build.
2022-04-15 13:22:25 +02:00
Toni Uhlig c3df3a12aa Fixed msys2 build warnings and re-activated CI Mingw64 build.
* Removed Visual Studio leftovers. Maintaining an autotools project with VS integration requires some additional overhead.

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Signed-off-by: lns <matzeton@googlemail.com>
2022-04-14 19:17:48 +02:00
Ivan Nardi 4775be3d85 Kerberos: fix some memory access errors (#1514)
```
==19724==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60e00000045e at pc 0x5620b8b3d3cc bp 0x7ffe0fda6b50 sp 0x7ffe0fda6310
READ of size 2 at 0x60e00000045e thread T0
    #0 0x5620b8b3d3cb in __interceptor_strncpy (/home/ivan/svnrepos/nDPI/fuzz/fuzz_process_packet_with_main+0x63f3cb) (BuildId: ee53ff920c8cd4c226d8520a0d4846d8864726b6)
    #1 0x5620b8d9b69c in strncpy_lower /home/ivan/svnrepos/nDPI/src/lib/protocols/kerberos.c:208:4
    #2 0x5620b8d995a0 in krb_parse /home/ivan/svnrepos/nDPI/src/lib/protocols/kerberos.c:316:5
    #3 0x5620b8d97a90 in ndpi_search_kerberos /home/ivan/svnrepos/nDPI/src/lib/protocols/kerberos.c:687:12
    #4 0x5620b8bcef35 in check_ndpi_detection_func /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:4996:4
    #5 0x5620b8bd1be8 in check_ndpi_udp_flow_func /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:5072:10
    #6 0x5620b8bd159c in ndpi_check_flow_func /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:5105:12
    #7 0x5620b8be323a in ndpi_detection_process_packet /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:5924:15
    #8 0x5620b8b8f7e0 in LLVMFuzzerTestOneInput /home/ivan/svnrepos/nDPI/fuzz/fuzz_process_packet.c:24:3
    #9 0x5620b8b8fd1b in main /home/ivan/svnrepos/nDPI/fuzz/fuzz_process_packet.c:84:17
    #10 0x7f45b32b90b2 in __libc_start_main /build/glibc-sMfBJT/glibc-2.31/csu/../csu/libc-start.c:308:16
    #11 0x5620b8acf47d in _start (/home/ivan/svnrepos/nDPI/fuzz/fuzz_process_packet_with_main+0x5d147d) (BuildId: ee53ff920c8cd4c226d8520a0d4846d8864726b6)

0x60e00000045e is located 0 bytes to the right of 158-byte region [0x60e0000003c0,0x60e00000045e)
allocated by thread T0 here:
    #0 0x5620b8b5283e in malloc (/home/ivan/svnrepos/nDPI/fuzz/fuzz_process_packet_with_main+0x65483e) (BuildId: ee53ff920c8cd4c226d8520a0d4846d8864726b6)
    #1 0x5620b8b8fc86 in main /home/ivan/svnrepos/nDPI/fuzz/fuzz_process_packet.c:70:17
    #2 0x7f45b32b90b2 in __libc_start_main /build/glibc-sMfBJT/glibc-2.31/csu/../csu/libc-start.c:308:16
```

```
protocols/kerberos.c:79:52: runtime error: left shift of 255 by 24 places cannot be represented in type 'int'
```

Found by oss-fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=46670
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=46636
2022-04-13 18:10:56 +02:00
Luca Deri e00997ea7c Extended list of cybersecurity domains 2022-04-13 18:05:29 +02:00
Wayneand林文烽 939572c61e fix(ndpi_main):Fix memory leak about ndpi_str; (#1513)
Co-authored-by: 林文烽 <wenfeng.lin@baishan.com>
2022-04-12 15:34:37 +02:00
Ivan Nardi 06a0abb6fd TINC: fix invalid memory read (#1512)
```
=================================================================
==19324==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60600061be96 at pc 0x55b4a4cb4460 bp 0x7ffc7b461a70 sp 0x7ffc7b461a68
READ of size 1 at 0x60600061be96 thread T0
    #0 0x55b4a4cb445f in ndpi_check_tinc /home/ivan/svnrepos/nDPI/src/lib/protocols/tinc.c:105:9
    #1 0x55b4a4cb1888 in ndpi_search_tinc /home/ivan/svnrepos/nDPI/src/lib/protocols/tinc.c:135:5
    #2 0x55b4a4b4a6e1 in check_ndpi_detection_func /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:5013:6
    #3 0x55b4a4b4c2d4 in check_ndpi_tcp_flow_func /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:5084:12
    #4 0x55b4a4b4bf77 in ndpi_check_flow_func /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:5103:12
    #5 0x55b4a4b5dcca in ndpi_detection_process_packet /home/ivan/svnrepos/nDPI/src/lib/ndpi_main.c:5924:15
    #6 0x55b4a4a87734 in packet_processing /home/ivan/svnrepos/nDPI/example/reader_util.c:1519:31
    #7 0x55b4a4a80761 in ndpi_workflow_process_packet /home/ivan/svnrepos/nDPI/example/reader_util.c:2093:10
    #8 0x55b4a4a39c8d in LLVMFuzzerTestOneInput /home/ivan/svnrepos/nDPI/fuzz/fuzz_ndpi_reader.c:107:7
    #9 0x55b4a4a3a46b in main /home/ivan/svnrepos/nDPI/fuzz/fuzz_ndpi_reader.c:179:17
    #10 0x7f69c63760b2 in __libc_start_main /build/glibc-sMfBJT/glibc-2.31/csu/../csu/libc-start.c:308:16
    #11 0x55b4a497954d in _start (/home/ivan/svnrepos/nDPI/fuzz/fuzz_ndpi_reader_with_main+0x61654d) (BuildId: 705ebc5c412d267294a65cb01f03a1f012aeaf20)

0x60600061be96 is located 0 bytes to the right of 54-byte region [0x60600061be60,0x60600061be96)
allocated by thread T0 here:
[...]
```
Found by oss-fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=46499
2022-04-10 16:59:34 +02:00
Toni e3faecf9de Improved ASN.1 parsing for Keberos. Fixes #1492. (#1497)
* This is a quick fix, the Kerberos protocol dissector requires some refactoring effort.

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Signed-off-by: lns <matzeton@googlemail.com>
2022-04-10 10:36:10 +02:00
Vinicius Silva Nogueira 713cdd0b13 QUIC: handle retransmissions and overlapping fragments in reassembler (#1195) (#1498)
* QUIC: handle retransmissions and overlapping fragments in reassembler

* Trigger CI

* minor fix: parentheses

* Changing ndpi_malloc to ndpi_calloc

* fix memory leak

* quic_reasm_buf calloc to malloc

* change order of is_ch_complete && is_reasm_buf_complete call

* is_reasm_buf_complete: added handling for case where frame size is not multiple of 8

* add extra check
2022-04-07 21:18:58 +02:00
aouinizied 9537788ade Fix JSON-C. 2022-04-07 17:59:11 +02:00
aouinizied ff993e2f57 Python bindings fix. 2022-04-07 17:54:41 +02:00
Luca Deri a6e2f4a15a Added ndpi_find_outliers() API call using Z-Score 2022-04-04 10:02:45 +02:00
Luca Deri 19019383f0 Added -z flag 2022-04-03 11:45:23 +02:00
Ivan Nardi e0e231756c ndpiReader: fix compilation (#1510)
Not sure why Windows started complaining... anyway, the fixes has been
taken from https://github.com/ntop/nDPI/pull/1491: credits to @lnslbrty
2022-04-01 22:01:39 +02:00
Luca Deri 8080b3d14f Removed un-necessary guess in mining 2022-04-01 19:23:13 +02:00
Luca Deri 9f3a6f131b update 2022-04-01 19:07:46 +02:00
Luca Deri 32a7d42469 Fixed incompatibilities due to https://github.com/ntop/nDPI/pull/1509 2022-04-01 19:07:00 +02:00
Luca Deri 6eb5bd88a7 DGA improvements 2022-04-01 17:39:29 +02:00
Luca Deri a75d77b536 Waring fixes 2022-04-01 17:35:25 +02:00
Vitaliy Ivanov 61bc9815d5 ndpireader: add json output back. (#1509)
- partial revert of:
    commit 51cfdfb0d8
    Author: Luca Deri <deri@ntop.org>
    Date: Sun Nov 17 17:51:45 2019 +0100
      Removed unused JSON-C code

- Json option is changed from 'j' to 'k' as it's used in the new codebase.
- use HAVE_LIBJSON_C instead of HAVE_JSON_C.
- tabs vs spaces clean ups.

Signed-off-by: Vitaliy Ivanov <vitaliyi@interfacemasters.com>

 Conflicts:
	example/ndpiReader.c
2022-04-01 11:47:01 +02:00
Luca Deri 8238e68275 Improvements for CUSTOM_NDPI_PROTOCOLS 2022-04-01 09:02:05 +02:00
Luca Deri 1e8cdd893c Moved geneated file to a separate folder 2022-04-01 08:58:53 +02:00
Luca Deri 0ff3e77c42 Improved twitter detection 2022-04-01 08:50:56 +02:00
Luca Deri 6677d692c4 Removed SRV record from suspicious DNS traffic 2022-03-31 11:32:30 +02:00
Luca Deri 98a548c642 Improved DGA detection 2022-03-31 11:29:30 +02:00
Darryl Sokoloski 46dc8b5bda [autoconf] Fixed .git submodule detection test. (#1507)
Signed-off-by: Darryl Sokoloski <darryl@sokoloski.ca>
2022-03-31 03:21:51 +02:00
Luca Deri 4e199abd39 Added code for identifiying anomalies with metrics stored in InfluxDB 2022-03-30 22:12:39 +02:00
Ivan Nardi 6bcba118d4 reader_util: add support for userAgent in SSDP (#1502)
Update unit tests results
Follow-up of d668ab4b
2022-03-28 04:25:34 +02:00
Ivan Nardi 6acf7a6abe Add support for Pluralsight site (#1503) 2022-03-27 15:13:12 +02:00
Ivan Nardi ec80f1fb3b Fix CI tests results (#1504)
CI integration is failing since 856d7d2.
2022-03-27 15:12:39 +02:00
Vitaly Lavrov 4896dabb6b Reducing the size of the ndpi_detection_module_struct structure. (#1490)
The ndpi_detection_module_struct structure contains 5 arrays "struct
ndpi_call_function_struct" size 286*144=41 kB size,
which are occupied by a small number of elements.

At the moment we have callback_buffer_size = 172, tcp_with_payload=114,
tcp_no_payload=8, udp=93, other 8.
NDPI_MAX_SUPPORTED_PROTOCOLS = 285.

Size of struct ndpi_detection_module_struct is 253136 bytes.
Size of all structs ndpi_call_function_struct 5*286*144=205920 bytes.
Real use memory size for struct ndpi_call_function_struct is
(173+224)*144=57168 bytes.
2022-03-27 12:00:21 +02:00
Darryl Sokoloski d668ab4bec [SSDP] Extract HTTP user-agent when available. (#1500)
[SSDP] Added capture file with UA header.
[SSDP] Added pcap test output log file.

Signed-off-by: Darryl Sokoloski <darryl@sokoloski.ca>
2022-03-27 11:10:44 +02:00
Luca Deri 856d7d2916 Improved DGA detection skipping names containign at least 3 consecutive digits in the first word 2022-03-26 09:59:55 +01:00
Ivan Nardi aeb5f1f947 QUIC: add support for version 2 draft 01 (#1493)
Support for v2-00 has been removed (it has never been used in real
networks and it is incompatible with v2-01).

Chrome already supports v2-01 in latest versions in Chrome Beta channel.
2022-03-25 10:16:30 +01:00
Ivan Nardi af1d20bca1 Mining: cleanup registration (#1496)
Use the same pattern of all the other dissectors: one registration and
one callback.
Spotted by @dsokoloski
2022-03-25 10:07:47 +01:00
Vinicius Silva Nogueira 26df1403e6 Trying to improve QUIC reassembler (#1195) (#1489)
* handling QUIC out-of-order fragments

* minor fix

* updated quic_frags_ch_out_of_order_same_packet_craziness.pcapng.out

* quic test: buf_len + last_pos

* QUIC: comment update in __reassemble function and minor change is_ch_complete function
2022-03-24 10:51:31 +01:00
aouinizied bb12837ca7 Update Python bindings guide. 2022-03-22 15:01:55 +01:00
aouinizied c7059db84a Fix typo. 2022-03-22 14:58:22 +01:00
aouinizied 1207ea118a Add HOWTO Python. 2022-03-22 14:56:44 +01:00
aouinizied c47d710d8e Fix python bindings CI. 2022-03-22 13:40:31 +01:00
aouinizied beef4f997b Complete rework of nDPI Python bindings (cffi API, automatic generation, packaging and CI integration) 2022-03-22 13:19:27 +01:00
Luca Deri 93f723d50f Extended the list of cybersecurity protocol 2022-03-21 15:12:50 +01:00
Vitaly Lavrov 8dd70b7023 Bug fixing. (#1487)
Using the protocol_id instead of its index.
2022-03-15 19:40:18 +01:00
Ivan Nardi 9e22c88e0a QUIC: convert logs to standard mechanism (#1485) 2022-03-15 16:55:47 +01:00
Ivan Nardi b83e9f20e7 QUIC: fix dissection of draft-34 (#1484)
QUIC-34 is probably not used in production, but fixing it is trivial and
it doesn't add any noise to the already complex QUIC code.
2022-03-09 22:37:56 +01:00
Ivan Nardi 7aee856aa0 Extend tests coverage (#1476)
Now there is at least one flow under `tests/pcap` for 249 protocols out
of the 284 ones supported by nDPI.

The 35 protocols without any tests are:

* P2P/sharing protocols: DIRECT_DOWNLOAD_LINK, OPENFT, FASTTRACK,
EDONKEY, SOPCAST, THUNDER, APPLEJUICE, DIRECTCONNECT, STEALTHNET

* games: CSGO, HALFLIFE2, ARMAGETRON, CROSSFIRE, DOFUS, FIESTA,
FLORENSIA, GUILDWARS, MAPLESTORY, WORLD_OF_KUNG_FU

* voip/streaming: VHUA, ICECAST, SHOUTCAST, TVUPLAYER, TRUPHONE

* other: AYIYA, SOAP, TARGUS_GETDATA, RPC, ZMQ, REDIS, VMWARE, NOE,
LOTUS_NOTES, EGP, SAP

Most of these protocols (expecially the P2P and games ones) have been
inherited by OpenDPI and have not been updated since then: even if they
are still used, the detection rules might be outdated.

However code coverage (of `lib/protocols`) only increases from 65.6% to
68.9%.

Improve Citrix, Corba, Fix, Aimini, Megaco, PPStream, SNMP and Some/IP
dissection.
Treat IPP as a HTTP sub protocol.
Fix Cassandra false positives.

Remove `NDPI_PROTOCOL_QQLIVE` and `NDPI_PROTOCOL_REMOTE_SCAN`:
these protocol ids are defined but they are never used.

Remove Collectd support: its code has never been called. If someone is
really interested in this protocol, we can re-add it later, updating the
dissector.

Add decoding of PPI (Per-Packet Information) data link type.
2022-03-09 22:37:35 +01:00
Toni f646a4bce0 Improved ASN/IP update scripts and CI integration. (#1474)
* CI will print a warning if ASN/IP addresses changed.

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-03-09 13:53:04 +01:00
Zied Aouini 74ae315e36 Implement CI on Windows. (#1483)
* Switch fail fast to True.
* Windows CI.
2022-03-09 10:57:21 +01:00
Ivan Nardi 269be6c7ef Some small fixes (#1481)
FTP: if the authentication fails, stop analyzing the flow
WSD: call the initialization routine; the dissector code has never been
triggered
MINING: fix dissection
2022-03-08 00:21:51 +01:00
sharonenochandSharon Enoch f91218360b Extracting the Azure Origin url from the download link (#1480)
* Extracting the Azure Origin url from the download link

* Response code check to address double quotes

Co-authored-by: Sharon Enoch <sharone@amzetta.com>
2022-03-08 00:21:32 +01:00
Vitaly Lavrov a1451935b8 Errors fixed (#1482)
Fixed errors for bigendian platforms in ndpiReader.
All address and port comparisons and hash calculations are done with
endian in mind.
The get_ndpi_flow_info() function searched for an existing flow for the
forward and reverse direction of the packet.
The ndpi_workflow_node_cmp() function looked for a flow regardless of
the packet's direction. This is what led to an error in determining the
direction of transmission of the packet.

Fixed error in "synscan" test: the number of packets in the forward and
reverse direction is incorrectly defined (verified via tcpdump).

Fixed bug with icmp protocol checksum check for big endian platforms.
2022-03-08 00:20:56 +01:00
Ivan Nardi c345b3c7af EthernetIP: fix integer conversion on big-endian archs (#1477) 2022-03-05 15:05:05 +01:00
Vitaly Lavrov 438f04066b Fixed a bug for BE architectures (#1478)
Fixed a bug in the internal implementation of libgcrypt for bigendian architectures
2022-03-05 11:44:21 +01:00
Ivan Nardi a173d3e98f configure: fix usage of libgpg-error with --with-local-libgcrypt (#1472)
Right now, using external libgcrypt, nDPI is not linked to libgpg-error
because configure script never checks for it.

```
ivan@ivan-Latitude-E6540:~/svnrepos/nDPI(dev)$ CC=gcc-11 CXX=g++-11 CFLAGS="-O3 -g -Werror" ./autogen.sh --enable-debug-messages --with-pcre  --with-local-libgcrypt && make -s -j
[...]
checking for numa_available in -lnuma... yes
checking for pcap_open_live in -lpcap... yes
checking for pthread_setaffinity_np in -lpthread... yes
checking for gcry_cipher_checktag in -lgcrypt... yes             <------- missing check for libgpg-error
checking for pcre_compile in -lpcre... yes
checking that generated files are newer than configure... done
[...]
ivan@ivan-Latitude-E6540:~/svnrepos/nDPI(dev)$ grep HAVE_LIBGPG_ERROR src/include/ndpi_config.h
/* #undef HAVE_LIBGPG_ERROR */

```

Make both libgcrypt and libgpg-error mandatory if
`--with-local-libgcrypt` is used.

Technically speaking, libgpg-error might be optional, because it is used
only for debug messages. However having both libraries mandatory
slightly simplified the logic.
In most environments, libgpg-error is a dependency of libgcrypt anyway,
so having both libraries should be the standard case.
2022-03-05 11:41:37 +01:00
Toni 95a3d4fffe Added autoconf option `--enable-tls-sigs'. (#1471)
* Testing more code in CI environments.
 * Added strict option checking for `./configure' in CI environments.

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-03-03 10:16:08 +01:00
Toni cb62dfd249 Drop support for non-gcrypt builds. (#1469)
* As there is now a builtin, lightweight libgcrypt
   there is no need to disable tls-clho decryption.
 * It is still possible to use a host libgcrypt
   with `--with-local-libgcrypt'.

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-03-02 19:48:46 +01:00
Ivan Nardi e23507d3e9 Internal crypto: increase size of authentication buffer (#1468)
Some QUIC flows are not properly decoded while using internal crypto
code: the authentication buffer is too small.
The new value (like the old one) is arbitrary.

Close #1463
2022-03-02 15:14:57 +01:00
Ivan Nardi 6f431057c5 reader_util: fix parsing of MPLS packets (#1467)
```
==20492==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60300000578c at pc 0x55c47455e3ea bp 0x7ffc62ca1eb0 sp 0x7ffc62ca1ea8
READ of size 4 at 0x60300000578c thread T0
    #0 0x55c47455e3e9 in ndpi_workflow_process_packet /home/ivan/svnrepos/nDPI/example/reader_util.c:1840:16
    #1 0x55c47451b9cd in LLVMFuzzerTestOneInput /home/ivan/svnrepos/nDPI/fuzz/fuzz_ndpi_reader.c:107:7
    #2 0x55c47451c1ab in main /home/ivan/svnrepos/nDPI/fuzz/fuzz_ndpi_reader.c:179:17
    #3 0x7f661b50e0b2 in __libc_start_main /build/glibc-sMfBJT/glibc-2.31/csu/../csu/libc-start.c:308:16
    #4 0x55c47445b54d in _start (/home/ivan/svnrepos/nDPI/fuzz/fuzz_ndpi_reader_with_main+0x61054d) (BuildId: eba4bb4cd43b7101e4f0028ec0fb79087bae0e37)

0x60300000578d is located 0 bytes to the right of 29-byte region [0x603000005770,0x60300000578d)

```
2022-03-02 15:14:41 +01:00
Toni e8559a4127 Add ICMP checksum check and set risk if mismatch detected. (#1464)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-03-02 13:12:01 +01:00
Luca Deri 6c4df21238 Typo 2022-03-02 12:47:04 +01:00
Toni 4da1453d90 Added configureable ndpi packet processing limit. (#1466)
* The current behaviour ignores any user preferences
   and was also incorrectly implemented, because the
   flow->num_processed_pkts wraps every 65535 and nDPI
   will process packets again until
   NDPI_MAX_NUM_PKTS_PER_FLOW_TO_DISSECT reached.

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-03-02 12:02:09 +01:00
Toni 736a80f9ce Fix libgcrypt(-light/-internal) compile error. (#1465)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-03-02 11:03:47 +01:00
Ivan Nardi 7a7e4ee69f Add a new flow risk NDPI_ANONYMOUS_SUBSCRIBER (#1462)
The main goal of a DPI engine is usually to determine "what", i.e. which
types of traffic flow on the network.
However the applications using DPI are often interested also in "who",
i.e. which "user/subscriber" generated that traffic.

The association between a flow and a subscriber is usually done via some
kind of DHCP/GTP/RADIUS/NAT mappings. In all these cases the key element
of the flow used to identify the user is the source ip address.

That usually happens for the vast majority of the traffic.

However, depending on the protocols involved and on the position on the net
where the traffic is captured, the source ip address might have been
changed/anonymized. In that case, that address is useless for any
flow-username association.

Example: iCloud Private Relay traffic captured between the exit relay and
the server.
See the picture at page 5 on:
https://www.apple.com/privacy/docs/iCloud_Private_Relay_Overview_Dec2021.PDF

This commit adds new generic flow risk `NDPI_ANONYMOUS_SUBSCRIBER` hinting
that the ip addresses shouldn't be used to identify the user associated
with the flow.
As a first example of this new feature, the entire list of the relay ip
addresses used by Private Relay is added.

A key point to note is that list is NOT used for flow classification
(unlike all the other ip lists present in nDPI) but only for setting this
new flow risk.

TODO: IPv6
2022-02-28 15:25:58 +01:00
Luca Deri 1a8a6aa161 Unless --with-libgcrypt is used, nDPI now uses its internal gcrypt implementation 2022-02-28 15:18:10 +01:00
Ivan Nardi e193f3713d Removed some unused fields (#1461) 2022-02-28 15:03:49 +01:00
Vitaly Lavrov c390085f91 Bug fixing. (#1459)
The '--enable-debug-messages' option works again.
Fixed warning in ahocorasick.c
Fixed integer overflow in ndpiReader.c for 32bit systems.
2022-02-28 15:01:00 +01:00
Toni 00d9a16b6a Added `--enable-code-coverage' build using lcov for coverage generation. (#1430)
* CI job generates a coverage report

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-02-28 14:58:45 +01:00
Ivan Nardi 61a3c2eb5b reader_util: fix TZSP decapsulation (#1460)
```
==38674==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60400008957f at pc 0x5653fcee6434 bp 0x7ffe9b554b50 sp 0x7ffe9b554b48
READ of size 1 at 0x60400008957f thread T0
    #0 0x5653fcee6433 in ndpi_workflow_process_packet /home/ivan/svnrepos/nDPI/example/reader_util.c:2050:18
    #1 0x5653fce9fc0d in LLVMFuzzerTestOneInput /home/ivan/svnrepos/nDPI/fuzz/fuzz_ndpi_reader.c:107:7
    #2 0x5653fcea03eb in main /home/ivan/svnrepos/nDPI/fuzz/fuzz_ndpi_reader.c:179:17
    #3 0x7fe71dc3d0b2 in __libc_start_main /build/glibc-YbNSs7/glibc-2.31/csu/../csu/libc-start.c:308:16
    #4 0x5653fcddf67d in _start (/home/ivan/svnrepos/nDPI/fuzz/fuzz_ndpi_reader_with_main+0x58a67d) (BuildId: 525418a27e8c37d6c492cc3220e0e97809c40f98)

0x60400008957f is located 0 bytes to the right of 47-byte region [0x604000089550,0x60400008957f)
allocated by thread T0 here:
```

Found by oss-fuzz
See: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=45036
2022-02-27 14:18:23 +01:00
Ivan Nardi 8b062295cc Add some scripts to easily update some IPs lists (#1449)
While the lists in a6ff0dd0 and 2f5f445f are somehow provided by the
companies themselves (or by some interested parties), these new lists
are directly extracted from BGP information, via AS prefixes.

*Usually*, these new lists are far more stable than the previous ones.

TODO:
* add some other ASNs (see `src/lib/ndpi_content_match.c.inc`)
* IPv6, as usual :-(
2022-02-25 14:26:26 +01:00
Toni f14dcb8344 Provide some API functions for convenience. (#1456)
* Extended JSON serializsation: risk, risk score, confidence

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-02-25 14:26:04 +01:00
Luca Deri 34e020ac35 Win fixes 2022-02-23 21:00:53 +01:00
Luca Deri 16ed0fd3f8 Replaced strdup with ndpi_strup 2022-02-23 21:37:52 +01:00
Ivan Nardi d506a0e12f Directly drop malformed packets (#1455)
TCP/UDP/ICMP/ICMPv6 packets with invalid L4 header length should be
ignored.
2022-02-22 22:15:46 +01:00
Ivan Nardi 96f8942f75 reader_util: fix parsing of IPv6 extension headers (#1453)
Found by oss-fuzz
See: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=44942
2022-02-22 19:58:17 +01:00
Ivan Nardi 279779062c reader_util: fix infinite loop in packet dissection (#1454)
Found by oss-fuzz
See: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=44944
2022-02-22 19:56:41 +01:00
Ivan Nardi fbb9700086 fuzz: purge old sessions (#1451)
At every fuzz iteration (i.e for every trace file):
* keep the same ndpi context (`ndpi_init_detection_module` is very
slow);
* reset the flow table, otherwise it grows indefinitely.

This change should fix the "out-of-memory" errors reported by oss-fuzz.
2022-02-21 20:32:50 +01:00
Ivan Nardi 6c1accd2bd DTLS: fix access to certificate cache (#1450)
```
protocols/tls.c:650:54: runtime error: member access within null pointer of type 'const struct ndpi_tcphdr'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior protocols/tls.c:650:54 in
protocols/tls.c:650:54: runtime error: load of null pointer of type 'const u_int16_t' (aka 'const unsigned short')
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior protocols/tls.c:650:54 in
AddressSanitizer:DEADLYSIGNAL
=================================================================
==47401==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x55f7a61b661c bp 0x7f38190f91b0 sp 0x7f38190f70e0 T1)
==47401==The signal is caused by a READ memory access.
==47401==Hint: address points to the zero page.
    #0 0x55f7a61b661c in processCertificateElements /home/ivan/svnrepos/nDPI/src/lib/protocols/tls.c:650:41
    #1 0x55f7a61ac3cc in processCertificate /home/ivan/svnrepos/nDPI/src/lib/protocols/tls.c:792:7
    #2 0x55f7a61d34e1 in processTLSBlock /home/ivan/svnrepos/nDPI/src/lib/protocols/tls.c:846:13
```
2022-02-21 20:30:22 +01:00
Ivan Nardi 59993e294e EthernetIP: add missing initialization (#1448)
Fix:1e1cfb89
2022-02-20 10:20:46 +01:00
Ivan Nardi 2f5f445f72 Add support for Google Cloud (#1447)
Differentiate between Google its own apps/services and Google Cloud.
We already do something similar for Amazon vs AWS and Microsoft vs Azure.
2022-02-20 10:19:52 +01:00
Ivan Nardi 75a53ad064 fuzz: make fuzz_ndpi_reader faster (#1446)
Initialize ndpi_workflow_init context only once.

On a quite old notebook, before:
```
$ ./fuzz/fuzz_ndpi_reader -max_total_time="${MAX_TOTAL_TIME:-360}" -print_pcs=1 -workers="${FUZZY_WORKERS:-0}" -jobs="${FUZZY_JOBS:-0}" ./tests/pcap/
[...]
Done 3256 runs in 361 second(s)
```
after:
```
Done 5032771 runs in 361 second(s)   <----------- ~1400X
```
oss-fuzz will be happy!
2022-02-20 10:19:22 +01:00
Vitaly Lavrov f2411958d7 Added lightweight implementation of libgcrypt. (#1444)
Implementation borrowed from the
https://github.com/ARMmbed/mbedtls.git project (v3.1.0)

Speed testing (Xeon(R) CPU E3-1230 V2 @ 3.30GHz):

gcrypt-gnu         Test md   2897 ms enc   2777 ms dec    942 ms
gcrypt-int         Test md   3668 ms enc   1312 ms dec   2836 ms
gcrypt-int-noaesni Test md   3652 ms enc   1916 ms dec   4458 ms

gcrypt-gnu-nonopt  Test md   3763 ms enc   4978 ms dec   3999 ms

gcrypt-gnu-nonopt - libgcrypt compiled without hardware acceleration
  --disable-padlock-support --disable-aesni-support \
  --disable-shaext-support --disable-pclmul-support \
  --disable-sse41-support --disable-drng-support \
  --disable-avx-support --disable-avx2-support \
  --disable-neon-support --disable-arm-crypto-support \
  --disable-ppc-crypto-support
  --disable-amd64-as-feature-detection
2022-02-20 10:16:46 +01:00
Ivan Nardi f28a3b293e Fix compilation and sync unit tests results (#1445)
'strcasestr' is not defined in all enviroments: quicker fix is to use
'ndpi_strncasestr' instead.
2022-02-19 19:18:02 +01:00
Luca Deri a2878af1ee Added newflow risk NDPI_HTTP_CRAWLER_BOT 2022-02-17 17:20:52 +01:00
Luca Deri 8a2a47e62a Silenced
NDPI_SUSPICIOUS_DGA_DOMAIN,
   NDPI_BINARY_APPLICATION_TRANSFER,
   NDPI_HTTP_NUMERIC_IP_HOST,
   NDPI_MALICIOUS_JA3,

for predefined connectivity check and cybersec categories
2022-02-14 23:38:21 +01:00
Luca Deri 92da30f017 Extended cybersecurity protocol dissection 2022-02-14 23:19:21 +01:00
Luca Deri c4113ffd7e Added SNMP error code check 2022-02-14 23:17:51 +01:00
Luca Deri de6905f41b Exteended cybersecurity list 2022-02-10 20:16:48 +01:00
Luca Deri 023618c13a Invalid prototupe fix 2022-02-10 19:38:11 +01:00
Ivan Nardi ada7d32c50 HSRP: fix dissection over IPv6 (#1443)
Handle all message types.
2022-02-10 11:46:32 +01:00
Luca Deri 1431aa3d1c Added cybersecurity category mapping to string 2022-02-10 10:35:34 +01:00
Luca Deri 5ddbbf4dd2 Added cybersecurity protocol and category that groups traffic towards leading cybersecurity companies and CDNs, useful to make destinations that should be marked as trusted in firewalls and security gateways 2022-02-10 09:50:06 +01:00
Ivan Nardi b5eea436ae HSRP: add support for IPv6 (#1440) 2022-02-09 11:47:37 +01:00
Dmytrii Vitman 4cf853548c Added VXLAN dissector (#1439)
* RFC 7348
2022-02-09 11:47:09 +01:00
Ivan Nardi f229068fd3 Fix memory access in ndpi_strnstr() (#1438)
Found by oss-fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=44482

It should be the same error reported (and only partially fixed) in
79968f32
2022-02-09 11:46:39 +01:00
Ivan NardiandLuca Deri a6ff0dd0e3 Add few scripts to easily update some IPs lists (#1436)
* Add few scripts to easily update some IPs lists

Some IPs lists should be updated frequently: try to easy the process.
The basic idea is taken from d59fefd0 and a8fe74e5 (for Azure
addresses): one specific .c.inc file and one script for each protocol.

Add the possibility to don't load a specific list.

Rename the old NDPI_PROTOCOL_HOTMAIL id to NDPI_PROTOCOL_MS_OUTLOOK,
to identify Hotmail/Outlook/Exchange flows.

TODO: ipv6

Remove the 9 addresses associated to BitTorrent: they have been added in
e2f21116 but it is not clear why all the traffic to/from these ips
should be classified as BitTorrent.

* Added quotes

* Added quotes

Co-authored-by: Luca Deri <lucaderi@users.noreply.github.com>
2022-02-09 11:45:48 +01:00
ol-andreyizrailevandAndrey Izrailev 8cc5cb9f76 Increment current/total number of active flows on successful flow insertion (#1434)
Memory allocation or ndpi_tsearch might fail, so the two values should be
incremented only when insertion actually happened.

Co-authored-by: Andrey Izrailev <Andrey.Izrailev@oktetlabs.ru>
2022-02-09 11:43:10 +01:00
Luca Deri 9838ceb7cd Added ndpi_serialize_string_string_len() APi call
Fixed CSV string serialization
2022-02-08 22:17:26 +01:00
Luca Deri be5a29ba9d Added HSRP protocol detection
Removed attic directory now obsolete
2022-02-08 18:04:57 +01:00
Luca Deri 922a7be897 Added check to ignore multicast packets marking the as Skype 2022-02-08 17:23:25 +01:00
Toni d59f0327a5 Improved MDNS/LLMNR detection. (#1437)
* Checking for port 5353/5355 is not enough.
 * Added additional multicast address and header checks.

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-02-07 18:05:23 +01:00
Ivan Nardi ff38d4b980 TLS: fix parsing of certificate elements (#1435)
Found by oss-fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=44280
```
==263603==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x592478 in ndpi_is_printable_string ndpi/src/lib/ndpi_utils.c:2200:9
    #1 0x5b047c in processCertificateElements ndpi/src/lib/protocols/tls.c:400:7
    #2 0x5ac880 in processCertificate ndpi/src/lib/protocols/tls.c:790:7
    #3 0x5c3a32 in processTLSBlock ndpi/src/lib/protocols/tls.c:844:13
    #4 0x5c2c61 in ndpi_search_tls_tcp ndpi/src/lib/protocols/tls.c:973:2
    #5 0x5c117d in ndpi_search_tls_wrapper ndpi/src/lib/protocols/tls.c:2367:5
    #6 0x552a50 in check_ndpi_detection_func ndpi/src/lib/ndpi_main.c:4792:6
```
2022-02-07 18:05:12 +01:00
Ivan Nardi 79968f3245 Sync utests (#1433)
* Sync utest results

* Fix read-heap-buffer-overflow error reported by CI

See: https://github.com/ntop/nDPI/runs/5055876515?check_suite_focus=true
2022-02-04 15:57:17 +01:00
Alfredo Cardigliano f5035521e8 Add comment 2022-02-03 18:43:31 +01:00
Luca Deri c40496eaac Updated test results 2022-02-03 13:54:38 +01:00
Luca Deri 7aef27f85e Added NDPI_ERROR_CODE_DETECTED risk 2022-02-03 13:20:54 +01:00
Luca Deri 0dd5ac89f8 Renamed DCERPC to more generic RPC protocol so we can use also for other types of RPCs (not limited to DCE)
Extended HTTP plugin to support RPC
Improved HTTP crear text detection to limit it to Basic and Digest
2022-02-03 13:06:27 +01:00
Luca Deri 6975f265ec Typo 2022-02-03 12:21:51 +01:00
Luca Deri ae09e7fb14 Improved risks description 2022-02-03 12:19:01 +01:00
Luca Deri a96d7eb180 Updated risk documentation 2022-02-03 12:10:18 +01:00
Luca 37ff626e78 Added new IDN/Punycode risk for spotting internationalized domain names 2022-02-03 09:17:54 +01:00
Luca Deri cd3d720ae3 Added missing __sync_fetch_and_add() definition in Windows 2022-02-02 10:36:50 +01:00
Luca 46bd093934 Moved to 4.3 2022-02-01 09:13:55 +01:00
616 changed files with 49092 additions and 25666 deletions
+4
View File
@@ -0,0 +1,4 @@
# Codige Code Review ignore
# Prevent Codiga complaining about Sphinx config.py
doc/conf.py
+1 -1
View File
@@ -21,7 +21,7 @@ A clear and concise description of what happening.
* OS version: [e.g. 18.04]
* Architecture: [e.g. arm64]
* nDPI version or commit hash: [e.g. 4.0-stable or 937357e4bc55610f116f66d15a8e0fc1e260c02c].
* nDPI compilation flags used: if you are building from source [e.g. --with-pcre --disable-gcrypt].
* nDPI compilation flags used: if you are building from source [e.g. --with-pcre --with-local-libgcrypt].
* Attach the `config.log` file generated after `./configure` ran (if you are building from source).
## How to reproduce the reported bug
+238 -45
View File
@@ -10,15 +10,166 @@ on:
release:
types: [created]
jobs:
coverage:
name: Coverage (ubuntu-latest)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Ubuntu Prerequisites
run: |
sudo apt-get update
sudo apt-get install autoconf automake libtool pkg-config gettext libjson-c-dev flex bison libpcap-dev
sudo apt-get install rrdtool librrd-dev
sudo apt-get install libpcre3-dev libmaxminddb-dev lcov
sudo apt-get install wdiff colordiff
- name: Configure
run: env CC=gcc CFLAGS='-Werror' ./autogen.sh --enable-option-checking=fatal --enable-debug-messages --enable-code-coverage --with-pcre --with-maxminddb --enable-tls-sigs
- name: Build
run: make all
- name: Test
run: |
make check VERBOSE=1
- name: Generate Coverage Report
run: |
mkdir -vp coverage_report/ndpi_coverage_report
lcov --directory . --capture --output-file lcov.info
genhtml -o coverage_report/ndpi_coverage_report lcov.info
- uses: actions/upload-artifact@v2
with:
name: ndpi-coverage-report
path: coverage_report
retention-days: 7
python-bindings:
name: Python Bindings (ubuntu-latest)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install Ubuntu Prerequisites
run: |
sudo apt-get update
sudo apt-get install autoconf automake libtool pkg-config gettext libjson-c-dev flex bison libpcap-dev
- name: Build nDPI library
run: |
env CC=gcc CFLAGS='-Werror' ./autogen.sh
make
sudo make install
- name: Generate Python bindings
run: |
pip install --upgrade pip
pip install -r python/requirements.txt
cd python
python setup.py install
cd ..
- name: Test Python Bindings
run: |
cd python
python tests.py
documentation:
name: Documentation (ubuntu-latest)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install Ubuntu Prerequisites
run: |
sudo apt-get update
sudo apt-get install autoconf automake libtool pkg-config gettext flex bison doxygen
- name: Configure nDPI library
run: |
./autogen.sh --with-only-libndpi --enable-option-checking=fatal
- name: Generate Documentation
run: |
pip install --upgrade pip
pip install -r doc/requirements.txt
make doc
mkdir -vp doc/_build/ndpi-documentation-upload/ndpi-documentation
mv -v doc/_build/html doc/_build/ndpi-documentation-upload/ndpi-documentation/html
- uses: actions/upload-artifact@v2
with:
name: ndpi-documentation
path: doc/_build/ndpi-documentation-upload
retention-days: 7
performance:
name: Performance (ubuntu-latest)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Ubuntu Prerequisites
run: |
sudo apt-get update
sudo apt-get install autoconf automake libtool pkg-config gettext flex bison libpcap-dev
sudo apt-get install golang-1.16-go libgoogle-perftools-dev graphviz
env GO111MODULE=on go install github.com/google/pprof@latest
sudo ln -s ${HOME}/go/bin/pprof /usr/bin/pprof
pprof -h
- name: Configure nDPI library
run: |
./autogen.sh --enable-gprof --enable-option-checking=fatal --with-pcre --with-maxminddb --enable-tls-sigs
- name: Build nDPI library
run: |
make
- name: Performance Profiling
run: |
./tests/do.sh
mkdir ndpi-performance-upload
mv -v tests/result/cpu_profile.png ndpi-performance-upload/cpu_profile.png
mv -v tests/result/heap_profile.png ndpi-performance-upload/heap_profile.png
- uses: actions/upload-artifact@v2
with:
name: ndpi-performance
path: ndpi-performance-upload
retention-days: 7
test-scripts:
name: Test Utils (ubuntu-latest)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Ubuntu Prerequisites
run: |
sudo apt-get update
sudo apt-get install python3-netaddr git
- name: Run Scripts
run: |
echo 'Running ./utils/bitcoinnodes.sh'
./utils/bitcoinnodes.sh >/dev/null
echo 'Running ./utils/get_routes_by_asn.sh AS714'
./utils/get_routes_by_asn.sh AS714 >/dev/null
echo 'Running ./utils/update_every_lists.sh'
./utils/update_every_lists.sh
echo 'Checking for changes in the git tree..'
git update-index --refresh || echo "::warning file=utils/update_every_lists.sh::Please re-run utils/update_every_lists.sh and commit any changes."
git diff-index --quiet HEAD -- || true
test:
name: ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.gcrypt }} ${{ matrix.compiler }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} ${{ matrix.msan }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false # Debugging purposes, switch to true when all issues on big endian is solved
fail-fast: true
matrix:
os: ["ubuntu-latest", "ubuntu-18.04", "macOS-latest", "macos-11"]
os: ["ubuntu-latest", "ubuntu-18.04", "macOS-latest", "macos-11", "windows-latest"]
arch: ["x86_64"]
gcrypt: ["--disable-gcrypt", ""]
gcrypt: ["--with-local-libgcrypt", ""]
compiler: ["default-cc"]
pcre: [""]
maxminddb: [""]
@@ -59,6 +210,13 @@ jobs:
pcre: "--with-pcre"
maxminddb: "--with-maxminddb"
msan: "--with-sanitizer"
- compiler: "default-cc"
os: ubuntu-latest
arch: "x86_64"
gcrypt: ""
pcre: "--with-pcre"
maxminddb: "--with-maxminddb"
msan: "--with-thread-sanitizer"
- compiler: "default-cc"
os: ubuntu-18.04
arch: "x86_64"
@@ -118,7 +276,7 @@ jobs:
sudo apt-get install doxygen python3-sphinx python3-sphinx-rtd-theme python3-breathe python3-pip
sudo apt-get install rrdtool librrd-dev
- name: Install Ubuntu Prerequisites (libgcrypt)
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.gcrypt, '--disable-gcrypt')
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.gcrypt, '--with-local-libgcrypt')
run: |
sudo apt-get install libgcrypt20-dev
- name: Install Ubuntu Prerequisites (libpcre)
@@ -137,14 +295,38 @@ jobs:
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.compiler, 'clang')
run: |
sudo apt-get install ${{ matrix.compiler }}
- name: Install Windows prerequisites
if: startsWith(matrix.os, 'windows')
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: git mingw-w64-x86_64-toolchain automake1.16 automake-wrapper autoconf libtool make mingw-w64-x86_64-json-c mingw-w64-x86_64-crt-git mingw-w64-x86_64-pcre mingw-w64-x86_64-libpcap
- name: Setup Windows prerequisites (libgcrypt)
if: startsWith(matrix.os, 'windows') && startsWith(matrix.gcrypt, '--with-local-libgcrypt')
run: |
msys2 -c 'git clone --branch libgpg-error-1.42 https://github.com/gpg/libgpg-error'
cd libgpg-error
msys2 -c './autogen.sh'
msys2 -c './configure -enable-maintainer-mode --enable-static --enable-shared --with-pic --disable-doc --disable-nls'
msys2 -c 'make'
msys2 -c 'make install'
msys2 -c 'cd ..'
msys2 -c 'rm -rf libgpg-error/'
msys2 -c 'git clone --branch libgcrypt-1.8.8 https://github.com/gpg/libgcrypt'
cd libgcrypt
msys2 -c './autogen.sh'
msys2 -c './configure -enable-maintainer-mode --enable-static --enable-shared --with-pic --disable-doc'
msys2 -c 'make'
msys2 -c 'make install'
msys2 -c 'cd ..'
msys2 -c 'rm -rf libgcrypt/'
- name: Installing MacOS prerequisites
if: startsWith(matrix.os, 'macOS') && startsWith(matrix.arch, 'x86_64')
run: |
brew install autoconf automake libtool pkg-config gettext json-c
brew install coreutils
brew install rrdtool
brew install coreutils wdiff colordiff autoconf automake libtool pkg-config gettext json-c rrdtool
- name: Install MacOS Prerequisites (libgcrypt)
if: startsWith(matrix.os, 'macOS') && startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.gcrypt, '--disable-gcrypt')
if: startsWith(matrix.os, 'macOS') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.gcrypt, '--with-local-libgcrypt')
run: |
brew install libgcrypt
- name: Install MacOS Prerequisites (libpcre)
@@ -158,60 +340,73 @@ jobs:
- name: Configure nDPI on Ubuntu
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.compiler, 'default-cc')
run: |
env CC=gcc CFLAGS='-Werror' ./autogen.sh --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }}
env CC=gcc CFLAGS='-Werror' ./autogen.sh --enable-option-checking=fatal --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} --enable-tls-sigs
- name: Configure nDPI on MacOS
if: startsWith(matrix.os, 'macOS') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.compiler, 'default-cc')
run: |
env CC=clang CFLAGS='-Werror' ./autogen.sh --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }}
env CC=clang CFLAGS='-Werror' ./autogen.sh --enable-option-checking=fatal --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} --enable-tls-sigs
- name: Configure nDPI on Windows
if: startsWith(matrix.os, 'windows') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.compiler, 'default-cc')
run: |
msys2 -c 'env CFLAGS=\"-Werror\" ./autogen.sh --enable-option-checking=fatal --enable-debug-messages --enable-tls-sigs --disable-npcap ${{ matrix.gcrypt }}'
- name: Build nDPI on Windows
if: startsWith(matrix.os, 'windows') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.compiler, 'default-cc')
run: |
msys2 -c 'make all'
msys2 -c 'ldd ./example/ndpiReader.exe'
- name: Configure nDPI with specified GCC version on Ubuntu
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.compiler, 'gcc')
run: |
env CC=${{ matrix.compiler }} CFLAGS='-Werror' ./autogen.sh --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }}
env CC=${{ matrix.compiler }} CFLAGS='-Werror' ./autogen.sh --enable-option-checking=fatal --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} --enable-tls-sigs
- name: Configure nDPI with specified CLANG on Ubuntu
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.compiler, 'clang')
run: |
env CC=${{ matrix.compiler }} CFLAGS='-Werror' ./autogen.sh --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }}
env CC=${{ matrix.compiler }} CFLAGS='-Werror' ./autogen.sh --enable-option-checking=fatal --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} --enable-tls-sigs
- name: Build nDPI
if: startsWith(matrix.arch, 'x86_64')
if: startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.os, 'windows')
run: |
make all
make -C example ndpiSimpleIntegration
make -C rrdtool
make -C python
- name: Install nDPI
if: startsWith(matrix.arch, 'x86_64')
if: startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.os, 'windows')
run: |
make install DESTDIR=$(realpath _install)
ls -alhHR _install
- name: Test nDPI [DIFF]
if: startsWith(matrix.arch, 'x86_64')
if: startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.os, 'windows')
run: |
./tests/do.sh
- name: Test nDPI [UNIT]
if: startsWith(matrix.arch, 'x86_64')
if: startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.os, 'windows')
run: |
./tests/do-unit.sh
- name: Test nDPI [DGA]
if: startsWith(matrix.arch, 'x86_64')
if: startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.os, 'windows')
run: |
./tests/do-dga.sh
- name: Generate tarball
- name: Test nDPI [DIFF] (runs only on windows jobs)
if: startsWith(matrix.arch, 'x86_64') && startsWith(matrix.os, 'windows')
run: |
msys2 -c './tests/do.sh'
- name: Test nDPI [UNIT] (runs only on windows jobs)
if: startsWith(matrix.arch, 'x86_64') && startsWith(matrix.os, 'windows')
run: |
msys2 -c './tests/do-unit.sh'
- name: Test nDPI [DGA] (runs only on windows jobs)
if: startsWith(matrix.arch, 'x86_64') && startsWith(matrix.os, 'windows')
run: |
msys2 -c './tests/do-dga.sh'
- name: Generate/Verify tarball
if: startsWith(matrix.os, 'ubuntu-latest') && startsWith(matrix.arch, 'x86_64')
run: |
make dist
- name: Generate documentation
if: startsWith(matrix.os, 'ubuntu-latest') && startsWith(matrix.arch, 'x86_64')
run: |
pip3 install --user sphinxcontrib.swaggerdoc
make -C doc text
make -C doc html
- name: Configure nDPI [Mingw-w64] (runs only on ubuntu jobs)
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64')
run: |
make distclean && ./autogen.sh --host=x86_64-w64-mingw32 ${{ matrix.gcrypt }} ${{ matrix.pcre }} ${{ matrix.maxminddb }}
./utils/verify_dist_tarball.sh
- name: Build nDPI [Mingw-w64] (runs only on ubuntu jobs)
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64')
run: |
make distclean
env CFLAGS='-Werror' ./autogen.sh --enable-option-checking=fatal --enable-debug-messages --enable-tls-sigs --host=x86_64-w64-mingw32
make all
- name: Display qemu specified architecture (arm64 - little endian)
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'arm64')
@@ -229,14 +424,13 @@ jobs:
args: >
bash -c
"apt-get -y update &&
apt-get -y install git autoconf automake libtool pkg-config gettext libjson-c-dev flex bison libpcap-dev libgcrypt20-dev libpcre3-dev libmaxminddb-dev rrdtool librrd-dev &&
env CC=gcc CFLAGS='-Werror' ./autogen.sh --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} &&
apt-get -y install git wdiff colordiff autoconf automake libtool pkg-config gettext libjson-c-dev flex bison libpcap-dev libgcrypt20-dev libpcre3-dev libmaxminddb-dev rrdtool librrd-dev &&
git config --global --add safe.directory $(realpath .) &&
env CC=gcc CFLAGS='-Werror' ./autogen.sh --enable-option-checking=fatal --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} --enable-tls-sigs &&
make all &&
make -C example ndpiSimpleIntegration &&
make -C rrdtool &&
make -C python &&
./tests/do.sh &&
./tests/do-unit.sh
make check VERBOSE=1
"
- name: Display qemu specified architecture (armhf - little endian)
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'armhf')
@@ -254,14 +448,13 @@ jobs:
args: >
bash -c
"apt-get -y update &&
apt-get -y install git autoconf automake libtool pkg-config gettext libjson-c-dev flex bison libpcap-dev libgcrypt20-dev libpcre3-dev libmaxminddb-dev rrdtool librrd-dev &&
env CC=gcc CFLAGS='-Werror' ./autogen.sh --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} &&
apt-get -y install git wdiff colordiff autoconf automake libtool pkg-config gettext libjson-c-dev flex bison libpcap-dev libgcrypt20-dev libpcre3-dev libmaxminddb-dev rrdtool librrd-dev &&
git config --global --add safe.directory $(realpath .) &&
env CC=gcc CFLAGS='-Werror' ./autogen.sh --enable-option-checking=fatal --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} --enable-tls-sigs &&
make all &&
make -C example ndpiSimpleIntegration &&
make -C rrdtool &&
make -C python &&
./tests/do.sh &&
./tests/do-unit.sh
make check VERBOSE=1
"
- name: Display qemu specified architecture (s390x - big endian)
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 's390x')
@@ -272,18 +465,18 @@ jobs:
"uname -a &&
lscpu | grep Endian
"
- name: Configure and compile (no tests) using qemu for the specified architecture (s390x - big endian)
- name: Configure and compile using qemu for the specified architecture (s390x - big endian)
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 's390x')
uses: docker://multiarch/ubuntu-core:s390x-bionic
with: #./tests/do.sh disabled because we know we have some problems with big-endian machines
with:
args: >
bash -c
"apt-get -y update &&
apt-get -y install git autoconf automake libtool pkg-config gettext libjson-c-dev flex bison libpcap-dev libgcrypt20-dev libpcre3-dev libmaxminddb-dev rrdtool librrd-dev &&
env CC=gcc CFLAGS='-Werror' ./autogen.sh --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} &&
apt-get -y install git wdiff colordiff autoconf automake libtool pkg-config gettext libjson-c-dev flex bison libpcap-dev libgcrypt20-dev libpcre3-dev libmaxminddb-dev rrdtool librrd-dev &&
git config --global --add safe.directory $(realpath .) &&
env CC=gcc CFLAGS='-Werror' ./autogen.sh --enable-option-checking=fatal --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} --enable-tls-sigs &&
make all &&
make -C example ndpiSimpleIntegration &&
make -C rrdtool &&
make -C python &&
./tests/do-unit.sh
make check VERBOSE=1
"
+2 -1
View File
@@ -61,7 +61,6 @@ stamp-h1
/fuzz/fuzz_ndpi_reader_with_main
/fuzz/fuzz_process_packet
/fuzz/fuzz_process_packet_with_main
/python/Makefile
/tests/dga/Makefile
/tests/do.sh
/tests/unit/Makefile
@@ -79,3 +78,5 @@ stamp-h1
/rrdtool/rrd_anomaly
/rrdtool/rrd_similarity
/tests/performance/Makefile
/influxdb/Makefile
/doc/Doxyfile.cfg
@@ -1,83 +0,0 @@
/**
* @name Suspicious packet->payload based integer arithmetic
* @description An arithmetic operation influenced array access is suspicious
* if it uses an integer value that is likely to be network-controlled, and
* may require a closer manual audit.
* @kind problem
* @problem.severity warning
* @id cpp/packet-payload-integer-arithmetic
* @tags audit security
*/
import cpp
import semmle.code.cpp.dataflow.TaintTracking
import semmle.code.cpp.rangeanalysis.SimpleRangeAnalysis
/** A source of an integer value that is likely to come from the network.
* This is produced by an invocation of a macro of the form `ntoh*` or `get_u_int*_t`,
* called with `packet->payload` as an argument.
*/
class NetworkMacro extends Macro {
NetworkMacro() { this.getName().regexpMatch("^ntoh(ll|l|s)") }
}
class NetworkIntegerSource extends Expr {
NetworkIntegerSource() {
exists(MacroInvocation mi |
this = mi.getExpr() and
mi.getUnexpandedArgument(0).regexpMatch(".*packet->payload.*") |
// catch all get_u_int*_t(x)
mi.getMacroName().regexpMatch("^get_u_int(64|32|16|8)_t") and
// dedup ntoh*(get_u_int*_t(x)) since we'll catch those in the next case
not mi.getOutermostMacroAccess().getMacro() instanceof NetworkMacro
or
// catch all ntoh*(x) ... this will also catch the nested cases
mi.getMacro() instanceof NetworkMacro
)
}
}
class ArithmeticOperation extends Operation {
ArithmeticOperation() {
this instanceof UnaryArithmeticOperation or this instanceof BinaryArithmeticOperation
}
}
class NetworkToArrayAccess extends TaintTracking::Configuration {
NetworkToArrayAccess() { this = "NetworkToArrayAccess" }
override predicate isSource(DataFlow::Node source) {
source.asExpr() instanceof NetworkIntegerSource
}
override predicate isSink(DataFlow::Node sink) {
exists(ArrayExpr ae | sink.asExpr() = ae.getArrayOffset())
}
}
class NetworkToArithmetic extends TaintTracking::Configuration {
NetworkToArithmetic() { this = "NetworkToArithmetic" }
override predicate isSource(DataFlow::Node source) {
source.asExpr() instanceof NetworkIntegerSource
}
override predicate isSink(DataFlow::Node sink) {
exists (Assignment assign |
sink.asExpr() = assign.getRValue().(ArithmeticOperation) or
sink.asExpr() = assign.(AssignArithmeticOperation)
) or
exists(LocalVariable var |
sink.asExpr() = var.getInitializer().getExpr().(ArithmeticOperation)
)
}
}
// find audit candidates based on suspicious network integer use
from NetworkIntegerSource source, Expr sink1, Expr sink2, NetworkToArithmetic config1, NetworkToArrayAccess config2
where config1.hasFlow(DataFlow::exprNode(source), DataFlow::exprNode(sink1))
// or this if you want integer arithmeric _OR_ array accesses
and config2.hasFlow(DataFlow::exprNode(source), DataFlow::exprNode(sink2))
select source, "Suspicious use of network integer arithmetic."
+19 -1
View File
@@ -8,7 +8,25 @@ endif
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libndpi.pc
EXTRA_DIST = README.md CHANGELOG.md CONTRIBUTING.md autogen.sh wireshark python windows utils packages example/MacOS doc/api.rst doc/conf.py doc/flow_risks.rst doc/guide/nDPI_QuickStartGuide.pages doc/guide/nDPI_QuickStartGuide.pdf doc/img/logo.png doc/index.rst doc/Makefile doc/what_is_ndpi.rst
EXTRA_DIST = README.md README.fuzzer.md CHANGELOG.md CONTRIBUTING.md \
autogen.sh wireshark windows utils packages \
influxdb/Makefile.in influxdb/metric_anomaly.c influxdb/README.txt \
rrdtool/Makefile.in rrdtool/README.txt rrdtool/rrd_anomaly.c rrdtool/rrd_similarity.c \
doc/requirements.txt doc/conf.py doc/flow_risks.rst doc/guide/nDPI_QuickStartGuide.pages \
doc/guide/nDPI_QuickStartGuide.pdf doc/img/logo.png doc/index.rst \
doc/Makefile doc/what_is_ndpi.rst \
python/DEV_GUIDE.md python/dev_requirements.txt python/ndpi_example.py python/ndpi/__init__.py \
python/ndpi/ndpi_build.py python/ndpi/ndpi.py python/README.md \
python/requirements.txt python/setup.py python/tests.py \
sonar-project.properties .github .ci-ignore lgtm.yml
.PHONY: doc doc-view
doc:
make -C doc html
doc-view:
python3 -m http.server --bind 127.0.0.1 --directory doc/_build/html 8080
changelog:
git log --since={`curl -s https://github.com/ntop/ndpi/releases | grep datetime | head -n1 | egrep -o "[0-9]+\-[0-9]+\-[0-9]+"`} --name-only --pretty=format:" - %s" | grep "^ " > CHANGELOG.latest
+49 -20
View File
@@ -12,44 +12,70 @@ nDPI® is an open source LGPLv3 library for deep-packet inspection. Based on Ope
### How To Compile nDPI
In order to compile this library do
In order to compile this project do
- ./autogen.sh
- ./configure
- make
To compile the library w/o any tools or tests:
- ./autogen.sh --with-only-libndpi
- make
To run tests do additionally:
- cd tests; ./do.sh
- ./tests/do.sh # Generate and check for diff's in PCAP files
- ./tests/do-unit.sh # Run unit tests
- ./tests/do-dga.sh # Run DGA detection test
Please note that the pre-requisites for compilation include:
- GNU tools (autogen, automake, autoconf, libtool)
- GNU C compiler (gcc)
or run all with: `make check`
Please note that the (minimal) pre-requisites for compilation include:
- GNU tools (autoconf automake libtool pkg-config gettext flex bison)
- GNU C compiler (gcc) or Clang
On Debian/Ubuntu systems do:
- sudo apt-get install build-essential git bison flex libpcap-dev libtool libtool-bin autoconf pkg-config automake autogen libjson-c-dev libnuma-dev libgcrypt20-dev libpcre2-dev
- sudo apt-get install build-essential git gettext flex bison libtool autoconf automake pkg-config libpcap-dev libjson-c-dev libnuma-dev libpcre2-dev libmaxminddb-dev librrd-dev
FreeBSD
- sudo pkg install gcc git autoconf automake libtool devel/pkgconf json-c gmake
On Arch Linux:
- sudo pacman -S gcc git gettext flex bison libtool autoconf automake pkg-config libpcap json-c numactl pcre2 libmaxminddb rrdtool
Remember to use gmake and not make on FreeBSD
On FreeBSD:
- sudo pkg install gcc git gettext flex bison libtool autoconf automake devel/pkgconf gmake libpcap json-c pcre2 libmaxminddb rrdtool
Remember to use `gmake` and not `make` on FreeBSD
On MacOS:
- brew install coreutils gcc git gettext flex bison libtool autoconf automake pkg-config libpcap json-c pcre2 libmaxminddb rrdtool
On Windows (assuming [MSYS2](https://www.msys2.org/) already installed):
- msys2 -c "pacman --noconfirm -S --needed --overwrite '\*' git mingw-w64-x86\_64-toolchain automake1.16 automake-wrapper autoconf libtool make mingw-w64-x86\_64-json-c mingw-w64-x86\_64-crt-git mingw-w64-x86\_64-pcre mingw-w64-x86\_64-libpcap"
### How To Build The Documentation
- pip install --upgrade pip
- pip install -r doc/requirements.txt
- make doc
Use the builtin python3 webserver to view documentation:
- make doc-view
### How To Add A New Protocol Dissector
The entire procedure of adding new protocols in detail:
1. Add new protocol together with its unique ID to: src/include/ndpi_protocol_ids.h
2. Create a new protocol in: src/lib/protocols/
3. Variables to be kept for the duration of the entire flow (as state variables) need to be placed in: src/include/ndpi_typedefs.h in ndpi_flow_tcp_struct (for TCP only), ndpi_flow_udp_struct (for UDP only), or ndpi_flow_struct (for both).
4. Add a new entry for the search function for the new protocol in: src/include/ndpi_protocols.h
5. Choose (do not change anything) a selection bitmask from: src/include/ndpi_define.h
6. Add a new entry in ndpi_set_protocol_detection_bitmask2 in: src/lib/ndpi_main.c
7. Set protocol default ports in ndpi_init_protocol_defaults in: src/lib/ndpi_main.c
8. ./autogen.sh
9. make
10. make check
1. Add new protocol together with its unique ID to: `src/include/ndpi_protocol_ids.h`
2. Create a new protocol in: `src/lib/protocols/`
3. Variables to be kept for the duration of the entire flow (as state variables) need to be placed in: `src/include/ndpi_typedefs.h` in `ndpi_flow_tcp_struct` (for TCP only), `ndpi_flow_udp_struct` (for UDP only), or `ndpi_flow_struct` (for both).
4. Add a new entry for the search function for the new protocol in: `src/include/ndpi_protocols.h`
5. Choose (do not change anything) a selection bitmask from: `src/include/ndpi_define.h`
6. Set protocol default ports in `ndpi_init_protocol_defaults` in: `src/lib/ndpi_main.c`
7. `./autogen.sh`
8. `make`
9. `make check`
### How to use nDPI to Block Selected Traffic
You can use nDPI to selectively block selected Internet traffic by embedding it onto an application (remember that nDPI is just a library). Both [ntopng](https://github.com/ntop/ntopng) and [nProbe cento](http://www.ntop.org/products/netflow/nprobe-cento/) can do this.
### nDPI Paper Citation
@@ -57,9 +83,12 @@ You can use nDPI to selectively block selected Internet traffic by embedding it
- Deri, Luca, et al. [nDPI: Open-source high-speed deep packet inspection](http://luca.ntop.org/nDPI.pdf) 2014 International Wireless Communications and Mobile Computing Conference (IWCMC). IEEE, 2014.
### nDPI-Related Projects
- [nfstream](https://github.com/aouinizied/nfstream)
- [nDPId](https://github.com/utoni/nDPId)
### DISCLAIMER
While we do our best to detect network protocols, we cannot guarantee that our software is error free and 100% accurate in protocol detection. Please make sure that you respect the privacy of users and you have proper authorization to listen, capture and inspect network traffic.
nDPI is a registered trademark in the US and EU.
-22
View File
@@ -1,22 +0,0 @@
Prerequisites for Compilation
-----------------------------
Prerequisites
- GNU autotools/libtool
- libpcap or PF_RING (optional but recommended)
- apt-get install libjson-c-dev (for JSON support)
- libgcrypt20-dev (for QUIC support)
On Ubuntu/Debian
- apt-get install build-essential
- apt-get install git autoconf automake autogen libpcap-dev libtool libgcrypt20-dev
On Fedora/CentOS
- yum groupinstall "Development tools"
- yum install git autoconf automake autogen libpcap-devel libtool libgcrypt-devel
On MacOSX (using http://brew.sh)
brew install autoconf automake libtool git libgcrypt
On FreeBSD
- pkg install autoconf automake libtool gmake git libgcrypt
+11 -5
View File
@@ -8,32 +8,38 @@ LIBTOOL=$(command -v libtool)
LIBTOOLIZE=$(command -v libtoolize)
AUTORECONF=$(command -v autoreconf)
PKG_CONFIG=$(command -v pkg-config)
MAKE=$(command -v make)
if test -z $AUTOCONF; then
if test -z "${AUTOCONF}"; then
echo "autoconf is missing: please install it and try again"
exit
fi
if test -z $AUTOMAKE; then
if test -z "${AUTOMAKE}"; then
echo "automake is missing: please install it and try again"
exit
fi
if test -z $LIBTOOL && test -z $LIBTOOLIZE ; then
if test -z "${LIBTOOL}" && test -z "${LIBTOOLIZE}"; then
echo "libtool and libtoolize is missing: please install it and try again"
exit
fi
if test -z $AUTORECONF; then
if test -z "${AUTORECONF}"; then
echo "autoreconf is missing: please install it and try again"
exit
fi
if test -z $PKG_CONFIG; then
if test -z "${PKG_CONFIG}"; then
echo "pkg-config is missing: please install it (apt-get install pkg-config) and try again"
exit
fi
if test -z "${MAKE}"; then
echo "make is missing; please install it (apt-get install make) and try again"
exit
fi
autoreconf -ivf
echo "./configure $@"
+97 -39
View File
@@ -1,4 +1,4 @@
AC_INIT([libndpi], [4.1.0])
AC_INIT([libndpi],[4.4.0])
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_MACRO_DIR([m4])
@@ -7,36 +7,64 @@ AM_INIT_AUTOMAKE([foreign subdir-objects])
AC_PREFIX_DEFAULT(/usr)
EXTRA_TARGETS="example tests tests/unit tests/dga"
EXTRA_TARGETS="example tests tests/dga"
AC_ARG_WITH(only-libndpi, AS_HELP_STRING([--with-only-libndpi], [Build only libndpi (no examples, tests etc)]))
AS_IF([test "${with_only_libndpi+set}" = set],[
EXTRA_TARGETS=""
])
AC_ARG_WITH(sanitizer, AS_HELP_STRING([--with-sanitizer], [Build with support for address, undefined and leak sanitizer]))
AC_ARG_WITH(thread-sanitizer, AS_HELP_STRING([--with-thread-sanitizer], [Build with support for thread sanitizer]))
AC_ARG_ENABLE(fuzztargets, AS_HELP_STRING([--enable-fuzztargets], [Enable fuzz targets]),[enable_fuzztargets=$enableval],[enable_fuzztargets=no])
AC_ARG_ENABLE(gprof, AS_HELP_STRING([--enable-gprof], [Enable CPU/HEAP profiling with gperftools]),[enable_gprof=$enableval],[enable_gprof=no])
AC_ARG_ENABLE(code-coverage, AS_HELP_STRING([--enable-code-coverage], [Generate Code Coverage report]))
AC_ARG_WITH(local-libgcrypt, AS_HELP_STRING([--with-local-libgcrypt], [Build with libgcrypt (if present) instead of the enclosed gcrypt light]))
AC_ARG_ENABLE(tls-sigs, AS_HELP_STRING([--enable-tls-sigs], [Enable TLS Client signature algorithm dissection. Rarely used, but requires significantly more memory.]))
AC_ARG_ENABLE(npcap, AS_HELP_STRING([--disable-npcap], [msys2 only: Disable linkage against the wpcap/npcap import library in windows/WpdPack/Lib.]))
AS_IF([test "x$enable_fuzztargets" = "xyes"], [BUILD_FUZZTARGETS=1], [BUILD_FUZZTARGETS=0])
AM_CONDITIONAL([BUILD_FUZZTARGETS], [test "x$enable_fuzztargets" = "xyes"])
AS_IF([test "${with_sanitizer+set}" = set -a "${with_thread_sanitizer+set}" = set],[
AC_MSG_ERROR([Configure options `--with-sanitizer' and `--with_thread_sanitizer' can not used at the same time.])
])
AS_IF([test "${with_sanitizer+set}" = set -o "${with_thread_sanitizer+set}" = set],[
CFLAGS="${CFLAGS} -O0 -g3"
],[
CFLAGS="${CFLAGS} -O2"
])
AS_IF([test "${with_sanitizer+set}" = set],[
CFLAGS="${CFLAGS} -g3 -O0 -fsanitize=address -fsanitize=undefined -fno-sanitize=alignment -fsanitize=leak -fno-omit-frame-pointer"
CFLAGS="${CFLAGS} -fsanitize=address -fsanitize=undefined -fno-sanitize=alignment -fsanitize=leak -fno-omit-frame-pointer"
LDFLAGS="${LDFLAGS} -fsanitize=address -fsanitize=undefined -fno-sanitize=alignment -fsanitize=leak"
])
AS_IF([test "${with_thread_sanitizer+set}" = set],[
CFLAGS="${CFLAGS} -fsanitize=thread -fno-omit-frame-pointer"
LDFLAGS="${LDFLAGS} -fsanitize=thread"
])
AS_IF([test "x${enable_code_coverage}" = "xyes"],[
CFLAGS="${CFLAGS} -fprofile-arcs -ftest-coverage"
LDFLAGS="${LDFLAGS} --coverage"
])
AS_IF([test "${enable_npcap+set}" = set],[DISABLE_NPCAP=1],[DISABLE_NPCAP=0])
LT_INIT
LT_LIB_M
PKG_PROG_PKG_CONFIG
AC_PROG_CC
SYSTEM=`uname -s`
if test $SYSTEM = "Darwin"; then
dnl> AC_PROG_CC(clang gcc)
AM_PROG_CC_C_O(clang gcc)
AC_PROG_CXX(clang++ g++)
AC_PROG_CC_STDC(clang gcc)
else
AC_PROG_CC_C_O
AC_PROG_CXX
AC_PROG_CC_STDC
fi
dnl> Can't iuse AM_PROG_AR because not all of our Makefiles are automake (yet?)
@@ -55,7 +83,7 @@ AC_DEFINE_UNQUOTED(NDPI_PATCH_LEVEL, "${NDPI_PATCH}", [nDPI patch level])
# .git as directory in a cloned repo
# .git as file in submodule based integration
if test -d ".git" || test -f ".git" ; then :
if test -d ".git" || test -r ".git"; then
GIT_TAG=`git log -1 --format=%h`
GIT_DATE=`git log -1 --format=%cd`
#
@@ -75,24 +103,32 @@ else
if test -z "$SOURCE_DATE_EPOCH" ; then :
SOURCE_DATE_EPOCH=`date +%s`
fi
NDPI_API_VERSION=`echo $SOURCE_DATE_EPOCH | cut -c7-10`
NDPI_API_VERSION=$((SOURCE_DATE_EPOCH % 65536))
fi
NDPI_API_VERSION=`echo $NDPI_API_VERSION | sed 's/^0*//'`
echo "Setting API version to $NDPI_API_VERSION"
AS_IF([test "x${NDPI_API_VERSION}" = "x"],[
AC_MSG_WARN([Could not get NDPI_API_VERSION, defaulting to 0.])
NDPI_API_VERSION=0
])
echo "Setting API version to ${NDPI_API_VERSION}"
AC_DEFINE_UNQUOTED(NDPI_GIT_RELEASE, "${GIT_RELEASE}", [GIT Release])
AC_DEFINE_UNQUOTED(NDPI_GIT_DATE, "${GIT_DATE}", [Last GIT change])
if ! test "${with_only_libndpi+set}" = set; then :
dnl> used by json-c for unit tests
PKG_CHECK_MODULES([JSONC], [json-c], [JSONC_LIBS="${pkg_cv_JSONC_LIBS}" JSONC_CFLAGS="${pkg_cv_JSONC_CFLAGS}"])
AC_CHECK_LIB([json-c], [json_object_put], [], [
PKG_CHECK_MODULES([JSONC], [json-c], [
AC_DEFINE(HAVE_LIBJSON_C, 1, [libjson-c is present])
JSONC_LIBS="${pkg_cv_JSONC_LIBS}"
JSONC_CFLAGS="${pkg_cv_JSONC_CFLAGS}"
], [AC_MSG_WARN([JSON-C not available. Disabled unit test.])])
AC_CHECK_LIB([json-c], [json_object_put], [
EXTRA_TARGETS="$EXTRA_TARGETS tests/unit"
build_unittests=yes
],[
AC_MSG_WARN([JSON-C not available. Disabled unit test.])
JSONC_LIBS=""
JSONC_CFLAGS=""
EXTRA_TARGETS="example tests tests/dga"
])
AX_PTHREAD([],[
AC_MSG_WARN([POSIX Threads not available. Building library only.])
@@ -101,9 +137,14 @@ if ! test "${with_only_libndpi+set}" = set; then :
EXTRA_TARGETS=""
])
fi
AM_CONDITIONAL([BUILD_UNITTESTS], [test "x$build_unittests" = "xyes"])
LIBS="$LIBS $JSONC_LIBS"
CFLAGS="-W -Wall -Wno-unused-parameter -Wno-unused-function $CFLAGS $JSONC_CFLAGS"
HANDLE_TLS_SIGS="//"
AS_IF([test "x${enable_tls_sigs}" = "xyes"],[
HANDLE_TLS_SIGS=""
])
CFLAGS="-W -Wall -Wno-unused-parameter -Wno-unused-function -Wno-address-of-packed-member ${CFLAGS}"
AC_CHECK_HEADERS([netinet/in.h stdint.h stdlib.h string.h unistd.h math.h float.h])
AC_CHECK_LIB([m], [sqrt], [], [LIBM="-lm"])
@@ -114,7 +155,7 @@ if test "x$ac_cv_lib_rrd_rrd_fetch_r" = xyes; then :
EXTRA_TARGETS="$EXTRA_TARGETS rrdtool"
fi
ADDITIONAL_LIBS="$LIBRRD $LIBM"
ADDITIONAL_LIBS="$LIBM"
PCAP_HOME=$HOME/PF_RING/userland
DPDK_TARGET=
@@ -156,16 +197,22 @@ case "$host" in
case "$host" in
x86_64-*)
BUILD_MINGW_X64=1
LDFLAGS="${LDFLAGS} -L/mingw64/lib"
;;
i686-*)
LDFLAGS="${LDFLAGS} -L/mingw32/lib"
;;
*)
AC_MSG_ERROR([Unsupported MingW cross compiler.])
;;
esac
CFLAGS="${CFLAGS}"
CFLAGS="-D__USE_MINGW_ANSI_STDIO -D__STDC_FORMAT_MACROS ${CFLAGS}"
LIBS="${LIBS} -lws2_32"
BUILD_MINGW=1
EXE_SUFFIX=".exe"
AS_IF([test "${enable_npcap+set}" != set && test "${with_only_libndpi+set}" != set],,
[PKG_CHECK_MODULES([PCAP], [libpcap], [PCAP_LIB="" PCAP_INC="${pkg_cv_PCAP_CFLAGS}"])
AC_CHECK_LIB([pcap], [pcap_open_live],, [AC_MSG_ERROR([Missing msys2/mingw libpcap library. Install it with `pacman -S mingw-w64-x86_64-libpcap' (msys2).])])])
;;
*)
if test -f $PCAP_HOME/libpcap/libpcap.a; then :
@@ -190,6 +237,8 @@ case "$host" in
AC_MSG_ERROR([Missing libpcap(-dev) library required to compile the example application.])
fi
fi
EXE_SUFFIX=""
AS_IF([test "${enable_npcap+set}" = set],AC_MSG_ERROR([--disable-npcap does only work with msys2/mingw CCs]))
;;
esac
@@ -228,27 +277,29 @@ return 0;
])
AM_CONDITIONAL([HAS_FUZZLDFLAGS], [test "x$has_sanitizefuzzer" = "xyes"])
GPROF_ENABLED=0
AS_IF([test "x$enable_gprof" = "xyes"], [
PKG_CHECK_MODULES([PROFILER], [libprofiler],,[
AC_MSG_ERROR([libprofiler not available. Required for profiling support.])
])
PKG_CHECK_MODULES([TCMALLOC], [libtcmalloc],,[
AC_MSG_ERROR([libtcmalloc not available. Required for profiling support.])
])
GPROF_ENABLED=1
GPROF_LIBS="-ltcmalloc_and_profiler"
GPROF_CFLAGS="${pkg_cv_PROFILER_CFLAGS} ${pkg_cv_TCMALLOC_CFLAGS}"
])
AC_CHECK_LIB(pthread, pthread_setaffinity_np, AC_DEFINE_UNQUOTED(HAVE_PTHREAD_SETAFFINITY_NP, 1, [libc has pthread_setaffinity_np]))
dnl> GCRYPT
GCRYPT_ENABLED=1
AC_ARG_ENABLE([gcrypt],
[AS_HELP_STRING([--disable-gcrypt], [Avoid compiling with libgcrypt/libgpg-error, even if they are present. QUIC sub-classification may be missing])],
[GCRYPT_ENABLED=0],
[AC_CHECK_LIB(gcrypt, gcry_cipher_checktag)])
AS_IF([test ${GCRYPT_ENABLED} -eq 1], [
if test "x$ac_cv_lib_gcrypt_gcry_cipher_checktag" = xyes; then :
ADDITIONAL_LIBS="${ADDITIONAL_LIBS} -lgcrypt"
else
$as_unset ac_cv_lib_gcrypt_gcry_cipher_checktag
AC_CHECK_LIB(gpg-error, gpg_strerror_r)
AC_CHECK_LIB(gcrypt, gcry_cipher_checktag)
if test "x$ac_cv_lib_gcrypt_gcry_cipher_checktag" = xyes -a "x$ac_cv_lib_gpg_error_gpg_strerror_r" = xyes; then :
ADDITIONAL_LIBS="${ADDITIONAL_LIBS} -lgcrypt -lgpg-error"
else
GCRYPT_ENABLED=0
fi
fi
dnl> libgcrypt (external)
USE_HOST_LIBGCRYPT=0
AS_IF([test "${with_local_libgcrypt+set}" = set],[
USE_HOST_LIBGCRYPT=1
AC_CHECK_LIB(gpg-error, gpg_strerror_r, [], AC_MSG_ERROR([libgpg-error required (because of --with-local-libgcrypt) but not found or too old.]))
AC_CHECK_LIB(gcrypt, gcry_cipher_checktag, [], AC_MSG_ERROR([libgcrypt required (because of --with-local-libgcrypt) but not found or too old.]))
ADDITIONAL_LIBS="${ADDITIONAL_LIBS} -lgcrypt -lgpg-error"
AC_DEFINE_UNQUOTED(USE_HOST_LIBGCRYPT, 1, [Use locally installed libgcrypt instead of builtin gcrypt-light])
])
dnl> PCRE
@@ -266,7 +317,7 @@ dnl> GeoIP
AC_ARG_WITH(maxminddb, [ --with-maxminddb Enable nDPI build with libmaxminddb])
if test "${with_maxminddb+set}" = set; then :
AC_CHECK_LIB([maxminddb], [MMDB_lookup_sockaddr])
AC_HAVE_HEADERS(maxminddb.h)
AC_CHECK_HEADERS([maxminddb.h])
if test ".${ac_cv_lib_maxminddb_MMDB_lookup_sockaddr}" = ".yes" && test ".${ac_cv_header_maxminddb_h}" = ".yes"; then
ADDITIONAL_LIBS="${ADDITIONAL_LIBS} -lmaxminddb"
AC_DEFINE_UNQUOTED(HAVE_MAXMINDDB, 1, [MaxMind DB support])
@@ -282,7 +333,7 @@ dnl> ADDITIONAL_LIBS="${ADDITIONAL_LIBS} -lcurl"
dnl> AC_DEFINE_UNQUOTED(HAVE_CURL, 1, [curl is present])
dnl> fi
AC_CONFIG_FILES([Makefile example/Makefile example/Makefile.dpdk tests/Makefile tests/unit/Makefile tests/performance/Makefile tests/dga/Makefile rrdtool/Makefile libndpi.pc src/include/ndpi_define.h src/lib/Makefile python/Makefile fuzz/Makefile src/include/ndpi_api.h])
AC_CONFIG_FILES([Makefile example/Makefile example/Makefile.dpdk tests/Makefile tests/unit/Makefile tests/performance/Makefile tests/dga/Makefile rrdtool/Makefile influxdb/Makefile libndpi.pc src/include/ndpi_define.h src/lib/Makefile fuzz/Makefile src/include/ndpi_api.h doc/Doxyfile.cfg])
AC_CONFIG_FILES([tests/do.sh], [chmod +x tests/do.sh])
AC_CONFIG_HEADERS(src/include/ndpi_config.h)
AC_SUBST(GIT_RELEASE)
@@ -292,6 +343,7 @@ AC_SUBST(NDPI_PATCH)
AC_SUBST(NDPI_VERSION_SHORT)
AC_SUBST(PCAP_INC)
AC_SUBST(PCAP_LIB)
AC_SUBST(LIBRRD)
AC_SUBST(ADDITIONAL_LIBS)
AC_SUBST(DL_LIB)
AC_SUBST(DPDK_TARGET)
@@ -304,6 +356,12 @@ AC_SUBST(BUILD_MINGW_X64)
AC_SUBST(BUILD_FUZZTARGETS)
AC_SUBST(JSONC_CFLAGS)
AC_SUBST(JSONC_LIBS)
AC_SUBST(GCRYPT_ENABLED)
AC_SUBST(GPROF_CFLAGS)
AC_SUBST(GPROF_LIBS)
AC_SUBST(GPROF_ENABLED)
AC_SUBST(USE_HOST_LIBGCRYPT)
AC_SUBST(PCRE_ENABLED)
AC_SUBST(HANDLE_TLS_SIGS)
AC_SUBST(DISABLE_NPCAP)
AC_SUBST(EXE_SUFFIX)
AC_OUTPUT
+2658
View File
File diff suppressed because it is too large Load Diff
+8 -5
View File
@@ -22,8 +22,8 @@ I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " release to make standalone HTML files for ntop documentation release"
@echo " html to make standalone HTML files"
@echo " release to make standalone Doxygen/HTML files for ntop documentation release"
@echo " html to make standalone Doxygen/HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@@ -50,12 +50,15 @@ help:
.PHONY: clean
clean:
rm -rf $(BUILDDIR)/*
cd doxygen; make clean
rm -rf $(BUILDDIR)/* api doxygen
.PHONY: html
html:
cd doxygen; make
@test -r Doxyfile.cfg || { \
echo 'Doxyfile.cfg does not exist; Please run $(realpath ..)/autogen.sh or $(realpath ..)/configure first.'; \
false; \
}
doxygen Doxyfile.cfg
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
-4
View File
@@ -1,4 +0,0 @@
nDPI Programming API
####################
Placeholder
+16 -3
View File
@@ -21,7 +21,8 @@ sys.path.append( "breathe/" )
# ones.
extensions = [
'sphinx.ext.intersphinx',
'breathe'
'breathe',
'exhale'
]
# Workaround for platforms where swaggerdoc is not available
@@ -31,6 +32,18 @@ if not os.environ.get("PYTHON_SKIP_SWAGGERDOC"):
breathe_projects = { "apidoc" : "doxygen/xml/" }
breathe_default_project = "apidoc"
exhale_args = {
"containmentFolder": "./api",
"rootFileName": "library_root.rst",
"rootFileTitle": "Library API",
"doxygenStripFromPath": ".",
"createTreeView": True,
# "treeViewIsBootstrap": True,
}
primary_domain = 'c'
highlight_language = 'c'
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@@ -139,7 +152,7 @@ html_logo = "img/logo.png"
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
#html_static_path = ['_static']
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
@@ -288,4 +301,4 @@ texinfo_documents = [
intersphinx_mapping = {'https://docs.python.org/': None}
def setup(app):
app.add_stylesheet('css/ntop.css')
app.add_css_file('css/ntop.css')
+39 -7
View File
@@ -45,25 +45,25 @@ TLS/QUIC only: this risk is triggered when a `self-signed certificate <https://e
NDPI_TLS_OBSOLETE_VERSION
=========================
Risk 0triggered when TLS version is older than 1.1.
Risk triggered when TLS version is older than 1.1.
.. _Risk 008:
NDPI_TLS_WEAK_CIPHER
====================
Risk 0triggered when an unsafe TLS cipher is used. See `this page <https://community.qualys.com/thread/18212-how-does-qualys-determine-the-server-cipher-suites>`_ for a list of insecure ciphers.
Risk triggered when an unsafe TLS cipher is used. See `this page <https://community.qualys.com/thread/18212-how-does-qualys-determine-the-server-cipher-suites>`_ for a list of insecure ciphers.
.. _Risk 009:
NDPI_TLS_CERTIFICATE_EXPIRED
============================
Risk 0triggered when a TLS certificate is expired, i.e. the current date falls outside of the certificate validity dates.
Risk triggered when a TLS certificate is expired, i.e. the current date falls outside of the certificate validity dates.
.. _Risk 010:
NDPI_TLS_CERTIFICATE_MISMATCH
=============================
Risk 0triggered when a TLS certificate does not match the hostname we're accessing. Example you do http://www.aaa.com and the TLS certificate returned is for www.bbb.com.
Risk triggered when a TLS certificate does not match the hostname we're accessing. Example you do http://www.aaa.com and the TLS certificate returned is for www.bbb.com.
.. _Risk 011:
@@ -195,13 +195,13 @@ This risk is set when the `ALPN <https://en.wikipedia.org/wiki/Application-Layer
NDPI_TLS_CERT_VALIDITY_TOO_LONG
===============================
From 01/09/2020 TLS certificates lifespan is limited to 13 months. This risk is triggered for certificates not respecting this directive.
From 01/09/2020 TLS certificates lifespan is limited to `13 months <https://www.appviewx.com/blogs/tls-certificate-lifespans-now-capped-at-13-months/>`_. This risk is triggered for certificates not respecting this directive.
.. _Risk 033:
NDPI_TLS_SUSPICIOUS_EXTENSION
=============================
This risk is triggered when the domain name (SNI extension) is not printable and thus it is a problem.
This risk is triggered when the domain name (SNI extension) is not printable and thus it is a problem. In TLS extensions can be dynamically specified by the client in the hello packet.
.. _Risk 034:
@@ -246,10 +246,42 @@ Additionally, some TLS protocol fields are checked for printable characters as w
NDPI_POSSIBLE_EXPLOIT
=====================
The risk is set whenever a possible exploit (e.g. Log4J/Log4Shell) is detected.
The risk is set whenever a possible exploit (e.g. `Log4J/Log4Shell <https://en.wikipedia.org/wiki/Log4Shell>`_) is detected.
.. _Risk 041:
NDPI_TLS_CERTIFICATE_ABOUT_TO_EXPIRE
===================================
The risk is set whenever a TLS certificate is close to the expiration date.
.. _Risk 042:
NDPI_PUNYCODE_IDN
===================================
The risk is set whenever a domain name is specified in IDN format as they are sometimes used in `IDN homograph attacks <https://en.wikipedia.org/wiki/IDN_homograph_attack>`_.
.. _Risk 043:
NDPI_ERROR_CODE_DETECTED
===================================
The risk is set whenever an error code is detected in the underlying protocol (e.g. HTTP and DNS).
.. _Risk 044:
NDPI_HTTP_CRAWLER_BOT
===================================
The risk is set whenever a crawler/bot/robot has been detected
.. _Risk 045:
NDPI_ANONYMOUS_SUBSCRIBER
===================================
The risk is set whenever the (source) ip address has been anonymized and it can't be used to identify the subscriber.
Example: the flow is generated by an iCloud-private-relay exit node.
.. _Risk 046:
NDPI_UNIDIRECTIONAL_TRAFFIC_SUBSCRIBER
===================================
The risk is set whenever the flow has unidirectional traffic (typically no traffic on the server to client direction). THis
risk is not triggered for multicast/broadcast destinations.
+1 -1
View File
@@ -13,7 +13,7 @@ nDPI is an open source DPI (Deep Packet Inspection) toolkit for traffic analysis
:maxdepth: 2
:caption: Developer's Guide
api
api/library_root
flow_risks
.. toctree::
+4
View File
@@ -0,0 +1,4 @@
breathe
exhale
sphinx-rtd-theme
sphinxcontrib-swaggerdoc
-18
View File
@@ -1,18 +0,0 @@
# How to use?
You need to first compile the nDPI library as usual:
- ./autogen.sh
- ./configure
- make
Then open the Xcode project and you are ready to go. The default behavior is to analyze an embeded pcap file `capture.pcap`. You can change the behavior by changing command line input in `ViewController.m` file.
# What does the XCode project do?
It's a dummy Mac App project with a **Run** button. It doesn't modify any nDPI code except that it renamed the `main` function to `orginal_main` in `ndpiReader.c` (because the Mac App has it's own main function) and call the `orginal_main` with synthetic command line input from `ViewController.m` file when the **Run** button is clicked.
It also fixes some problems when compiling with Xcode. Some are listed below:
- Add missed `NDPI_LOG_DEBUG2` macro definition implementation (defined as `NDPI_LOG_DEBUG2_XCODE_PROJ` in `ViewController.m`)
- Add an empty ndpi_utils.h file to make `protocols/attic/ftp.c` and `protocols/attic/secondlife.c` can compile
- Specially treat `ndpi_patricia.c` by not adding it into compilation source, since it's directly included in `ndpi_main.c`
File diff suppressed because it is too large Load Diff
@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:ndpiExample.xcodeproj">
</FileRef>
</Workspace>
@@ -1,58 +0,0 @@
{
"images" : [
{
"idiom" : "mac",
"size" : "16x16",
"scale" : "1x"
},
{
"idiom" : "mac",
"size" : "16x16",
"scale" : "2x"
},
{
"idiom" : "mac",
"size" : "32x32",
"scale" : "1x"
},
{
"idiom" : "mac",
"size" : "32x32",
"scale" : "2x"
},
{
"idiom" : "mac",
"size" : "128x128",
"scale" : "1x"
},
{
"idiom" : "mac",
"size" : "128x128",
"scale" : "2x"
},
{
"idiom" : "mac",
"size" : "256x256",
"scale" : "1x"
},
{
"idiom" : "mac",
"size" : "256x256",
"scale" : "2x"
},
{
"idiom" : "mac",
"size" : "512x512",
"scale" : "1x"
},
{
"idiom" : "mac",
"size" : "512x512",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -1,732 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13771"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Application-->
<scene sceneID="JPo-4y-FX3">
<objects>
<application id="hnw-xV-0zn" sceneMemberID="viewController">
<menu key="mainMenu" title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
<items>
<menuItem title="ndpiExample" id="1Xt-HY-uBw">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="ndpiExample" systemMenu="apple" id="uQy-DD-JDr">
<items>
<menuItem title="About ndpiExample" id="5kV-Vb-QxS">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="orderFrontStandardAboutPanel:" target="Ady-hI-5gd" id="Exp-CZ-Vem"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
<menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/>
<menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
<menuItem title="Services" id="NMo-om-nkz">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
</menuItem>
<menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
<menuItem title="Hide ndpiExample" keyEquivalent="h" id="Olw-nP-bQN">
<connections>
<action selector="hide:" target="Ady-hI-5gd" id="PnN-Uc-m68"/>
</connections>
</menuItem>
<menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="hideOtherApplications:" target="Ady-hI-5gd" id="VT4-aY-XCT"/>
</connections>
</menuItem>
<menuItem title="Show All" id="Kd2-mp-pUS">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="unhideAllApplications:" target="Ady-hI-5gd" id="Dhg-Le-xox"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
<menuItem title="Quit ndpiExample" keyEquivalent="q" id="4sb-4s-VLi">
<connections>
<action selector="terminate:" target="Ady-hI-5gd" id="Te7-pn-YzF"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="File" id="dMs-cI-mzQ">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="File" id="bib-Uj-vzu">
<items>
<menuItem title="New" keyEquivalent="n" id="Was-JA-tGl">
<connections>
<action selector="newDocument:" target="Ady-hI-5gd" id="4Si-XN-c54"/>
</connections>
</menuItem>
<menuItem title="Open…" keyEquivalent="o" id="IAo-SY-fd9">
<connections>
<action selector="openDocument:" target="Ady-hI-5gd" id="bVn-NM-KNZ"/>
</connections>
</menuItem>
<menuItem title="Open Recent" id="tXI-mr-wws">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Open Recent" systemMenu="recentDocuments" id="oas-Oc-fiZ">
<items>
<menuItem title="Clear Menu" id="vNY-rz-j42">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="clearRecentDocuments:" target="Ady-hI-5gd" id="Daa-9d-B3U"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem isSeparatorItem="YES" id="m54-Is-iLE"/>
<menuItem title="Close" keyEquivalent="w" id="DVo-aG-piG">
<connections>
<action selector="performClose:" target="Ady-hI-5gd" id="HmO-Ls-i7Q"/>
</connections>
</menuItem>
<menuItem title="Save…" keyEquivalent="s" id="pxx-59-PXV">
<connections>
<action selector="saveDocument:" target="Ady-hI-5gd" id="teZ-XB-qJY"/>
</connections>
</menuItem>
<menuItem title="Save As…" keyEquivalent="S" id="Bw7-FT-i3A">
<connections>
<action selector="saveDocumentAs:" target="Ady-hI-5gd" id="mDf-zr-I0C"/>
</connections>
</menuItem>
<menuItem title="Revert to Saved" keyEquivalent="r" id="KaW-ft-85H">
<connections>
<action selector="revertDocumentToSaved:" target="Ady-hI-5gd" id="iJ3-Pv-kwq"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="aJh-i4-bef"/>
<menuItem title="Page Setup…" keyEquivalent="P" id="qIS-W8-SiK">
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
<connections>
<action selector="runPageLayout:" target="Ady-hI-5gd" id="Din-rz-gC5"/>
</connections>
</menuItem>
<menuItem title="Print…" keyEquivalent="p" id="aTl-1u-JFS">
<connections>
<action selector="print:" target="Ady-hI-5gd" id="qaZ-4w-aoO"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Edit" id="5QF-Oa-p0T">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Edit" id="W48-6f-4Dl">
<items>
<menuItem title="Undo" keyEquivalent="z" id="dRJ-4n-Yzg">
<connections>
<action selector="undo:" target="Ady-hI-5gd" id="M6e-cu-g7V"/>
</connections>
</menuItem>
<menuItem title="Redo" keyEquivalent="Z" id="6dh-zS-Vam">
<connections>
<action selector="redo:" target="Ady-hI-5gd" id="oIA-Rs-6OD"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="WRV-NI-Exz"/>
<menuItem title="Cut" keyEquivalent="x" id="uRl-iY-unG">
<connections>
<action selector="cut:" target="Ady-hI-5gd" id="YJe-68-I9s"/>
</connections>
</menuItem>
<menuItem title="Copy" keyEquivalent="c" id="x3v-GG-iWU">
<connections>
<action selector="copy:" target="Ady-hI-5gd" id="G1f-GL-Joy"/>
</connections>
</menuItem>
<menuItem title="Paste" keyEquivalent="v" id="gVA-U4-sdL">
<connections>
<action selector="paste:" target="Ady-hI-5gd" id="UvS-8e-Qdg"/>
</connections>
</menuItem>
<menuItem title="Paste and Match Style" keyEquivalent="V" id="WeT-3V-zwk">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="pasteAsPlainText:" target="Ady-hI-5gd" id="cEh-KX-wJQ"/>
</connections>
</menuItem>
<menuItem title="Delete" id="pa3-QI-u2k">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="delete:" target="Ady-hI-5gd" id="0Mk-Ml-PaM"/>
</connections>
</menuItem>
<menuItem title="Select All" keyEquivalent="a" id="Ruw-6m-B2m">
<connections>
<action selector="selectAll:" target="Ady-hI-5gd" id="VNm-Mi-diN"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="uyl-h8-XO2"/>
<menuItem title="Find" id="4EN-yA-p0u">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Find" id="1b7-l0-nxx">
<items>
<menuItem title="Find…" tag="1" keyEquivalent="f" id="Xz5-n4-O0W">
<connections>
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="cD7-Qs-BN4"/>
</connections>
</menuItem>
<menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="YEy-JH-Tfz">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="WD3-Gg-5AJ"/>
</connections>
</menuItem>
<menuItem title="Find Next" tag="2" keyEquivalent="g" id="q09-fT-Sye">
<connections>
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="NDo-RZ-v9R"/>
</connections>
</menuItem>
<menuItem title="Find Previous" tag="3" keyEquivalent="G" id="OwM-mh-QMV">
<connections>
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="HOh-sY-3ay"/>
</connections>
</menuItem>
<menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="buJ-ug-pKt">
<connections>
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="U76-nv-p5D"/>
</connections>
</menuItem>
<menuItem title="Jump to Selection" keyEquivalent="j" id="S0p-oC-mLd">
<connections>
<action selector="centerSelectionInVisibleArea:" target="Ady-hI-5gd" id="IOG-6D-g5B"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Spelling and Grammar" id="Dv1-io-Yv7">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Spelling" id="3IN-sU-3Bg">
<items>
<menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="HFo-cy-zxI">
<connections>
<action selector="showGuessPanel:" target="Ady-hI-5gd" id="vFj-Ks-hy3"/>
</connections>
</menuItem>
<menuItem title="Check Document Now" keyEquivalent=";" id="hz2-CU-CR7">
<connections>
<action selector="checkSpelling:" target="Ady-hI-5gd" id="fz7-VC-reM"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="bNw-od-mp5"/>
<menuItem title="Check Spelling While Typing" id="rbD-Rh-wIN">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleContinuousSpellChecking:" target="Ady-hI-5gd" id="7w6-Qz-0kB"/>
</connections>
</menuItem>
<menuItem title="Check Grammar With Spelling" id="mK6-2p-4JG">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleGrammarChecking:" target="Ady-hI-5gd" id="muD-Qn-j4w"/>
</connections>
</menuItem>
<menuItem title="Correct Spelling Automatically" id="78Y-hA-62v">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticSpellingCorrection:" target="Ady-hI-5gd" id="2lM-Qi-WAP"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Substitutions" id="9ic-FL-obx">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Substitutions" id="FeM-D8-WVr">
<items>
<menuItem title="Show Substitutions" id="z6F-FW-3nz">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="orderFrontSubstitutionsPanel:" target="Ady-hI-5gd" id="oku-mr-iSq"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="gPx-C9-uUO"/>
<menuItem title="Smart Copy/Paste" id="9yt-4B-nSM">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleSmartInsertDelete:" target="Ady-hI-5gd" id="3IJ-Se-DZD"/>
</connections>
</menuItem>
<menuItem title="Smart Quotes" id="hQb-2v-fYv">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticQuoteSubstitution:" target="Ady-hI-5gd" id="ptq-xd-QOA"/>
</connections>
</menuItem>
<menuItem title="Smart Dashes" id="rgM-f4-ycn">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticDashSubstitution:" target="Ady-hI-5gd" id="oCt-pO-9gS"/>
</connections>
</menuItem>
<menuItem title="Smart Links" id="cwL-P1-jid">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticLinkDetection:" target="Ady-hI-5gd" id="Gip-E3-Fov"/>
</connections>
</menuItem>
<menuItem title="Data Detectors" id="tRr-pd-1PS">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticDataDetection:" target="Ady-hI-5gd" id="R1I-Nq-Kbl"/>
</connections>
</menuItem>
<menuItem title="Text Replacement" id="HFQ-gK-NFA">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticTextReplacement:" target="Ady-hI-5gd" id="DvP-Fe-Py6"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Transformations" id="2oI-Rn-ZJC">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Transformations" id="c8a-y6-VQd">
<items>
<menuItem title="Make Upper Case" id="vmV-6d-7jI">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="uppercaseWord:" target="Ady-hI-5gd" id="sPh-Tk-edu"/>
</connections>
</menuItem>
<menuItem title="Make Lower Case" id="d9M-CD-aMd">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="lowercaseWord:" target="Ady-hI-5gd" id="iUZ-b5-hil"/>
</connections>
</menuItem>
<menuItem title="Capitalize" id="UEZ-Bs-lqG">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="capitalizeWord:" target="Ady-hI-5gd" id="26H-TL-nsh"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Speech" id="xrE-MZ-jX0">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Speech" id="3rS-ZA-NoH">
<items>
<menuItem title="Start Speaking" id="Ynk-f8-cLZ">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="startSpeaking:" target="Ady-hI-5gd" id="654-Ng-kyl"/>
</connections>
</menuItem>
<menuItem title="Stop Speaking" id="Oyz-dy-DGm">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="stopSpeaking:" target="Ady-hI-5gd" id="dX8-6p-jy9"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Format" id="jxT-CU-nIS">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Format" id="GEO-Iw-cKr">
<items>
<menuItem title="Font" id="Gi5-1S-RQB">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Font" systemMenu="font" id="aXa-aM-Jaq">
<items>
<menuItem title="Show Fonts" keyEquivalent="t" id="Q5e-8K-NDq">
<connections>
<action selector="orderFrontFontPanel:" target="YLy-65-1bz" id="WHr-nq-2xA"/>
</connections>
</menuItem>
<menuItem title="Bold" tag="2" keyEquivalent="b" id="GB9-OM-e27">
<connections>
<action selector="addFontTrait:" target="YLy-65-1bz" id="hqk-hr-sYV"/>
</connections>
</menuItem>
<menuItem title="Italic" tag="1" keyEquivalent="i" id="Vjx-xi-njq">
<connections>
<action selector="addFontTrait:" target="YLy-65-1bz" id="IHV-OB-c03"/>
</connections>
</menuItem>
<menuItem title="Underline" keyEquivalent="u" id="WRG-CD-K1S">
<connections>
<action selector="underline:" target="Ady-hI-5gd" id="FYS-2b-JAY"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="5gT-KC-WSO"/>
<menuItem title="Bigger" tag="3" keyEquivalent="+" id="Ptp-SP-VEL">
<connections>
<action selector="modifyFont:" target="YLy-65-1bz" id="Uc7-di-UnL"/>
</connections>
</menuItem>
<menuItem title="Smaller" tag="4" keyEquivalent="-" id="i1d-Er-qST">
<connections>
<action selector="modifyFont:" target="YLy-65-1bz" id="HcX-Lf-eNd"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="kx3-Dk-x3B"/>
<menuItem title="Kern" id="jBQ-r6-VK2">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Kern" id="tlD-Oa-oAM">
<items>
<menuItem title="Use Default" id="GUa-eO-cwY">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="useStandardKerning:" target="Ady-hI-5gd" id="6dk-9l-Ckg"/>
</connections>
</menuItem>
<menuItem title="Use None" id="cDB-IK-hbR">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="turnOffKerning:" target="Ady-hI-5gd" id="U8a-gz-Maa"/>
</connections>
</menuItem>
<menuItem title="Tighten" id="46P-cB-AYj">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="tightenKerning:" target="Ady-hI-5gd" id="hr7-Nz-8ro"/>
</connections>
</menuItem>
<menuItem title="Loosen" id="ogc-rX-tC1">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="loosenKerning:" target="Ady-hI-5gd" id="8i4-f9-FKE"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Ligatures" id="o6e-r0-MWq">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Ligatures" id="w0m-vy-SC9">
<items>
<menuItem title="Use Default" id="agt-UL-0e3">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="useStandardLigatures:" target="Ady-hI-5gd" id="7uR-wd-Dx6"/>
</connections>
</menuItem>
<menuItem title="Use None" id="J7y-lM-qPV">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="turnOffLigatures:" target="Ady-hI-5gd" id="iX2-gA-Ilz"/>
</connections>
</menuItem>
<menuItem title="Use All" id="xQD-1f-W4t">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="useAllLigatures:" target="Ady-hI-5gd" id="KcB-kA-TuK"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Baseline" id="OaQ-X3-Vso">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Baseline" id="ijk-EB-dga">
<items>
<menuItem title="Use Default" id="3Om-Ey-2VK">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="unscript:" target="Ady-hI-5gd" id="0vZ-95-Ywn"/>
</connections>
</menuItem>
<menuItem title="Superscript" id="Rqc-34-cIF">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="superscript:" target="Ady-hI-5gd" id="3qV-fo-wpU"/>
</connections>
</menuItem>
<menuItem title="Subscript" id="I0S-gh-46l">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="subscript:" target="Ady-hI-5gd" id="Q6W-4W-IGz"/>
</connections>
</menuItem>
<menuItem title="Raise" id="2h7-ER-AoG">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="raiseBaseline:" target="Ady-hI-5gd" id="4sk-31-7Q9"/>
</connections>
</menuItem>
<menuItem title="Lower" id="1tx-W0-xDw">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="lowerBaseline:" target="Ady-hI-5gd" id="OF1-bc-KW4"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem isSeparatorItem="YES" id="Ndw-q3-faq"/>
<menuItem title="Show Colors" keyEquivalent="C" id="bgn-CT-cEk">
<connections>
<action selector="orderFrontColorPanel:" target="Ady-hI-5gd" id="mSX-Xz-DV3"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="iMs-zA-UFJ"/>
<menuItem title="Copy Style" keyEquivalent="c" id="5Vv-lz-BsD">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="copyFont:" target="Ady-hI-5gd" id="GJO-xA-L4q"/>
</connections>
</menuItem>
<menuItem title="Paste Style" keyEquivalent="v" id="vKC-jM-MkH">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="pasteFont:" target="Ady-hI-5gd" id="JfD-CL-leO"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Text" id="Fal-I4-PZk">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Text" id="d9c-me-L2H">
<items>
<menuItem title="Align Left" keyEquivalent="{" id="ZM1-6Q-yy1">
<connections>
<action selector="alignLeft:" target="Ady-hI-5gd" id="zUv-R1-uAa"/>
</connections>
</menuItem>
<menuItem title="Center" keyEquivalent="|" id="VIY-Ag-zcb">
<connections>
<action selector="alignCenter:" target="Ady-hI-5gd" id="spX-mk-kcS"/>
</connections>
</menuItem>
<menuItem title="Justify" id="J5U-5w-g23">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="alignJustified:" target="Ady-hI-5gd" id="ljL-7U-jND"/>
</connections>
</menuItem>
<menuItem title="Align Right" keyEquivalent="}" id="wb2-vD-lq4">
<connections>
<action selector="alignRight:" target="Ady-hI-5gd" id="r48-bG-YeY"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="4s2-GY-VfK"/>
<menuItem title="Writing Direction" id="H1b-Si-o9J">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Writing Direction" id="8mr-sm-Yjd">
<items>
<menuItem title="Paragraph" enabled="NO" id="ZvO-Gk-QUH">
<modifierMask key="keyEquivalentModifierMask"/>
</menuItem>
<menuItem id="YGs-j5-SAR">
<string key="title"> Default</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeBaseWritingDirectionNatural:" target="Ady-hI-5gd" id="qtV-5e-UBP"/>
</connections>
</menuItem>
<menuItem id="Lbh-J2-qVU">
<string key="title"> Left to Right</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeBaseWritingDirectionLeftToRight:" target="Ady-hI-5gd" id="S0X-9S-QSf"/>
</connections>
</menuItem>
<menuItem id="jFq-tB-4Kx">
<string key="title"> Right to Left</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeBaseWritingDirectionRightToLeft:" target="Ady-hI-5gd" id="5fk-qB-AqJ"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="swp-gr-a21"/>
<menuItem title="Selection" enabled="NO" id="cqv-fj-IhA">
<modifierMask key="keyEquivalentModifierMask"/>
</menuItem>
<menuItem id="Nop-cj-93Q">
<string key="title"> Default</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeTextWritingDirectionNatural:" target="Ady-hI-5gd" id="lPI-Se-ZHp"/>
</connections>
</menuItem>
<menuItem id="BgM-ve-c93">
<string key="title"> Left to Right</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeTextWritingDirectionLeftToRight:" target="Ady-hI-5gd" id="caW-Bv-w94"/>
</connections>
</menuItem>
<menuItem id="RB4-Sm-HuC">
<string key="title"> Right to Left</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeTextWritingDirectionRightToLeft:" target="Ady-hI-5gd" id="EXD-6r-ZUu"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem isSeparatorItem="YES" id="fKy-g9-1gm"/>
<menuItem title="Show Ruler" id="vLm-3I-IUL">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleRuler:" target="Ady-hI-5gd" id="FOx-HJ-KwY"/>
</connections>
</menuItem>
<menuItem title="Copy Ruler" keyEquivalent="c" id="MkV-Pr-PK5">
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
<connections>
<action selector="copyRuler:" target="Ady-hI-5gd" id="71i-fW-3W2"/>
</connections>
</menuItem>
<menuItem title="Paste Ruler" keyEquivalent="v" id="LVM-kO-fVI">
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
<connections>
<action selector="pasteRuler:" target="Ady-hI-5gd" id="cSh-wd-qM2"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="View" id="H8h-7b-M4v">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="View" id="HyV-fh-RgO">
<items>
<menuItem title="Show Toolbar" keyEquivalent="t" id="snW-S8-Cw5">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="toggleToolbarShown:" target="Ady-hI-5gd" id="BXY-wc-z0C"/>
</connections>
</menuItem>
<menuItem title="Customize Toolbar…" id="1UK-8n-QPP">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="runToolbarCustomizationPalette:" target="Ady-hI-5gd" id="pQI-g3-MTW"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="hB3-LF-h0Y"/>
<menuItem title="Show Sidebar" keyEquivalent="s" id="kIP-vf-haE">
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
<connections>
<action selector="toggleSourceList:" target="Ady-hI-5gd" id="iwa-gc-5KM"/>
</connections>
</menuItem>
<menuItem title="Enter Full Screen" keyEquivalent="f" id="4J7-dP-txa">
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
<connections>
<action selector="toggleFullScreen:" target="Ady-hI-5gd" id="dU3-MA-1Rq"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Window" id="aUF-d1-5bR">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
<items>
<menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
<connections>
<action selector="performMiniaturize:" target="Ady-hI-5gd" id="VwT-WD-YPe"/>
</connections>
</menuItem>
<menuItem title="Zoom" id="R4o-n2-Eq4">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="performZoom:" target="Ady-hI-5gd" id="DIl-cC-cCs"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
<menuItem title="Bring All to Front" id="LE2-aR-0XJ">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="arrangeInFront:" target="Ady-hI-5gd" id="DRN-fu-gQh"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Help" id="wpr-3q-Mcd">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
<items>
<menuItem title="ndpiExample Help" keyEquivalent="?" id="FKE-Sm-Kum">
<connections>
<action selector="showHelp:" target="Ady-hI-5gd" id="y7X-2Q-9no"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
</items>
</menu>
<connections>
<outlet property="delegate" destination="Voe-Tx-rLC" id="PrD-fu-P6m"/>
</connections>
</application>
<customObject id="Voe-Tx-rLC" customClass="AppDelegate"/>
<customObject id="YLy-65-1bz" customClass="NSFontManager"/>
<customObject id="Ady-hI-5gd" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="75" y="0.0"/>
</scene>
<!--Window Controller-->
<scene sceneID="R2V-B0-nI4">
<objects>
<windowController id="B8D-0N-5wS" sceneMemberID="viewController">
<window key="window" title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" showsToolbarButton="NO" visibleAtLaunch="NO" animationBehavior="default" id="IQv-IB-iLA">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="196" y="240" width="480" height="270"/>
<rect key="screenRect" x="0.0" y="0.0" width="1680" height="1027"/>
<connections>
<outlet property="delegate" destination="B8D-0N-5wS" id="98r-iN-zZc"/>
</connections>
</window>
<connections>
<segue destination="XfG-lQ-9wD" kind="relationship" relationship="window.shadowedContentViewController" id="cq2-FE-JQM"/>
</connections>
</windowController>
<customObject id="Oky-zY-oP4" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="75" y="250"/>
</scene>
<!--View Controller-->
<scene sceneID="hIz-AP-VOD">
<objects>
<viewController id="XfG-lQ-9wD" customClass="ViewController" sceneMemberID="viewController">
<view key="view" wantsLayer="YES" id="m2S-Jp-Qdl">
<rect key="frame" x="0.0" y="0.0" width="480" height="270"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Jdf-YK-4JB">
<rect key="frame" x="23" y="173" width="64" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Run" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="1eG-Fb-Ybk">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="onRunButtonClicked:" target="XfG-lQ-9wD" id="zyK-t7-vwt"/>
</connections>
</button>
</subviews>
</view>
</viewController>
<customObject id="rPt-NT-nkU" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="75" y="655"/>
</scene>
</scenes>
</document>
@@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2018年 ZengYingpei. All rights reserved.</string>
<key>NSMainStoryboardFile</key>
<string>Main</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
@@ -1,106 +0,0 @@
/*
*
* Copyright (C) 2011-18 - ntop.org
*
* This file is part of nDPI, an open source deep packet inspection
* library based on the OpenDPI and PACE technology by ipoque GmbH
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nDPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
*
*/
#import "ViewController.h"
#include "ndpi_api.h"
// Declare the orginal_main defined in ndpiReader.c here
extern int orginal_main(int argc, char **argv);
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}
- (void)setRepresentedObject:(id)representedObject {
[super setRepresentedObject:representedObject];
// Update the view, if already loaded.
}
- (IBAction)onRunButtonClicked:(id)sender
{
char* args[10];
extern int optind;
optind = 1; // reset the parse of getopt_long
// Check the "nDPI_QuickStartGuide.pdf" for comand option explanation.
/* Following code it to execute below command (remember to change args[2] to
* absolute path):
* ./ndpiReader -i capture.pcap
*/
args[0] = (char*)"ndpiReader";
args[1] = (char*)"-i";
NSString* pcap_file = [[NSBundle mainBundle]pathForResource:@"capture" ofType:@"pcap"];
args[2] = (char*)[pcap_file cStringUsingEncoding:NSUTF8StringEncoding];
// Change to you pcap file path if you want.
//args[2] = (char*)"/Users/zengyingpei/Documents/code/nDPI/example/MacOS/ndpiExample/ndpiExample/capture.pcap";
// Remember to change below number of args when you change to other command inputs.
orginal_main(3, args);
/* Following code it to execute below command:
* ./ndpiReader -i en1 -s 10 -p protos.txt
* The process seems to be not support re-entering. You may have to re-run the App.
*/
/*
args[0] = (char*)"ndpiReader";
args[1] = (char*)"-i";
args[2] = (char*)"en0";
args[3] = (char*)"-s";
args[4] = (char*)"10";
args[5] = (char*)"-p";
NSString* proto_file = [[NSBundle mainBundle]pathForResource:@"protos" ofType:@"txt"];
args[6] = (char*)[proto_file cStringUsingEncoding:NSUTF8StringEncoding];
//args[6] = (char*)"/Users/zengyingpei/Documents/code/nDPI/example/protos.txt";
orginal_main(7, args);
*/
}
// In order to fix the missing of NDPI_LOG_DEBUG2 (used in ndpi_main.c), we define
// NDPI_LOG_DEBUG2 as NDPI_LOG_DEBUG2_XCODE_PROJ.
void vNDPI_LOG_DEBUG2_XCODE_PROJ(struct ndpi_detection_module_struct * ndpi_struct,
const char *format, va_list ap)
{
vprintf(format, ap);
}
void NDPI_LOG_DEBUG2_XCODE_PROJ(struct ndpi_detection_module_struct * ndpi_struct,
const char *format, ...)
{
va_list ap;
va_start (ap, format);
vNDPI_LOG_DEBUG2_XCODE_PROJ(ndpi_struct, format, ap);
va_end (ap);
}
@end
Binary file not shown.
@@ -1,27 +0,0 @@
/*
*
* Copyright (C) 2011-18 - ntop.org
*
* This file is part of nDPI, an open source deep packet inspection
* library based on the OpenDPI and PACE technology by ipoque GmbH
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nDPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
*
*/
#import <Cocoa/Cocoa.h>
int main(int argc, const char * argv[]) {
return NSApplicationMain(argc, argv);
}
@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>
+1 -1
View File
@@ -17,7 +17,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
APP = ndpiReader.dpdk
LIBNDPI = $(PWD)/../src/lib/libndpi.a
SRCS-y := reader_util.c intrusion_detection.c ndpiReader.c
SRCS-y := reader_util.c ndpiReader.c
CFLAGS += -g
CFLAGS += -Wno-strict-prototypes -Wno-missing-prototypes -Wno-missing-declarations -Wno-unused-parameter -I $(PWD)/../src/include @CFLAGS@ -DUSE_DPDK
+38 -19
View File
@@ -3,20 +3,29 @@ CC=@CC@
CXX=@CXX@
BUILD_MINGW=@BUILD_MINGW@
BUILD_MINGW_X64=@BUILD_MINGW_X64@
DISABLE_NPCAP=@DISABLE_NPCAP@
EXE_SUFFIX=@EXE_SUFFIX@
SRCHOME=../src
CFLAGS=-g -fPIC -DPIC -I$(SRCHOME)/include @PCAP_INC@ @CFLAGS@
ifneq ($(OS),Windows_NT)
CFLAGS+=-fPIC -DPIC
endif
CFLAGS+=-I$(SRCHOME)/include @PCAP_INC@ @CFLAGS@ @GPROF_CFLAGS@
LDFLAGS=@LDFLAGS@
LIBNDPI=$(SRCHOME)/lib/libndpi.a
LIBS=$(LIBNDPI) @PCAP_LIB@ @LIBS@ @ADDITIONAL_LIBS@
HEADERS=intrusion_detection.h reader_util.h $(SRCHOME)/include/ndpi_api.h \
LIBS=$(LIBNDPI) @PCAP_LIB@ @ADDITIONAL_LIBS@ @LIBS@ @GPROF_LIBS@
HEADERS=reader_util.h $(SRCHOME)/include/ndpi_api.h \
$(SRCHOME)/include/ndpi_typedefs.h $(SRCHOME)/include/ndpi_protocol_ids.h
OBJS=ndpiReader.o reader_util.o intrusion_detection.o
PREFIX?=@prefix@
ifneq ($(BUILD_MINGW),)
SUFFIX:=.exe
ifeq ($(DISABLE_NPCAP),0)
CFLAGS+=-I@srcdir@/../windows/WpdPack/Include -I@srcdir@/../windows/WpdPack/Include/pcap
LIBS+=-Wl,-Bstatic -lpthread -Wl,-Bdynamic
else
CFLAGS+=-DDISABLE_NPCAP
endif
ifeq ($(DISABLE_NPCAP),0)
ifneq ($(BUILD_MINGW_X64),)
LIBS+=@srcdir@/../windows/WpdPack/Lib/x64/wpcap.lib
@@ -24,13 +33,16 @@ else
LIBS+=@srcdir@/../windows/WpdPack/Lib/wpcap.lib
endif
else
LIBS+=-lpthread
endif
all: ndpiReader$(SUFFIX) @DPDK_TARGET@
LIBS+=-Wl,-Bstatic -lpthread -Wl,-Bdynamic
else
LIBS+=-pthread
endif
CFLAGS+=-pthread
all: ndpiReader$(EXE_SUFFIX) @DPDK_TARGET@
EXECUTABLE_SOURCES := ndpiReader.c ndpiSimpleIntegration.c
COMMON_SOURCES := $(filter-out $(EXECUTABLE_SOURCES),$(wildcard *.c ))
@@ -38,22 +50,22 @@ COMMON_SOURCES := $(filter-out $(EXECUTABLE_SOURCES),$(wildcard *.c ))
libndpiReader.a: $(COMMON_SOURCES:%.c=%.o) $(LIBNDPI)
$(AR) rsv libndpiReader.a $(COMMON_SOURCES:%.c=%.o)
ndpiReader$(SUFFIX): libndpiReader.a $(LIBNDPI) ndpiReader.o
ndpiReader$(EXE_SUFFIX): libndpiReader.a $(LIBNDPI) ndpiReader.o
$(CC) $(CFLAGS) $(LDFLAGS) ndpiReader.o libndpiReader.a $(LIBS) -o $@
ndpiSimpleIntegration$(SUFFIX): ndpiSimpleIntegration.o
ndpiSimpleIntegration$(EXE_SUFFIX): ndpiSimpleIntegration.o
$(CC) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
%.o: %.c $(HEADERS) Makefile
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
install: ndpiReader$(SUFFIX)
install: ndpiReader$(EXE_SUFFIX)
mkdir -p $(DESTDIR)$(PREFIX)/bin/
mkdir -p $(DESTDIR)$(PREFIX)/share/ndpi
cp ndpiReader$(SUFFIX) $(DESTDIR)$(PREFIX)/bin/
cp ndpiReader$(EXE_SUFFIX) $(DESTDIR)$(PREFIX)/bin/
cp protos.txt $(DESTDIR)$(PREFIX)/share/ndpi/ndpiProtos.txt
cp mining_hosts.txt $(DESTDIR)$(PREFIX)/share/ndpi/ndpiCustomCategory.txt
[ -f ndpiSimpleIntegration$(SUFFIX) ] && cp ndpiSimpleIntegration$(SUFFIX) $(DESTDIR)$(PREFIX)/bin/ndpiSimpleIntegration$(SUFFIX) || true
[ -f ndpiSimpleIntegration$(EXE_SUFFIX) ] && cp ndpiSimpleIntegration$(EXE_SUFFIX) $(DESTDIR)$(PREFIX)/bin/ndpiSimpleIntegration$(EXE_SUFFIX) || true
[ -f build/app/ndpiReader.dpdk ] && cp build/app/ndpiReader.dpdk $(DESTDIR)$(PREFIX)/bin/ || true
[ -f ndpiReader.dpdk ] && cp ndpiReader.dpdk $(DESTDIR)$(PREFIX)/bin/ || true
@@ -61,17 +73,24 @@ dpdk:
$(MAKE) -f Makefile.dpdk
check:
true # nothing to do here
cppcheck:
cppcheck --template='{file}:{line}:{severity}:{message}' --quiet --enable=all --force -I$(SRCHOME)/include *.c
clean:
/bin/rm -f *.o ndpiReader ndpiSimpleIntegration ndpiReader$(SUFFIX) ndpiSimpleIntegration$(SUFFIX) ndpiReader.dpdk
/bin/rm -f *.o ndpiReader ndpiSimpleIntegration ndpiReader$(EXE_SUFFIX) ndpiSimpleIntegration$(EXE_SUFFIX) ndpiReader.dpdk
/bin/rm -f .*.dpdk.cmd .*.o.cmd *.dpdk.map .*.o.d
/bin/rm -f _install _postbuild _postinstall _preinstall
/bin/rm -rf build
distdir:
cp categories.txt mining_hosts.txt protos.txt README.DPDK '$(distdir)/'
find . -maxdepth 1 -type f -name '*.c' -o -name '*.h' -o -name '*.py' | xargs -I'{}' cp '{}' '$(distdir)/{}'
cp README.DPDK '$(distdir)/'
find . -maxdepth 1 -type f -name '*.c' \
-o -name '*.h' \
-o -name '*.py' \
-o -name '*.txt' \
-o -name '*.csv' | xargs -I'{}' cp '{}' '$(distdir)/{}'
distclean: clean
/bin/rm -f Makefile.dpdk
+108 -109
View File
@@ -1,109 +1,108 @@
################################################################
# abuse.ch Suricata JA3 Fingerprint Blacklist (CSV) #
# For Suricata 4.1.0 or newer #
# Last updated: 2020-04-09 06:48:14 UTC #
# #
# Terms Of Use: https://sslbl.abuse.ch/blacklist/ #
# For questions please contact sslbl [at] abuse.ch #
################################################################
#
# ja3_md5,Firstseen,Lastseen,Listingreason
b386946a5a44d1ddcc843bc75336dfce,2017-07-14 18:08:15,2019-07-27 20:42:54,Dridex
8991a387e4cc841740f25d6f5139f92d,2017-07-14 19:02:03,2019-07-28 00:34:38,Adware
cb98a24ee4b9134448ffb5714fd870ac,2017-07-14 19:48:28,2019-05-22 03:22:38,Dridex
1aa7bf8b97e540ca5edd75f7b8384bfa,2017-07-14 20:23:38,2019-07-28 01:38:22,TrickBot
3d89c0dfb1fa44911b8fa7523ef8dedb,2017-07-15 04:23:45,2021-02-01 18:23:25,Adware
bc6c386f480ee97b9d9e52d472b772d8,2017-07-15 10:57:38,2021-02-21 13:13:30,Adware
8f52d1ce303fb4a6515836aec3cc16b1,2017-07-15 19:05:11,2019-07-27 20:00:57,TrickBot
d6f04b5a910115f4b50ecec09d40a1df,2017-07-15 19:42:24,2018-10-14 08:12:51,Dridex
35c0a31c481927f022a3b530255ac080,2017-07-15 19:43:19,2021-02-06 03:21:55,Tofsee
d551fafc4f40f1dec2bb45980bfa9492,2017-07-15 19:59:29,2020-11-16 13:06:20,Adware
e330bca99c8a5256ae126a55c4c725c5,2017-07-15 19:59:29,2021-01-13 00:29:37,Adware
b8f81673c0e1d29908346f3bab892b9b,2017-07-16 01:32:03,2018-12-17 06:08:03,Adware
83e04bc58d402f9633983cbf22724b02,2017-07-16 01:32:03,2021-01-14 14:23:42,Adware
70722097d1fe1d78d8c2164640ab6df4,2017-07-16 02:39:08,2021-02-22 04:56:57,Tofsee
9c2589e1c0e9f533a022c6205f9719e1,2017-07-16 08:37:17,2021-02-19 08:46:32,Adware
849b04bdbd1d2b983f6e8a457e0632a8,2017-07-16 08:37:17,2021-02-19 08:46:32,Adware
16efcf0e00504ddfedde13bfea997952,2017-07-16 19:45:45,2020-12-23 15:10:32,Adware
4d7a28d6f2263ed61de88ca66eb011e3,2017-07-16 21:20:29,2020-12-08 18:10:55,Tofsee
550dce18de1bb143e69d6dd9413b8355,2017-07-16 22:17:20,2018-12-21 07:04:50,Adware
c50f6a8b9173676b47ba6085bd0c6cee,2017-07-16 22:38:41,2019-05-21 09:42:17,TrickBot
20dd18bdd3209ea718989030a6f93364,2017-07-18 10:22:58,2019-04-28 09:23:31,Adware
8498fe4268764dbf926a38283e9d3d8f,2017-07-18 10:22:58,2020-12-31 02:06:27,Adware
590a232d04d56409fab72e752a8a2634,2017-07-18 18:53:24,2020-10-11 20:48:33,Tofsee
51a7ad14509fd614c7bb3a50c4982b8c,2017-07-19 07:28:19,2019-07-14 11:58:32,JBifrost
96eba628dcb2b47607192ba74a3b55ba,2017-07-19 18:53:48,2021-01-04 12:45:08,Tofsee
df5c30e670dba99f9270ed36060cf054,2017-07-20 17:44:07,2018-04-11 15:57:59,Tofsee
098f55e27d8c4b0a590102cbdb3a5f3a,2017-07-21 09:52:01,2019-04-08 01:09:54,Adware
46efd49abcca8ea9baa932da68fdb529,2017-07-22 14:07:36,2021-02-20 20:45:32,Adware
29085f03f8e8a03f0b399c5c7cf0b0b8,2017-07-22 14:07:36,2021-02-21 20:56:01,Adware
d7150af4514b868defb854db0f62a441,2017-07-23 09:39:24,2018-07-24 01:04:58,Tofsee
03e186a7f83285e93341de478334006e,2017-07-24 18:17:14,2021-02-13 23:55:58,Tofsee
3cda52da4ade09f1f781ad2e82dcfa20,2017-07-30 18:41:36,2019-05-21 17:34:18,Quakbot
b13d01846ad7a14a70bf030a16775c78,2017-08-08 07:12:49,2021-02-21 01:32:12,Adware
1543a7c46633acf71e8401baccbd0568,2017-08-08 21:32:28,2020-11-10 05:30:17,Tofsee
1d095e68489d3c535297cd8dffb06cb9,2017-08-12 19:56:28,2020-10-28 11:06:23,Tofsee
93d056782d649deb51cda44ecb714bb0,2017-08-28 12:20:47,2019-04-15 23:47:27,Adware
698e36219f3979420fa2581b21dac7ec,2017-08-28 12:20:47,2020-12-31 02:06:31,Adware
1712287800ac91b34cadd5884ce85568,2017-08-28 16:01:59,2021-01-23 09:36:32,TorrentLocker
5e573c9c9f8ba720ef9b18e9fce2e2f7,2017-08-30 13:44:56,2021-02-17 17:11:34,Adware
f6fd83a21f9f3c5f9ff7b5c63bbc179d,2017-10-20 08:03:21,2018-11-06 06:42:12,Adware
92579701f145605e9edc0b01a901c6d5,2017-10-23 00:10:48,2021-02-18 22:56:49,Adware
a61299f9b501adcf680b9275d79d4ac6,2017-11-04 18:03:59,2020-04-21 17:08:24,Tofsee
b2b61db7b9490a60d270ccb20b462826,2017-11-14 20:12:03,2021-02-18 22:56:49,Adware
7dcce5b76c8b17472d024758970a406b,2017-11-22 12:42:46,2020-12-22 15:15:49,Tofsee
534ce2dbc413c68e908363b5df0ae5e0,2017-12-22 09:36:21,2019-07-27 15:22:33,TrickBot
fb00055a1196aeea8d1bc609885ba953,2018-01-01 22:49:25,2019-04-09 06:58:58,TrickBot
a50a861119aceb0ccc74902e8fddb618,2018-01-02 08:16:23,2018-07-05 02:33:08,Tofsee
e7643725fcff971e3051fe0e47fc2c71,2018-01-31 08:06:13,2020-03-25 16:19:48,Tofsee
7c410ce832e848a3321432c9a82e972b,2018-01-31 20:04:25,2021-02-21 22:51:31,Tofsee
da949afd9bd6df820730f8f171584a71,2018-02-03 05:19:37,2021-02-21 05:20:43,Tofsee
906004246f3ba5e755b043c057254a29,2018-03-11 08:25:38,2018-04-14 00:59:16,Tofsee
fd80fa9c6120cdeea8520510f3c644ac,2018-03-11 09:34:30,2021-02-21 22:16:39,Tofsee
b90bdbe961a648f0427db21aaa6ccb59,2018-03-11 10:37:43,2020-05-29 23:39:01,Tofsee
1fe4c7a3544eb27afec2adfb3a3dbf60,2018-03-11 19:23:08,2021-02-20 11:19:52,Tofsee
c201b92f8b483fa388be174d6689f534,2018-03-12 13:43:52,2021-01-28 06:17:06,Gozi
9f62c4f26b90d3d757bea609e82f2eaf,2018-03-13 06:23:41,2020-12-18 16:07:31,Tofsee
1be3ecebe5aa9d3654e6e703d81f6928,2018-03-13 11:50:02,2021-02-14 23:03:13,Ransomware.Troldesh
e3b2ab1f9a56f2fb4c9248f2f41631fa,2018-03-15 01:06:34,2021-02-22 10:36:48,Tofsee
dff8a0aa1c904aaea76c5bf624e88333,2018-03-18 09:41:15,2020-10-27 09:50:24,Tofsee
17fd49722f8d11f3d76dce84f8e099a7,2018-03-19 23:02:27,2020-12-09 11:32:21,Tofsee
911479ac8a0813ed1241b3686ccdade9,2018-03-19 23:24:59,2020-03-30 04:09:18,Tofsee
c5deb9465d47232dd48772f9c4d14679,2018-03-22 15:42:48,2021-02-17 07:39:32,Tofsee
f22bdd57e3a52de86cda40da2d84e83b,2018-03-27 13:40:19,2019-01-20 14:31:39,Tofsee
d18a4da84af59e1108862a39bae7c9d4,2018-04-03 00:40:51,2021-02-06 01:53:12,Tofsee
2d8794cb7b52b777bee2695e79c15760,2018-04-04 06:56:37,2021-02-10 08:22:31,Ransomware
40adfd923eb82b89d8836ba37a19bca1,2018-04-15 15:49:08,2021-02-21 22:22:56,CoinMiner
1aee0238942d453d679fc1e37a303387,2018-05-13 01:59:49,2021-02-10 13:19:24,Tofsee
2092e1fffb45d7e4a19a57f9bc5e203a,2018-05-16 21:59:36,2018-09-05 01:58:33,Adware
bffa4501966196d3d6e90cee1f88fc89,2018-06-07 15:08:04,2020-03-16 00:03:44,Tofsee
807fca46d9d0cf63adf4e5e80e414bbe,2018-06-07 16:51:03,2021-02-20 03:15:38,Tofsee
fb58831f892190644fe44e25bc830b45,2018-06-08 12:07:59,2019-05-31 21:02:37,Adware
0cc1e84568e471aa1d62ad4158ade6b5,2018-06-24 10:50:47,2021-02-10 21:48:57,Tofsee
d2935c58fe676744fecc8614ee5356c7,2018-08-14 21:48:41,2021-02-21 21:44:55,Adwind
8916410db85077a5460817142dcbc8de,2018-08-21 12:32:28,2021-02-21 20:02:19,TrickBot
c5235d3a8b9934b7fbbd204d50bc058d,2018-08-23 17:36:08,2019-10-13 05:11:09,Gootkit
57f3642b4e37e28f5cbe3020c9331b4c,2018-08-28 15:54:53,2021-02-22 11:09:43,Gozi
e62a5f4d538cbf169c2af71bec2399b4,2018-08-30 15:45:40,2021-02-21 20:36:55,TrickBot
51c64c77e60f3980eea90869b68c58a8,2018-08-30 21:04:57,2021-02-21 22:09:16,Dridex
7691297bcb20a41233fd0a0baa0a3628,2018-09-17 02:50:05,2021-02-21 17:05:57,Adware
7dd50e112cd23734a310b90f6f44a7cd,2018-09-17 17:54:58,2021-02-22 11:14:04,Quakbot
52c7396a501e4fecbdfa99c5408334ac,2018-09-18 00:29:04,2019-12-03 17:24:02,Tofsee
f735bbc6b69723b9df7b0e7ef27872af,2018-10-02 18:04:16,2021-02-19 06:55:39,TrickBot
49ed2ef3f1321e5f044f1e71b0e6fdd5,2018-10-02 18:04:17,2021-02-19 06:55:39,TrickBot
d76ee64fb7273733cbe455ac81c292e6,2018-11-16 13:26:39,2018-11-18 19:19:36,Tofsee
8f6c918dcb585ebbea05e2cc94530e3d,2018-11-16 13:26:41,2020-05-06 15:45:21,Tofsee
34f14a69ad7009ca5863379218af17f3,2018-11-17 05:17:22,2021-01-28 08:19:18,Tofsee
c2b4710c6888a5d47befe865c8e6fb19,2018-11-29 20:46:04,2020-12-16 15:08:09,Tofsee
decfb48a53789ebe081b88aabb58ee34,2018-12-21 09:06:16,2021-02-16 12:28:53,Adwind
08a8a4e85b25ac42e1490bc85cfdb5ce,2019-01-30 02:48:34,2020-10-27 09:50:19,Tofsee
c0220cd64849a629397a9cb68f78a0ea,2019-03-24 00:12:32,2021-02-13 05:13:33,Tofsee
7a29c223fb122ec64d10f0a159e07996,2019-06-09 22:55:29,2020-10-27 09:50:26,Tofsee
44dab16d680ef93487bc16ad23b3ffb1,2019-06-09 22:55:29,2020-10-27 09:50:25,Tofsee
70a04365be5bbd4653698bebeb43ce68,2019-07-02 06:26:56,2020-05-30 04:19:00,Tofsee
d81d654effb94714a4086734fa0adad9,2019-07-16 23:29:02,2020-10-27 09:50:21,Tofsee
25d74b7b4b779eb1efd4b31d26d651c6,2019-08-03 20:15:33,2020-07-14 21:43:25,Tofsee
fc2299d5b2964cd242c5a2c8c531a5f0,2019-08-09 23:56:32,2021-02-22 08:49:18,Tofsee
32926ca3e59f0413d0b98725454594f5,2019-09-12 06:56:10,2020-10-27 21:49:31,Tofsee
ffefafdb86336d057eda5fdf02b3d5ce,2019-10-26 07:31:49,2020-07-25 00:14:09,Tofsee
# END (98) entries
################################################################
# abuse.ch Suricata JA3 Fingerprint Blacklist (CSV) #
# For Suricata 4.1.0 or newer #
# Last updated: 2021-08-03 14:33:44 UTC #
# #
# Terms Of Use: https://sslbl.abuse.ch/blacklist/ #
# For questions please contact sslbl [at] abuse.ch #
################################################################
#
# ja3_md5,Firstseen,Lastseen,Listingreason
b386946a5a44d1ddcc843bc75336dfce,2017-07-14 18:08:15,2019-07-27 20:42:54,Dridex
8991a387e4cc841740f25d6f5139f92d,2017-07-14 19:02:03,2019-07-28 00:34:38,Adware
cb98a24ee4b9134448ffb5714fd870ac,2017-07-14 19:48:28,2019-05-22 03:22:38,Dridex
1aa7bf8b97e540ca5edd75f7b8384bfa,2017-07-14 20:23:38,2019-07-28 01:38:22,TrickBot
3d89c0dfb1fa44911b8fa7523ef8dedb,2017-07-15 04:23:45,2021-02-01 18:23:25,Adware
bc6c386f480ee97b9d9e52d472b772d8,2017-07-15 10:57:38,2021-03-13 07:33:39,Adware
8f52d1ce303fb4a6515836aec3cc16b1,2017-07-15 19:05:11,2019-07-27 20:00:57,TrickBot
d6f04b5a910115f4b50ecec09d40a1df,2017-07-15 19:42:24,2018-10-14 08:12:51,Dridex
35c0a31c481927f022a3b530255ac080,2017-07-15 19:43:19,2021-04-10 12:54:04,Tofsee
e330bca99c8a5256ae126a55c4c725c5,2017-07-15 19:59:29,2021-01-13 00:29:37,Adware
d551fafc4f40f1dec2bb45980bfa9492,2017-07-15 19:59:29,2020-11-16 13:06:20,Adware
83e04bc58d402f9633983cbf22724b02,2017-07-16 01:32:03,2021-03-02 04:07:43,Adware
b8f81673c0e1d29908346f3bab892b9b,2017-07-16 01:32:03,2021-03-02 04:07:36,Adware
70722097d1fe1d78d8c2164640ab6df4,2017-07-16 02:39:08,2021-05-04 09:52:20,Tofsee
9c2589e1c0e9f533a022c6205f9719e1,2017-07-16 08:37:17,2021-07-25 08:33:18,Adware
849b04bdbd1d2b983f6e8a457e0632a8,2017-07-16 08:37:17,2021-07-25 08:33:18,Adware
16efcf0e00504ddfedde13bfea997952,2017-07-16 19:45:45,2020-12-23 15:10:32,Adware
4d7a28d6f2263ed61de88ca66eb011e3,2017-07-16 21:20:29,2020-12-08 18:10:55,Tofsee
550dce18de1bb143e69d6dd9413b8355,2017-07-16 22:17:20,2018-12-21 07:04:50,Adware
c50f6a8b9173676b47ba6085bd0c6cee,2017-07-16 22:38:41,2019-05-21 09:42:17,TrickBot
590a232d04d56409fab72e752a8a2634,2017-07-18 18:53:24,2020-10-11 20:48:33,Tofsee
51a7ad14509fd614c7bb3a50c4982b8c,2017-07-19 07:28:19,2019-07-14 11:58:32,JBifrost
96eba628dcb2b47607192ba74a3b55ba,2017-07-19 18:53:48,2021-07-31 01:48:32,Tofsee
df5c30e670dba99f9270ed36060cf054,2017-07-20 17:44:07,2018-04-11 15:57:59,Tofsee
098f55e27d8c4b0a590102cbdb3a5f3a,2017-07-21 09:52:01,2019-04-08 01:09:54,Adware
29085f03f8e8a03f0b399c5c7cf0b0b8,2017-07-22 14:07:36,2021-04-11 06:42:45,Adware
46efd49abcca8ea9baa932da68fdb529,2017-07-22 14:07:36,2021-04-11 05:54:57,Adware
d7150af4514b868defb854db0f62a441,2017-07-23 09:39:24,2018-07-24 01:04:58,Tofsee
03e186a7f83285e93341de478334006e,2017-07-24 18:17:14,2021-03-20 07:45:40,Tofsee
3cda52da4ade09f1f781ad2e82dcfa20,2017-07-30 18:41:36,2019-05-21 17:34:18,Quakbot
b13d01846ad7a14a70bf030a16775c78,2017-08-08 07:12:49,2021-04-10 00:03:33,Adware
1543a7c46633acf71e8401baccbd0568,2017-08-08 21:32:28,2021-04-08 19:50:46,Tofsee
1d095e68489d3c535297cd8dffb06cb9,2017-08-12 19:56:28,2020-10-28 11:06:23,Tofsee
698e36219f3979420fa2581b21dac7ec,2017-08-28 12:20:47,2020-12-31 02:06:31,Adware
93d056782d649deb51cda44ecb714bb0,2017-08-28 12:20:47,2019-04-15 23:47:27,Adware
1712287800ac91b34cadd5884ce85568,2017-08-28 16:01:59,2021-07-28 14:16:00,TorrentLocker
5e573c9c9f8ba720ef9b18e9fce2e2f7,2017-08-30 13:44:56,2021-03-13 07:33:38,Adware
f6fd83a21f9f3c5f9ff7b5c63bbc179d,2017-10-20 08:03:21,2018-11-06 06:42:12,Adware
92579701f145605e9edc0b01a901c6d5,2017-10-23 00:10:48,2021-07-25 17:07:34,Adware
a61299f9b501adcf680b9275d79d4ac6,2017-11-04 18:03:59,2020-04-21 17:08:24,Tofsee
b2b61db7b9490a60d270ccb20b462826,2017-11-14 20:12:03,2021-06-06 20:27:10,Adware
7dcce5b76c8b17472d024758970a406b,2017-11-22 12:42:46,2021-03-16 12:53:35,Tofsee
534ce2dbc413c68e908363b5df0ae5e0,2017-12-22 09:36:21,2019-07-27 15:22:33,TrickBot
fb00055a1196aeea8d1bc609885ba953,2018-01-01 22:49:25,2019-04-09 06:58:58,TrickBot
a50a861119aceb0ccc74902e8fddb618,2018-01-02 08:16:23,2018-07-05 02:33:08,Tofsee
e7643725fcff971e3051fe0e47fc2c71,2018-01-31 08:06:13,2020-03-25 16:19:48,Tofsee
7c410ce832e848a3321432c9a82e972b,2018-01-31 20:04:25,2021-08-01 06:13:14,Tofsee
da949afd9bd6df820730f8f171584a71,2018-02-03 05:19:37,2021-03-08 22:10:10,Tofsee
906004246f3ba5e755b043c057254a29,2018-03-11 08:25:38,2018-04-14 00:59:16,Tofsee
fd80fa9c6120cdeea8520510f3c644ac,2018-03-11 09:34:30,2021-08-11 12:34:00,Tofsee
b90bdbe961a648f0427db21aaa6ccb59,2018-03-11 10:37:43,2020-05-29 23:39:01,Tofsee
1fe4c7a3544eb27afec2adfb3a3dbf60,2018-03-11 19:23:08,2021-08-09 11:42:58,Tofsee
c201b92f8b483fa388be174d6689f534,2018-03-12 13:43:52,2021-01-28 06:17:06,Gozi
9f62c4f26b90d3d757bea609e82f2eaf,2018-03-13 06:23:41,2021-05-20 23:01:06,Tofsee
1be3ecebe5aa9d3654e6e703d81f6928,2018-03-13 11:50:02,2021-08-11 13:02:35,Ransomware.Troldesh
e3b2ab1f9a56f2fb4c9248f2f41631fa,2018-03-15 01:06:34,2021-07-02 21:51:49,Tofsee
dff8a0aa1c904aaea76c5bf624e88333,2018-03-18 09:41:15,2020-10-27 09:50:24,Tofsee
17fd49722f8d11f3d76dce84f8e099a7,2018-03-19 23:02:27,2021-08-01 00:40:52,Tofsee
911479ac8a0813ed1241b3686ccdade9,2018-03-19 23:24:59,2020-03-30 04:09:18,Tofsee
c5deb9465d47232dd48772f9c4d14679,2018-03-22 15:42:48,2021-03-23 00:34:25,Tofsee
f22bdd57e3a52de86cda40da2d84e83b,2018-03-27 13:40:19,2019-01-20 14:31:39,Tofsee
d18a4da84af59e1108862a39bae7c9d4,2018-04-03 00:40:51,2021-02-06 01:53:12,Tofsee
2d8794cb7b52b777bee2695e79c15760,2018-04-04 06:56:37,2021-07-26 08:07:00,Ransomware
40adfd923eb82b89d8836ba37a19bca1,2018-04-15 15:49:08,2021-04-11 04:42:47,CoinMiner
1aee0238942d453d679fc1e37a303387,2018-05-13 01:59:49,2021-07-30 12:27:07,Tofsee
2092e1fffb45d7e4a19a57f9bc5e203a,2018-05-16 21:59:36,2018-09-05 01:58:33,Adware
bffa4501966196d3d6e90cee1f88fc89,2018-06-07 15:08:04,2020-03-16 00:03:44,Tofsee
807fca46d9d0cf63adf4e5e80e414bbe,2018-06-07 16:51:03,2021-08-07 03:15:42,Tofsee
fb58831f892190644fe44e25bc830b45,2018-06-08 12:07:59,2021-07-20 01:39:05,Adware
0cc1e84568e471aa1d62ad4158ade6b5,2018-06-24 10:50:47,2021-06-21 02:35:57,Tofsee
d2935c58fe676744fecc8614ee5356c7,2018-08-14 21:48:41,2021-08-11 11:54:42,Adwind
8916410db85077a5460817142dcbc8de,2018-08-21 12:32:28,2021-08-11 15:00:50,TrickBot
c5235d3a8b9934b7fbbd204d50bc058d,2018-08-23 17:36:08,2019-10-13 05:11:09,Gootkit
57f3642b4e37e28f5cbe3020c9331b4c,2018-08-28 15:54:53,2021-08-11 13:05:18,Gozi
e62a5f4d538cbf169c2af71bec2399b4,2018-08-30 15:45:40,2021-08-11 09:48:52,TrickBot
51c64c77e60f3980eea90869b68c58a8,2018-08-30 21:04:57,2021-08-11 08:13:08,Dridex
7691297bcb20a41233fd0a0baa0a3628,2018-09-17 02:50:05,2021-08-11 12:20:33,Adware
7dd50e112cd23734a310b90f6f44a7cd,2018-09-17 17:54:58,2021-08-01 11:28:46,Quakbot
52c7396a501e4fecbdfa99c5408334ac,2018-09-18 00:29:04,2019-12-03 17:24:02,Tofsee
fc54e0d16d9764783542f0146a98b300,2018-09-24 12:33:44,2021-08-11 12:51:10,AsyncRAT
f735bbc6b69723b9df7b0e7ef27872af,2018-10-02 18:04:16,2021-08-11 07:25:14,TrickBot
49ed2ef3f1321e5f044f1e71b0e6fdd5,2018-10-02 18:04:17,2021-08-08 22:08:01,TrickBot
d76ee64fb7273733cbe455ac81c292e6,2018-11-16 13:26:39,2018-11-18 19:19:36,Tofsee
8f6c918dcb585ebbea05e2cc94530e3d,2018-11-16 13:26:41,2020-05-06 15:45:21,Tofsee
34f14a69ad7009ca5863379218af17f3,2018-11-17 05:17:22,2021-01-28 08:19:18,Tofsee
c2b4710c6888a5d47befe865c8e6fb19,2018-11-29 20:46:04,2021-08-03 23:37:22,Tofsee
decfb48a53789ebe081b88aabb58ee34,2018-12-21 09:06:16,2021-06-14 05:27:16,Adwind
08a8a4e85b25ac42e1490bc85cfdb5ce,2019-01-30 02:48:34,2020-10-27 09:50:19,Tofsee
c0220cd64849a629397a9cb68f78a0ea,2019-03-24 00:12:32,2021-07-31 00:26:06,Tofsee
7a29c223fb122ec64d10f0a159e07996,2019-06-09 22:55:29,2020-10-27 09:50:26,None
70a04365be5bbd4653698bebeb43ce68,2019-07-02 06:26:56,2020-05-30 04:19:00,Tofsee
d81d654effb94714a4086734fa0adad9,2019-07-16 23:29:02,2020-10-27 09:50:21,Tofsee
25d74b7b4b779eb1efd4b31d26d651c6,2019-08-03 20:15:33,2020-07-14 21:43:25,Tofsee
fc2299d5b2964cd242c5a2c8c531a5f0,2019-08-09 23:56:32,2021-08-11 02:20:22,Tofsee
32926ca3e59f0413d0b98725454594f5,2019-09-12 06:56:10,2021-04-08 19:50:43,Tofsee
ffefafdb86336d057eda5fdf02b3d5ce,2019-10-26 07:31:49,2020-07-25 00:14:09,Tofsee
8515076cbbca9dce33151b798f782456,2020-12-27 16:53:04,2021-08-11 15:06:36,BitRAT
# END (97) entries
1 ################################################################
2 # abuse.ch Suricata JA3 Fingerprint Blacklist (CSV) #
3 # For Suricata 4.1.0 or newer #
4 # Last updated: 2020-04-09 06:48:14 UTC # # Last updated: 2021-08-03 14:33:44 UTC #
5 # #
6 # Terms Of Use: https://sslbl.abuse.ch/blacklist/ #
7 # For questions please contact sslbl [at] abuse.ch #
8 ################################################################
9 #
10 # ja3_md5,Firstseen,Lastseen,Listingreason
11 b386946a5a44d1ddcc843bc75336dfce,2017-07-14 18:08:15,2019-07-27 20:42:54,Dridex
12 8991a387e4cc841740f25d6f5139f92d,2017-07-14 19:02:03,2019-07-28 00:34:38,Adware
13 cb98a24ee4b9134448ffb5714fd870ac,2017-07-14 19:48:28,2019-05-22 03:22:38,Dridex
14 1aa7bf8b97e540ca5edd75f7b8384bfa,2017-07-14 20:23:38,2019-07-28 01:38:22,TrickBot
15 3d89c0dfb1fa44911b8fa7523ef8dedb,2017-07-15 04:23:45,2021-02-01 18:23:25,Adware
16 bc6c386f480ee97b9d9e52d472b772d8,2017-07-15 10:57:38,2021-02-21 13:13:30,Adware bc6c386f480ee97b9d9e52d472b772d8,2017-07-15 10:57:38,2021-03-13 07:33:39,Adware
17 8f52d1ce303fb4a6515836aec3cc16b1,2017-07-15 19:05:11,2019-07-27 20:00:57,TrickBot
18 d6f04b5a910115f4b50ecec09d40a1df,2017-07-15 19:42:24,2018-10-14 08:12:51,Dridex
19 35c0a31c481927f022a3b530255ac080,2017-07-15 19:43:19,2021-02-06 03:21:55,Tofsee 35c0a31c481927f022a3b530255ac080,2017-07-15 19:43:19,2021-04-10 12:54:04,Tofsee
20 d551fafc4f40f1dec2bb45980bfa9492,2017-07-15 19:59:29,2020-11-16 13:06:20,Adware e330bca99c8a5256ae126a55c4c725c5,2017-07-15 19:59:29,2021-01-13 00:29:37,Adware
21 e330bca99c8a5256ae126a55c4c725c5,2017-07-15 19:59:29,2021-01-13 00:29:37,Adware d551fafc4f40f1dec2bb45980bfa9492,2017-07-15 19:59:29,2020-11-16 13:06:20,Adware
22 b8f81673c0e1d29908346f3bab892b9b,2017-07-16 01:32:03,2018-12-17 06:08:03,Adware 83e04bc58d402f9633983cbf22724b02,2017-07-16 01:32:03,2021-03-02 04:07:43,Adware
23 83e04bc58d402f9633983cbf22724b02,2017-07-16 01:32:03,2021-01-14 14:23:42,Adware b8f81673c0e1d29908346f3bab892b9b,2017-07-16 01:32:03,2021-03-02 04:07:36,Adware
24 70722097d1fe1d78d8c2164640ab6df4,2017-07-16 02:39:08,2021-02-22 04:56:57,Tofsee 70722097d1fe1d78d8c2164640ab6df4,2017-07-16 02:39:08,2021-05-04 09:52:20,Tofsee
25 9c2589e1c0e9f533a022c6205f9719e1,2017-07-16 08:37:17,2021-02-19 08:46:32,Adware 9c2589e1c0e9f533a022c6205f9719e1,2017-07-16 08:37:17,2021-07-25 08:33:18,Adware
26 849b04bdbd1d2b983f6e8a457e0632a8,2017-07-16 08:37:17,2021-02-19 08:46:32,Adware 849b04bdbd1d2b983f6e8a457e0632a8,2017-07-16 08:37:17,2021-07-25 08:33:18,Adware
27 16efcf0e00504ddfedde13bfea997952,2017-07-16 19:45:45,2020-12-23 15:10:32,Adware
28 4d7a28d6f2263ed61de88ca66eb011e3,2017-07-16 21:20:29,2020-12-08 18:10:55,Tofsee
29 550dce18de1bb143e69d6dd9413b8355,2017-07-16 22:17:20,2018-12-21 07:04:50,Adware
30 c50f6a8b9173676b47ba6085bd0c6cee,2017-07-16 22:38:41,2019-05-21 09:42:17,TrickBot
31 20dd18bdd3209ea718989030a6f93364,2017-07-18 10:22:58,2019-04-28 09:23:31,Adware 590a232d04d56409fab72e752a8a2634,2017-07-18 18:53:24,2020-10-11 20:48:33,Tofsee
32 8498fe4268764dbf926a38283e9d3d8f,2017-07-18 10:22:58,2020-12-31 02:06:27,Adware 51a7ad14509fd614c7bb3a50c4982b8c,2017-07-19 07:28:19,2019-07-14 11:58:32,JBifrost
33 590a232d04d56409fab72e752a8a2634,2017-07-18 18:53:24,2020-10-11 20:48:33,Tofsee 96eba628dcb2b47607192ba74a3b55ba,2017-07-19 18:53:48,2021-07-31 01:48:32,Tofsee
34 51a7ad14509fd614c7bb3a50c4982b8c,2017-07-19 07:28:19,2019-07-14 11:58:32,JBifrost df5c30e670dba99f9270ed36060cf054,2017-07-20 17:44:07,2018-04-11 15:57:59,Tofsee
35 96eba628dcb2b47607192ba74a3b55ba,2017-07-19 18:53:48,2021-01-04 12:45:08,Tofsee 098f55e27d8c4b0a590102cbdb3a5f3a,2017-07-21 09:52:01,2019-04-08 01:09:54,Adware
36 df5c30e670dba99f9270ed36060cf054,2017-07-20 17:44:07,2018-04-11 15:57:59,Tofsee 29085f03f8e8a03f0b399c5c7cf0b0b8,2017-07-22 14:07:36,2021-04-11 06:42:45,Adware
37 098f55e27d8c4b0a590102cbdb3a5f3a,2017-07-21 09:52:01,2019-04-08 01:09:54,Adware 46efd49abcca8ea9baa932da68fdb529,2017-07-22 14:07:36,2021-04-11 05:54:57,Adware
38 46efd49abcca8ea9baa932da68fdb529,2017-07-22 14:07:36,2021-02-20 20:45:32,Adware d7150af4514b868defb854db0f62a441,2017-07-23 09:39:24,2018-07-24 01:04:58,Tofsee
39 29085f03f8e8a03f0b399c5c7cf0b0b8,2017-07-22 14:07:36,2021-02-21 20:56:01,Adware 03e186a7f83285e93341de478334006e,2017-07-24 18:17:14,2021-03-20 07:45:40,Tofsee
40 d7150af4514b868defb854db0f62a441,2017-07-23 09:39:24,2018-07-24 01:04:58,Tofsee 3cda52da4ade09f1f781ad2e82dcfa20,2017-07-30 18:41:36,2019-05-21 17:34:18,Quakbot
41 03e186a7f83285e93341de478334006e,2017-07-24 18:17:14,2021-02-13 23:55:58,Tofsee b13d01846ad7a14a70bf030a16775c78,2017-08-08 07:12:49,2021-04-10 00:03:33,Adware
42 3cda52da4ade09f1f781ad2e82dcfa20,2017-07-30 18:41:36,2019-05-21 17:34:18,Quakbot 1543a7c46633acf71e8401baccbd0568,2017-08-08 21:32:28,2021-04-08 19:50:46,Tofsee
43 b13d01846ad7a14a70bf030a16775c78,2017-08-08 07:12:49,2021-02-21 01:32:12,Adware 1d095e68489d3c535297cd8dffb06cb9,2017-08-12 19:56:28,2020-10-28 11:06:23,Tofsee
44 1543a7c46633acf71e8401baccbd0568,2017-08-08 21:32:28,2020-11-10 05:30:17,Tofsee 698e36219f3979420fa2581b21dac7ec,2017-08-28 12:20:47,2020-12-31 02:06:31,Adware
45 1d095e68489d3c535297cd8dffb06cb9,2017-08-12 19:56:28,2020-10-28 11:06:23,Tofsee 93d056782d649deb51cda44ecb714bb0,2017-08-28 12:20:47,2019-04-15 23:47:27,Adware
46 93d056782d649deb51cda44ecb714bb0,2017-08-28 12:20:47,2019-04-15 23:47:27,Adware 1712287800ac91b34cadd5884ce85568,2017-08-28 16:01:59,2021-07-28 14:16:00,TorrentLocker
47 698e36219f3979420fa2581b21dac7ec,2017-08-28 12:20:47,2020-12-31 02:06:31,Adware 5e573c9c9f8ba720ef9b18e9fce2e2f7,2017-08-30 13:44:56,2021-03-13 07:33:38,Adware
48 1712287800ac91b34cadd5884ce85568,2017-08-28 16:01:59,2021-01-23 09:36:32,TorrentLocker f6fd83a21f9f3c5f9ff7b5c63bbc179d,2017-10-20 08:03:21,2018-11-06 06:42:12,Adware
49 5e573c9c9f8ba720ef9b18e9fce2e2f7,2017-08-30 13:44:56,2021-02-17 17:11:34,Adware 92579701f145605e9edc0b01a901c6d5,2017-10-23 00:10:48,2021-07-25 17:07:34,Adware
50 f6fd83a21f9f3c5f9ff7b5c63bbc179d,2017-10-20 08:03:21,2018-11-06 06:42:12,Adware a61299f9b501adcf680b9275d79d4ac6,2017-11-04 18:03:59,2020-04-21 17:08:24,Tofsee
51 92579701f145605e9edc0b01a901c6d5,2017-10-23 00:10:48,2021-02-18 22:56:49,Adware b2b61db7b9490a60d270ccb20b462826,2017-11-14 20:12:03,2021-06-06 20:27:10,Adware
52 a61299f9b501adcf680b9275d79d4ac6,2017-11-04 18:03:59,2020-04-21 17:08:24,Tofsee 7dcce5b76c8b17472d024758970a406b,2017-11-22 12:42:46,2021-03-16 12:53:35,Tofsee
53 b2b61db7b9490a60d270ccb20b462826,2017-11-14 20:12:03,2021-02-18 22:56:49,Adware 534ce2dbc413c68e908363b5df0ae5e0,2017-12-22 09:36:21,2019-07-27 15:22:33,TrickBot
54 7dcce5b76c8b17472d024758970a406b,2017-11-22 12:42:46,2020-12-22 15:15:49,Tofsee fb00055a1196aeea8d1bc609885ba953,2018-01-01 22:49:25,2019-04-09 06:58:58,TrickBot
55 534ce2dbc413c68e908363b5df0ae5e0,2017-12-22 09:36:21,2019-07-27 15:22:33,TrickBot a50a861119aceb0ccc74902e8fddb618,2018-01-02 08:16:23,2018-07-05 02:33:08,Tofsee
56 fb00055a1196aeea8d1bc609885ba953,2018-01-01 22:49:25,2019-04-09 06:58:58,TrickBot e7643725fcff971e3051fe0e47fc2c71,2018-01-31 08:06:13,2020-03-25 16:19:48,Tofsee
57 a50a861119aceb0ccc74902e8fddb618,2018-01-02 08:16:23,2018-07-05 02:33:08,Tofsee 7c410ce832e848a3321432c9a82e972b,2018-01-31 20:04:25,2021-08-01 06:13:14,Tofsee
58 e7643725fcff971e3051fe0e47fc2c71,2018-01-31 08:06:13,2020-03-25 16:19:48,Tofsee da949afd9bd6df820730f8f171584a71,2018-02-03 05:19:37,2021-03-08 22:10:10,Tofsee
59 7c410ce832e848a3321432c9a82e972b,2018-01-31 20:04:25,2021-02-21 22:51:31,Tofsee 906004246f3ba5e755b043c057254a29,2018-03-11 08:25:38,2018-04-14 00:59:16,Tofsee
60 da949afd9bd6df820730f8f171584a71,2018-02-03 05:19:37,2021-02-21 05:20:43,Tofsee fd80fa9c6120cdeea8520510f3c644ac,2018-03-11 09:34:30,2021-08-11 12:34:00,Tofsee
61 906004246f3ba5e755b043c057254a29,2018-03-11 08:25:38,2018-04-14 00:59:16,Tofsee b90bdbe961a648f0427db21aaa6ccb59,2018-03-11 10:37:43,2020-05-29 23:39:01,Tofsee
62 fd80fa9c6120cdeea8520510f3c644ac,2018-03-11 09:34:30,2021-02-21 22:16:39,Tofsee 1fe4c7a3544eb27afec2adfb3a3dbf60,2018-03-11 19:23:08,2021-08-09 11:42:58,Tofsee
63 b90bdbe961a648f0427db21aaa6ccb59,2018-03-11 10:37:43,2020-05-29 23:39:01,Tofsee c201b92f8b483fa388be174d6689f534,2018-03-12 13:43:52,2021-01-28 06:17:06,Gozi
64 1fe4c7a3544eb27afec2adfb3a3dbf60,2018-03-11 19:23:08,2021-02-20 11:19:52,Tofsee 9f62c4f26b90d3d757bea609e82f2eaf,2018-03-13 06:23:41,2021-05-20 23:01:06,Tofsee
65 c201b92f8b483fa388be174d6689f534,2018-03-12 13:43:52,2021-01-28 06:17:06,Gozi 1be3ecebe5aa9d3654e6e703d81f6928,2018-03-13 11:50:02,2021-08-11 13:02:35,Ransomware.Troldesh
66 9f62c4f26b90d3d757bea609e82f2eaf,2018-03-13 06:23:41,2020-12-18 16:07:31,Tofsee e3b2ab1f9a56f2fb4c9248f2f41631fa,2018-03-15 01:06:34,2021-07-02 21:51:49,Tofsee
67 1be3ecebe5aa9d3654e6e703d81f6928,2018-03-13 11:50:02,2021-02-14 23:03:13,Ransomware.Troldesh dff8a0aa1c904aaea76c5bf624e88333,2018-03-18 09:41:15,2020-10-27 09:50:24,Tofsee
68 e3b2ab1f9a56f2fb4c9248f2f41631fa,2018-03-15 01:06:34,2021-02-22 10:36:48,Tofsee 17fd49722f8d11f3d76dce84f8e099a7,2018-03-19 23:02:27,2021-08-01 00:40:52,Tofsee
69 dff8a0aa1c904aaea76c5bf624e88333,2018-03-18 09:41:15,2020-10-27 09:50:24,Tofsee 911479ac8a0813ed1241b3686ccdade9,2018-03-19 23:24:59,2020-03-30 04:09:18,Tofsee
70 17fd49722f8d11f3d76dce84f8e099a7,2018-03-19 23:02:27,2020-12-09 11:32:21,Tofsee c5deb9465d47232dd48772f9c4d14679,2018-03-22 15:42:48,2021-03-23 00:34:25,Tofsee
71 911479ac8a0813ed1241b3686ccdade9,2018-03-19 23:24:59,2020-03-30 04:09:18,Tofsee f22bdd57e3a52de86cda40da2d84e83b,2018-03-27 13:40:19,2019-01-20 14:31:39,Tofsee
72 c5deb9465d47232dd48772f9c4d14679,2018-03-22 15:42:48,2021-02-17 07:39:32,Tofsee d18a4da84af59e1108862a39bae7c9d4,2018-04-03 00:40:51,2021-02-06 01:53:12,Tofsee
73 f22bdd57e3a52de86cda40da2d84e83b,2018-03-27 13:40:19,2019-01-20 14:31:39,Tofsee 2d8794cb7b52b777bee2695e79c15760,2018-04-04 06:56:37,2021-07-26 08:07:00,Ransomware
74 d18a4da84af59e1108862a39bae7c9d4,2018-04-03 00:40:51,2021-02-06 01:53:12,Tofsee 40adfd923eb82b89d8836ba37a19bca1,2018-04-15 15:49:08,2021-04-11 04:42:47,CoinMiner
75 2d8794cb7b52b777bee2695e79c15760,2018-04-04 06:56:37,2021-02-10 08:22:31,Ransomware 1aee0238942d453d679fc1e37a303387,2018-05-13 01:59:49,2021-07-30 12:27:07,Tofsee
76 40adfd923eb82b89d8836ba37a19bca1,2018-04-15 15:49:08,2021-02-21 22:22:56,CoinMiner 2092e1fffb45d7e4a19a57f9bc5e203a,2018-05-16 21:59:36,2018-09-05 01:58:33,Adware
77 1aee0238942d453d679fc1e37a303387,2018-05-13 01:59:49,2021-02-10 13:19:24,Tofsee bffa4501966196d3d6e90cee1f88fc89,2018-06-07 15:08:04,2020-03-16 00:03:44,Tofsee
78 2092e1fffb45d7e4a19a57f9bc5e203a,2018-05-16 21:59:36,2018-09-05 01:58:33,Adware 807fca46d9d0cf63adf4e5e80e414bbe,2018-06-07 16:51:03,2021-08-07 03:15:42,Tofsee
79 bffa4501966196d3d6e90cee1f88fc89,2018-06-07 15:08:04,2020-03-16 00:03:44,Tofsee fb58831f892190644fe44e25bc830b45,2018-06-08 12:07:59,2021-07-20 01:39:05,Adware
80 807fca46d9d0cf63adf4e5e80e414bbe,2018-06-07 16:51:03,2021-02-20 03:15:38,Tofsee 0cc1e84568e471aa1d62ad4158ade6b5,2018-06-24 10:50:47,2021-06-21 02:35:57,Tofsee
81 fb58831f892190644fe44e25bc830b45,2018-06-08 12:07:59,2019-05-31 21:02:37,Adware d2935c58fe676744fecc8614ee5356c7,2018-08-14 21:48:41,2021-08-11 11:54:42,Adwind
82 0cc1e84568e471aa1d62ad4158ade6b5,2018-06-24 10:50:47,2021-02-10 21:48:57,Tofsee 8916410db85077a5460817142dcbc8de,2018-08-21 12:32:28,2021-08-11 15:00:50,TrickBot
83 d2935c58fe676744fecc8614ee5356c7,2018-08-14 21:48:41,2021-02-21 21:44:55,Adwind c5235d3a8b9934b7fbbd204d50bc058d,2018-08-23 17:36:08,2019-10-13 05:11:09,Gootkit
84 8916410db85077a5460817142dcbc8de,2018-08-21 12:32:28,2021-02-21 20:02:19,TrickBot 57f3642b4e37e28f5cbe3020c9331b4c,2018-08-28 15:54:53,2021-08-11 13:05:18,Gozi
85 c5235d3a8b9934b7fbbd204d50bc058d,2018-08-23 17:36:08,2019-10-13 05:11:09,Gootkit e62a5f4d538cbf169c2af71bec2399b4,2018-08-30 15:45:40,2021-08-11 09:48:52,TrickBot
86 57f3642b4e37e28f5cbe3020c9331b4c,2018-08-28 15:54:53,2021-02-22 11:09:43,Gozi 51c64c77e60f3980eea90869b68c58a8,2018-08-30 21:04:57,2021-08-11 08:13:08,Dridex
87 e62a5f4d538cbf169c2af71bec2399b4,2018-08-30 15:45:40,2021-02-21 20:36:55,TrickBot 7691297bcb20a41233fd0a0baa0a3628,2018-09-17 02:50:05,2021-08-11 12:20:33,Adware
88 51c64c77e60f3980eea90869b68c58a8,2018-08-30 21:04:57,2021-02-21 22:09:16,Dridex 7dd50e112cd23734a310b90f6f44a7cd,2018-09-17 17:54:58,2021-08-01 11:28:46,Quakbot
89 7691297bcb20a41233fd0a0baa0a3628,2018-09-17 02:50:05,2021-02-21 17:05:57,Adware 52c7396a501e4fecbdfa99c5408334ac,2018-09-18 00:29:04,2019-12-03 17:24:02,Tofsee
90 7dd50e112cd23734a310b90f6f44a7cd,2018-09-17 17:54:58,2021-02-22 11:14:04,Quakbot fc54e0d16d9764783542f0146a98b300,2018-09-24 12:33:44,2021-08-11 12:51:10,AsyncRAT
91 52c7396a501e4fecbdfa99c5408334ac,2018-09-18 00:29:04,2019-12-03 17:24:02,Tofsee f735bbc6b69723b9df7b0e7ef27872af,2018-10-02 18:04:16,2021-08-11 07:25:14,TrickBot
92 f735bbc6b69723b9df7b0e7ef27872af,2018-10-02 18:04:16,2021-02-19 06:55:39,TrickBot 49ed2ef3f1321e5f044f1e71b0e6fdd5,2018-10-02 18:04:17,2021-08-08 22:08:01,TrickBot
93 49ed2ef3f1321e5f044f1e71b0e6fdd5,2018-10-02 18:04:17,2021-02-19 06:55:39,TrickBot d76ee64fb7273733cbe455ac81c292e6,2018-11-16 13:26:39,2018-11-18 19:19:36,Tofsee
94 d76ee64fb7273733cbe455ac81c292e6,2018-11-16 13:26:39,2018-11-18 19:19:36,Tofsee 8f6c918dcb585ebbea05e2cc94530e3d,2018-11-16 13:26:41,2020-05-06 15:45:21,Tofsee
95 8f6c918dcb585ebbea05e2cc94530e3d,2018-11-16 13:26:41,2020-05-06 15:45:21,Tofsee 34f14a69ad7009ca5863379218af17f3,2018-11-17 05:17:22,2021-01-28 08:19:18,Tofsee
96 34f14a69ad7009ca5863379218af17f3,2018-11-17 05:17:22,2021-01-28 08:19:18,Tofsee c2b4710c6888a5d47befe865c8e6fb19,2018-11-29 20:46:04,2021-08-03 23:37:22,Tofsee
97 c2b4710c6888a5d47befe865c8e6fb19,2018-11-29 20:46:04,2020-12-16 15:08:09,Tofsee decfb48a53789ebe081b88aabb58ee34,2018-12-21 09:06:16,2021-06-14 05:27:16,Adwind
98 decfb48a53789ebe081b88aabb58ee34,2018-12-21 09:06:16,2021-02-16 12:28:53,Adwind 08a8a4e85b25ac42e1490bc85cfdb5ce,2019-01-30 02:48:34,2020-10-27 09:50:19,Tofsee
99 08a8a4e85b25ac42e1490bc85cfdb5ce,2019-01-30 02:48:34,2020-10-27 09:50:19,Tofsee c0220cd64849a629397a9cb68f78a0ea,2019-03-24 00:12:32,2021-07-31 00:26:06,Tofsee
100 c0220cd64849a629397a9cb68f78a0ea,2019-03-24 00:12:32,2021-02-13 05:13:33,Tofsee 7a29c223fb122ec64d10f0a159e07996,2019-06-09 22:55:29,2020-10-27 09:50:26,None
101 7a29c223fb122ec64d10f0a159e07996,2019-06-09 22:55:29,2020-10-27 09:50:26,Tofsee 70a04365be5bbd4653698bebeb43ce68,2019-07-02 06:26:56,2020-05-30 04:19:00,Tofsee
102 44dab16d680ef93487bc16ad23b3ffb1,2019-06-09 22:55:29,2020-10-27 09:50:25,Tofsee d81d654effb94714a4086734fa0adad9,2019-07-16 23:29:02,2020-10-27 09:50:21,Tofsee
103 70a04365be5bbd4653698bebeb43ce68,2019-07-02 06:26:56,2020-05-30 04:19:00,Tofsee 25d74b7b4b779eb1efd4b31d26d651c6,2019-08-03 20:15:33,2020-07-14 21:43:25,Tofsee
104 d81d654effb94714a4086734fa0adad9,2019-07-16 23:29:02,2020-10-27 09:50:21,Tofsee fc2299d5b2964cd242c5a2c8c531a5f0,2019-08-09 23:56:32,2021-08-11 02:20:22,Tofsee
105 25d74b7b4b779eb1efd4b31d26d651c6,2019-08-03 20:15:33,2020-07-14 21:43:25,Tofsee 32926ca3e59f0413d0b98725454594f5,2019-09-12 06:56:10,2021-04-08 19:50:43,Tofsee
106 fc2299d5b2964cd242c5a2c8c531a5f0,2019-08-09 23:56:32,2021-02-22 08:49:18,Tofsee ffefafdb86336d057eda5fdf02b3d5ce,2019-10-26 07:31:49,2020-07-25 00:14:09,Tofsee
107 32926ca3e59f0413d0b98725454594f5,2019-09-12 06:56:10,2020-10-27 21:49:31,Tofsee 8515076cbbca9dce33151b798f782456,2020-12-27 16:53:04,2021-08-11 15:06:36,BitRAT
108 ffefafdb86336d057eda5fdf02b3d5ce,2019-10-26 07:31:49,2020-07-25 00:14:09,Tofsee # END (97) entries
# END (98) entries
+1548 -922
View File
File diff suppressed because it is too large Load Diff
+55 -18
View File
@@ -1,8 +1,25 @@
/*
*
* Copyright (C) 2011-22 - ntop.org
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nDPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef WIN32
#include <arpa/inet.h>
#include <netinet/in.h>
#else
#include <windows.h>
#endif
#include <errno.h>
#include <ndpi_api.h>
@@ -16,6 +33,10 @@
#include <string.h>
#include <unistd.h>
#ifdef WIN32
#include <windows.h>
#endif
//#define VERBOSE 1
#define MAX_FLOW_ROOTS_PER_THREAD 2048
#define MAX_IDLE_FLOWS_PER_THREAD 64
@@ -90,7 +111,7 @@ struct nDPI_flow_info {
struct nDPI_workflow {
pcap_t * pcap_handle;
uint8_t error_or_eof;
volatile long int error_or_eof;
unsigned long long int packets_captured;
unsigned long long int packets_processed;
@@ -121,8 +142,8 @@ struct nDPI_reader_thread {
static struct nDPI_reader_thread reader_threads[MAX_READER_THREADS] = {};
static int reader_thread_count = MAX_READER_THREADS;
static int main_thread_shutdown = 0;
static uint32_t flow_id = 0;
static volatile long int main_thread_shutdown = 0;
static volatile long int flow_id = 0;
static void free_workflow(struct nDPI_workflow ** const workflow);
@@ -130,7 +151,10 @@ static struct nDPI_workflow * init_workflow(char const * const file_or_device)
{
char pcap_error_buffer[PCAP_ERRBUF_SIZE];
struct nDPI_workflow * workflow = (struct nDPI_workflow *)ndpi_calloc(1, sizeof(*workflow));
const char *bpfFilter = "ip or ip6";
static struct bpf_program bpf_code;
static struct bpf_program *bpf_cfilter = NULL;
if (workflow == NULL) {
return NULL;
}
@@ -153,6 +177,17 @@ static struct nDPI_workflow * init_workflow(char const * const file_or_device)
return NULL;
}
if(pcap_compile(workflow->pcap_handle, &bpf_code, bpfFilter, 1, 0xFFFFFF00) < 0) {
printf("pcap_compile error: '%s'\n", pcap_geterr(workflow->pcap_handle));
exit(-1);
}
bpf_cfilter = &bpf_code;
if(pcap_setfilter(workflow->pcap_handle, bpf_cfilter) < 0) {
printf("pcap_setfilter error: '%s'\n", pcap_geterr(workflow->pcap_handle));
}
ndpi_init_prefs init_prefs = ndpi_no_prefs;
workflow->ndpi_struct = ndpi_init_detection_module(init_prefs);
if (workflow->ndpi_struct == NULL) {
@@ -300,7 +335,7 @@ static void print_packet_info(struct nDPI_reader_thread const * const reader_thr
char buf[256];
int used = 0, ret;
ret = snprintf(buf, sizeof(buf), "[%8llu, %d, %4u] %4u bytes: ",
ret = ndpi_snprintf(buf, sizeof(buf), "[%8llu, %d, %4u] %4u bytes: ",
workflow->packets_captured, reader_thread->array_index,
flow->flow_id, header->caplen);
if (ret > 0) {
@@ -308,9 +343,9 @@ static void print_packet_info(struct nDPI_reader_thread const * const reader_thr
}
if (ip_tuple_to_string(flow, src_addr_str, sizeof(src_addr_str), dst_addr_str, sizeof(dst_addr_str)) != 0) {
ret = snprintf(buf + used, sizeof(buf) - used, "IP[%s -> %s]", src_addr_str, dst_addr_str);
ret = ndpi_snprintf(buf + used, sizeof(buf) - used, "IP[%s -> %s]", src_addr_str, dst_addr_str);
} else {
ret = snprintf(buf + used, sizeof(buf) - used, "IP[ERROR]");
ret = ndpi_snprintf(buf + used, sizeof(buf) - used, "IP[ERROR]");
}
if (ret > 0) {
used += ret;
@@ -318,24 +353,24 @@ static void print_packet_info(struct nDPI_reader_thread const * const reader_thr
switch (flow->l4_protocol) {
case IPPROTO_UDP:
ret = snprintf(buf + used, sizeof(buf) - used, " -> UDP[%u -> %u, %u bytes]",
ret = ndpi_snprintf(buf + used, sizeof(buf) - used, " -> UDP[%u -> %u, %u bytes]",
flow->src_port, flow->dst_port, l4_data_len);
break;
case IPPROTO_TCP:
ret = snprintf(buf + used, sizeof(buf) - used, " -> TCP[%u -> %u, %u bytes]",
ret = ndpi_snprintf(buf + used, sizeof(buf) - used, " -> TCP[%u -> %u, %u bytes]",
flow->src_port, flow->dst_port, l4_data_len);
break;
case IPPROTO_ICMP:
ret = snprintf(buf + used, sizeof(buf) - used, " -> ICMP");
ret = ndpi_snprintf(buf + used, sizeof(buf) - used, " -> ICMP");
break;
case IPPROTO_ICMPV6:
ret = snprintf(buf + used, sizeof(buf) - used, " -> ICMP6");
ret = ndpi_snprintf(buf + used, sizeof(buf) - used, " -> ICMP6");
break;
case IPPROTO_HOPOPTS:
ret = snprintf(buf + used, sizeof(buf) - used, " -> ICMP6 Hop-By-Hop");
ret = ndpi_snprintf(buf + used, sizeof(buf) - used, " -> ICMP6 Hop-By-Hop");
break;
default:
ret = snprintf(buf + used, sizeof(buf) - used, " -> Unknown[0x%X]", flow->l4_protocol);
ret = ndpi_snprintf(buf + used, sizeof(buf) - used, " -> Unknown[0x%X]", flow->l4_protocol);
break;
}
if (ret > 0) {
@@ -776,8 +811,6 @@ static void ndpi_process_packet(uint8_t * const args,
return;
}
workflow->cur_active_flows++;
workflow->total_active_flows++;
memcpy(flow_to_process, &flow, sizeof(*flow_to_process));
flow_to_process->flow_id = __sync_fetch_and_add(&flow_id, 1);
@@ -796,6 +829,9 @@ static void ndpi_process_packet(uint8_t * const args,
/* Possible Leak, but should not happen as we'd abort earlier. */
return;
}
workflow->cur_active_flows++;
workflow->total_active_flows++;
} else {
flow_to_process = *(struct nDPI_flow_info **)tree_result;
}
@@ -1101,9 +1137,10 @@ static void sighandler(int signum)
int main(int argc, char ** argv)
{
if (argc == 0) {
printf("usage: ndpiSimpleIntegration Mdevice name>\n");
return 1;
}
printf("usage: %s [PCAP-FILE-OR-INTERFACE]\n"
"----------------------------------\n"
"nDPI version: %s\n"
+165 -127
View File
@@ -21,9 +21,8 @@
*
*/
#ifdef HAVE_CONFIG_H
#include "ndpi_config.h"
#endif
#include "ndpi_api.h"
#include <stdlib.h>
#include <math.h>
@@ -31,9 +30,13 @@
#ifdef WIN32
#include <winsock2.h> /* winsock.h is included automatically */
#include <windows.h>
#include <ws2tcpip.h>
#include <process.h>
#include <io.h>
#ifndef DISABLE_NPCAP
#include <ip6_misc.h>
#endif
#else
#include <unistd.h>
#include <netinet/in.h>
@@ -391,7 +394,8 @@ extern char *_debug_protocols;
static int _debug_protocols_ok = 0;
struct ndpi_workflow* ndpi_workflow_init(const struct ndpi_workflow_prefs * prefs,
pcap_t * pcap_handle) {
pcap_t * pcap_handle, int do_init_flows_root,
ndpi_serialization_format serialization_format) {
struct ndpi_detection_module_struct * module;
struct ndpi_workflow * workflow;
@@ -427,7 +431,16 @@ struct ndpi_workflow* ndpi_workflow_init(const struct ndpi_workflow_prefs * pref
if(_debug_protocols_ok)
ndpi_set_debug_bitmask(module, debug_bitmask);
workflow->ndpi_flows_root = ndpi_calloc(workflow->prefs.num_roots, sizeof(void *));
if(do_init_flows_root)
workflow->ndpi_flows_root = ndpi_calloc(workflow->prefs.num_roots, sizeof(void *));
if (serialization_format != ndpi_serialization_format_unknown &&
ndpi_init_serializer(&workflow->ndpi_serializer,
serialization_format) != 0)
{
LOG(NDPI_LOG_ERROR, "serializer initialization failed\n");
exit(-1);
}
return workflow;
}
@@ -528,6 +541,8 @@ void ndpi_flow_info_free_data(struct ndpi_flow_info *flow) {
#else
ndpi_free_bin(&flow->payload_len_bin);
#endif
if(flow->risk_str) ndpi_free(flow->risk_str);
}
/* ***************************************************** */
@@ -535,6 +550,8 @@ void ndpi_flow_info_free_data(struct ndpi_flow_info *flow) {
void ndpi_workflow_free(struct ndpi_workflow * workflow) {
u_int i;
ndpi_term_serializer(&workflow->ndpi_serializer);
for(i=0; i<workflow->prefs.num_roots; i++)
ndpi_tdestroy(workflow->ndpi_flows_root[i], ndpi_flow_info_freer);
@@ -543,6 +560,13 @@ void ndpi_workflow_free(struct ndpi_workflow * workflow) {
ndpi_free(workflow);
}
static inline int cmp_n32(uint32_t a,uint32_t b) {
return a == b ? 0 : ntohl(a) < ntohl(b) ? -1:1;
}
static inline int cmp_n16(uint16_t a,uint16_t b) {
return a == b ? 0 : ntohs(a) < ntohs(b) ? -1:1;
}
/* ***************************************************** */
int ndpi_workflow_node_cmp(const void *a, const void *b) {
@@ -556,29 +580,13 @@ int ndpi_workflow_node_cmp(const void *a, const void *b) {
if(fa->vlan_id < fb->vlan_id ) return(-1); else { if(fa->vlan_id > fb->vlan_id ) return(1); }
if(fa->protocol < fb->protocol ) return(-1); else { if(fa->protocol > fb->protocol ) return(1); }
if(
(
(fa->src_ip == fb->src_ip )
&& (fa->src_port == fb->src_port)
&& (fa->dst_ip == fb->dst_ip )
&& (fa->dst_port == fb->dst_port)
)
||
(
(fa->src_ip == fb->dst_ip )
&& (fa->src_port == fb->dst_port)
&& (fa->dst_ip == fb->src_ip )
&& (fa->dst_port == fb->src_port)
)
)
return(0);
int r;
r = cmp_n32(fa->src_ip, fb->src_ip); if(r) return r;
r = cmp_n16(fa->src_port, fb->src_port) ; if(r) return r;
r = cmp_n32(fa->dst_ip, fb->dst_ip); if(r) return r;
r = cmp_n16(fa->dst_port, fb->dst_port);
if(fa->src_ip < fb->src_ip ) return(-1); else { if(fa->src_ip > fb->src_ip ) return(1); }
if(fa->src_port < fb->src_port) return(-1); else { if(fa->src_port > fb->src_port) return(1); }
if(fa->dst_ip < fb->dst_ip ) return(-1); else { if(fa->dst_ip > fb->dst_ip ) return(1); }
if(fa->dst_port < fb->dst_port) return(-1); else { if(fa->dst_port > fb->dst_port) return(1); }
return(0); /* notreached */
return(r);
}
/* ***************************************************** */
@@ -788,11 +796,17 @@ static struct ndpi_flow_info *get_ndpi_flow_info(struct ndpi_workflow * workflow
flow.protocol = iph->protocol, flow.vlan_id = vlan_id;
flow.src_ip = iph->saddr, flow.dst_ip = iph->daddr;
flow.src_port = htons(*sport), flow.dst_port = htons(*dport);
flow.hashval = hashval = flow.protocol + flow.src_ip + flow.dst_ip + flow.src_port + flow.dst_port;
flow.hashval = hashval = flow.protocol + ntohl(flow.src_ip) + ntohl(flow.dst_ip)
+ ntohs(flow.src_port) + ntohs(flow.dst_port);
#if 0
printf("hashval=%u [%u][%u][%u:%u][%u:%u]\n", hashval, flow.protocol, flow.vlan_id,
flow.src_ip, flow.src_port, ntohs(flow.dst_ip), ntohs(flow.dst_port));
{
char ip1[48],ip2[48];
inet_ntop(AF_INET, &flow.src_ip, ip1, sizeof(ip1));
inet_ntop(AF_INET, &flow.dst_ip, ip2, sizeof(ip2));
printf("hashval=%u [%u][%u][%s:%u][%s:%u]\n", hashval, flow.protocol, flow.vlan_id,
ip1, ntohs(flow.src_port), ip2, ntohs(flow.dst_port));
}
#endif
idx = hashval % workflow->prefs.num_roots;
@@ -856,10 +870,14 @@ static struct ndpi_flow_info *get_ndpi_flow_info(struct ndpi_workflow * workflow
inet_ntop(AF_INET, &newflow->src_ip, newflow->src_name, sizeof(newflow->src_name));
inet_ntop(AF_INET, &newflow->dst_ip, newflow->dst_name, sizeof(newflow->dst_name));
} else {
inet_ntop(AF_INET6, &iph6->ip6_src, newflow->src_name, sizeof(newflow->src_name));
inet_ntop(AF_INET6, &iph6->ip6_dst, newflow->dst_name, sizeof(newflow->dst_name));
/* For consistency across platforms replace :0: with :: */
ndpi_patchIPv6Address(newflow->src_name), ndpi_patchIPv6Address(newflow->dst_name);
newflow->src_ip6 = *(struct ndpi_in6_addr *)&iph6->ip6_src;
inet_ntop(AF_INET6, &newflow->src_ip6,
newflow->src_name, sizeof(newflow->src_name));
newflow->dst_ip6 = *(struct ndpi_in6_addr *)&iph6->ip6_dst;
inet_ntop(AF_INET6, &newflow->dst_ip6,
newflow->dst_name, sizeof(newflow->dst_name));
/* For consistency across platforms replace :0: with :: */
ndpi_patchIPv6Address(newflow->src_name), ndpi_patchIPv6Address(newflow->dst_name);
}
if((newflow->ndpi_flow = ndpi_flow_malloc(SIZEOF_FLOW_STRUCT)) == NULL) {
@@ -904,24 +922,10 @@ static struct ndpi_flow_info *get_ndpi_flow_info(struct ndpi_workflow * workflow
struct ndpi_flow_info *rflow = *(struct ndpi_flow_info**)ret;
if(is_changed) {
if(rflow->src_ip == iph->saddr
&& rflow->dst_ip == iph->daddr
&& rflow->src_port == htons(*sport)
&& rflow->dst_port == htons(*dport)
)
*src_to_dst_direction = 0, rflow->bidirectional = 1;
else
*src_to_dst_direction = 1;
*src_to_dst_direction = 0, rflow->bidirectional |= 1;
}
else {
if(rflow->src_ip == iph->saddr
&& rflow->dst_ip == iph->daddr
&& rflow->src_port == htons(*sport)
&& rflow->dst_port == htons(*dport)
)
*src_to_dst_direction = 1;
else
*src_to_dst_direction = 0, rflow->bidirectional = 1;
}
if(enable_flow_stats) {
if(src_to_dst_direction) {
@@ -983,6 +987,8 @@ static struct ndpi_flow_info *get_ndpi_flow_info6(struct ndpi_workflow * workflo
u_int8_t l4proto = iph6->ip6_hdr.ip6_un1_nxt;
u_int16_t ip_len = ntohs(iph6->ip6_hdr.ip6_un1_plen);
const u_int8_t *l4ptr = (((const u_int8_t *) iph6) + sizeof(struct ndpi_ipv6hdr));
if(ipsize < sizeof(struct ndpi_ipv6hdr) + ip_len)
return(NULL);
if(ndpi_handle_ipv6_extension_headers(ipsize - sizeof(struct ndpi_ipv6hdr), &l4ptr, &ip_len, &l4proto) != 0) {
return(NULL);
}
@@ -1030,17 +1036,25 @@ u_int8_t plen2slot(u_int16_t plen) {
/* ****************************************************** */
void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_flow_info *flow, FILE * csv_fp) {
void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_flow_info *flow) {
u_int i, is_quic = 0;
char out[128], *s;
if(!flow->ndpi_flow) return;
flow->info_type = INFO_INVALID;
s = ndpi_get_flow_risk_info(flow->ndpi_flow, out, sizeof(out), 0 /* text */);
if(s != NULL)
flow->risk_str = ndpi_strdup(s);
flow->confidence = flow->ndpi_flow->confidence;
snprintf(flow->host_server_name, sizeof(flow->host_server_name), "%s",
ndpi_snprintf(flow->host_server_name, sizeof(flow->host_server_name), "%s",
flow->ndpi_flow->host_server_name);
snprintf(flow->flow_extra_info, sizeof(flow->flow_extra_info), "%s",
ndpi_snprintf(flow->flow_extra_info, sizeof(flow->flow_extra_info), "%s",
flow->ndpi_flow->flow_extra_info);
flow->risk = flow->ndpi_flow->risk;
@@ -1068,8 +1082,11 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl
/* DNS */
else if(is_ndpi_proto(flow, NDPI_PROTOCOL_DNS)) {
if(flow->ndpi_flow->protos.dns.rsp_type == 0x1)
{
flow->info_type = INFO_GENERIC;
inet_ntop(AF_INET, &flow->ndpi_flow->protos.dns.rsp_addr.ipv4, flow->info, sizeof(flow->info));
else {
} else {
flow->info_type = INFO_GENERIC;
inet_ntop(AF_INET6, &flow->ndpi_flow->protos.dns.rsp_addr.ipv6, flow->info, sizeof(flow->info));
/* For consistency across platforms replace :0: with :: */
@@ -1078,89 +1095,101 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl
}
/* MDNS */
else if(is_ndpi_proto(flow, NDPI_PROTOCOL_MDNS)) {
snprintf(flow->info, sizeof(flow->info), "%s", flow->ndpi_flow->host_server_name);
flow->info_type = INFO_GENERIC;
ndpi_snprintf(flow->info, sizeof(flow->info), "%s", flow->ndpi_flow->host_server_name);
}
/* UBNTAC2 */
else if(is_ndpi_proto(flow, NDPI_PROTOCOL_UBNTAC2)) {
snprintf(flow->info, sizeof(flow->info), "%s", flow->ndpi_flow->protos.ubntac2.version);
flow->info_type = INFO_GENERIC;
ndpi_snprintf(flow->info, sizeof(flow->info), "%s", flow->ndpi_flow->protos.ubntac2.version);
}
/* FTP */
else if((is_ndpi_proto(flow, NDPI_PROTOCOL_FTP_CONTROL))
|| /* IMAP */ is_ndpi_proto(flow, NDPI_PROTOCOL_MAIL_IMAP)
|| /* POP */ is_ndpi_proto(flow, NDPI_PROTOCOL_MAIL_POP)
|| /* SMTP */ is_ndpi_proto(flow, NDPI_PROTOCOL_MAIL_SMTP)) {
if(flow->ndpi_flow->l4.tcp.ftp_imap_pop_smtp.username[0] != '\0')
snprintf(flow->info, sizeof(flow->info), "User: %s][Pwd: %s%s",
flow->ndpi_flow->l4.tcp.ftp_imap_pop_smtp.username,
flow->ndpi_flow->l4.tcp.ftp_imap_pop_smtp.password,
flow->ndpi_flow->l4.tcp.ftp_imap_pop_smtp.auth_failed ? "][Auth Failed" : "");
flow->info_type = INFO_FTP_IMAP_POP_SMTP;
ndpi_snprintf(flow->ftp_imap_pop_smtp.username,
sizeof(flow->ftp_imap_pop_smtp.username),
"%s", flow->ndpi_flow->l4.tcp.ftp_imap_pop_smtp.username);
ndpi_snprintf(flow->ftp_imap_pop_smtp.password,
sizeof(flow->ftp_imap_pop_smtp.password),
"%s", flow->ndpi_flow->l4.tcp.ftp_imap_pop_smtp.password);
flow->ftp_imap_pop_smtp.auth_failed =
flow->ndpi_flow->l4.tcp.ftp_imap_pop_smtp.auth_failed;
}
/* TFTP */
else if(is_ndpi_proto(flow, NDPI_PROTOCOL_TFTP)) {
flow->info_type = INFO_GENERIC;
if(flow->ndpi_flow->protos.tftp.filename[0] != '\0')
ndpi_snprintf(flow->info, sizeof(flow->info), "Filename: %s",
flow->ndpi_flow->protos.tftp.filename);
}
/* KERBEROS */
else if(is_ndpi_proto(flow, NDPI_PROTOCOL_KERBEROS)) {
if((flow->ndpi_flow->protos.kerberos.hostname[0] != '\0')
|| (flow->ndpi_flow->protos.kerberos.username[0] != '\0')) {
snprintf(flow->info, sizeof(flow->info), "%s%s%s%s",
flow->ndpi_flow->protos.kerberos.domain /* = realm */,
flow->ndpi_flow->protos.kerberos.domain[0] != '\0' ? "\\" : "",
flow->ndpi_flow->protos.kerberos.hostname,
flow->ndpi_flow->protos.kerberos.username);
} else if(flow->ndpi_flow->protos.kerberos.domain[0] != '\0')
snprintf(flow->info, sizeof(flow->info), "%s",
flow->ndpi_flow->protos.kerberos.domain);
#if 0
if(flow->info[0] != '\0')
printf("->> (%d) [%s][%s][%s]<<--\n",
htons(flow->src_port),
flow->ndpi_flow->protos.kerberos.domain,
flow->ndpi_flow->protos.kerberos.hostname,
flow->ndpi_flow->protos.kerberos.username);
#endif
flow->info_type = INFO_KERBEROS;
ndpi_snprintf(flow->kerberos.domain,
sizeof(flow->kerberos.domain),
"%s", flow->ndpi_flow->protos.kerberos.domain);
ndpi_snprintf(flow->kerberos.hostname,
sizeof(flow->kerberos.hostname),
"%s", flow->ndpi_flow->protos.kerberos.hostname);
ndpi_snprintf(flow->kerberos.username,
sizeof(flow->kerberos.username),
"%s", flow->ndpi_flow->protos.kerberos.username);
}
/* HTTP */
else if((flow->detected_protocol.master_protocol == NDPI_PROTOCOL_HTTP)
|| is_ndpi_proto(flow, NDPI_PROTOCOL_HTTP)) {
if(flow->ndpi_flow->http.url != NULL) {
snprintf(flow->http.url, sizeof(flow->http.url), "%s", flow->ndpi_flow->http.url);
ndpi_snprintf(flow->http.url, sizeof(flow->http.url), "%s", flow->ndpi_flow->http.url);
flow->http.response_status_code = flow->ndpi_flow->http.response_status_code;
snprintf(flow->http.content_type, sizeof(flow->http.content_type), "%s", flow->ndpi_flow->http.content_type ? flow->ndpi_flow->http.content_type : "");
snprintf(flow->http.request_content_type, sizeof(flow->http.request_content_type), "%s", flow->ndpi_flow->http.request_content_type ? flow->ndpi_flow->http.request_content_type : "");
snprintf(flow->http.user_agent, sizeof(flow->http.user_agent), "%s", flow->ndpi_flow->http.user_agent ? flow->ndpi_flow->http.user_agent : "");
ndpi_snprintf(flow->http.content_type, sizeof(flow->http.content_type), "%s", flow->ndpi_flow->http.content_type ? flow->ndpi_flow->http.content_type : "");
ndpi_snprintf(flow->http.request_content_type, sizeof(flow->http.request_content_type), "%s", flow->ndpi_flow->http.request_content_type ? flow->ndpi_flow->http.request_content_type : "");
}
} else if(is_ndpi_proto(flow, NDPI_PROTOCOL_TELNET)) {
}
/* COLLECTD */
else if(is_ndpi_proto(flow, NDPI_PROTOCOL_COLLECTD)) {
flow->info_type = INFO_GENERIC;
if(flow->ndpi_flow->protos.collectd.client_username[0] != '\0')
ndpi_snprintf(flow->info, sizeof(flow->info), "Username: %s",
flow->ndpi_flow->protos.collectd.client_username);
}
/* TELNET */
else if(is_ndpi_proto(flow, NDPI_PROTOCOL_TELNET)) {
if(flow->ndpi_flow->protos.telnet.username[0] != '\0')
flow->telnet.username = ndpi_strdup(flow->ndpi_flow->protos.telnet.username);
if(flow->ndpi_flow->protos.telnet.password[0] != '\0')
flow->telnet.password = ndpi_strdup(flow->ndpi_flow->protos.telnet.password);
} else if(is_ndpi_proto(flow, NDPI_PROTOCOL_SSH)) {
snprintf(flow->host_server_name,
ndpi_snprintf(flow->host_server_name,
sizeof(flow->host_server_name), "%s",
flow->ndpi_flow->protos.ssh.client_signature);
snprintf(flow->ssh_tls.server_info, sizeof(flow->ssh_tls.server_info), "%s",
ndpi_snprintf(flow->ssh_tls.server_info, sizeof(flow->ssh_tls.server_info), "%s",
flow->ndpi_flow->protos.ssh.server_signature);
snprintf(flow->ssh_tls.client_hassh, sizeof(flow->ssh_tls.client_hassh), "%s",
ndpi_snprintf(flow->ssh_tls.client_hassh, sizeof(flow->ssh_tls.client_hassh), "%s",
flow->ndpi_flow->protos.ssh.hassh_client);
snprintf(flow->ssh_tls.server_hassh, sizeof(flow->ssh_tls.server_hassh), "%s",
ndpi_snprintf(flow->ssh_tls.server_hassh, sizeof(flow->ssh_tls.server_hassh), "%s",
flow->ndpi_flow->protos.ssh.hassh_server);
}
/* TLS */
else if((is_ndpi_proto(flow, NDPI_PROTOCOL_TLS))
else if(is_ndpi_proto(flow, NDPI_PROTOCOL_TLS)
|| is_ndpi_proto(flow, NDPI_PROTOCOL_DTLS)
|| is_ndpi_proto(flow, NDPI_PROTOCOL_MAIL_SMTPS)
|| is_ndpi_proto(flow, NDPI_PROTOCOL_MAIL_IMAPS)
|| is_ndpi_proto(flow, NDPI_PROTOCOL_MAIL_POPS)
|| ((is_quic = is_ndpi_proto(flow, NDPI_PROTOCOL_QUIC)))
|| (flow->detected_protocol.master_protocol == NDPI_PROTOCOL_TLS)
|| (flow->ndpi_flow->protos.tls_quic.ja3_client[0] != '\0')
) {
flow->ssh_tls.ssl_version = flow->ndpi_flow->protos.tls_quic.ssl_version;
snprintf(flow->http.user_agent, sizeof(flow->http.user_agent), "%s", flow->ndpi_flow->http.user_agent ? flow->ndpi_flow->http.user_agent : "");
if(flow->ndpi_flow->protos.tls_quic.server_names_len > 0 && flow->ndpi_flow->protos.tls_quic.server_names)
flow->ssh_tls.server_names = ndpi_strdup(flow->ndpi_flow->protos.tls_quic.server_names);
flow->ssh_tls.notBefore = flow->ndpi_flow->protos.tls_quic.notBefore;
flow->ssh_tls.notAfter = flow->ndpi_flow->protos.tls_quic.notAfter;
snprintf(flow->ssh_tls.ja3_client, sizeof(flow->ssh_tls.ja3_client), "%s",
ndpi_snprintf(flow->ssh_tls.ja3_client, sizeof(flow->ssh_tls.ja3_client), "%s",
flow->ndpi_flow->protos.tls_quic.ja3_client);
snprintf(flow->ssh_tls.ja3_server, sizeof(flow->ssh_tls.ja3_server), "%s",
ndpi_snprintf(flow->ssh_tls.ja3_server, sizeof(flow->ssh_tls.ja3_server), "%s",
flow->ndpi_flow->protos.tls_quic.ja3_server);
flow->ssh_tls.server_unsafe_cipher = flow->ndpi_flow->protos.tls_quic.server_unsafe_cipher;
flow->ssh_tls.server_cipher = flow->ndpi_flow->protos.tls_quic.server_cipher;
@@ -1199,22 +1228,18 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl
correct_csv_data_field(flow->ndpi_flow->protos.tls_quic.alpn);
correct_csv_data_field(flow->ndpi_flow->protos.tls_quic.tls_supported_versions);
if(csv_fp)
snprintf(flow->info, sizeof(flow->info), "%s",
flow->ndpi_flow->protos.tls_quic.alpn);
else
snprintf(flow->info, sizeof(flow->info), "ALPN: %s][TLS Supported Versions: %s",
flow->ndpi_flow->protos.tls_quic.alpn,
flow->ndpi_flow->protos.tls_quic.tls_supported_versions);
flow->info_type = INFO_TLS_QUIC_ALPN_VERSION;
ndpi_snprintf(flow->tls_quic.alpn, sizeof(flow->tls_quic.alpn), "%s",
flow->ndpi_flow->protos.tls_quic.alpn);
ndpi_snprintf(flow->tls_quic.tls_supported_versions,
sizeof(flow->tls_quic.tls_supported_versions),
"%s", flow->ndpi_flow->protos.tls_quic.tls_supported_versions);
} else if(flow->ndpi_flow->protos.tls_quic.alpn) {
correct_csv_data_field(flow->ndpi_flow->protos.tls_quic.alpn);
if(csv_fp)
snprintf(flow->info, sizeof(flow->info), "%s,",
flow->ndpi_flow->protos.tls_quic.alpn);
else
snprintf(flow->info, sizeof(flow->info), "ALPN: %s",
flow->ndpi_flow->protos.tls_quic.alpn);
flow->info_type = INFO_TLS_QUIC_ALPN_ONLY;
ndpi_snprintf(flow->tls_quic.alpn, sizeof(flow->tls_quic.alpn), "%s",
flow->ndpi_flow->protos.tls_quic.alpn);
}
if(enable_doh_dot_detection) {
@@ -1230,6 +1255,10 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl
}
}
ndpi_snprintf(flow->http.user_agent,
sizeof(flow->http.user_agent),
"%s", (flow->ndpi_flow->http.user_agent ? flow->ndpi_flow->http.user_agent : ""));
if(flow->detection_completed && (!flow->check_extra_packets)) {
if(is_ndpi_proto(flow, NDPI_PROTOCOL_UNKNOWN)) {
if(workflow->__flow_giveup_callback != NULL)
@@ -1313,8 +1342,7 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow,
const struct pcap_pkthdr *header,
const u_char *packet,
pkt_timeval when,
ndpi_risk *flow_risk,
FILE * csv_fp) {
ndpi_risk *flow_risk) {
struct ndpi_flow_info *flow = NULL;
struct ndpi_flow_struct *ndpi_flow = NULL;
u_int8_t proto;
@@ -1413,6 +1441,7 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow,
}
ndpi_data_add_value(flow->pktlen_s_to_c, rawsize);
flow->dst2src_packets++, flow->dst2src_bytes += rawsize, flow->dst2src_goodput_bytes += payload_len;
flow->risk &= ~(1ULL << NDPI_UNIDIRECTIONAL_TRAFFIC); /* Clear bit */
memcpy(&flow->dst2src_last_pkt_time, &when, sizeof(when));
#ifdef DIRECTION_BINS
@@ -1554,11 +1583,11 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow,
if(enable_protocol_guess) workflow->stats.guessed_flow_protocols++;
}
process_ndpi_collected_info(workflow, flow, csv_fp);
process_ndpi_collected_info(workflow, flow);
}
}
}
#if 0
if(flow->risk != 0) {
FILE *r = fopen("/tmp/e", "a");
@@ -1594,6 +1623,7 @@ int ndpi_is_datalink_supported(int datalink_type) {
case DLT_LINUX_SLL:
case DLT_IEEE802_11_RADIO:
case DLT_RAW:
case DLT_PPI:
return 1;
default:
return 0;
@@ -1605,8 +1635,7 @@ int ndpi_is_datalink_supported(int datalink_type) {
struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow,
const struct pcap_pkthdr *header,
const u_char *packet,
ndpi_risk *flow_risk,
FILE * csv_fp) {
ndpi_risk *flow_risk) {
/*
* Declare pointers to packet headers
*/
@@ -1638,8 +1667,8 @@ struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow,
ndpi_packet_tunnel tunnel_type = ndpi_no_tunnel;
/* lengths and offsets */
u_int32_t eth_offset = 0;
u_int16_t radio_len;
u_int32_t eth_offset = 0, dlt;
u_int16_t radio_len, header_length;
u_int16_t fc;
u_int16_t type = 0;
int wifi_len = 0;
@@ -1718,14 +1747,14 @@ struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow,
#ifdef DLT_IPV4
case DLT_IPV4:
type = ETH_P_IP;
ip_offset = 0;
ip_offset = eth_offset;
break;
#endif
#ifdef DLT_IPV6
case DLT_IPV6:
type = ETH_P_IPV6;
ip_offset = 0;
ip_offset = eth_offset;
break;
#endif
@@ -1784,7 +1813,7 @@ struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow,
(FCF_TO_DS(fc) == 0x0 && FCF_FROM_DS(fc)))
wifi_len = 26; /* + 4 byte fcs */
} else /* no data frames */
break;
return(nproto);
/* Check ether_type from LLC */
if(header->caplen < (eth_offset + wifi_len + radio_len + sizeof(struct ndpi_llc_header_snap)))
@@ -1798,9 +1827,18 @@ struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow,
break;
case DLT_RAW:
ip_offset = eth_offset = 0;
ip_offset = eth_offset;
break;
case DLT_PPI:
header_length = le16toh(*(u_int16_t *)&packet[eth_offset + 2]);
dlt = le32toh(*(u_int32_t *)&packet[eth_offset + 4]);
if(dlt != DLT_EN10MB) /* Handle only standard ethernet, for the time being */
return(nproto);
datalink_type = DLT_EN10MB;
eth_offset += header_length;
goto datalink_check;
default:
/*
* We shoudn't be here, because we already checked that this datalink is supported.
@@ -1834,6 +1872,8 @@ struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow,
case ETH_P_MPLS_UNI:
case ETH_P_MPLS_MULTI:
if(ip_offset+4 >= (int)header->caplen)
return(nproto);
mpls.u32 = *((uint32_t *) &packet[ip_offset]);
mpls.u32 = ntohl(mpls.u32);
workflow->stats.mpls_count++;
@@ -1892,9 +1932,7 @@ struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow,
iph6 = NULL;
if(iph->protocol == IPPROTO_IPV6
#ifdef IPPROTO_IPIP
|| iph->protocol == IPPROTO_IPIP
#endif
|| iph->protocol == NDPI_IPIP_PROTOCOL_TYPE
) {
ip_offset += ip_len;
if(ip_len > 0)
@@ -1933,9 +1971,7 @@ struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow,
}
if(proto == IPPROTO_IPV6
#ifdef IPPROTO_IPIP
|| proto == IPPROTO_IPIP
#endif
|| proto == NDPI_IPIP_PROTOCOL_TYPE
) {
if(l4ptr > packet) { /* Better safe than sorry */
ip_offset = (l4ptr - packet);
@@ -2044,6 +2080,8 @@ struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow,
tag_len = 1, stop = 1;
break;
default:
if(offset + 1 >= header->caplen)
return(nproto); /* Invalid packet */
tag_len = packet[offset+1];
break;
}
@@ -2091,7 +2129,7 @@ struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow,
return(packet_processing(workflow, time_ms, vlan_id, tunnel_type, iph, iph6,
ip_offset, header->caplen - ip_offset,
header->caplen, header, packet, header->ts,
flow_risk, csv_fp));
flow_risk));
}
/* ********************************************************** */
+38 -5
View File
@@ -90,6 +90,7 @@ extern int dpdk_port_deinit(int port);
#define MAX_TABLE_SIZE_1 4096
#define MAX_TABLE_SIZE_2 8192
#define INIT_VAL -1
#define SERIALIZATION_BUFSIZ (8192 * 2)
// inner hash table (ja3 -> security state)
@@ -157,12 +158,23 @@ struct ndpi_entropy {
float score;
};
enum info_type {
INFO_INVALID = 0,
INFO_GENERIC,
INFO_KERBEROS,
INFO_FTP_IMAP_POP_SMTP,
INFO_TLS_QUIC_ALPN_VERSION,
INFO_TLS_QUIC_ALPN_ONLY,
};
// flow tracking
typedef struct ndpi_flow_info {
u_int32_t flow_id;
u_int32_t hashval;
u_int32_t src_ip; /* network order */
u_int32_t dst_ip; /* network order */
struct ndpi_in6_addr src_ip6; /* network order */
struct ndpi_in6_addr dst_ip6; /* network order */
u_int16_t src_port; /* network order */
u_int16_t dst_port; /* network order */
u_int8_t detection_completed, protocol, bidirectional, check_extra_packets;
@@ -186,6 +198,7 @@ typedef struct ndpi_flow_info {
u_int32_t src2dst_packets, dst2src_packets;
u_int32_t has_human_readeable_strings;
char human_readeable_string_buffer[32];
char *risk_str;
// result only, not used for flow identification
ndpi_protocol detected_protocol;
@@ -196,7 +209,25 @@ typedef struct ndpi_flow_info {
struct ndpi_analyze_struct *iat_c_to_s, *iat_s_to_c, *iat_flow,
*pktlen_c_to_s, *pktlen_s_to_c;
char info[255];
enum info_type info_type;
union {
char info[256];
struct {
char alpn[128];
char tls_supported_versions[128];
} tls_quic;
struct {
unsigned char auth_failed;
char username[127];
char password[128];
} ftp_imap_pop_smtp;
struct {
char domain[85];
char hostname[85];
char username[86];
} kerberos;
};
char flow_extra_info[16];
char host_server_name[80]; /* Hostname/SNI */
char *bittorent_hash;
@@ -302,11 +333,14 @@ typedef struct ndpi_workflow {
void **ndpi_flows_root;
struct ndpi_detection_module_struct *ndpi_struct;
u_int32_t num_allocated_flows;
/* CSV,TLV,JSON serialization interface */
ndpi_serializer ndpi_serializer;
} ndpi_workflow_t;
/* TODO: remove wrappers parameters and use ndpi global, when their initialization will be fixed... */
struct ndpi_workflow * ndpi_workflow_init(const struct ndpi_workflow_prefs * prefs, pcap_t * pcap_handle);
struct ndpi_workflow * ndpi_workflow_init(const struct ndpi_workflow_prefs * prefs, pcap_t * pcap_handle, int do_init_flows_root, ndpi_serialization_format serialization_format);
/* workflow main free function */
@@ -324,8 +358,7 @@ void ndpi_free_flow_info_half(struct ndpi_flow_info *flow);
struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow,
const struct pcap_pkthdr *header,
const u_char *packet,
ndpi_risk *flow_risk,
FILE * csv_fp);
ndpi_risk *flow_risk);
int ndpi_is_datalink_supported(int datalink_type);
@@ -345,7 +378,7 @@ static inline void ndpi_workflow_set_flow_giveup_callback(struct ndpi_workflow *
/* compare two nodes in workflow */
int ndpi_workflow_node_cmp(const void *a, const void *b);
void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_flow_info *flow, FILE * csv_fp);
void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_flow_info *flow);
u_int32_t ethernet_crc32(const void* data, size_t n_bytes);
void ndpi_flow_info_free_data(struct ndpi_flow_info *flow);
void ndpi_flow_info_freer(void *node);
File diff suppressed because it is too large Load Diff
+35 -23
View File
@@ -8,6 +8,7 @@
#include <stdio.h>
struct ndpi_workflow_prefs *prefs = NULL;
struct ndpi_workflow *workflow = NULL;
int nDPI_LogLevel = 0;
char *_debug_protocols = NULL;
@@ -46,6 +47,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
char errbuf[PCAP_ERRBUF_SIZE];
NDPI_PROTOCOL_BITMASK all;
char * pcap_path = tempnam("/tmp", "fuzz-ndpi-reader");
u_int i;
if (prefs == NULL) {
prefs = calloc(sizeof(struct ndpi_workflow_prefs), 1);
@@ -55,15 +57,29 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
}
prefs->decode_tunnels = 1;
prefs->num_roots = 16;
prefs->max_ndpi_flows = 1024;
prefs->max_ndpi_flows = 16 * 1024 * 1024;
prefs->quiet_mode = 0;
workflow = ndpi_workflow_init(prefs, NULL /* pcap handler will be set later */, 0, ndpi_serialization_format_json);
// enable all protocols
NDPI_BITMASK_SET_ALL(all);
ndpi_set_protocol_detection_bitmask2(workflow->ndpi_struct, &all);
memset(workflow->stats.protocol_counter, 0,
sizeof(workflow->stats.protocol_counter));
memset(workflow->stats.protocol_counter_bytes, 0,
sizeof(workflow->stats.protocol_counter_bytes));
memset(workflow->stats.protocol_flows, 0,
sizeof(workflow->stats.protocol_flows));
ndpi_finalize_initialization(workflow->ndpi_struct);
}
bufferToFile(pcap_path, Data, Size);
pkts = pcap_open_offline(pcap_path, errbuf);
if (pkts == NULL) {
remove(pcap_path);
free(pcap_path);
ndpi_term_serializer(&workflow->ndpi_serializer);
return 0;
}
if (ndpi_is_datalink_supported(pcap_datalink(pkts)) == 0)
@@ -72,41 +88,37 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
pcap_close(pkts);
remove(pcap_path);
free(pcap_path);
ndpi_term_serializer(&workflow->ndpi_serializer);
return 0;
}
struct ndpi_workflow * workflow = ndpi_workflow_init(prefs, pkts);
// enable all protocols
NDPI_BITMASK_SET_ALL(all);
ndpi_set_protocol_detection_bitmask2(workflow->ndpi_struct, &all);
memset(workflow->stats.protocol_counter, 0,
sizeof(workflow->stats.protocol_counter));
memset(workflow->stats.protocol_counter_bytes, 0,
sizeof(workflow->stats.protocol_counter_bytes));
memset(workflow->stats.protocol_flows, 0,
sizeof(workflow->stats.protocol_flows));
ndpi_finalize_initialization(workflow->ndpi_struct);
workflow->pcap_handle = pkts;
/* Init flow tree */
workflow->ndpi_flows_root = ndpi_calloc(workflow->prefs.num_roots, sizeof(void *));
header = NULL;
r = pcap_next_ex(pkts, &header, &pkt);
while (r > 0) {
if(header->caplen >= 42 /* ARP+ size */) {
/* allocate an exact size buffer to check overflows */
uint8_t *packet_checked = malloc(header->caplen);
/* allocate an exact size buffer to check overflows */
uint8_t *packet_checked = malloc(header->caplen);
if(packet_checked) {
ndpi_risk flow_risk;
memcpy(packet_checked, pkt, header->caplen);
ndpi_workflow_process_packet(workflow, header, packet_checked, &flow_risk, NULL);
free(packet_checked);
}
if(packet_checked) {
ndpi_risk flow_risk;
memcpy(packet_checked, pkt, header->caplen);
ndpi_workflow_process_packet(workflow, header, packet_checked, &flow_risk);
free(packet_checked);
}
r = pcap_next_ex(pkts, &header, &pkt);
}
ndpi_workflow_free(workflow);
pcap_close(pkts);
/* Free flow trees */
for(i = 0; i < workflow->prefs.num_roots; i++)
ndpi_tdestroy(workflow->ndpi_flows_root[i], ndpi_flow_info_freer);
ndpi_free(workflow->ndpi_flows_root);
remove(pcap_path);
free(pcap_path);
+19 -2
View File
@@ -4,6 +4,8 @@
#include <stdio.h>
struct ndpi_detection_module_struct *ndpi_info_mod = NULL;
static ndpi_serializer json_serializer = {};
static ndpi_serializer csv_serializer = {};
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
uint8_t protocol_was_guessed;
@@ -17,12 +19,27 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
ndpi_set_log_level(ndpi_info_mod, 4);
ndpi_set_debug_bitmask(ndpi_info_mod, debug_bitmask);
ndpi_finalize_initialization(ndpi_info_mod);
ndpi_init_serializer(&json_serializer, ndpi_serialization_format_json);
ndpi_init_serializer(&csv_serializer, ndpi_serialization_format_csv);
}
struct ndpi_flow_struct *ndpi_flow = ndpi_flow_malloc(SIZEOF_FLOW_STRUCT);
memset(ndpi_flow, 0, SIZEOF_FLOW_STRUCT);
ndpi_detection_process_packet(ndpi_info_mod, ndpi_flow, Data, Size, 0);
ndpi_detection_giveup(ndpi_info_mod, ndpi_flow, 1, &protocol_was_guessed);
ndpi_protocol detected_protocol =
ndpi_detection_process_packet(ndpi_info_mod, ndpi_flow, Data, Size, 0);
ndpi_protocol guessed_protocol =
ndpi_detection_giveup(ndpi_info_mod, ndpi_flow, 1, &protocol_was_guessed);
ndpi_reset_serializer(&json_serializer);
ndpi_reset_serializer(&csv_serializer);
if (protocol_was_guessed == 0)
{
ndpi_dpi2json(ndpi_info_mod, ndpi_flow, detected_protocol, &json_serializer);
ndpi_dpi2json(ndpi_info_mod, ndpi_flow, detected_protocol, &csv_serializer);
} else {
ndpi_dpi2json(ndpi_info_mod, ndpi_flow, guessed_protocol, &json_serializer);
ndpi_dpi2json(ndpi_info_mod, ndpi_flow, guessed_protocol, &csv_serializer);
}
ndpi_free_flow(ndpi_flow);
return 0;
+28
View File
@@ -0,0 +1,28 @@
CC=@CC@
INC=-I ../src/include -I/usr/local/include
LIBDPI=../src/lib/libndpi.a
LDFLAGS=@LDFLAGS@
LIB=$(LIBDPI) -lm @ADDITIONAL_LIBS@ @LIBS@
TOOLS=metric_anomaly
all: $(TOOLS)
metric_anomaly: metric_anomaly.c Makefile $(LIBDPI)
$(CC) $(CPPFLAGS) -g $(INC) $(LDFLAGS) metric_anomaly.c -o metric_anomaly $(LIB)
clean:
/bin/rm -f *.o $(TOOLS) *~
distclean: clean
/bin/rm -f Makefile
distdir:
find . -type f -name '*.c' \
-o -name '*.txt' | xargs -I'{}' cp '{}' '$(distdir)/{}'
install:
@echo -n ""
check:
true # nothing to do here
+4
View File
@@ -0,0 +1,4 @@
This directory contains a tool that allows anomalies to be identified with InfluxDB
+166
View File
@@ -0,0 +1,166 @@
/*
* metric_anomaly.c
*
* Copyright (C) 2011-22 - ntop.org
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nDPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <getopt.h>
#include "ndpi_api.h"
#define DEFAULT_ALPHA 0.5
#define DEFAULT_RO 0.05
/* *************************************************** */
static void help() {
printf("Usage: metric_anomaly [-Q][-v][-z][-a <alpha>][-q] -d <database> -q <query>\n"
"-a | Set alpha. Valid range >0 .. <1. Default %.2f\n"
"-Q | Quick output (only anomalies are reported)\n"
"-d <database> | InfluxDB database name\n"
"-q <query> | InfluxQL query\n"
"-v | Verbose\n"
"-z | Bottom metric value set to zero\n"
,
DEFAULT_ALPHA);
printf("\n\nExample: metric_anomaly -d ntopng -q \"%s\"\n",
"SELECT mean(\"cpu0\") FROM \"cpu_load\" WHERE time > 1648634807000000000 GROUP BY time(60s) fill(previous)");
exit(0);
}
/* *************************************************** */
int main(int argc, char *argv[]) {
char *database = NULL, *query = NULL, cmd[512], buf[256];
u_int i, j, first = 1, quick_mode = 0, verbose = 0;
struct ndpi_ses_struct ses;
float alpha, ro;
char c;
FILE *fd;
bool go_below_zero = true;
/* Defaults */
alpha = DEFAULT_ALPHA;
ro = DEFAULT_RO;
while((c = getopt(argc, argv, "a:Qd:q:vz")) != '?') {
if(c == -1) break;
switch(c) {
case 'a':
{
float f = atof(optarg);
if((f > 0) && (f < 1))
alpha = f;
else
printf("Discarding -a: valid range is >0 .. <1\n");
}
break;
case 'Q':
quick_mode = 1;
break;
case 'd':
database = optarg;
break;
case 'q':
query = optarg;
break;
case 'v':
verbose = 1;
break;
case 'z':
go_below_zero = false;
break;
default:
help();
break;
}
}
if((database == NULL) || (query == NULL))
help();
ndpi_snprintf(cmd, sizeof(cmd), "influx -database '%s' -precision s -execute '%s'", database, query);
if(verbose) printf("%s\n", cmd);
if ((fd = popen(cmd, "r")) == NULL) {
printf("Unable to execute '%s'\n", cmd);
return(-1);
}
ndpi_ses_init(&ses, alpha, ro);
while(fgets(buf, sizeof(buf), fd) != NULL) {
u_int32_t epoch;
float value;
double prediction, confidence_band;
double lower, upper;
int rc;
bool is_anomaly;
if(sscanf(buf, "%u %f", &epoch, &value) != 2)
continue;
// printf("->>> '%s'", buf);
value *= 100; /* trick to avoid dealing with floats */
rc = ndpi_ses_add_value(&ses, value, &prediction, &confidence_band);
lower = prediction - confidence_band, upper = prediction + confidence_band;
if(!go_below_zero) lower = ndpi_max(lower, 0), upper = ndpi_max(upper, 0);
is_anomaly = ((rc == 0) || (confidence_band == 0) || ((value >= lower) && (value <= upper))) ? false : true;
if(verbose || is_anomaly) {
const time_t _t = epoch;
struct tm *t_info = localtime((const time_t*)&_t);
strftime(buf, sizeof(buf), "%d/%b/%Y %H:%M:%S", t_info);
if(quick_mode) {
if(is_anomaly) {
printf("%u [%s]\n", epoch, buf);
}
} else {
if(first) {
first = 0;
printf("%s %s\t%s %s %s\t %s [%s]\n",
"When", "Value", "Prediction", "Lower", "Upper", "Out", "Band");
}
printf("%s %12.3f\t%.3f\t%12.3f\t%12.3f\t %s [%.3f][rc: %d]\n",
buf, value/100., prediction/100., lower/100., upper/100., is_anomaly? "ANOMALY" : "OK",
confidence_band/100., rc);
}
}
}
(void)pclose(fd);
return(0);
}
+5 -4
View File
@@ -28,8 +28,8 @@ PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk
ifeq ($(CONFIG_LIBNDPI_GCRYPT),)
CONFIGURE_ARGS += --disable-gcrypt
ifneq ($(CONFIG_LIBNDPI_GCRYPT),)
CONFIGURE_ARGS += --with-local-libgcrypt
endif
define Package/libndpi
@@ -47,11 +47,12 @@ endef
define Package/libndpi/config
config LIBNDPI_GCRYPT
bool "GCrypt support"
bool "Use external libgcrypt"
depends on PACKAGE_libndpi
default n
help
This option enables QUIC client hello decryption.
This option enables QUIC client hello decryption through
an external libgcrypt instead of a lightweight builtin version.
Disabled by default.
endef
+5 -4
View File
@@ -27,8 +27,8 @@ PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk
ifeq ($(CONFIG_LIBNDPI_GCRYPT),)
CONFIGURE_ARGS += --disable-gcrypt
ifneq ($(CONFIG_LIBNDPI_GCRYPT),)
CONFIGURE_ARGS += --with-local-libgcrypt
endif
define Package/libndpi
@@ -46,11 +46,12 @@ endef
define Package/libndpi/config
config LIBNDPI_GCRYPT
bool "GCrypt support"
bool "Use external libgcrypt"
depends on PACKAGE_libndpi
default n
help
This option enables QUIC client hello decryption.
This option enables QUIC client hello decryption through
an external libgcrypt instead of a lightweight builtin version.
Disabled by default.
endef
+1
View File
@@ -51,6 +51,7 @@ PATH=/usr/bin:/bin:/usr/sbin:/sbin
%{?el6:%define libdir /usr/lib}
%{?el7:%define libdir /usr/lib}
%{?el8:%define libdir /usr/lib64}
%{?el9:%define libdir /usr/lib64}
%define bindir /usr/bin
%install
+2 -2
View File
@@ -1,8 +1,8 @@
#!/bin/bash
SCRIPTPATH="$(cd "$(dirname "$0")"; pwd -P)"
RELEASE="$(cd ${SCRIPTPATH}; cat ../configure.ac|grep C_INIT|cut -c 21-|rev|cut -c 3-|rev)"
MAJOR_RELEASE="$(cd ${SCRIPTPATH}; cat ../configure.ac|grep C_INIT|cut -c 21-|rev|cut -c 3-|rev|cut -d. -f1)"
RELEASE="$(cd ${SCRIPTPATH}; cat ../configure.ac|grep C_INIT|cut -c 20-|rev|cut -c 3-|rev)"
MAJOR_RELEASE="$(cd ${SCRIPTPATH}; cat ../configure.ac|grep C_INIT|cut -c 20-|rev|cut -c 3-|rev|cut -d. -f1)"
REVISION="$(cd ${SCRIPTPATH}; git rev-list --all |wc -l | tr -d '[[:space:]]')"
get_release() {
+34
View File
@@ -0,0 +1,34 @@
# Python Bindings Development Guide
The aim of this document is to guide when extending these bindings with additional nDPI API.
In the following we suppose that we want to add the following API to ndpi python package.
``` c
int ndpi_des_init(struct ndpi_des_struct *des, double alpha, double beta, float significance);
```
## Add it to NDPI_APIS Python definition
[**NDPI_APIS**][py_ndpi_api] must be updated with the this new API your want to add.
## Regenerate bindings
``` bash
python3 setup.py install
```
## That's it!
Now this API can be called and used on python side
``` python
from ndpi import lib, ffi
des = ffi.new("struct ndpi_des_struct *")
alpha = 0.9
beta = 0.5
lib.ndpi_des_init(des, alpha, beta, 0.05)
```
[py_ndpi_api]: https://github.com/ntop/nDPI/blob/c47d710d8e5281fff2f1f90ff5462c16ac91d50c/python/ndpi/ndpi_build.py#L49
-27
View File
@@ -1,27 +0,0 @@
CC=@CC@
CFLAGS=-I. -I../src/include -I./src/lib/third_party/include @CFLAGS@ @CUSTOM_NDPI@ -shared
#LIBNDPI=../src/lib/libndpi.so.@NDPI_VERSION_SHORT@
LIBNDPI=../src/lib/libndpi.a
LDFLAGS=@LDFLAGS@
LIBS=$(CFILE) $(LIBNDPI) -lpcap @LIBS@ @ADDITIONAL_LIBS@
SHARE = -soname,ndpi_wrap
SO=ndpi_wrap.so
OBJS = ndpi_wrap.o
CFILE = ndpi_wrap.c
PIC = -fPIC
PREFIX?=/usr/local
.PHONY: all
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)#do something for linux
SHARE=-install_name,ndpiReader.so
endif
all: $(SO)
$(SO): $(CFILE) $(LIBNDPI) Makefile
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(PIC) -Wl,$(SHARE) -o $@ $(LIBS)
# ln -s $(LIBNDPI) .
clean:
/bin/rm -f $(SO)
+81
View File
@@ -0,0 +1,81 @@
# ndpi
This package contains Python bindings for nDPI. nDPI is an Open and Extensible LGPLv3 Deep Packet Inspection Library.
**ndpi** is implemented using [**CFFI**][cffi] (out-of-line API mode). Consequently, it is fast and [**PyPy**][pypy]
compliant.
## Installation
### Build nDPI
``` bash
git clone --branch dev https://github.com/ntop/nDPI.git
cd nDPI
./autogen.sh
./configure
make
sudo make install
```
### Install ndpi package
``` bash
cd python
python3 -m pip install --upgrade pip
python3 -m install -r dev_requirements.txt
python3 -m pip install .
```
## Usage
### API
``` python
from ndpi import NDPI, NDPIFlow
nDPI = NDPI()
# You per flow processing here
# ...
ndpi_flow = NDPIFlow()
nDPI.process_packet(ndpi_flow, ip_bytes, time_ms)
nDPI.giveup(ndpi_flow) # If you want to guess it instead (DPI fallback)
```
### Example Application
[ndpi_example.py][ndpi_example] is provided to demonstrate how **ndpi** can be integrated within your Python application.
``` bash
Using nDPI 4.3.0-3532-8dd70b70
usage: ndpi_example.py [-h] [-u] input
positional arguments:
input input pcap file path
optional arguments:
-h, --help show this help message and exit
-u, --include-unknowns
```
Example with a Skype capture file
``` bash
python3 ndpi_example.py -u ../tests/pcap/skype.pcap
```
## Related projects
The provided example is for demo purposes only, For additional features (live capture, multiplatform support,
multiprocessing, ML based classification, system visibility, etc.), please check nDPI based
framework, [**NFStream**][nfstream].
## License
This project is licensed under the LGPLv3 License - see the [**License**][license] file for details.
[license]: https://github.com/ntop/nDPI/blob/dev/COPYING
[cffi]: https://cffi.readthedocs.io/en/latest/
[pypy]: https://www.pypy.org/
[nfstream]: https://github.com/nfstream/nfstream
[ndpi_example]: https://github.com/ntop/nDPI/blob/dev/python/ndpi_example.py
-43
View File
@@ -1,43 +0,0 @@
nDPI Python bindings
--------------------
This directory contains the Python3 bindings for nDPI. We provide both cffi and ctypes based bindings.
**cffi bindings**
Files:
* ndpi.py
Example (using `nfstream <https://github.com/aouinizied/nfstream>`_ package):
.. code-block:: bash
pip3 install nfstream
python3 flow_printer.py <interface>
python3 flow_printer.py <pcap_file>
Code courtesy:
* Zied Aouini
**ctypes bindings**
Files:
* ndpi_typestruct.py
* ndpi_wrap.c
* Makefile.in
Example:
.. code-block:: bash
pip3 install scapy
python3 ndpi_example.py <interface>
python3 ndpi_example.py <pcap_file>
Code courtesy:
* Massimo Puddu
* Zied Aouini
+2
View File
@@ -0,0 +1,2 @@
cffi>=1.15.0
dpkt>=1.9.7.2
-38
View File
@@ -1,38 +0,0 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
------------------------------------------------------------------------------------------------------------------------
flow_printer.py
Copyright (C) 2019-20 - NFStream Developers
This file is part of NFStream, a Flexible Network Data Analysis Framework (https://www.nfstream.org/).
NFStream is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
version.
NFStream is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with NFStream.
If not, see <http://www.gnu.org/licenses/>.
------------------------------------------------------------------------------------------------------------------------
"""
from nfstream import NFStreamer
import sys
# Example must run with nfstream >= 6.1.1
path = sys.argv[1]
flow_streamer = NFStreamer(source=path, statistical_analysis=False, performance_report=1)
result = {}
try:
for flow in flow_streamer:
print(flow)
try:
result[flow.application_name] += flow.bidirectional_packets
except KeyError:
result[flow.application_name] = flow.bidirectional_packets
print("\nSummary (Application Name: Packets):")
print(result)
except KeyboardInterrupt:
print("\nSummary (Application Name: Packets):")
print(result)
print("Terminated.")
-1363
View File
File diff suppressed because it is too large Load Diff
+21
View File
@@ -0,0 +1,21 @@
"""
------------------------------------------------------------------------------------------------------------------------
__init__.py
Copyright (C) 2011-22 - ntop.org
This file is part of nDPI, an open source deep packet inspection library.
nDPI is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
version.
nDPI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with NFStream.
If not, see <http://www.gnu.org/licenses/>.
------------------------------------------------------------------------------------------------------------------------
"""
from .ndpi import *
__author__ = """Zied Aouini"""
__email__ = 'aouinizied@gmail.com'
__version__ = '4.3.0'
+101
View File
@@ -0,0 +1,101 @@
"""
------------------------------------------------------------------------------------------------------------------------
ndpi.py
Copyright (C) 2011-22 - ntop.org
This file is part of nDPI, an open source deep packet inspection library.
nDPI is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
version.
nDPI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with NFStream.
If not, see <http://www.gnu.org/licenses/>.
------------------------------------------------------------------------------------------------------------------------
"""
from collections import namedtuple
from _ndpi import ffi, lib
ndpi_protocol = namedtuple('NDPIProtocol', ['C',
'master_protocol',
'app_protocol',
'category'])
ndpi_confidence = namedtuple('NDPIConfidence', ['id',
'name'])
class NDPI(object):
__slots__ = ("_api_version",
"_revision",
"_detection_module")
def __init__(self):
self._detection_module = lib.ndpi_init_detection_module(0)
if self._detection_module == ffi.NULL:
raise MemoryError("Unable to instantiate NDPI object")
lib.ndpi_py_setup_detection_module(self._detection_module)
@property
def api_version(self):
return lib.ndpi_get_api_version()
@property
def revision(self):
return ffi.string(lib.ndpi_revision()).decode('utf-8', errors='ignore')
def process_packet(self, flow, packet, packet_time_ms):
p = lib.ndpi_detection_process_packet(self._detection_module,
flow.C,
packet,
len(packet),
int(packet_time_ms))
return ndpi_protocol(C=p,
master_protocol=p.master_protocol,
app_protocol=p.app_protocol,
category=p.category)
def giveup(self, flow, enable_guess=True):
p = lib.ndpi_detection_giveup(self._detection_module,
flow.C,
enable_guess,
ffi.new("uint8_t*", 0))
return ndpi_protocol(C=p,
master_protocol=p.master_protocol,
app_protocol=p.app_protocol,
category=p.category)
def protocol_name(self, protocol):
buf = ffi.new("char[40]")
lib.ndpi_protocol2name(self._detection_module, protocol.C, buf, ffi.sizeof(buf))
return ffi.string(buf).decode('utf-8', errors='ignore')
def protocol_category_name(self, protocol):
return ffi.string(lib.ndpi_category_get_name(self._detection_module,
protocol.C.category)).decode('utf-8',
errors='ignore')
def __del__(self):
if self._detection_module != ffi.NULL:
lib.ndpi_exit_detection_module(self._detection_module)
class NDPIFlow(object):
__slots__ = "C"
@property
def confidence(self):
confidence = self.C.confidence
return ndpi_confidence(id=confidence,
name=ffi.string(lib.ndpi_confidence_get_name(confidence)).decode('utf-8',
errors='ignore'))
def __init__(self):
self.C = lib.ndpi_py_initialize_flow()
def __del__(self):
if self.C != ffi.NULL:
lib.ndpi_flow_free(self.C)
self.C = ffi.NULL
+137
View File
@@ -0,0 +1,137 @@
"""
------------------------------------------------------------------------------------------------------------------------
ndpi_build.py
Copyright (C) 2011-22 - ntop.org
This file is part of nDPI, an open source deep packet inspection library.
nDPI is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
version.
nDPI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with NFStream.
If not, see <http://www.gnu.org/licenses/>.
------------------------------------------------------------------------------------------------------------------------
"""
from cffi import FFI
import subprocess
import pathlib
NDPI_INCLUDES = """
#include "ndpi_main.h"
#include "ndpi_typedefs.h"
#include "ndpi_api.h"
"""
NDPI_HELPERS = """
// nDPI cffi helper functions (function naming convention ndpi_py_*)
void ndpi_py_setup_detection_module(struct ndpi_detection_module_struct *mod) {
if (mod == NULL) {
return;
} else {
NDPI_PROTOCOL_BITMASK protos;
NDPI_BITMASK_SET_ALL(protos); // Set bitmask for ALL protocols
ndpi_set_protocol_detection_bitmask2(mod, &protos);
ndpi_finalize_initialization(mod);
}
};
struct ndpi_flow_struct * ndpi_py_initialize_flow(void) {
struct ndpi_flow_struct * ndpi_flow = NULL;
ndpi_flow = (struct ndpi_flow_struct *)ndpi_flow_malloc(SIZEOF_FLOW_STRUCT);
memset(ndpi_flow, 0, SIZEOF_FLOW_STRUCT);
return ndpi_flow;
};
"""
NDPI_APIS = """
u_int16_t ndpi_get_api_version(void);
char* ndpi_revision(void);
struct ndpi_detection_module_struct *ndpi_init_detection_module(ndpi_init_prefs prefs);
void ndpi_exit_detection_module(struct ndpi_detection_module_struct *ndpi_struct);
void ndpi_flow_free(void *ptr);
ndpi_protocol ndpi_detection_process_packet(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
const unsigned char *packet,
const unsigned short packetlen,
const u_int64_t packet_time_ms);
ndpi_protocol ndpi_detection_giveup(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
u_int8_t enable_guess,
u_int8_t *protocol_was_guessed);
void ndpi_py_setup_detection_module(struct ndpi_detection_module_struct *mod);
struct ndpi_flow_struct * ndpi_py_initialize_flow(void);
char* ndpi_protocol2name(struct ndpi_detection_module_struct *ndpi_mod, ndpi_protocol proto, char *buf, u_int buf_len);
const char* ndpi_category_get_name(struct ndpi_detection_module_struct *ndpi_mod, ndpi_protocol_category_t category);
const char* ndpi_confidence_get_name(ndpi_confidence_t confidence);
"""
ffi_builder = FFI()
INCLUDE_DIR = pathlib.Path(__file__)\
.parent.resolve().parent.resolve().parent.resolve().\
joinpath("src").joinpath("include")
LIBRARY_DIR = pathlib.Path(__file__)\
.parent.resolve().parent.resolve().parent.resolve().\
joinpath("src").joinpath("lib")
NDPI_CDEF = subprocess.run(["gcc",
"-DNDPI_LIB_COMPILATION",
"-DNDPI_CFFI_PREPROCESSING",
"-DNDPI_CFFI_PREPROCESSING_EXCLUDE_PACKED",
"-E", "-x", "c", "-P", "-C",
str(INCLUDE_DIR.joinpath("ndpi_typedefs.h"))],
capture_output=True
).stdout.decode('utf-8',
errors='ignore')
NDPI_MODULE_STRUCT_CDEF = NDPI_CDEF.split("//CFFI.NDPI_MODULE_STRUCT")[1]
NDPI_PACKED = subprocess.run(["gcc",
"-DNDPI_LIB_COMPILATION", "-DNDPI_CFFI_PREPROCESSING",
"-E", "-x", "c", "-P", "-C",
str(INCLUDE_DIR.joinpath("ndpi_typedefs.h"))],
capture_output=True
).stdout.decode('utf-8',
errors='ignore')
NDPI_PACKED_STRUCTURES = NDPI_PACKED.split("//CFFI.NDPI_PACKED_STRUCTURES")[1]
NDPI_SOURCE = NDPI_INCLUDES + NDPI_MODULE_STRUCT_CDEF + NDPI_HELPERS
ffi_builder.set_source("_ndpi",
NDPI_SOURCE,
libraries=["ndpi"],
library_dirs=[str(LIBRARY_DIR)],
include_dirs=[str(INCLUDE_DIR)])
ffi_builder.cdef("""
typedef uint64_t u_int64_t;
typedef uint32_t u_int32_t;
typedef uint16_t u_int16_t;
typedef uint8_t u_int8_t;
typedef uint8_t u_char;
typedef unsigned u_int;
struct in_addr {
unsigned long s_addr;
};
struct in6_addr {
unsigned char s6_addr[16];
};
""")
ffi_builder.cdef(NDPI_PACKED_STRUCTURES, packed=True)
ffi_builder.cdef(NDPI_CDEF)
ffi_builder.cdef(NDPI_APIS)
if __name__ == "__main__":
ffi_builder.compile(verbose=True)
Executable → Regular
+144 -250
View File
@@ -1,273 +1,167 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
file: ndpi_example.py
This file is part of nDPI.
Copyright (C) 2011-19 - ntop.org
Copyright (C) 2019 - Zied Aouini <aouinizied@gmail.com> (Incremental improvements)
nDPI is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License
as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
------------------------------------------------------------------------------------------------------------------------
ndpi_example.py
Copyright (C) 2011-22 - ntop.org
This file is part of nDPI, an open source deep packet inspection library.
nDPI is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
version.
nDPI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with nDPI.
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with NFStream.
If not, see <http://www.gnu.org/licenses/>.
------------------------------------------------------------------------------------------------------------------------
"""
from ndpi_typestruct import *
from ctypes import *
from scapy.all import *
import sys
# ------- return type & pcapstruct to declare -------
from collections import namedtuple
from ndpi import NDPI, NDPIFlow
import argparse
import socket
import dpkt
class WorkFlow(Structure):
_fields_ = [("src_ip", c_uint32),
("dst_ip", c_uint32),
("src_port", c_uint16),
("dst_port", c_uint16),
("protocol", c_uint8),
("packets", c_uint32),
("detected_protocol", NDPIProtocol),
("detection_completed", c_uint8),
("id", c_uint32),
("src_id", POINTER(NDPIIdStruct)),
("dst_id", POINTER(NDPIIdStruct)),
("flow", POINTER(NDPIFlowStruct))]
FLOW_KEY = "{} {}:{} <-> {}:{}"
FLOW_STR = " {} {} [protocol:{}] [category:{}] [confidence:{}] [{} packets/{} bytes]"
CMCFUN = CFUNCTYPE(c_int, c_void_p, c_void_p)
GUESS = CFUNCTYPE(None, c_void_p, c_int32, c_int, c_void_p)
FREE = CFUNCTYPE(None, c_void_p)
PROTOCOL_UNKNWON = 0
def node_proto_guess_walker(nodo, which, depth, user_data):
global ndpi_info_mod
class Flow(object):
__slots__ = ("index",
"pkts",
"bytes",
"detected_protocol",
"ndpi_flow")
flow = cast(nodo, POINTER(POINTER(WorkFlow))).contents.contents
if which == 0 or which == 3: # execute only preorder operation of the tree
if flow.detection_completed == 0: # order for tree operation
flow.detected_protocol = ndpi.ndpi_detection_giveup(ndpi_info_mod,
flow.flow,
1,
cast(addressof(c_uint8(0)), POINTER(c_uint8)))
count_protocol[flow.detected_protocol.app_protocol] += flow.packets
def __init__(self):
self.pkts = 0
self.detected_protocol = None
self.bytes = 0
self.ndpi_flow = None
def py_cmp_fun(a, b):
fa = cast(a, POINTER(WorkFlow))
fb = cast(b, POINTER(WorkFlow))
if fa.contents.src_ip < fb.contents.src_ip: return -1
elif fa.contents.src_ip > fb.contents.src_ip: return 1
if fa.contents.src_port < fb.contents.src_port: return -1
elif fa.contents.src_port > fb.contents.src_port: return 1
if fa.contents.dst_ip < fb.contents.dst_ip: return -1
elif fa.contents.dst_ip > fb.contents.dst_ip: return 1
if fa.contents.dst_port < fb.contents.dst_port: return -1
elif fa.contents.dst_port > fb.contents.dst_port: return 1
if fa.contents.protocol < fb.contents.protocol: return -1
elif fa.contents.protocol > fb.contents.protocol: return 1
return 0
ppacket = namedtuple('ParsedPacket', ['src_ip',
'src_port',
'dst_ip',
'dst_port',
'protocol',
'ip_version',
'ip_bytes'])
def freer(a):
pass
cmp_func = CMCFUN(py_cmp_fun)
guess_walker = GUESS(node_proto_guess_walker)
free_walk = FREE(freer)
# --------------------------------------
# number of analyzed packet
packet_number = 0
flow_count = 0
max_num_udp_dissected_pkts = 16
max_num_tcp_dissected_pkts = 10
flows_root = c_void_p(None)
flows_root_ref = pointer(flows_root)
count_protocol = (c_int32 * (ndpi.ndpi_wrap_ndpi_max_supported_protocols() + ndpi.ndpi_wrap_ndpi_max_num_custom_protocols() + 1))()
lista = [] # used to avoid impropriate memory deallocation from python
# check ndpi version
if ndpi.ndpi_get_api_version() != ndpi.ndpi_wrap_get_api_version():
print("nDPI Library version mismatch: please make sure this code and the nDPI library are in sync\n")
sys.exit(-1)
# create data structure of ndpi
ndpi_info_mod = ndpi.ndpi_init_detection_module()
if ndpi_info_mod is None:
sys.exit(-1)
else:
ndpi_ndpi_finalize_initalization(ndpi_info_mod)
def ip2int(ip):
"""
Convert an IP string to long and then c_uint32
"""
packedIP = socket.inet_aton(ip)
return int(struct.unpack("!I", packedIP)[0])
def get_flow(pkt):
global flows_root
global flows_root_ref
global flow_count
ip_packet = pkt[1]
ip_protocol = ip_packet.proto
transport_packet = None
if ip_protocol == 6 or ip_protocol == 17:
transport_packet = pkt[2]
if transport_packet is not None:
# to avoid two nodes in one binary tree for a flow
ip_src = ip2int(ip_packet.src)
ip_dst = ip2int(ip_packet.dst)
src_port = transport_packet.sport
dst_port = transport_packet.dport
else:
return None
# set flows to correct type and data
ndpi_flow = pointer(NDPIFlowStruct())
memset(ndpi_flow, 0, sizeof(NDPIFlowStruct))
if ip_src > ip_dst:
flow = WorkFlow(ip_src, ip_dst, src_port, dst_port, int(ip_packet.proto), 0, NDPIProtocol(), 0, 0,
pointer(NDPIIdStruct()), pointer(NDPIIdStruct()), ndpi_flow)
else:
flow = WorkFlow(ip_dst, ip_src, dst_port, src_port, int(ip_packet.proto), 0, NDPIProtocol(), 0, 0,
pointer(NDPIIdStruct()), pointer(NDPIIdStruct()), ndpi_flow)
flow_ref = pointer(flow)
res = ndpi.ndpi_tfind(flow_ref, flows_root_ref, cmp_func)
if res is None:
ndpi.ndpi_tsearch(flow_ref, pointer(flows_root), cmp_func) # add
lista.append(flow)
flow_count += 1
return pointer(flow)
flow = cast(res, POINTER(POINTER(WorkFlow))).contents
return flow
def packetcaptured(pkt):
global packet_number
global ndpi_info_mod
flow = None
h = PcapPktHdr()
# getting flow
def inet_to_str(inet):
""" get string representation of IP address """
try:
flow = get_flow(pkt)
except AttributeError:
pass # ignore packet
if flow is None: return
# filling pcap_pkthdr
h.len = h.caplen = len(pkt)
h.ts.tv_sec = int(pkt["IP"].time/1000000)
h.ts.tv_usec = int(pkt["IP"].time)
# real work
if int(pkt[1].frag) == 0: # not fragmented packet
flow.contents.packets += 1
packet_number += 1
# get ndpi_iphdr address
iphdr_addr = cast(c_char_p(pkt[1].build()), c_void_p)
ndpi_flow = flow.contents.flow
if flow.contents.detection_completed is 0:
flow.contents.detected_protocol = ndpi.ndpi_detection_process_packet(ndpi_info_mod,
ndpi_flow,
cast(iphdr_addr, POINTER(c_uint8)),
int(pkt[1].len),
h.ts.tv_usec,
flow.contents.src_id,
flow.contents.dst_id)
flow1 = flow.contents.detected_protocol
valid = False
if flow.contents.protocol == 6: valid = flow.contents.packets > max_num_tcp_dissected_pkts
elif flow.contents.protocol == 17: valid = flow.contents.packets > max_num_udp_dissected_pkts
# should we continue anylizing packet or not?
if valid or flow1.app_protocol is not 0:
if valid or flow1.master_protocol is not 91: # or # 91 is NDPI_PROTOCOL_TLS
flow.contents.detection_completed = 1 # protocol found
if flow1.app_protocol is 0:
flow.contents.detected_protocol = ndpi.ndpi_detection_giveup(ndpi_info_mod,
ndpi_flow,
1,
cast(addressof(c_uint8(0)),
POINTER(c_uint8)))
return socket.inet_ntop(socket.AF_INET, inet)
except ValueError:
return socket.inet_ntop(socket.AF_INET6, inet)
def result():
global flows_root_ref
global ndpi_info_mod
print('\nnumber of analyzed packet: ' + str(packet_number))
print('number of flows: ' + str(flow_count))
ndpi.ndpi_twalk(flows_root_ref.contents, guess_walker, None)
print('\nDetected protocols:')
for i in range(0, ndpi.ndpi_get_num_supported_protocols(ndpi_info_mod)):
if count_protocol[i] > 0:
print("{}: {} packets".format(
cast(ndpi.ndpi_get_proto_name(ndpi_info_mod, i), c_char_p).value.decode('utf-8'),
str(count_protocol[i])))
def free(ndpi_struct):
ndpi.ndpi_tdestroy(flows_root, free_walk)
ndpi.ndpi_exit_detection_module(ndpi_struct)
def initialize(ndpi_struct):
all = NDPIProtocolBitMask()
ndpi.ndpi_wrap_NDPI_BITMASK_SET_ALL(pointer(all))
ndpi.ndpi_set_protocol_detection_bitmask2(ndpi_struct, pointer(all))
print('Using nDPI ' + cast(ndpi.ndpi_revision(), c_char_p).value.decode("utf-8"))
initialize(ndpi_info_mod)
if len(sys.argv) != 2:
print("\nUsage: ndpi_example.py <device>")
sys.exit(0)
if "." in sys.argv[1]:
print('Reading pcap from file ' + sys.argv[1] + '...')
scapy_cap = None
def parse_packet(pkt):
""" parse packet and extract 5 tuple and IP bytes """
try:
scapy_cap = rdpcap(sys.argv[1])
except FileNotFoundError:
print("\nFile not found")
except Scapy_Exception:
print("\nBad pcap")
l2 = dpkt.ethernet.Ethernet(pkt)
if isinstance(l2.data, dpkt.ip.IP):
ip_version = 4
elif isinstance(l2.data, dpkt.ip6.IP6):
ip_version = 6
else:
return
except dpkt.dpkt.NeedData:
return
l3 = l2.data
stop_decoding = False
while not stop_decoding:
if isinstance(l3.data, dpkt.tcp.TCP):
l4 = l3.data
proto = "TCP"
stop_decoding = True
elif isinstance(l3.data, dpkt.udp.UDP):
l4 = l3.data
proto = "UDP"
stop_decoding = True
elif isinstance(l3.data, dpkt.ip6.IP6):
l3 = l3.data
else:
return
return ppacket(src_ip=inet_to_str(l3.src), src_port=l4.sport,
dst_ip=inet_to_str(l3.dst), dst_port=l4.dport,
protocol=proto, ip_version=ip_version,
ip_bytes=bytes(l3))
def ppkt_to_flow_key(ppkt):
""" create a consistent direction agnostic flow keyfrom a parsed packet """
if ppkt.src_ip < ppkt.dst_ip:
k = FLOW_KEY.format(ppkt.protocol, ppkt.src_ip, ppkt.src_port, ppkt.dst_ip, ppkt.dst_port)
else:
for packet in scapy_cap:
packetcaptured(packet)
else:
print('Capturing live traffic from device ' + sys.argv[1] + '...')
try:
sniff(iface=sys.argv[1], prn=packetcaptured)
except KeyboardInterrupt:
print('\nInterrupted\n')
except PermissionError:
sys.exit('\nRoot privilege required for live capture on interface: {}\n'.format(sys.argv[1]))
if ppkt.src_ip == ppkt.dst_ip:
if ppkt.src_port <= ppkt.dst_port:
k = FLOW_KEY.format(ppkt.protocol, ppkt.src_ip, ppkt.src_port, ppkt.dst_ip, ppkt.dst_port)
else:
k = FLOW_KEY.format(ppkt.protocol, ppkt.dst_ip, ppkt.dst_port, ppkt.src_ip, ppkt.src_port)
else:
k = FLOW_KEY.format(ppkt.protocol, ppkt.dst_ip, ppkt.dst_port, ppkt.src_ip, ppkt.src_port)
return k
result()
free(ndpi_info_mod)
def parse_arguments():
parser = argparse.ArgumentParser()
parser.add_argument("input", help="input pcap file path")
parser.add_argument('-u', '--include-unknowns', action='store_true')
return parser.parse_args()
if __name__ == "__main__":
nDPI = NDPI() # As simple as that. :)
flow_cache = {} # We store the flows in a dictionary.
flow_count = 0 # Flow counter
print("Using nDPI {}".format(nDPI.revision))
args = parse_arguments()
with open(args.input, 'rb') as pcap_file:
capture = dpkt.pcap.Reader(pcap_file) # We use dpkt pcap capture handler
for time, packet in capture:
time_ms = int(time * 1000) # Convert packet timestamp to milliseconds
ppkt = parse_packet(packet)
if ppkt is not None: # If we succeed to parse the packet
key = ppkt_to_flow_key(ppkt)
try: # Try a Flow update
flow = flow_cache[key]
flow.detected_protocol = nDPI.process_packet(flow.ndpi_flow, ppkt.ip_bytes, time_ms)
flow.pkts += 1
flow.bytes += len(packet)
except KeyError: # New Flow
flow = Flow()
flow.index = flow_count
flow_count += 1
flow.ndpi_flow = NDPIFlow() # We create an nDPIFlow object per Flow
flow.detected_protocol = nDPI.process_packet(flow.ndpi_flow, ppkt.ip_bytes, time_ms)
flow.pkts += 1
flow.bytes += len(packet)
flow_cache[key] = flow
print(" Detected flows:")
unknown_flows = []
for key, flow in flow_cache.items(): # Iterate over all flows in flow cache
if flow.detected_protocol.app_protocol == PROTOCOL_UNKNWON: # Didn't succeed to identigy it using DPI
flow.detected_protocol = nDPI.giveup(flow.ndpi_flow) # We try to guess it (port matching, LRU, etc.)
FLOW_EXPORT = FLOW_STR.format(flow.index,
key,
nDPI.protocol_name(flow.detected_protocol),
nDPI.protocol_category_name(flow.detected_protocol),
flow.ndpi_flow.confidence.name,
flow.pkts,
flow.bytes)
if flow.detected_protocol.app_protocol != PROTOCOL_UNKNWON:
print(FLOW_EXPORT) # We start by printing detected flows
else:
# Format it for later
unknown_flows.append(FLOW_EXPORT)
if args.include_unknowns:
print(" Unknown flows:")
for unknown_flow in unknown_flows: # Dump unknown flows
print(unknown_flow)
-793
View File
@@ -1,793 +0,0 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
file: ndpi_typestruct.py
This file is part of nDPI.
Copyright (C) 2011-19 - ntop.org
Copyright (C) 2019 - Zied Aouini <aouinizied@gmail.com> (Incremental improvements)
nDPI is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License
as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
nDPI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with nDPI.
If not, see <http://www.gnu.org/licenses/>.
"""
from ctypes import CDLL, Structure, c_uint16, c_int, c_ulong, c_uint32, CFUNCTYPE, c_void_p, POINTER, c_char_p, c_uint8
from ctypes import c_char, c_uint, c_int16, c_longlong, c_size_t, Union, c_ubyte, c_uint64, c_int32, c_ushort, cast
from os.path import abspath, dirname
ndpi = CDLL(dirname(abspath(__file__)) + '/ndpi_wrap.so')
# ----------------------------------------------- Structures -----------------------------------------------------------
class NDPIDetectionModuleStruct(Structure):
pass
class NDPIFlowStruct(Structure):
pass
class NDPIProtocol(Structure):
_fields_ = [
("master_protocol", c_uint16),
("app_protocol", c_uint16),
("category", c_int)
]
class TimeVal(Structure):
_fields_ = [("tv_sec", c_ulong), ("tv_usec", c_ulong)]
class PcapPktHdr(Structure):
_fields_ = [("ts", TimeVal), ("caplen", c_uint32), ("len", c_uint32)]
class NDPIMask(Structure):
_fields_ = [("fds_bits", c_uint32)]
class NDPIProtocolBitMask(Structure):
_fields_ = [("fds_bits", NDPIMask * ndpi.ndpi_wrap_ndpi_num_fds_bits())]
class NDPISubprotocolConfStruct(Structure):
_fields_ = [("func", CFUNCTYPE(c_void_p, POINTER(NDPIDetectionModuleStruct), c_char_p, c_char_p, c_int))]
class NDPIAutoma(Structure):
_fields_ = [
("ac_automa", c_void_p),
("ac_automa_finalized", c_uint8)
]
class NDPINode(Structure):
pass
NDPINode._fields_ = [
('key', POINTER(c_char)),
('left', POINTER(NDPINode)),
('right', POINTER(NDPINode)),
]
class NDPICallFunctionStruct(Structure):
_fields_ = [
("detection_bitmask", NDPIProtocolBitMask),
("excluded_protocol_bitmask", NDPIProtocolBitMask),
("ndpi_selection_bitmask", c_uint32),
("func", CFUNCTYPE(None, POINTER(NDPIDetectionModuleStruct), POINTER(NDPIFlowStruct))),
("detection_feature", c_uint8)
]
class NDPIProtoDefaultsT(Structure):
_fields_ = [
("protoName", c_char_p),
("protoCategory", c_uint),
("subprotocols", c_uint16_p),
("subprotocol_count", c_uint32),
("protoId", c_uint16),
("protoIdx", c_uint16),
("protoBreed", c_uint),
("func", CFUNCTYPE(None, POINTER(NDPIDetectionModuleStruct), POINTER(NDPIFlowStruct))),
]
class NDPIDefaultsPortsTreeNodeT(Structure):
_fields_ = [
("proto", NDPIProtoDefaultsT),
("customUserProto", c_uint8),
("default_port", c_int16)
]
class SpinlockT(Structure):
_fields_ = [("val", c_int)]
class AtomicT(Structure):
_fields_ = [("counter", c_int)]
class TimeT(Structure):
_fields_ = [("counter", c_longlong)]
class HashIp4pNode(Structure):
pass
HashIp4pNode._fields_ = [
("next", POINTER(HashIp4pNode)),
("prev", POINTER(HashIp4pNode)),
("lchg", TimeT),
("port", c_uint16),
("count", c_uint16, 12),
("flag", c_uint16, 4),
("ip", c_uint32)
]
class HashIp4p(Structure):
_fields_ = [
("top", POINTER(HashIp4pNode)),
("lock",SpinlockT),
("len", c_size_t)
]
class HashIp4pTable(Structure):
_fields_ = [
("size", c_size_t),
("ipv6", c_int),
("lock", SpinlockT),
("count", AtomicT),
("tbl", HashIp4p)
]
class BtAnnounce(Structure):
_fields_ = [
("hash", c_uint32 * 5),
("ip", c_uint32 * 4),
("time", c_uint32),
("port", c_uint16),
("name_len", c_uint8),
("name", c_uint8 * 149)
]
class NDPILruCacheEntry(Structure):
_fields_ = [
("key", c_uint32),
("is_full", c_uint32, 1),
("value", c_uint32, 16),
("pad", c_uint32, 15)
]
class NDPILruCache(Structure):
_fields_ = [
("num_entries", c_uint32),
("entries", POINTER(NDPILruCacheEntry)),
]
class CacheEntry(Structure):
pass
CacheEntry._fields_ = [
("item", c_void_p),
("item_size", c_uint32),
("prev", POINTER(CacheEntry)),
("next", POINTER(CacheEntry))
]
class CacheEntryMap(Structure):
pass
CacheEntryMap._fields_ = [
("entry", POINTER(CacheEntry)),
("next", POINTER(CacheEntryMap)),
]
class Cache(Structure):
_fields_ = [
("size", c_uint32),
("max_size", c_uint32),
("head", POINTER(CacheEntry)),
("tail", POINTER(CacheEntry)),
("map", POINTER(POINTER(CacheEntryMap)))
]
class CustomCategories(Structure):
_fields_ = [
("hostnames", NDPIAutoma),
("hostnames_shadow", NDPIAutoma),
("ipAddresses", c_void_p),
("ipAddresses_shadow", c_void_p),
("categories_loaded", c_uint8),
]
NDPIDetectionModuleStruct._fields_ = [
("detection_bitmask", NDPIProtocolBitMask),
("generic_http_packet_bitmask", NDPIProtocolBitMask),
("current_ts", c_uint32),
("ticks_per_second", c_uint32),
("custom_category_labels",
(c_char * ndpi.ndpi_wrap_num_custom_categories()) * ndpi.ndpi_wrap_custom_category_label_len()),
("callback_buffer", NDPICallFunctionStruct * (ndpi.ndpi_wrap_ndpi_max_supported_protocols() + 1)),
("callback_buffer_size", c_uint32),
("callback_buffer_tcp_no_payload", NDPICallFunctionStruct * (ndpi.ndpi_wrap_ndpi_max_supported_protocols() + 1)),
("callback_buffer_size_tcp_no_payload", c_uint32),
("callback_buffer_tcp_payload", NDPICallFunctionStruct * (ndpi.ndpi_wrap_ndpi_max_supported_protocols() + 1)),
("callback_buffer_size_tcp_payload", c_uint32),
("callback_buffer_udp", NDPICallFunctionStruct * (ndpi.ndpi_wrap_ndpi_max_supported_protocols() + 1)),
("callback_buffer_size_udp", c_uint32),
("callback_buffer_non_tcp_udp", NDPICallFunctionStruct * (ndpi.ndpi_wrap_ndpi_max_supported_protocols() + 1)),
("callback_buffer_size_non_tcp_udp", c_uint32),
("tcpRoot", POINTER(NDPIDefaultsPortsTreeNodeT)),
("udpRoot", POINTER(NDPIDefaultsPortsTreeNodeT)),
("ndpi_log_level", c_uint),
("tcp_max_retransmission_window_size", c_uint32),
("directconnect_connection_ip_tick_timeout", c_uint32),
("subprotocol_conf", NDPISubprotocolConfStruct * (ndpi.ndpi_wrap_ndpi_max_supported_protocols() + 1)),
("ndpi_num_supported_protocols", c_uint),
("ndpi_num_custom_protocols", c_uint),
("host_automa", NDPIAutoma),
("bigrams_automa", NDPIAutoma),
("impossible_bigrams_automa", NDPIAutoma),
("custom_categories", CustomCategories),
("protocols_ptree", c_void_p),
("irc_timeout", c_uint32),
("gnutella_timeout", c_uint32),
("zattoo_connection_timeout", c_uint32),
("jabber_stun_timeout", c_uint32),
("jabber_file_transfer_timeout", c_uint32),
("ip_version_limit", c_uint8),
("bt_ht", POINTER(HashIp4pTable)),
("bt6_ht", POINTER(HashIp4pTable)),
("bt_ann", POINTER(BtAnnounce)),
("bt_ann_len", c_int),
("ookla_cache", POINTER(NDPILruCache)),
("tinc_cache", POINTER(Cache)),
("proto_defaults", NDPIProtoDefaultsT * (ndpi.ndpi_wrap_ndpi_max_supported_protocols() +
ndpi.ndpi_wrap_ndpi_max_num_custom_protocols())),
("direction_detect_disable", c_uint8, 1),
('_pad', c_uint8, 7),
('packet', NDPIPacketStruct),
]
class U6Addr(Union):
_fields_ = [
("u6_addr8", c_uint8 * 16),
("u6_addr16", c_uint16 * 8),
("u6_addr32", c_uint32 * 4),
("u6_addr64", c_uint64 * 2)
]
class NDPIIn6Addr(Structure):
_pack_ = 1
_fields_ = [("u6_addr", U6Addr)]
class NDPIIpAddrT(Union):
_fields_ = [
('ipv4', c_uint32),
('ipv4_u_int8_t', c_uint8 * 4),
('ipv6', NDPIIn6Addr),
]
class NDPIIdStruct(Structure):
_fields_ = [
('detected_protocol_bitmask', NDPIProtocolBitMask),
('irc_port', c_uint16 * 8),
('last_time_port_used', c_uint32 * 8),
('irc_ts', c_uint32),
('gnutella_ts', c_uint32),
('battlefield_ts', c_uint32),
('rtsp_timer', c_uint32),
('jabber_stun_or_ft_ts', c_uint32),
('directconnect_last_safe_access_time', c_uint32),
('detected_directconnect_port', c_uint16),
('detected_directconnect_udp_port', c_uint16),
('detected_directconnect_ssl_port', c_uint16),
('jabber_voice_stun_port', c_uint16 * 6),
('jabber_file_transfer_port', c_uint16 * 2),
('detected_gnutella_udp_port1', c_uint16),
('detected_gnutella_udp_port2', c_uint16),
('irc_number_of_port', c_uint8),
('oscar_ssl_session_id', c_uint8 * 33),
('jabber_voice_stun_used_ports', c_uint8),
]
class NDPIFlowTcpStruct(Structure):
_pack_ = 1
_fields_ = [
('smtp_command_bitmask', c_uint16),
('pop_command_bitmask', c_uint16),
('wa_matched_so_far', c_uint8),
('irc_stage', c_uint8),
('h323_valid_packets', c_uint8),
('gnutella_msg_id', c_uint8 * 3),
('irc_3a_counter', c_uint32, 3),
('irc_stage2', c_uint32, 5),
('irc_direction', c_uint32, 2),
('irc_0x1000_full', c_uint32, 1),
('usenet_stage', c_uint32, 2),
('http_stage', c_uint32, 2),
('http_empty_line_seen', c_uint32, 1),
('gnutella_stage', c_uint32, 2),
('ssh_stage', c_uint32, 3),
('vnc_stage', c_uint32, 2),
('telnet_stage', c_uint32, 2),
('tls_seen_client_cert', c_uint8, 1),
('tls_seen_server_cert', c_uint8, 1),
('tls_seen_certificate', c_uint8, 1),
('tls_srv_cert_fingerprint_found', c_uint8, 1),
('tls_srv_cert_fingerprint_processed', c_uint8, 1),
('tls_stage', c_uint8, 2),
('tls_record_offset', c_int16),
('tls_fingerprint_len', c_int16),
('tls_sha1_certificate_fingerprint', c_uint8 * 20),
('postgres_stage', c_uint32, 3),
('seen_syn', c_uint32, 1),
('seen_syn_ack', c_uint32, 1),
('seen_ack', c_uint32, 1),
('icecast_stage', c_uint32, 1),
('dofus_stage', c_uint32, 1),
('fiesta_stage', c_uint32, 2),
('wow_stage', c_uint32, 2),
('shoutcast_stage', c_uint32, 2),
('rtp_special_packets_seen', c_uint32, 1),
('mail_pop_stage', c_uint32, 2),
('mail_imap_stage', c_uint32, 3),
('mail_imap_starttls', c_uint32, 2),
('skype_packet_id', c_uint8),
('citrix_packet_id', c_uint8),
('lotus_notes_packet_id', c_uint8),
('teamviewer_stage', c_uint8),
('prev_zmq_pkt_len', c_uint8),
('prev_zmq_pkt', c_char * 10),
('ppstream_stage', c_uint32, 3),
('memcached_matches', c_uint8),
('nest_log_sink_matches', c_uint8),
]
class NDPIFlowUdpStruct(Structure):
_pack_ = 1
_fields_ = [
('ppstream_stage', c_uint32, 3),
('halflife2_stage', c_uint32, 2),
('tftp_stage', c_uint32, 2),
('aimini_stage', c_uint32, 5),
('xbox_stage', c_uint32, 1),
('skype_packet_id', c_uint8),
('teamviewer_stage', c_uint8),
('eaq_pkt_id', c_uint8),
('eaq_sequence', c_uint32),
('rx_conn_epoch', c_uint32),
('rx_conn_id', c_uint32),
('memcached_matches', c_uint8),
('wireguard_stage', c_uint8),
('wireguard_peer_index', c_uint32 * 2),
('quic_reasm_buf', POINTER(c_uint8)),
('quic_reasm_buf_len', c_uint32),
('csgo_strid', c_uint8 * 18),
('csgo_state', c_uint8),
('csgo_s2', c_uint8),
('csgo_id2', c_uint32),
('rdp_to_srv', c_uint8 * 3),
('rdp_from_srv', c_uint8 * 3),
('rdp_to_srv_pkts,', c_uint8),
('rdp_from_srv_pkts', c_uint8),
('imo_last_one_byte_pkt,', c_uint8),
('imo_last_byte', c_uint8),
]
class L4(Union):
_fields_ = [("tcp", NDPIFlowTcpStruct), ("udp", NDPIFlowUdpStruct)]
class Http(Structure):
_fields_ = [
("method", c_int),
("request_version", c_uint8),
("response_status_code", c_uint16),
("url", c_char_p),
("content_type", c_char_p),
("user_agent", c_char_p),
("detected_os", c_char_p),
("nat_ip", c_char_p),
]
class Dns(Structure):
_fields_ = [
("num_queries", c_uint8),
("num_answers", c_uint8),
("reply_code", c_uint8),
("is_query", c_uint8),
("query_type", c_uint16),
("query_class", c_uint16),
("rsp_type", c_uint16),
("rsp_addr", NDPIIpAddrT)
]
class Ntp(Structure):
_fields_ = [("request_code", c_uint8),
("version", c_uint8)]
class Kerberos(Structure):
_fields_ = [("cname", c_char * 24),
("realm", c_char * 24)]
class QuicSsl(Structure):
_fields_ = [
("ssl_version", c_uint16),
("client_certificate", c_char * 64),
("server_certificate", c_char * 64),
("server_organization", c_char * 64),
('notBefore', c_uint32),
('notAfter', c_uint32),
("ja3_client", c_char * 33),
("ja3_server", c_char * 33),
("server_cipher", c_uint16),
("server_unsafe_cipher", c_int)
]
class Stun(Structure):
_fields_ = [
("num_udp_pkts", c_uint8),
("num_processed_pkts", c_uint8),
("num_binding_requests", c_uint8),
]
class Ssh(Structure):
_fields_ = [
("client_signature", c_char * 48),
("server_signature", c_char * 48),
("hassh_client", c_char * 33),
("hassh_server", c_char * 33)
]
class Mdns(Structure):
_fields_ = [("answer", c_char * 96)]
class Ubntac2(Structure):
_fields_ = [("version", c_char * 32)]
class FtpImapPopSmtp(Structure):
_fields_ = [
("auth_found", c_uint8, 1),
("auth_failed", c_uint8, 1),
("auth_tls", c_uint8, 1),
("auth_done", c_uint8, 1),
("_pad", c_uint8, 4),
("username", c_char * 32),
("password", c_char * 16)
]
class Bittorrent(Structure):
_fields_ = [("hash", c_char * 20)]
class Dhcp(Structure):
_fields_ = [
("fingerprint", c_char * 48),
("class_ident", c_char * 48)
]
class Protos(Union):
_fields_ = [
("dns", Dns),
("kerberos", Kerberos),
("quic_ssl", QuicSsl),
("ssh", Ssh),
("mdns", Mdns),
("ubntac2", Ubntac2),
("bittorrent", Bittorrent),
("dhcp", Dhcp)
]
class TincCacheEntry(Structure):
_pack_ = 1
_fields_ = [
('src_address', c_uint32),
('dst_address', c_uint32),
('dst_port', c_uint16),
]
class NDPIIntOneLineStruct(Structure):
_fields_ = [
('ptr', POINTER(c_uint8)),
('len', c_uint16),
]
class NDPIIphdr(Structure):
_pack_ = 1
_fields_ = [
('ihl', c_uint8, 4),
('version', c_uint8, 4),
('tos', c_uint8),
('tot_len', c_uint16),
('id', c_uint16),
('frag_off', c_uint16),
('ttl', c_uint8),
('protocol', c_uint8),
('check', c_uint16),
('saddr', c_uint32),
('daddr', c_uint32)]
class NDPIIp6Hdrctl(Structure):
_pack_ = 1
_fields_ = [
('ip6_un1_flow', c_uint32),
('ip6_un1_plen', c_uint16),
('ip6_un1_nxt', c_uint8),
('ip6_un1_hlim', c_uint8),
]
class NDPIIpv6hdr(Structure):
_pack_ = 1
_fields_ = [
('ip6_hdr', NDPIIp6Hdrctl),
('ip6_src', NDPIIn6Addr),
('ip6_dst', NDPIIn6Addr),
]
class NDPITcpHdr(Structure):
_pack_ = 1
_fields_ = [
('source', c_uint16),
('dest', c_uint16),
('seq', c_uint32),
('ack_seq', c_uint32),
('res1', c_uint16, 4),
('doff', c_uint16, 4),
('fin', c_uint16, 1),
('syn', c_uint16, 1),
('rst', c_uint16, 1),
('psh', c_uint16, 1),
('ack', c_uint16, 1),
('urg', c_uint16, 1),
('ece', c_uint16, 1),
('cwr', c_uint16, 1),
('window', c_uint16),
('check', c_uint16),
('urg_ptr', c_uint16),
]
class NDPIUdpHdr(Structure):
_pack_ = 1
_fields_ = [
('source', c_uint16),
('dest', c_uint16),
('len', c_uint16),
('check', c_uint16),
]
class NDPIPacketStruct(Structure):
_fields_ = [
('iph', POINTER(NDPIIphdr)),
('iphv6', POINTER(NDPIIpv6hdr)),
('tcp', POINTER(NDPITcpHdr)),
('udp', POINTER(NDPIUdpHdr)),
('generic_l4_ptr', POINTER(c_uint8)),
('payload', POINTER(c_uint8)),
('current_timestamp_ms', c_uint64),
('detected_protocol_stack', c_uint16 * ndpi.ndpi_wrap_ndpi_procol_size()),
('line', NDPIIntOneLineStruct * 64),
('host_line', NDPIIntOneLineStruct),
('forwarded_line', NDPIIntOneLineStruct),
('referer_line', NDPIIntOneLineStruct),
('content_line', NDPIIntOneLineStruct),
('accept_line', NDPIIntOneLineStruct),
('user_agent_line', NDPIIntOneLineStruct),
('http_url_name', NDPIIntOneLineStruct),
('http_encoding', NDPIIntOneLineStruct),
('http_transfer_encoding', NDPIIntOneLineStruct),
('http_contentlen', NDPIIntOneLineStruct),
('http_cookie', NDPIIntOneLineStruct),
('http_origin', NDPIIntOneLineStruct),
('http_x_session_type', NDPIIntOneLineStruct),
('server_line', NDPIIntOneLineStruct),
('http_method', NDPIIntOneLineStruct),
('http_response', NDPIIntOneLineStruct),
('http_num_headers', c_uint8),
('l3_packet_len', c_uint16),
('payload_packet_len', c_uint16),
('parsed_lines', c_uint16),
('empty_line_position', c_uint16),
('tcp_retransmission', c_uint8),
('packet_lines_parsed_complete', c_uint8, 1),
('packet_direction', c_uint8, 1),
('empty_line_position_set', c_uint8, 1),
('http_check_content', c_uint8, 1),
('pad', c_uint8, 4),
]
class NDPIFlowStructStack(Structure):
_pack_ = 1
_fields_ = [
("detected_protocol_stack", c_uint16 * ndpi.ndpi_wrap_ndpi_procol_size()),
]
NDPIFlowStruct._fields_ = [
("ndpi_flow_stack", NDPIFlowStructStack),
("guessed_protocol_id", c_uint16),
("guessed_host_protocol_id", c_uint16),
("guessed_category", c_uint16),
("guessed_header_category", c_uint16),
("l4_proto", c_uint8),
("protocol_id_already_guessed", c_uint8, 1),
("host_already_guessed", c_uint8, 1),
("init_finished", c_uint8, 1),
("setup_packet_direction", c_uint8, 1),
("packet_direction", c_uint8, 1),
("check_extra_packets", c_uint8, 1),
("next_tcp_seq_nr", c_uint32 * 2),
("max_extra_packets_to_check", c_uint8),
("num_extra_packets_checked", c_uint8),
("num_processed_pkts", c_uint8),
("extra_packets_func", CFUNCTYPE(c_int, POINTER(NDPIDetectionModuleStruct), POINTER(NDPIFlowStruct))),
("l4", L4),
("host_server_name", c_char * 80),
("http", Http),
("stun", Stun),
("ftp_imap_pop_smtp", FtpImapPopSmtp),
("protos", Protos),
("excluded_protocol_bitmask", NDPIProtocolBitMask),
("category", c_int),
('redis_s2d_first_char', c_uint8),
('redis_d2s_first_char', c_uint8),
('packet_counter', c_uint16),
('packet_direction_counter', c_uint16 * 2),
('byte_counter', c_uint16 * 2),
('bittorrent_stage', c_uint8),
('directconnect_stage', c_uint8, 2),
('http_detected', c_uint8, 1),
('http_upper_protocol', c_uint16),
('http_lower_protocol', c_uint16),
('rtsprdt_stage', c_uint8, 2),
('zattoo_stage', c_uint8, 3),
('thunder_stage', c_uint8, 2),
('oscar_ssl_voice_stage', c_uint8, 3),
('oscar_video_voice', c_uint8, 1),
('florensia_stage', c_uint8, 1),
('socks5_stage', c_uint8, 2),
('socks4_stage', c_uint8, 2),
('edonkey_stage', c_uint8, 2),
('ftp_control_stage', c_uint8, 2),
('rtmp_stage', c_uint8, 2),
('pando_stage', c_uint8, 3),
('steam_stage1', c_uint16, 3),
('steam_stage2', c_uint16, 2),
('steam_stage3', c_uint16, 2),
('pplive_stage1', c_uint8, 3),
('pplive_stage2', c_uint8, 2),
('pplive_stage3', c_uint8, 2),
('starcraft_udp_stage', c_uint8, 3),
('ovpn_session_id', c_uint8 * 8),
('ovpn_counter', c_uint8),
('key_mining_cache', c_uint32),
('tinc_state', c_uint8),
('TincCacheEntry', TincCacheEntry),
('src', POINTER(NDPIIdStruct)),
('dst', POINTER(NDPIIdStruct))
]
# ----------------------------------------------- nDPI APIs ------------------------------------------------------------
""" ndpi_detection_giveup: Function to be called before we give up with detection for a given flow.
This function reduces the NDPI_UNKNOWN_PROTOCOL detection. """
ndpi.ndpi_detection_giveup.restype = NDPIProtocol
ndpi.ndpi_detection_giveup.argtypes = [POINTER(NDPIDetectionModuleStruct),
POINTER(NDPIFlowStruct), c_uint8,
POINTER(c_uint8)]
""" ndpi_detection_process_packet: Processes one packet and returns the ID of the detected protocol.
This is the MAIN PACKET PROCESSING FUNCTION. """
ndpi.ndpi_detection_process_packet.restype = NDPIProtocol
ndpi.ndpi_detection_process_packet.argtypes = [POINTER(NDPIDetectionModuleStruct),
POINTER(NDPIFlowStruct),
POINTER(c_ubyte),
c_ushort,
c_uint64,
POINTER(NDPIIdStruct),
POINTER(NDPIIdStruct)]
""" ndpi_ssl_version2str : Converts ssl version to readable string """
ndpi.ndpi_ssl_version2str.restype = c_char_p
ndpi.ndpi_ssl_version2str.argtypes = [c_int16, POINTER(c_uint8)]
""" ndpi_init_detection_module: Returns a new initialized detection module.
Note that before you can use it you can still load hosts and do other things. As soon as you are ready to use
it do not forget to call first ndpi_finalize_initalization() """
ndpi.ndpi_init_detection_module.restype = POINTER(NDPIDetectionModuleStruct)
def ndpi_ndpi_finalize_initalization(detection_module):
""" ndpi_finalize_initalization: Completes the initialization (ndpi_revision >= 3.1)"""
if cast(ndpi.ndpi_revision(), c_char_p).value.decode("utf-8")[:3] >= '3.1':
ndpi.ndpi_finalize_initalization.restype = c_void_p
ndpi.ndpi_finalize_initalization.argtypes = [POINTER(NDPIDetectionModuleStruct)]
return ndpi.ndpi_finalize_initalization(detection_module)
else:
# ignore it
return None
""" ndpi_tfind: find a node, or return 0. """
ndpi.ndpi_tfind.restype = c_void_p
""" ndpi_tsearch: ftp://ftp.cc.uoc.gr/mirrors/OpenBSD/src/lib/libc/stdlib/tsearch.c
find or insert datum into search tree. """
ndpi.ndpi_tsearch.restype = c_void_p
ndpi.ndpi_tsearch.argtypes = [c_void_p, POINTER(c_void_p), CFUNCTYPE(c_int, c_void_p, c_void_p)]
""" ndpi_revision: Get the nDPI version release. """
ndpi.ndpi_revision.restype = c_void_p
""" ndpi_get_proto_name: Get the protocol name associated to the ID."""
ndpi.ndpi_get_proto_name.restype = c_void_p
""" ndpi_category_get_name: Get protocol category as string."""
ndpi.ndpi_category_get_name.restype = c_void_p
""" ndpi_get_num_supported_protocols: Get the total number of the supported protocols."""
ndpi.ndpi_get_num_supported_protocols.restype = c_uint
""" ndpi_wrap_NDPI_BITMASK_SET_ALL: memset((char *)(p), 0xFF, sizeof(*(p)))"""
ndpi.ndpi_wrap_NDPI_BITMASK_SET_ALL.argtypes = [POINTER(NDPIProtocolBitMask)]
""" ndpi_set_protocol_detection_bitmask2: Sets the protocol bitmask2."""
ndpi.ndpi_set_protocol_detection_bitmask2.argtypes = [POINTER(NDPIDetectionModuleStruct),
POINTER(NDPIProtocolBitMask)]
""" ndpi_twalk: Walk the nodes of a tree. """
ndpi.ndpi_twalk.argtypes = [c_void_p, CFUNCTYPE(None, c_void_p, c_int32, c_int, c_void_p), c_void_p]
""" ndpi_tdestroy: node destroy. """
ndpi.ndpi_tdestroy.argtypes = [c_void_p, CFUNCTYPE(None, c_void_p)]
-60
View File
@@ -1,60 +0,0 @@
/*
* ndpi_wrap.c
*
* Copyright (C) 2011-19 - ntop.org
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nDPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "sys/types.h"
#include "ndpi_config.h"
#include "ndpi_main.h"
int ndpi_wrap_get_api_version(){
return NDPI_API_VERSION;
}
int ndpi_wrap_ndpi_num_fds_bits(){
return NDPI_NUM_FDS_BITS;
}
int ndpi_wrap_num_custom_categories(){
return NUM_CUSTOM_CATEGORIES;
}
int ndpi_wrap_custom_category_label_len(){
return CUSTOM_CATEGORY_LABEL_LEN;
}
int ndpi_wrap_ndpi_max_supported_protocols(){
return NDPI_MAX_SUPPORTED_PROTOCOLS;
}
int ndpi_wrap_ndpi_max_num_custom_protocols(){
return NDPI_MAX_NUM_CUSTOM_PROTOCOLS;
}
int ndpi_wrap_ndpi_procol_size(){
return NDPI_PROTOCOL_SIZE;
}
void ndpi_wrap_NDPI_BITMASK_SET_ALL(NDPI_PROTOCOL_BITMASK* bitmask){
NDPI_ONE(bitmask);
}
void dummy() {
/* Dummy call just to cause linker to include the ndpi library */
ndpi_tfind(NULL, NULL, NULL);
}
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
cffi>=1.15.0
+57
View File
@@ -0,0 +1,57 @@
"""
------------------------------------------------------------------------------------------------------------------------
setup.py
Copyright (C) 2011-22 - ntop.org
This file is part of nDPI, an open source deep packet inspection library.
nDPI is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
version.
nDPI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with NFStream.
If not, see <http://www.gnu.org/licenses/>.
------------------------------------------------------------------------------------------------------------------------
"""
from setuptools import setup
import os
this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name="ndpi",
version='4.3.0',
url='https://www.ntop.org/products/deep-packet-inspection/ndpi/',
license='LGPLv3',
description="Open and Extensible LGPLv3 Deep Packet Inspection Library",
long_description=long_description,
long_description_content_type='text/markdown',
author='Zied Aouini',
author_email='aouinizied@gmail.com',
packages=['ndpi'],
setup_requires=["cffi>=1.15.0"],
cffi_modules=["ndpi/ndpi_build.py:ffi_builder"],
install_requires=["cffi>=1.15.0"],
platforms=["Linux",
"Mac OS-X",
"Windows",
"Unix"],
classifiers=[
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Topic :: System :: Networking :: Monitoring',
],
project_urls={
'GitHub': 'https://github.com/ntop/nDPI',
}
)
+28
View File
@@ -0,0 +1,28 @@
"""
------------------------------------------------------------------------------------------------------------------------
tests.py
Copyright (C) 2011-22 - ntop.org
This file is part of nDPI, an open source deep packet inspection library.
nDPI is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
version.
nDPI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with NFStream.
If not, see <http://www.gnu.org/licenses/>.
------------------------------------------------------------------------------------------------------------------------
"""
from ndpi import NDPI, NDPIFlow
import time
if __name__ == '__main__':
try:
nDPI = NDPI()
ndpi_flow = NDPIFlow()
nDPI.process_packet(ndpi_flow, b'', time.time())
nDPI.giveup(ndpi_flow)
print("nDPI Python bindings: OK")
except Exception:
raise AssertionError("nDPI Python bindings: KO")
+6 -1
View File
@@ -2,7 +2,7 @@ CC=@CC@
INC=-I ../src/include -I/usr/local/include
LIBDPI=../src/lib/libndpi.a
LDFLAGS=@LDFLAGS@
LIB=$(LIBDPI) -lrrd -lm @LIBS@ @ADDITIONAL_LIBS@
LIB=$(LIBDPI) -lm @ADDITIONAL_LIBS@ @LIBRRD@ @LIBS@
TOOLS=rrd_anomaly rrd_similarity
@@ -21,6 +21,11 @@ distclean: clean
/bin/rm -f Makefile
distdir:
find . -type f -name '*.c' \
-o -name '*.txt' | xargs -I'{}' cp '{}' '$(distdir)/{}'
install:
@echo -n ""
check:
true # nothing to do here
+1 -1
View File
@@ -1,5 +1,5 @@
This directory contains a tool that allows to identify anomalies and similarities in RRD files
This directory contains a tool that allows anomalies and similarities in RRD files to be identified
Prerequisite
+1 -1
View File
@@ -180,7 +180,7 @@ void find_rrds(char *basedir, char *filename, rrd_file_stats *rrds, u_int *num_r
char path[PATH_MAX];
struct stat s;
snprintf(path, sizeof(path), "%s/%s", basedir, namelist[n]->d_name);
ndpi_snprintf(path, sizeof(path), "%s/%s", basedir, namelist[n]->d_name);
if(stat(path, &s) == 0) {
if(S_ISDIR(s.st_mode))
+167 -22
View File
@@ -98,6 +98,15 @@ extern "C" {
int ndpi_match_string_value(void *_automa, char *string_to_match,
u_int match_len, u_int32_t *num);
/**
* Return the protocol error code of a given flow
*
* @par flow = the flow to analyze
* @return the error code or 0 otherwise
*
*/
u_int32_t ndpi_get_flow_error_code(struct ndpi_flow_struct *flow);
/**
* nDPI personal allocation and free functions
**/
@@ -109,7 +118,7 @@ extern "C" {
void * ndpi_flow_malloc(size_t size);
void ndpi_flow_free(void *ptr);
u_int32_t ndpi_get_tot_allocated_memory(void);
/**
* Search the first occurrence of substring -find- in -s-
* The search is limited to the first -slen- characters of the string
@@ -331,6 +340,40 @@ extern "C" {
u_int16_t ndpi_get_flow_masterprotocol(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow);
/**
* Get the app protocol of the passed flows for the detected module
*
*
* @par ndpi_struct = the detection module
* @par flow = the flow given for the detection module
* @return the ID of the app protocol detected
*
*/
u_int16_t ndpi_get_flow_appprotocol(struct ndpi_detection_module_struct *ndpi_str, struct ndpi_flow_struct *flow);
/**
* Get the category of the passed flows for the detected module
*
*
* @par ndpi_struct = the detection module
* @par flow = the flow given for the detection module
* @return the ID of the category
*
*/
ndpi_protocol_category_t ndpi_get_flow_category(struct ndpi_detection_module_struct *ndpi_str, struct ndpi_flow_struct *flow);
/**
* Get the ndpi protocol data of the passed flows for the detected module
*
*
* @par ndpi_struct = the detection module
* @par flow = the flow given for the detection module
* @par ndpi_proto = the output struct where to store the requested information
*
*/
void ndpi_get_flow_ndpi_proto(struct ndpi_detection_module_struct *ndpi_str, struct ndpi_flow_struct *flow,
struct ndpi_proto * ndpi_proto);
/**
* API call that is called internally by ndpi_detection_process_packet or by apps
* that want to avoid calling ndpi_detection_process_packet as they have already
@@ -722,10 +765,11 @@ extern "C" {
*
* @par ndpi_mod = the detection module
* @par path = the path of the file
* @par user_data = pointer to some user data value
* @return 0 if the file is loaded correctly;
* -1 else
*/
int ndpi_load_categories_file(struct ndpi_detection_module_struct *ndpi_str, const char* path);
int ndpi_load_categories_file(struct ndpi_detection_module_struct *ndpi_str, const char* path, void *user_data);
/**
* Read a file and load the list of risky domains
@@ -888,12 +932,16 @@ extern "C" {
int ndpi_match_string(void *_automa, char *string_to_match);
int ndpi_load_ip_category(struct ndpi_detection_module_struct *ndpi_struct,
const char *ip_address_and_mask, ndpi_protocol_category_t category);
const char *ip_address_and_mask, ndpi_protocol_category_t category,
void *user_data);
int ndpi_load_hostname_category(struct ndpi_detection_module_struct *ndpi_struct,
const char *name_to_add, ndpi_protocol_category_t category);
int ndpi_load_category(struct ndpi_detection_module_struct *ndpi_struct,
const char *ip_or_name, ndpi_protocol_category_t category);
const char *ip_or_name, ndpi_protocol_category_t category,
void *user_data);
int ndpi_enable_loaded_categories(struct ndpi_detection_module_struct *ndpi_struct);
void* ndpi_find_ipv4_category_userdata(struct ndpi_detection_module_struct *ndpi_str,
u_int32_t saddr);
int ndpi_fill_ip_protocol_category(struct ndpi_detection_module_struct *ndpi_struct,
u_int32_t saddr,
u_int32_t daddr,
@@ -952,12 +1000,12 @@ extern "C" {
*
* @par ndpi_struct = the struct created for the protocol detection
* @par days = the number of days threshold for emitting the alert
*
*
*/
void ndpi_set_tls_cert_expire_days(struct ndpi_detection_module_struct *ndpi_str,
u_int8_t days);
/* Utility functions to set ndpi malloc/free/print wrappers */
void set_ndpi_malloc(void* (*__ndpi_malloc)(size_t size));
void set_ndpi_free(void (*__ndpi_free)(void *ptr));
@@ -1056,7 +1104,7 @@ extern "C" {
u_int64_t ndpi_ntohll(u_int64_t v);
u_int8_t ndpi_is_valid_protoId(u_int16_t protoId);
u_int8_t ndpi_is_encrypted_proto(struct ndpi_detection_module_struct *ndpi_str, ndpi_protocol proto);
/* DGA */
int ndpi_check_dga_name(struct ndpi_detection_module_struct *ndpi_str,
struct ndpi_flow_struct *flow,
@@ -1155,7 +1203,7 @@ extern "C" {
int ndpi_serialize_uint32_string(ndpi_serializer *serializer, u_int32_t key, const char *value);
/**
* Serialize a 32-bit unsigned int key and a boolean value
* Serialize a 32-bit unsigned int key and a boolean value (JSON/CSV only, not supported by TLV)
* @param serializer The serializer handle
* @param key The field name or ID
* @param value The field value
@@ -1269,6 +1317,17 @@ extern "C" {
*/
int ndpi_serialize_string_string(ndpi_serializer *serializer, const char *key, const char *value);
/**
* Serialize a string key and a string value
* @param serializer The serializer handle
* @param key The field name or ID
* @param value The field value
* @param value_len The field value length
* @return 0 on success, a negative number otherwise
*/
int ndpi_serialize_string_string_len(ndpi_serializer *serializer, const char *key,
const char *value, u_int16_t value_len);
/**
* Serialize a string key and an unterminated string value
* @param serializer The serializer handle
@@ -1390,6 +1449,14 @@ extern "C" {
*/
int ndpi_serialize_start_of_block(ndpi_serializer *serializer, const char *key);
/**
* Serialize the start of a block with a numeric key
* @param serializer The serializer handle
* @param key The numeric key as 32-bit unsigned integer.
* @return 0 on success, a negative number otherwise
*/
int ndpi_serialize_start_of_block_uint32(ndpi_serializer *serializer, u_int32_t key);
/**
* Serialize the end of a block
* @param serializer The serializer handle
@@ -1488,6 +1555,13 @@ extern "C" {
int ndpi_deserialize_clone_item(ndpi_deserializer *deserializer, ndpi_serializer *serializer);
int ndpi_deserialize_clone_all(ndpi_deserializer *deserializer, ndpi_serializer *serializer);
/*
* Escape a string to be suitable for a JSON value, adding double quotes, and terminating the string with a null byte.
* It is recommended to provide a destination buffer (dst) which is as large as double the source buffer (src) at least.
* Upon successful return, these functions return the number of characters printed (excluding the null byte used to terminate the string).
*/
int ndpi_json_string_escape(const char *src, int src_len, char *dst, int dst_max_len);
/* Data analysis */
struct ndpi_analyze_struct* ndpi_alloc_data_analysis(u_int16_t _max_series_len);
void ndpi_init_data_analysis(struct ndpi_analyze_struct *s, u_int16_t _max_series_len);
@@ -1505,6 +1579,7 @@ extern "C" {
float ndpi_data_entropy(struct ndpi_analyze_struct *s);
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_int32_t ndpi_data_min(struct ndpi_analyze_struct *s);
u_int32_t ndpi_data_max(struct ndpi_analyze_struct *s);
@@ -1528,13 +1603,13 @@ extern "C" {
int ndpi_ses_init(struct ndpi_ses_struct *ses, double alpha, float significance);
int ndpi_ses_add_value(struct ndpi_ses_struct *ses, const u_int64_t _value, double *forecast, double *confidence_band);
void ndpi_ses_fitting(double *values, u_int32_t num_values, float *ret_alpha);
/* ******************************* */
int ndpi_des_init(struct ndpi_des_struct *des, double alpha, double beta, float significance);
int ndpi_des_add_value(struct ndpi_des_struct *des, const u_int64_t _value, double *forecast, double *confidence_band);
void ndpi_des_fitting(double *values, u_int32_t num_values, float *ret_alpha, float *ret_beta);
/* ******************************* */
int ndpi_jitter_init(struct ndpi_jitter_struct *hw, u_int16_t num_periods);
@@ -1551,9 +1626,13 @@ extern "C" {
u_int8_t ndpi_is_protocol_detected(struct ndpi_detection_module_struct *ndpi_str,
ndpi_protocol proto);
void ndpi_serialize_risk(ndpi_serializer *serializer, ndpi_risk_enum risk);
void ndpi_serialize_risk(ndpi_serializer *serializer, ndpi_risk risk);
void ndpi_serialize_risk_score(ndpi_serializer *serializer, ndpi_risk_enum risk);
void ndpi_serialize_confidence(ndpi_serializer *serializer, ndpi_confidence_t confidence);
void ndpi_serialize_proto(struct ndpi_detection_module_struct *ndpi_struct,
ndpi_serializer *serializer, ndpi_risk_enum risk,
ndpi_serializer *serializer,
ndpi_risk_enum risk,
ndpi_confidence_t confidence,
ndpi_protocol l7_protocol);
const char* ndpi_risk2str(ndpi_risk_enum risk);
const char* ndpi_severity2str(ndpi_risk_severity s);
@@ -1561,6 +1640,12 @@ extern "C" {
u_int16_t ndpi_risk2score(ndpi_risk risk,
u_int16_t *client_score, u_int16_t *server_score);
u_int8_t ndpi_check_issuerdn_risk_exception(struct ndpi_detection_module_struct *ndpi_str,
char *issuerDN);
u_int8_t ndpi_check_flow_risk_exceptions(struct ndpi_detection_module_struct *ndpi_str,
u_int num_params,
ndpi_risk_params params[]);
/* ******************************* */
/* HyperLogLog cardinality estimator */
@@ -1582,9 +1667,9 @@ extern "C" {
int ndpi_init_bin(struct ndpi_bin *b, enum ndpi_bin_family f, u_int16_t num_bins);
void ndpi_free_bin(struct ndpi_bin *b);
struct ndpi_bin* ndpi_clone_bin(struct ndpi_bin *b);
void ndpi_inc_bin(struct ndpi_bin *b, u_int16_t slot_id, u_int32_t val);
void ndpi_set_bin(struct ndpi_bin *b, u_int16_t slot_id, u_int32_t value);
u_int32_t ndpi_get_bin_value(struct ndpi_bin *b, u_int16_t slot_id);
void ndpi_inc_bin(struct ndpi_bin *b, u_int16_t slot_id, u_int64_t val);
void ndpi_set_bin(struct ndpi_bin *b, u_int16_t slot_id, u_int64_t value);
u_int64_t ndpi_get_bin_value(struct ndpi_bin *b, u_int16_t slot_id);
void ndpi_reset_bin(struct ndpi_bin *b);
void ndpi_normalize_bin(struct ndpi_bin *b);
char* ndpi_print_bin(struct ndpi_bin *b, u_int8_t normalize_first, char *out_buf, u_int out_buf_len);
@@ -1596,14 +1681,70 @@ extern "C" {
/* ******************************* */
/*
* Finds outliers using Z-score
* Z-Score = (Value - Mean) / StdDev
*
* @par values = pointer to the individual values to be analyzed [in]
* @par outliers = pointer to a list of outliers identified [out]
* @par num_values = lenght of values and outliers that MUST have the same lenght [in]
*
* @return The number of outliers found
*/
u_int ndpi_find_outliers(u_int32_t *values, bool *outliers, u_int32_t num_values);
/* ******************************* */
u_int32_t ndpi_quick_16_byte_hash(u_int8_t *in_16_bytes_long);
/* ******************************* */
ndpi_str_hash* ndpi_hash_alloc(u_int32_t max_num_entries);
void ndpi_hash_free(ndpi_str_hash *h);
int ndpi_hash_find_entry(ndpi_str_hash *h, char *key, u_int key_len, u_int8_t *value);
int ndpi_hash_add_entry(ndpi_str_hash *h, char *key, u_int8_t key_len, u_int8_t value);
/**
* Initialize the hashmap.
*
* @par h = pointer to the hash map [in, out]
*
* @return 0 on success, 1 otherwise
*
*/
int ndpi_hash_init(ndpi_str_hash **h);
/**
* Free the hashmap.
*
* @par h = pointer to the hash map [in, out]
* @par cleanup_func = pointer to a optional callback function
* called for each element in the hashmap [in]
*
*/
void ndpi_hash_free(ndpi_str_hash **h, void (*cleanup_func)(ndpi_str_hash *h));
/**
* Search for an entry in the hashmap.
*
* @par h = pointer to the hash map [in]
* @par key = character string (no '\0' required) [in]
* @par key_len = length of the character string @key [in]
* @par value = pointer to a pointer to the value, which contains a
* previously added hash entry [in, out]
*
* @return 0 if an entry with that key was found, 1 otherwise
*
*/
int ndpi_hash_find_entry(ndpi_str_hash *h, char *key, u_int key_len, void **value);
/**
* Add an entry to the hashmap.
*
* @par h = pointer to the hash map [in, out]
* @par key = character string (no '\0' required) [in]
* @par key_len = length of the character string @key [in]
* @par value = pointer to the value to add [in]
*
* @return 0 if the entry was added, 1 otherwise
*
*/
int ndpi_hash_add_entry(ndpi_str_hash **h, char *key, u_int8_t key_len, void *value);
/* ******************************* */
@@ -1619,7 +1760,7 @@ extern "C" {
/* ******************************* */
char* ndpi_get_flow_name(struct ndpi_flow_struct *flow);
/* ******************************* */
ndpi_bitmap* ndpi_bitmap_alloc(void);
@@ -1635,13 +1776,17 @@ extern "C" {
void ndpi_bitmap_and(ndpi_bitmap* a, ndpi_bitmap* b_and);
void ndpi_bitmap_or(ndpi_bitmap* a, ndpi_bitmap* b_or);
ndpi_bitmap_iterator* ndpi_bitmap_iterator_alloc(ndpi_bitmap* b);
void ndpi_bitmap_iterator_free(ndpi_bitmap* b);
bool ndpi_bitmap_iterator_next(ndpi_bitmap_iterator* i, uint32_t *value);
/* ******************************* */
char* ndpi_get_flow_risk_info(struct ndpi_flow_struct *flow,
char *out, u_int out_len,
u_int8_t use_json);
#ifdef __cplusplus
}
#endif
+7 -18
View File
@@ -156,8 +156,7 @@
/* misc definitions */
#define NDPI_DEFAULT_MAX_TCP_RETRANSMISSION_WINDOW_SIZE 0x10000
#define NDPI_MAX_NUM_PKTS_PER_FLOW_TO_DISSECT 32
#define NDPI_DEFAULT_MAX_NUM_PKTS_PER_FLOW_TO_DISSECT 32
/* TODO: rebuild all memory areas to have a more aligned memory block here */
@@ -167,17 +166,6 @@
#define MAX_PACKET_COUNTER 65000
#define MAX_DEFAULT_PORTS 5
#define NDPI_DIRECTCONNECT_CONNECTION_IP_TICK_TIMEOUT 600
#define NDPI_IRC_CONNECTION_TIMEOUT 120
#define NDPI_GNUTELLA_CONNECTION_TIMEOUT 60
#define NDPI_BATTLEFIELD_CONNECTION_TIMEOUT 60
#define NDPI_THUNDER_CONNECTION_TIMEOUT 30
#define NDPI_TVANTS_CONNECTION_TIMEOUT 5
#define NDPI_ZATTOO_CONNECTION_TIMEOUT 120
#define NDPI_ZATTOO_FLASH_TIMEOUT 5
#define NDPI_JABBER_STUN_TIMEOUT 30
#define NDPI_JABBER_FT_TIMEOUT 5
#ifdef NDPI_ENABLE_DEBUG_MESSAGES
#define NDPI_LOG(proto, m, log_level, args...) \
{ \
@@ -308,6 +296,10 @@
#define NDPI_SCTP_PROTOCOL_TYPE 132
#define NDPI_IPIP_PROTOCOL_TYPE 0x04
#define NDPI_ICMPV6_PROTOCOL_TYPE 0x3a
#define NDPI_PGM_PROTOCOL_TYPE 0x71
#define NDPI_PIM_PROTOCOL_TYPE 0x67
#define NDPI_ARRAY_LENGTH(array) (sizeof(array) / sizeof((array)[0]))
/* the get_uXX will return raw network packet bytes !! */
#define get_u_int8_t(X,O) (*(u_int8_t *)((&(((u_int8_t *)X)[O]))))
@@ -327,7 +319,6 @@ static inline u_int64_t get_u_int64_t(const u_int8_t* X, int O)
/* new definitions to get little endian from network bytes */
#define get_ul8(X,O) get_u_int8_t(X,O)
#if defined(__LITTLE_ENDIAN__) || defined(_LITTLE_ENDIAN)
#define get_l16(X,O) get_u_int16_t(X,O)
#define get_l32(X,O) get_u_int32_t(X,O)
@@ -342,10 +333,6 @@ static inline u_int64_t get_u_int64_t(const u_int8_t* X, int O)
/* define memory callback function */
#define match_first_bytes(payload,st) (memcmp((payload),(st),(sizeof(st)-1))==0)
#if defined(WIN32) && !defined(snprintf)
#define snprintf _snprintf
#endif
#if defined(WIN32)
#undef strtok_r
#define strtok_r strtok_s
@@ -375,6 +362,8 @@ static inline u_int64_t get_u_int64_t(const u_int8_t* X, int O)
#define NDPI_MAX_NUM_TLS_APPL_BLOCKS 8
@HANDLE_TLS_SIGS@#define TLS_HANDLE_SIGNATURE_ALGORITMS 1
#ifdef __APPLE__
#include <libkern/OSByteOrder.h>
+1 -1
View File
@@ -1,7 +1,7 @@
/*
* ndpi_includes.h
*
* Copyright (C) 2011-16 - ntop.org
* Copyright (C) 2011-22 - ntop.org
*
* This file is part of nDPI, an open source deep packet inspection
* library based on the OpenDPI and PACE technology by ipoque GmbH
+1 -5
View File
@@ -1,7 +1,7 @@
/*
* ndpi_includes_OpenBSD.h
*
* Copyright (C) 2011-16 - ntop.org
* Copyright (C) 2011-22 - ntop.org
*
* This file is part of nDPI, an open source deep packet inspection
* library based on the OpenDPI and PACE technology by ipoque GmbH
@@ -24,10 +24,6 @@
#ifndef __NDPI_INCLUDES_OPENBSD_H__
#define __NDPI_INCLUDES_OPENBSD_H__
#ifndef IPPROTO_SCTP
#define IPPROTO_SCTP 132
#endif /* IPPROTO_SCTP */
#include <net/bpf.h>
typedef struct bpf_timeval pkt_timeval;
+19 -11
View File
@@ -25,6 +25,10 @@
#define __NDPI_MAIN_H__
#include "ndpi_includes.h"
#ifdef NDPI_LIB_COMPILATION
/* for macros NDPI_LOG_* in ndpi_define.h */
#include "ndpi_config.h"
#endif
#include "ndpi_define.h"
#include "ndpi_protocol_ids.h"
#include "ndpi_typedefs.h"
@@ -95,13 +99,6 @@ extern "C" {
extern void ndpi_set_proto_subprotocols(struct ndpi_detection_module_struct *ndpi_mod,
int protoId, ...);
extern void ndpi_set_proto_defaults(struct ndpi_detection_module_struct *ndpi_mod,
u_int8_t is_cleartext,
ndpi_protocol_breed_t protoBreed, u_int16_t protoId, char *protoName,
ndpi_protocol_category_t protoCategory,
ndpi_port_range *tcpDefPorts,
ndpi_port_range *udpDefPorts);
extern void ndpi_int_reset_protocol(struct ndpi_flow_struct *flow);
extern int ndpi_packet_src_ip_eql(const struct ndpi_packet_struct *packet, const ndpi_ip_addr_t * ip);
@@ -123,8 +120,6 @@ extern "C" {
extern u_int8_t ndpi_is_proto(ndpi_protocol proto, u_int16_t p);
extern u_int16_t ndpi_get_lower_proto(ndpi_protocol p);
#ifdef NDPI_ENABLE_DEBUG_MESSAGES
void ndpi_debug_get_last_log_function_line(struct ndpi_detection_module_struct *ndpi_struct,
const char **file, const char **func, u_int32_t * line);
@@ -144,18 +139,31 @@ extern "C" {
int ndpi_handle_ipv6_extension_headers(u_int16_t l3len,
const u_int8_t ** l4ptr, u_int16_t * l4len,
u_int8_t * nxt_hdr);
void ndpi_set_proto_defaults(struct ndpi_detection_module_struct *ndpi_str,
u_int8_t is_cleartext, u_int8_t is_app_protocol,
ndpi_protocol_breed_t breed,
u_int16_t protoId, char *protoName,
ndpi_protocol_category_t protoCategory,
ndpi_port_range *tcpDefPorts,
ndpi_port_range *udpDefPorts);
void ndpi_set_risk(struct ndpi_detection_module_struct *ndpi_str,
struct ndpi_flow_struct *flow, ndpi_risk_enum r);
struct ndpi_flow_struct *flow, ndpi_risk_enum r,
char *risk_message);
int ndpi_isset_risk(struct ndpi_detection_module_struct *ndpi_str,
struct ndpi_flow_struct *flow, ndpi_risk_enum r);
int ndpi_is_printable_string(char * const str, size_t len);
int ndpi_is_printable_buffer(uint8_t const * const buf, size_t len);
int ndpi_normalize_printable_string(char * const str, size_t len);
int ndpi_is_valid_hostname(char * const str, size_t len);
#define NDPI_ENTROPY_ENCRYPTED_OR_RANDOM(entropy) (entropy > 7.0f)
float ndpi_entropy(u_int8_t const * const buf, size_t len);
u_int16_t ndpi_calculate_icmp4_checksum(u_int8_t const * const buf, size_t len);
void load_common_alpns(struct ndpi_detection_module_struct *ndpi_str);
u_int8_t is_a_common_alpn(struct ndpi_detection_module_struct *ndpi_str,
const char *alpn_to_check, u_int alpn_to_check_len);
char *ndpi_hostname_sni_set(struct ndpi_flow_struct *flow, const u_int8_t *value, size_t value_len);
char *ndpi_user_agent_set(struct ndpi_flow_struct *flow, const u_int8_t *value, size_t value_len);
#ifdef __cplusplus
}
+2 -1
View File
@@ -73,7 +73,7 @@ union ndpi_patricia_node_value_t {
} uv32;
u_int64_t uv64;
void *user_data;
} u;
};
@@ -95,6 +95,7 @@ typedef struct _ndpi_patricia_node_t {
struct _ndpi_patricia_node_t *l, *r; /* left and right children */
struct _ndpi_patricia_node_t *parent;/* may be used */
void *data; /* pointer to data */
void *custom_user_data; /* pointer to custom userdata */
union ndpi_patricia_node_value_t value;
} ndpi_patricia_node_t;
+86 -63
View File
@@ -29,7 +29,7 @@
typedef enum {
NDPI_PROTOCOL_UNKNOWN = 0,
NDPI_PROTOCOL_FTP_CONTROL = 1, /* Tomasz Bujlow <tomasz@skatnet.dk> */
NDPI_PROTOCOL_FTP_CONTROL = 1,
NDPI_PROTOCOL_MAIL_POP = 2,
NDPI_PROTOCOL_MAIL_SMTP = 3,
NDPI_PROTOCOL_MAIL_IMAP = 4,
@@ -49,7 +49,7 @@ typedef enum {
NDPI_PROTOCOL_DHCP = 18,
NDPI_PROTOCOL_POSTGRES = 19,
NDPI_PROTOCOL_MYSQL = 20,
NDPI_PROTOCOL_HOTMAIL = 21,
NDPI_PROTOCOL_MS_OUTLOOK = 21, /* Hotmail / Microsoft Outlook / Exchange */
NDPI_PROTOCOL_DIRECT_DOWNLOAD_LINK = 22,
NDPI_PROTOCOL_MAIL_POPS = 23,
NDPI_PROTOCOL_APPLEJUICE = 24,
@@ -59,19 +59,19 @@ typedef enum {
NDPI_PROTOCOL_VMWARE = 28,
NDPI_PROTOCOL_MAIL_SMTPS = 29,
NDPI_PROTOCOL_DTLS = 30,
NDPI_PROTOCOL_UBNTAC2 = 31, /* Ubiquity UBNT AirControl = 2 - Thomas Fjellstrom <thomas+ndpi@fjellstrom.ca> */
NDPI_PROTOCOL_UBNTAC2 = 31, /* Ubiquity UBNT AirControl = 2 */
NDPI_PROTOCOL_KONTIKI = 32,
NDPI_PROTOCOL_OPENFT = 33,
NDPI_PROTOCOL_FASTTRACK = 34,
NDPI_PROTOCOL_GNUTELLA = 35,
NDPI_PROTOCOL_EDONKEY = 36, /* Tomasz Bujlow <tomasz@skatnet.dk> */
NDPI_PROTOCOL_EDONKEY = 36,
NDPI_PROTOCOL_BITTORRENT = 37,
NDPI_PROTOCOL_SKYPE_CALL = 38, /* Skype call and videocalls */
NDPI_PROTOCOL_SKYPE_TEAMS_CALL = 38, /* Skype call and videocalls */
NDPI_PROTOCOL_SIGNAL = 39,
NDPI_PROTOCOL_MEMCACHED = 40, /* Memcached - Darryl Sokoloski <darryl@egloo.ca> */
NDPI_PROTOCOL_MEMCACHED = 40, /* Memcached */
NDPI_PROTOCOL_SMBV23 = 41, /* SMB version 2/3 */
NDPI_PROTOCOL_MINING = 42, /* Bitcoin, Ethereum, ZCash, Monero */
NDPI_PROTOCOL_NEST_LOG_SINK = 43, /* Nest Log Sink (Nest Protect) - Darryl Sokoloski <darryl@egloo.ca> */
NDPI_PROTOCOL_NEST_LOG_SINK = 43, /* Nest Log Sink (Nest Protect) */
NDPI_PROTOCOL_MODBUS = 44, /* Modbus */
NDPI_PROTOCOL_WHATSAPP_CALL = 45, /* WhatsApp video ad audio calls go here */
NDPI_PROTOCOL_DATASAVER = 46, /* Protocols used to save data on Internet communications */
@@ -88,26 +88,26 @@ typedef enum {
NDPI_PROTOCOL_SOPCAST = 57,
NDPI_PROTOCOL_DISCORD = 58,
NDPI_PROTOCOL_TVUPLAYER = 59,
NDPI_PROTOCOL_MONGODB = 60, /* Leonn Paiva <leonn.paiva@gmail.com> */
NDPI_PROTOCOL_QQLIVE = 61,
NDPI_PROTOCOL_MONGODB = 60,
NDPI_PROTOCOL_PLURALSIGHT = 61,
NDPI_PROTOCOL_THUNDER = 62,
NDPI_PROTOCOL_OCSP = 63,
NDPI_PROTOCOL_FREE_64 = 64, /* FREE */
NDPI_PROTOCOL_VXLAN = 64,
NDPI_PROTOCOL_IRC = 65,
NDPI_PROTOCOL_AYIYA = 66,
NDPI_PROTOCOL_JABBER = 67,
NDPI_PROTOCOL_NATS = 68,
NDPI_PROTOCOL_AMONG_US = 69, /* Toni Uhlig <matzeton@googlemail.com> */
NDPI_PROTOCOL_AMONG_US = 69,
NDPI_PROTOCOL_YAHOO = 70,
NDPI_PROTOCOL_DISNEYPLUS = 71, /* Zied Aouini <aouinizied@gmail.com> */
NDPI_PROTOCOL_DISNEYPLUS = 71,
NDPI_PROTOCOL_GOOGLE_PLUS = 72,
NDPI_PROTOCOL_IP_VRRP = 73,
NDPI_PROTOCOL_STEAM = 74, /* Tomasz Bujlow <tomasz@skatnet.dk> */
NDPI_PROTOCOL_STEAM = 74,
NDPI_PROTOCOL_HALFLIFE2 = 75,
NDPI_PROTOCOL_WORLDOFWARCRAFT = 76,
NDPI_PROTOCOL_TELNET = 77,
NDPI_PROTOCOL_STUN = 78,
NDPI_PROTOCOL_IP_IPSEC = 79,
NDPI_PROTOCOL_IPSEC = 79,
NDPI_PROTOCOL_IP_GRE = 80,
NDPI_PROTOCOL_IP_ICMP = 81,
NDPI_PROTOCOL_IP_IGMP = 82,
@@ -118,7 +118,7 @@ typedef enum {
NDPI_PROTOCOL_RTP = 87,
NDPI_PROTOCOL_RDP = 88,
NDPI_PROTOCOL_VNC = 89,
NDPI_PROTOCOL_TUMBLR = 90, /* Zied Aouini <aouinizied@gmail.com> */
NDPI_PROTOCOL_TUMBLR = 90,
NDPI_PROTOCOL_TLS = 91,
NDPI_PROTOCOL_SSH = 92,
NDPI_PROTOCOL_USENET = 93,
@@ -138,7 +138,7 @@ typedef enum {
NDPI_PROTOCOL_FIESTA = 107,
NDPI_PROTOCOL_FLORENSIA = 108,
NDPI_PROTOCOL_GUILDWARS = 109,
NDPI_PROTOCOL_AMAZON_ALEXA = 110, /* Zied Aouini <aouinizied@gmail.com> */
NDPI_PROTOCOL_AMAZON_ALEXA = 110,
NDPI_PROTOCOL_KERBEROS = 111,
NDPI_PROTOCOL_LDAP = 112,
NDPI_PROTOCOL_MAPLESTORY = 113,
@@ -155,7 +155,7 @@ typedef enum {
NDPI_PROTOCOL_YOUTUBE = 124,
NDPI_PROTOCOL_SKYPE_TEAMS = 125,
NDPI_PROTOCOL_GOOGLE = 126,
NDPI_PROTOCOL_DCERPC = 127,
NDPI_PROTOCOL_RPC = 127,
NDPI_PROTOCOL_NETFLOW = 128,
NDPI_PROTOCOL_SFLOW = 129,
NDPI_PROTOCOL_HTTP_CONNECT = 130,
@@ -167,7 +167,7 @@ typedef enum {
NDPI_PROTOCOL_YOUTUBE_UPLOAD = 136, /* Upload files to youtube */
NDPI_PROTOCOL_HULU = 137,
NDPI_PROTOCOL_CHECKMK = 138,
NDPI_PROTOCOL_AJP = 139, /* Leonn Paiva <leonn.paiva@gmail.com> */
NDPI_PROTOCOL_AJP = 139,
NDPI_PROTOCOL_APPLE = 140,
NDPI_PROTOCOL_WEBEX = 141,
NDPI_PROTOCOL_WHATSAPP = 142,
@@ -176,72 +176,72 @@ typedef enum {
NDPI_PROTOCOL_APPLE_ITUNES = 145,
NDPI_PROTOCOL_RADIUS = 146,
NDPI_PROTOCOL_WINDOWS_UPDATE = 147,
NDPI_PROTOCOL_TEAMVIEWER = 148, /* xplico.org */
NDPI_PROTOCOL_TEAMVIEWER = 148,
NDPI_PROTOCOL_TUENTI = 149,
NDPI_PROTOCOL_LOTUS_NOTES = 150,
NDPI_PROTOCOL_SAP = 151,
NDPI_PROTOCOL_GTP = 152,
NDPI_PROTOCOL_WSD = 153,
NDPI_PROTOCOL_LLMNR = 154,
NDPI_PROTOCOL_REMOTE_SCAN = 155,
NDPI_PROTOCOL_TOCA_BOCA = 155,
NDPI_PROTOCOL_SPOTIFY = 156,
NDPI_PROTOCOL_MESSENGER = 157,
NDPI_PROTOCOL_H323 = 158, /* Remy Mudingay <mudingay@ill.fr> */
NDPI_PROTOCOL_OPENVPN = 159, /* Remy Mudingay <mudingay@ill.fr> */
NDPI_PROTOCOL_NOE = 160, /* Remy Mudingay <mudingay@ill.fr> */
NDPI_PROTOCOL_CISCOVPN = 161, /* Remy Mudingay <mudingay@ill.fr> */
NDPI_PROTOCOL_TEAMSPEAK = 162, /* Remy Mudingay <mudingay@ill.fr> */
NDPI_PROTOCOL_TOR = 163, /* Remy Mudingay <mudingay@ill.fr> */
NDPI_PROTOCOL_SKINNY = 164, /* Remy Mudingay <mudingay@ill.fr> */
NDPI_PROTOCOL_RTCP = 165, /* Remy Mudingay <mudingay@ill.fr> */
NDPI_PROTOCOL_RSYNC = 166, /* Remy Mudingay <mudingay@ill.fr> */
NDPI_PROTOCOL_ORACLE = 167, /* Remy Mudingay <mudingay@ill.fr> */
NDPI_PROTOCOL_CORBA = 168, /* Remy Mudingay <mudingay@ill.fr> */
NDPI_PROTOCOL_UBUNTUONE = 169, /* Remy Mudingay <mudingay@ill.fr> */
NDPI_PROTOCOL_H323 = 158,
NDPI_PROTOCOL_OPENVPN = 159,
NDPI_PROTOCOL_NOE = 160,
NDPI_PROTOCOL_CISCOVPN = 161,
NDPI_PROTOCOL_TEAMSPEAK = 162,
NDPI_PROTOCOL_TOR = 163,
NDPI_PROTOCOL_SKINNY = 164,
NDPI_PROTOCOL_RTCP = 165,
NDPI_PROTOCOL_RSYNC = 166,
NDPI_PROTOCOL_ORACLE = 167,
NDPI_PROTOCOL_CORBA = 168,
NDPI_PROTOCOL_UBUNTUONE = 169,
NDPI_PROTOCOL_WHOIS_DAS = 170,
NDPI_PROTOCOL_COLLECTD = 171,
NDPI_PROTOCOL_SOCKS = 172, /* Tomasz Bujlow <tomasz@skatnet.dk> */
NDPI_PROTOCOL_SD_RTN = 171, /* Agora SD-RTN: https://www.agora.io/en */
NDPI_PROTOCOL_SOCKS = 172,
NDPI_PROTOCOL_NINTENDO = 173,
NDPI_PROTOCOL_RTMP = 174, /* Tomasz Bujlow <tomasz@skatnet.dk> */
NDPI_PROTOCOL_FTP_DATA = 175, /* Tomasz Bujlow <tomasz@skatnet.dk> */
NDPI_PROTOCOL_WIKIPEDIA = 176, /* Tomasz Bujlow <tomasz@skatnet.dk> */
NDPI_PROTOCOL_RTMP = 174,
NDPI_PROTOCOL_FTP_DATA = 175,
NDPI_PROTOCOL_WIKIPEDIA = 176,
NDPI_PROTOCOL_ZMQ = 177,
NDPI_PROTOCOL_AMAZON = 178, /* Tomasz Bujlow <tomasz@skatnet.dk> */
NDPI_PROTOCOL_EBAY = 179, /* Tomasz Bujlow <tomasz@skatnet.dk> */
NDPI_PROTOCOL_CNN = 180, /* Tomasz Bujlow <tomasz@skatnet.dk> */
NDPI_PROTOCOL_MEGACO = 181, /* Gianluca Costa <g.costa@xplico.org> */
NDPI_PROTOCOL_AMAZON = 178,
NDPI_PROTOCOL_EBAY = 179,
NDPI_PROTOCOL_CNN = 180,
NDPI_PROTOCOL_MEGACO = 181,
NDPI_PROTOCOL_REDIS = 182,
NDPI_PROTOCOL_PINTEREST = 183, /* Zied Aouini <aouinizied@gmail.com> */
NDPI_PROTOCOL_PINTEREST = 183,
NDPI_PROTOCOL_VHUA = 184,
NDPI_PROTOCOL_TELEGRAM = 185, /* Gianluca Costa <g.costa@xplico.org> */
NDPI_PROTOCOL_TELEGRAM = 185,
NDPI_PROTOCOL_VEVO = 186,
NDPI_PROTOCOL_PANDORA = 187,
NDPI_PROTOCOL_QUIC = 188, /* Andrea Buscarinu <andrea.buscarinu@gmail.com> - Michele Campus <michelecampus5@gmail.com> */
NDPI_PROTOCOL_QUIC = 188,
NDPI_PROTOCOL_ZOOM = 189, /* Zoom video conference. */
NDPI_PROTOCOL_EAQ = 190,
NDPI_PROTOCOL_OOKLA = 191,
NDPI_PROTOCOL_AMQP = 192,
NDPI_PROTOCOL_KAKAOTALK = 193, /* KakaoTalk Chat (no voice call) */
NDPI_PROTOCOL_KAKAOTALK_VOICE = 194, /* KakaoTalk Voice */
NDPI_PROTOCOL_TWITCH = 195, /* Edoardo Dominici <edoaramis@gmail.com> */
NDPI_PROTOCOL_TWITCH = 195,
NDPI_PROTOCOL_DOH_DOT = 196, /* DoH (DNS over HTTPS), DoT (DNS over TLS), DoQ (DNS over QUIC). TODO: rename in NDPI_PROTOCOL_DOH_DOT_DOQ? */
NDPI_PROTOCOL_WECHAT = 197,
NDPI_PROTOCOL_MPEGTS = 198,
NDPI_PROTOCOL_SNAPCHAT = 199,
NDPI_PROTOCOL_SINA = 200,
NDPI_PROTOCOL_HANGOUT_DUO = 201, /* Google Hangout ad Duo (merged as they are very similar) */
NDPI_PROTOCOL_IFLIX = 202, /* www.vizuamatix.com R&D team & M.Mallawaarachchie <manoj_ws@yahoo.com> */
NDPI_PROTOCOL_IFLIX = 202,
NDPI_PROTOCOL_GITHUB = 203,
NDPI_PROTOCOL_BJNP = 204,
NDPI_PROTOCOL_REDDIT = 205, /* Zied Aouini <aouinizied@gmail.com> */
NDPI_PROTOCOL_REDDIT = 205,
NDPI_PROTOCOL_WIREGUARD = 206,
NDPI_PROTOCOL_SMPP = 207, /* Damir Franusic <df@release14.org> */
NDPI_PROTOCOL_DNSCRYPT = 208, /* Toni Uhlig <matzeton@googlemail.com> */
NDPI_PROTOCOL_TINC = 209, /* William Guglielmo <william@deselmo.com> */
NDPI_PROTOCOL_SMPP = 207,
NDPI_PROTOCOL_DNSCRYPT = 208,
NDPI_PROTOCOL_TINC = 209,
NDPI_PROTOCOL_DEEZER = 210,
NDPI_PROTOCOL_INSTAGRAM = 211, /* Andrea Buscarinu <andrea.buscarinu@gmail.com> */
NDPI_PROTOCOL_INSTAGRAM = 211,
NDPI_PROTOCOL_MICROSOFT = 212,
NDPI_PROTOCOL_STARCRAFT = 213, /* Matteo Bracci <matteobracci1@gmail.com> */
NDPI_PROTOCOL_STARCRAFT = 213,
NDPI_PROTOCOL_TEREDO = 214,
NDPI_PROTOCOL_HOTSPOT_SHIELD = 215,
NDPI_PROTOCOL_IMO = 216,
@@ -260,8 +260,8 @@ typedef enum {
NDPI_PROTOCOL_SOMEIP = 229,
NDPI_PROTOCOL_FIX = 230,
NDPI_PROTOCOL_PLAYSTATION = 231,
NDPI_PROTOCOL_PASTEBIN = 232, /* Paulo Angelo <pa@pauloangelo.com> */
NDPI_PROTOCOL_LINKEDIN = 233, /* Paulo Angelo <pa@pauloangelo.com> */
NDPI_PROTOCOL_PASTEBIN = 232,
NDPI_PROTOCOL_LINKEDIN = 233,
NDPI_PROTOCOL_SOUNDCLOUD = 234,
NDPI_PROTOCOL_CSGO = 235, /* Counter-Strike Global Offensive, Dota = 2 */
NDPI_PROTOCOL_LISP = 236,
@@ -279,20 +279,20 @@ typedef enum {
NDPI_PROTOCOL_ZABBIX = 248,
NDPI_PROTOCOL_S7COMM = 249,
NDPI_PROTOCOL_MSTEAMS = 250,
NDPI_PROTOCOL_WEBSOCKET = 251, /* Leonn Paiva <leonn.paiva@gmail.com> */
NDPI_PROTOCOL_ANYDESK = 252, /* Toni Uhlig <matzeton@googlemail.com> */
NDPI_PROTOCOL_SOAP = 253, /* Toni Uhlig <matzeton@googlemail.com> */
NDPI_PROTOCOL_APPLE_SIRI = 254, /* Zied Aouini <aouinizied@gmail.com> */
NDPI_PROTOCOL_WEBSOCKET = 251,
NDPI_PROTOCOL_ANYDESK = 252,
NDPI_PROTOCOL_SOAP = 253,
NDPI_PROTOCOL_APPLE_SIRI = 254,
NDPI_PROTOCOL_SNAPCHAT_CALL = 255,
NDPI_PROTOCOL_HPVIRTGRP = 256, /* Toni Uhlig <matzeton@googlemail.com> */
NDPI_PROTOCOL_GENSHIN_IMPACT = 257, /* Toni Uhlig <matzeton@googlemail.com> */
NDPI_PROTOCOL_HPVIRTGRP = 256,
NDPI_PROTOCOL_GENSHIN_IMPACT = 257,
NDPI_PROTOCOL_ACTIVISION = 258,
NDPI_PROTOCOL_FORTICLIENT = 259,
NDPI_PROTOCOL_Z3950 = 260, /* Toni Uhlig <matzeton@googlemail.com> */
NDPI_PROTOCOL_Z3950 = 260,
NDPI_PROTOCOL_LIKEE = 261,
NDPI_PROTOCOL_GITLAB = 262,
NDPI_PROTOCOL_AVAST_SECUREDNS = 263, /* Toni Uhlig <matzeton@googlemail.com> */
NDPI_PROTOCOL_CASSANDRA = 264, /* Lucas Santos <lfneiva.santos@gmail.com> */
NDPI_PROTOCOL_AVAST_SECUREDNS = 263,
NDPI_PROTOCOL_CASSANDRA = 264,
NDPI_PROTOCOL_AMAZON_AWS = 265,
NDPI_PROTOCOL_SALESFORCE = 266,
NDPI_PROTOCOL_VIMEO = 267,
@@ -310,6 +310,29 @@ typedef enum {
NDPI_PROTOCOL_BADOO = 279,
NDPI_PROTOCOL_ACCUWEATHER = 280,
NDPI_PROTOCOL_GOOGLE_CLASSROOM = 281,
NDPI_PROTOCOL_HSRP = 282,
NDPI_PROTOCOL_CYBERSECURITY = 283, /* Cybersecurity companies */
NDPI_PROTOCOL_GOOGLE_CLOUD = 284,
NDPI_PROTOCOL_TENCENT = 285,
NDPI_PROTOCOL_RAKNET = 286,
NDPI_PROTOCOL_XIAOMI = 287,
NDPI_PROTOCOL_EDGECAST = 288,
NDPI_PROTOCOL_CACHEFLY = 289,
NDPI_PROTOCOL_SOFTETHER = 290,
NDPI_PROTOCOL_MPEGDASH = 291,
NDPI_PROTOCOL_DAZN = 292,
NDPI_PROTOCOL_GOTO = 293, /* GoTo products, mainly GoToMeeting */
NDPI_PROTOCOL_RSH = 294,
NDPI_PROTOCOL_1KXUN = 295,
NDPI_PROTOCOL_IP_PGM = 296,
NDPI_PROTOCOL_IP_PIM = 297,
NDPI_PROTOCOL_COLLECTD = 298,
NDPI_PROTOCOL_TUNNELBEAR = 299,
NDPI_PROTOCOL_CLOUDFLARE_WARP = 300,
NDPI_PROTOCOL_I3D = 301, /* i3d.net: Game Hosting service */
NDPI_PROTOCOL_RIOTGAMES = 302,
NDPI_PROTOCOL_PSIPHON = 303,
NDPI_PROTOCOL_ULTRASURF = 304,
#ifdef CUSTOM_NDPI_PROTOCOLS
#include "../../../nDPI-custom/custom_ndpi_protocol_ids.h"
+14 -1
View File
@@ -85,6 +85,7 @@ void init_ftp_control_dissector(struct ndpi_detection_module_struct *ndpi_struct
void init_ftp_data_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_gnutella_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_gtp_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_hsrp_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_guildwars_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_h323_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_halflife2_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
@@ -168,6 +169,7 @@ void init_vhua_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int
void init_viber_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_vmware_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_vnc_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_vxlan_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_warcraft3_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_whois_das_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_world_of_warcraft_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
@@ -204,7 +206,6 @@ void init_modbus_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_i
void init_capwap_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_zabbix_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_wireguard_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_targus_getdata_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_dnp3_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_104_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_s7comm_dissector(struct ndpi_detection_module_struct *ndpi_struct,u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
@@ -218,6 +219,18 @@ void init_genshin_impact_dissector(struct ndpi_detection_module_struct *ndpi_str
void init_z3950_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_avast_securedns_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_cassandra_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_ethernet_ip_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_toca_boca_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_sd_rtn_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_raknet_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_xiaomi_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_mpegdash_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_rsh_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_ipsec_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_collectd_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_i3d_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_riotgames_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
void init_ultrasurf_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
/* ndpi_main.c */
extern u_int32_t ndpi_ip_port_hash_funct(u_int32_t ip, u_int16_t port);
+166 -81
View File
@@ -61,15 +61,12 @@ typedef enum {
- nDPI/wireshark/ndpi.lua
- ndpi_risk2str (in ndpi_utils.c)
- doc/flow_risks.rst
- ndpi_risk_enum (in python/ndpi.py)
- ndpi_known_risks (ndpi_main.c)
To make sure the risk is also seen by ntopng:
1. Add a new flow alert key to the enum FlowAlertTypeEnum in include/ntop_typedefs.h
2. Add the very same flow alert key to the table flow_alert_keys in scripts/lua/modules/alert_keys/flow_alert_keys.lua
3. Add the risk to the array risk_enum_to_alert_type in src/FlowRiskAlerts.cpp
- To initialize .alert_type use the flow alert key added in 1. and an AlertCategory
- To initialize .alert_lua_name use a unique string
Example: https://github.com/ntop/ntopng/commit/aecc1e3e6505a0522439dbb2b295a3703d3d0f9a
*/
@@ -114,15 +111,42 @@ typedef enum {
NDPI_DNS_LARGE_PACKET,
NDPI_DNS_FRAGMENTED,
NDPI_INVALID_CHARACTERS,
NDPI_POSSIBLE_EXPLOIT, /* Log4J and other exploits */
NDPI_POSSIBLE_EXPLOIT, /* Log4J, Wordpress and other exploits */
NDPI_TLS_CERTIFICATE_ABOUT_TO_EXPIRE,
NDPI_PUNYCODE_IDN, /* https://en.wikipedia.org/wiki/Punycode */
NDPI_ERROR_CODE_DETECTED,
NDPI_HTTP_CRAWLER_BOT,
NDPI_ANONYMOUS_SUBSCRIBER,
NDPI_UNIDIRECTIONAL_TRAFFIC, /* NOTE: as nDPI can detect a protocol with one packet, make sure
your app will clear this risk if future packets (not sent to nDPI)
are received in the opposite direction */
/* Leave this as last member */
NDPI_MAX_RISK /* must be <= 63 due to (**) */
} ndpi_risk_enum;
typedef u_int64_t ndpi_risk; /* (**) */
typedef enum {
NDPI_PARAM_HOSTNAME /* char* */,
NDPI_PARAM_ISSUER_DN /* char* */,
NDPI_PARAM_HOST_IPV4 /* u_int32_t* */, /* Network byte order */
/*
IMPORTANT
please update ndpi_check_flow_risk_exceptions()
(in ndpi_utils.c) whenever you add a new parameter
*/
/* Leave this as last member */
NDPI_MAX_RISK_PARAM_ID
} ndpi_risk_param_id;
typedef struct {
ndpi_risk_param_id id;
void *value; /* char* for strings, u_int32_t* for IPv4 addresses */
} ndpi_risk_params;
typedef enum {
NDPI_RISK_LOW,
NDPI_RISK_MEDIUM,
@@ -168,7 +192,14 @@ typedef struct node_t {
/* NDPI_MASK_SIZE */
typedef u_int32_t ndpi_ndpi_mask;
#define MAX_NUM_RISK_INFOS 8
/* NDPI_PROTO_BITMASK_STRUCT */
#ifdef NDPI_CFFI_PREPROCESSING
#undef NDPI_NUM_FDS_BITS
#define NDPI_NUM_FDS_BITS 16
#endif
typedef struct ndpi_protocol_bitmask_struct {
ndpi_ndpi_mask fds_bits[NDPI_NUM_FDS_BITS];
} ndpi_protocol_bitmask_struct_t;
@@ -179,6 +210,7 @@ typedef void (*ndpi_debug_function_ptr) (u_int32_t protocol, void *module_struct
const char *func, unsigned line,
const char *format, ...);
#ifndef NDPI_CFFI_PREPROCESSING_EXCLUDE_PACKED
/* ************************************************************ */
/* ******************* NDPI NETWORKS HEADERS ****************** */
/* ************************************************************ */
@@ -196,6 +228,15 @@ typedef void (*ndpi_debug_function_ptr) (u_int32_t protocol, void *module_struct
#define PACK_OFF __attribute__((packed))
#endif
/* PLEASE DO NOT REMOVE OR CHANGE THE ORDER OF WHAT IS DELIMITED BY CFFI.NDPI_PACKED_STRUCTURES FLAG AS IT IS USED FOR
PYTHON BINDINGS AUTO GENERATION */
#ifdef NDPI_CFFI_PREPROCESSING
#undef PACK_ON
#undef PACK_OFF
#define PACK_ON
#define PACK_OFF
#endif
//CFFI.NDPI_PACKED_STRUCTURES
PACK_ON
struct ndpi_chdlc
{
@@ -433,12 +474,6 @@ struct ndpi_dns_packet_header {
u_int16_t additional_rrs;
} PACK_OFF;
typedef union
{
u_int32_t ipv4;
struct ndpi_in6_addr ipv6;
} ndpi_ip_addr_t;
/* +++++++++++++++++++++++ ICMP header +++++++++++++++++++++++ */
@@ -488,6 +523,22 @@ struct ndpi_vxlanhdr {
/* ******************* ********************* ****************** */
/* ************************************************************ */
PACK_ON struct tinc_cache_entry {
u_int32_t src_address;
u_int32_t dst_address;
u_int16_t dst_port;
} PACK_OFF;
//CFFI.NDPI_PACKED_STRUCTURES
#endif // NDPI_CFFI_PREPROCESSING_EXCLUDE_PACKED
typedef union
{
u_int32_t ipv4;
struct ndpi_in6_addr ipv6;
} ndpi_ip_addr_t;
typedef struct message {
u_int8_t *buffer;
u_int buffer_len, buffer_used;
@@ -497,12 +548,6 @@ typedef struct message {
/* NDPI_PROTOCOL_TINC */
#define TINC_CACHE_MAX_SIZE 10
PACK_ON struct tinc_cache_entry {
u_int32_t src_address;
u_int32_t dst_address;
u_int16_t dst_port;
} PACK_OFF;
/*
In case the typedef below is modified, please update
ndpi_http_method2str (ndpi_utils.c)
@@ -517,7 +562,9 @@ typedef enum {
NDPI_HTTP_METHOD_PUT,
NDPI_HTTP_METHOD_DELETE,
NDPI_HTTP_METHOD_TRACE,
NDPI_HTTP_METHOD_CONNECT
NDPI_HTTP_METHOD_CONNECT,
NDPI_HTTP_METHOD_RPC_IN_DATA,
NDPI_HTTP_METHOD_RPC_OUT_DATA,
} ndpi_http_method;
struct ndpi_lru_cache_entry {
@@ -634,9 +681,6 @@ struct ndpi_flow_tcp_struct {
/* NDPI_PROTOCOL_SKYPE */
u_int8_t skype_packet_id;
/* NDPI_PROTOCOL_CITRIX */
u_int8_t citrix_packet_id;
/* NDPI_PROTOCOL_LOTUS_NOTES */
u_int8_t lotus_notes_packet_id;
@@ -699,7 +743,8 @@ struct ndpi_flow_udp_struct {
/* NDPI_PROTOCOL_QUIC */
u_int8_t *quic_reasm_buf;
u_int32_t quic_reasm_buf_len;
u_int8_t *quic_reasm_buf_bitmap;
u_int32_t quic_reasm_buf_last_pos;
/* NDPI_PROTOCOL_CSGO */
u_int8_t csgo_strid[18],csgo_state,csgo_s2;
@@ -804,7 +849,9 @@ typedef enum {
NDPI_CONFIDENCE_UNKNOWN = 0, /* Unknown classification */
NDPI_CONFIDENCE_MATCH_BY_PORT, /* Classification obtained looking only at the L4 ports */
NDPI_CONFIDENCE_MATCH_BY_IP, /* Classification obtained looking only at the L3 addresses */
NDPI_CONFIDENCE_DPI_CACHE, /* Classification results based on same LRU cache (i.e. correlation among sessions) */
NDPI_CONFIDENCE_DPI_PARTIAL, /* Classification results based on partial/incomplete DPI information */
NDPI_CONFIDENCE_DPI_PARTIAL_CACHE, /* Classification results based on some LRU cache with partial/incomplete DPI information */
NDPI_CONFIDENCE_DPI_CACHE, /* Classification results based on some LRU cache (i.e. correlation among sessions) */
NDPI_CONFIDENCE_DPI, /* Deep packet inspection */
/*
@@ -870,6 +917,7 @@ typedef enum {
NDPI_PROTOCOL_CATEGORY_SHOPPING,
NDPI_PROTOCOL_CATEGORY_PRODUCTIVITY,
NDPI_PROTOCOL_CATEGORY_FILE_SHARING,
/*
The category below is used by sites who are used
to test connectivity
@@ -880,6 +928,7 @@ typedef enum {
The category below is used for vocal assistance services.
*/
NDPI_PROTOCOL_CATEGORY_VIRTUAL_ASSISTANT,
NDPI_PROTOCOL_CATEGORY_CYBERSECURITY,
/* Some custom categories */
CUSTOM_CATEGORY_MINING = 99,
@@ -915,14 +964,15 @@ typedef enum {
typedef enum {
ndpi_pref_direction_detect_disable = 0,
ndpi_pref_enable_tls_block_dissection /* nDPI considers only those blocks past the certificate exchange */
ndpi_pref_max_packets_to_process,
ndpi_pref_enable_tls_block_dissection, /* nDPI considers only those blocks past the certificate exchange */
} ndpi_detection_preference;
/* ntop extensions */
typedef struct ndpi_proto_defaults {
char *protoName;
ndpi_protocol_category_t protoCategory;
u_int8_t isClearTextProto;
u_int8_t isClearTextProto:1, isAppProtocol:1, _notused:6;
u_int16_t *subprotocols;
u_int32_t subprotocol_count;
u_int16_t protoId, protoIdx;
@@ -941,6 +991,12 @@ typedef struct _ndpi_automa {
void *ac_automa; /* Real type is AC_AUTOMATA_t */
} ndpi_automa;
typedef struct ndpi_str_hash {
unsigned int hash;
void *value;
u_int8_t private_data[0];
} ndpi_str_hash;
typedef struct ndpi_proto {
/*
Note
@@ -949,9 +1005,10 @@ typedef struct ndpi_proto {
*/
u_int16_t master_protocol /* e.g. HTTP */, app_protocol /* e.g. FaceBook */;
ndpi_protocol_category_t category;
void *custom_category_userdata;
} ndpi_protocol;
#define NDPI_PROTOCOL_NULL { NDPI_PROTOCOL_UNKNOWN , NDPI_PROTOCOL_UNKNOWN , NDPI_PROTOCOL_CATEGORY_UNSPECIFIED }
#define NDPI_PROTOCOL_NULL { NDPI_PROTOCOL_UNKNOWN , NDPI_PROTOCOL_UNKNOWN , NDPI_PROTOCOL_CATEGORY_UNSPECIFIED, NULL }
#define NUM_CUSTOM_CATEGORIES 5
#define CUSTOM_CATEGORY_LABEL_LEN 32
@@ -964,6 +1021,9 @@ typedef struct ndpi_proto {
#define _NDPI_CONFIG_H_
#endif
/* PLEASE DO NOT REMOVE OR CHANGE THE ORDER OF WHAT IS DELIMITED BY CFFI.NDPI_MODULE_STRUCT FLAG AS IT IS USED FOR
PYTHON BINDINGS AUTO GENERATION */
//CFFI.NDPI_MODULE_STRUCT
typedef enum {
ndpi_stun_cache,
ndpi_hangout_cache
@@ -976,10 +1036,9 @@ typedef struct ndpi_list_struct {
struct ndpi_detection_module_struct {
NDPI_PROTOCOL_BITMASK detection_bitmask;
NDPI_PROTOCOL_BITMASK generic_http_packet_bitmask;
u_int32_t current_ts;
u_int32_t ticks_per_second;
u_int16_t max_packets_to_process;
u_int16_t num_tls_blocks_to_follow;
u_int8_t skip_tls_blocks_until_change_cipher:1, enable_ja3_plus:1, _notused:6;
u_int8_t tls_certificate_expire_in_x_days;
@@ -988,20 +1047,17 @@ struct ndpi_detection_module_struct {
void *user_data;
#endif
char custom_category_labels[NUM_CUSTOM_CATEGORIES][CUSTOM_CATEGORY_LABEL_LEN];
/* callback function buffer */
struct ndpi_call_function_struct callback_buffer[NDPI_MAX_SUPPORTED_PROTOCOLS + 1];
struct ndpi_call_function_struct *callback_buffer;
struct ndpi_call_function_struct *callback_buffer_tcp_no_payload;
struct ndpi_call_function_struct *callback_buffer_tcp_payload;
struct ndpi_call_function_struct *callback_buffer_udp;
struct ndpi_call_function_struct *callback_buffer_non_tcp_udp;
u_int32_t callback_buffer_size;
struct ndpi_call_function_struct callback_buffer_tcp_no_payload[NDPI_MAX_SUPPORTED_PROTOCOLS + 1];
u_int32_t callback_buffer_size_tcp_no_payload;
struct ndpi_call_function_struct callback_buffer_tcp_payload[NDPI_MAX_SUPPORTED_PROTOCOLS + 1];
u_int32_t callback_buffer_size_tcp_payload;
struct ndpi_call_function_struct callback_buffer_udp[NDPI_MAX_SUPPORTED_PROTOCOLS + 1];
u_int32_t callback_buffer_size_udp;
struct ndpi_call_function_struct callback_buffer_non_tcp_udp[NDPI_MAX_SUPPORTED_PROTOCOLS + 1];
u_int32_t callback_buffer_size_non_tcp_udp;
ndpi_default_ports_tree_node_t *tcpRoot, *udpRoot;
@@ -1020,8 +1076,6 @@ struct ndpi_detection_module_struct {
/* misc parameters */
u_int32_t tcp_max_retransmission_window_size;
u_int32_t directconnect_connection_ip_tick_timeout;
/* subprotocol registration handler */
struct ndpi_subprotocol_conf_struct subprotocol_conf[NDPI_MAX_SUPPORTED_PROTOCOLS + 1];
@@ -1032,13 +1086,14 @@ struct ndpi_detection_module_struct {
/* HTTP/DNS/HTTPS/QUIC host matching */
ndpi_automa host_automa, /* Used for DNS/HTTPS */
risky_domain_automa, tls_cert_subject_automa,
malicious_ja3_automa, malicious_sha1_automa,
host_risk_mask_automa, common_alpns_automa;
host_risk_mask_automa, common_alpns_automa;
ndpi_str_hash *malicious_ja3_hashmap, *malicious_sha1_hashmap;
/* IMPORTANT: please update ndpi_finalize_initialization() whenever you add a new automa */
ndpi_list *trusted_issuer_dn;
void *ip_risk_mask_ptree;
void *ip_risk_ptree;
struct {
ndpi_automa hostnames, hostnames_shadow;
@@ -1049,13 +1104,6 @@ struct ndpi_detection_module_struct {
/* IP-based protocol detection */
void *protocols_ptree;
/* irc parameters */
u_int32_t irc_timeout;
/* gnutella parameters */
u_int32_t gnutella_timeout;
/* rstp */
u_int32_t jabber_stun_timeout;
u_int32_t jabber_file_transfer_timeout;
u_int8_t ip_version_limit;
/* NDPI_PROTOCOL_OOKLA */
@@ -1101,6 +1149,7 @@ struct ndpi_detection_module_struct {
};
#endif /* NDPI_LIB_COMPILATION */
//CFFI.NDPI_MODULE_STRUCT
typedef enum {
ndpi_cipher_safe = NDPI_CIPHER_SAFE,
@@ -1118,11 +1167,11 @@ struct tls_heuristics {
u_int8_t is_safari_tls:1, is_firefox_tls:1, is_chrome_tls:1, notused:5;
};
/*
NOTE
When the struct below is modified don't forget to update
- ndpi_flow_struct (in python/ndpi.py)
*/
struct ndpi_risk_information {
ndpi_risk_enum id;
char *info;
};
struct ndpi_flow_struct {
u_int16_t detected_protocol_stack[NDPI_PROTOCOL_SIZE];
@@ -1173,18 +1222,20 @@ struct ndpi_flow_struct {
char flow_extra_info[16];
/* General purpose field used to save mainly hostname/SNI information.
* In details it used for: DNS and NETBIOS name, HTTP and DHCP hostname,
* WHOIS request, TLS/QUIC server name and STUN realm.
* In details it used for: COLLECTD, DNS, SSDP and NETBIOS name, HTTP and DHCP hostname,
* WHOIS request, TLS/QUIC server name, XIAOMI domain and STUN realm.
*
* Please, think *very* hard before increasing its size!
*/
char host_server_name[80];
u_int8_t initial_binary_bytes[8], initial_binary_bytes_len;
u_int8_t risk_checked:1, ip_risk_mask_evaluated:1, host_risk_mask_evaluated:1, _notused:5;
u_int8_t risk_checked:1, ip_risk_mask_evaluated:1, host_risk_mask_evaluated:1, tree_risk_checked:1, _notused:4;
ndpi_risk risk_mask; /* Stores the flow risk mask for flow peers */
ndpi_risk risk; /* Issues found with this flow [bitmask of ndpi_risk] */
struct ndpi_risk_information risk_infos[MAX_NUM_RISK_INFOS]; /* String that contains information about the risks found */
u_int8_t num_risk_infos;
/*
This structure below will not not stay inside the protos
structure below as HTTP is used by many subprotocols
@@ -1256,13 +1307,17 @@ struct ndpi_flow_struct {
char *esni;
} encrypted_sni;
ndpi_cipher_weakness server_unsafe_cipher;
} tls_quic;
} tls_quic; /* Used also by DTLS and POPS/IMAPS/SMTPS */
struct {
char client_signature[48], server_signature[48];
char hassh_client[33], hassh_server[33];
} ssh;
struct {
char filename[128];
} tftp;
struct {
u_int8_t username_detected:1, username_found:1,
password_detected:1, password_found:1,
@@ -1271,6 +1326,16 @@ struct ndpi_flow_struct {
char username[32], password[32];
} telnet;
struct {
char client_username[32];
char server_username[32];
char command[48];
} rsh;
struct {
char client_username[32];
} collectd;
struct {
char version[32];
} ubntac2;
@@ -1287,6 +1352,12 @@ struct ndpi_flow_struct {
char fingerprint[48];
char class_ident[48];
} dhcp;
struct {
u_int8_t version; /* 0 = SNMPv1, 1 = SNMPv2c, 3 = SNMPv3 */
u_int8_t primitive; /* GET, SET... */
u_int8_t error_status;
} snmp;
} protos;
/*** ALL protocol specific 64 bit variables here ***/
@@ -1299,9 +1370,13 @@ struct ndpi_flow_struct {
/* NDPI_PROTOCOL_REDIS */
u_int8_t redis_s2d_first_char, redis_d2s_first_char;
/* Only packets with L5 data (ie no TCP SYN, pure ACKs, ...) */
u_int16_t packet_counter; // can be 0 - 65000
u_int16_t packet_direction_counter[2];
u_int16_t byte_counter[2];
/* Every packets */
u_int16_t packet_direction_complete_counter[2]; // can be 0 - 65000
/* NDPI_PROTOCOL_BITTORRENT */
u_int8_t bittorrent_stage; // can be 0 - 255
u_int8_t bt_check_performed : 1;
@@ -1352,6 +1427,13 @@ struct ndpi_flow_struct {
/* NDPI_PROTOCOL_TINC */
u_int8_t tinc_state;
struct tinc_cache_entry tinc_cache_entry;
/*
Leave this field below at the end
The field below can be used by third
party dissectors for storing private data
*/
u_int8_t priv_data[16];
};
#define NDPI_PROTOCOL_DEFAULT_LEVEL 0
@@ -1382,12 +1464,24 @@ typedef struct {
typedef u_int32_t ndpi_init_prefs;
typedef enum
{
ndpi_no_prefs = 0,
ndpi_dont_load_tor_hosts = 1,
ndpi_dont_init_libgcrypt = 2,
ndpi_enable_ja3_plus = 4
typedef enum {
ndpi_no_prefs = 0,
ndpi_dont_load_tor_list = (1 << 0),
ndpi_dont_init_libgcrypt = (1 << 1),
ndpi_enable_ja3_plus = (1 << 2),
ndpi_dont_load_azure_list = (1 << 3),
ndpi_dont_load_whatsapp_list = (1 << 4),
ndpi_dont_load_amazon_aws_list = (1 << 5),
ndpi_dont_load_ethereum_list = (1 << 6),
ndpi_dont_load_zoom_list = (1 << 7),
ndpi_dont_load_cloudflare_list = (1 << 8),
ndpi_dont_load_microsoft_list = (1 << 9),
ndpi_dont_load_google_list = (1 << 10),
ndpi_dont_load_google_cloud_list = (1 << 11),
ndpi_dont_load_asn_lists = (1 << 12),
ndpi_dont_load_icloud_private_relay_list = (1 << 13),
ndpi_dont_init_risk_ptree = (1 << 14),
ndpi_dont_load_cachefly_list = (1 << 15),
} ndpi_prefs;
typedef struct {
@@ -1466,7 +1560,11 @@ typedef struct {
#define ndpi_private_deserializer ndpi_private_serializer
#ifdef NDPI_CFFI_PREPROCESSING
typedef struct { char c[72]; } ndpi_serializer;
#else
typedef struct { char c[sizeof(ndpi_private_serializer)]; } ndpi_serializer;
#endif
#define ndpi_deserializer ndpi_serializer
@@ -1535,7 +1633,8 @@ struct ndpi_hll {
enum ndpi_bin_family {
ndpi_bin_family8,
ndpi_bin_family16,
ndpi_bin_family32
ndpi_bin_family32,
ndpi_bin_family64,
};
struct ndpi_bin {
@@ -1547,24 +1646,10 @@ struct ndpi_bin {
u_int8_t *bins8; /* num_bins bins */
u_int16_t *bins16; /* num_bins bins */
u_int32_t *bins32; /* num_bins bins */
u_int64_t *bins64; /* num_bins bins */
} u;
};
/* **************************************** */
struct ndpi_str_hash_info {
char *key; /* Key */
u_int8_t key_len;
u_int8_t value; /* Value */
struct ndpi_str_hash_info *next;
};
typedef struct {
u_int32_t num_buckets, max_num_entries;
struct ndpi_str_hash_info **buckets;
} ndpi_str_hash;
/* **************************************** */
#define HW_HISTORY_LEN 4
+1 -1
View File
@@ -1,7 +1,7 @@
/*
* ndpi_unix.h
*
* Copyright (C) 2011-16 - ntop.org
* Copyright (C) 2011-22 - ntop.org
*
* This file is part of nDPI, an open source deep packet inspection
* library based on the OpenDPI and PACE technology by ipoque GmbH
+30 -2
View File
@@ -1,4 +1,25 @@
/*
* ndpi_main.c
*
* Copyright (C) 2011-22 - ntop.org
*
* This file is part of nDPI, an open source deep packet inspection
* library based on the OpenDPI and PACE technology by ipoque GmbH
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nDPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef __NDPI_UTILS_H__
#define __NDPI_UTILS_H__
@@ -12,18 +33,20 @@
// #define NDPI_ENABLE_DEBUG_INFO_MESSAGES
// #define NDPI_ENABLE_DEBUG_TRACE_MESSAGES
#ifndef NDPI_CFFI_PREPROCESSING
extern void printRawData(const uint8_t *ptr, size_t len);
//extern uint8_t add_segment_to_buffer( struct ndpi_flow_struct *flow, struct ndpi_tcphdr const * tcph, uint32_t waited);
//extern uint8_t check_for_sequence( struct ndpi_flow_struct *flow, struct ndpi_tcphdr const * tcph);
extern u_int8_t ndpi_ends_with(char *str, char *ends);
#endif // NDPI_CFFI_PREPROCESSING
/* **************************************** */
/* Can't call libc functions from kernel space, define some stub instead */
#define ndpi_isalpha(ch) (((ch) >= 'a' && (ch) <= 'z') || ((ch) >= 'A' && (ch) <= 'Z'))
#define ndpi_isdigit(ch) ((ch) >= '0' && (ch) <= '9')
#define ndpi_isalnum(ch) (ndpi_isalpha(ch) != 0 || ndpi_isdigit(ch) != 0)
#define ndpi_isspace(ch) (((ch) >= '\t' && (ch) <= '\r') || ((ch) == ' '))
#define ndpi_isprint(ch) ((ch) >= 0x20 && (ch) <= 0x7e)
#define ndpi_ispunct(ch) (((ch) >= '!' && (ch) <= '/') || \
@@ -31,4 +54,9 @@ extern u_int8_t ndpi_ends_with(char *str, char *ends);
((ch) >= '[' && (ch) <= '`') || \
((ch) >= '{' && (ch) <= '~'))
#ifndef NDPI_CFFI_PREPROCESSING
int ndpi_vsnprintf(char * str, size_t size, char const * format, va_list va_args);
int ndpi_snprintf(char * str, size_t size, char const * format, ...);
#endif
#endif
+4 -11
View File
@@ -1,7 +1,7 @@
/*
* ndpi_win32.h
*
* Copyright (C) 2011-16 - ntop.org
* Copyright (C) 2011-22 - ntop.org
*
* This file is part of nDPI, an open source deep packet inspection
* library based on the OpenDPI and PACE technology by ipoque GmbH
@@ -47,18 +47,8 @@
#define _CRT_SECURE_NO_WARNINGS
#endif
#define _WS2TCPIP_H_ /* Avoid compilation problems */
#define IPVERSION 4 /* on *nix it is defined in netinet/ip.h */
#ifndef MIN
#define MIN(X, Y) (((X) < (Y)) ? (X) : (Y))
#endif
#ifndef IPPROTO_SCTP
#define IPPROTO_SCTP 132
#endif
#if defined(__MINGW32__) || defined(__MINGW64__)
#undef gettimeofday
#define gettimeofday mingw_gettimeofday
@@ -82,4 +72,7 @@ typedef unsigned __int64 u_int64_t;
#define sleep(a /* sec */) Sleep(1000*a /* ms */)
/* https://stackoverflow.com/questions/7993050/multiplatform-atomic-increment */
#define __sync_fetch_and_add(a,b) InterlockedExchangeAdd ((a), b)
#endif /* __NDPI_WIN32_H__ */
+22 -5
View File
@@ -14,9 +14,12 @@ RANLIB = @RANLIB@
prefix = @prefix@
libdir = ${prefix}/lib
includedir = ${prefix}/include/ndpi
CFLAGS += -fPIC -DPIC -I../include -Ithird_party/include -DNDPI_LIB_COMPILATION @CFLAGS@ @CUSTOM_NDPI@
ifneq ($(OS),Windows_NT)
CFLAGS += -fPIC -DPIC
endif
CFLAGS += -I../include -Ithird_party/include -DNDPI_LIB_COMPILATION @CFLAGS@ @GPROF_CFLAGS@ @CUSTOM_NDPI@
LDFLAGS = @LDFLAGS@
LIBS = @ADDITIONAL_LIBS@ @LIBS@
LIBS = @ADDITIONAL_LIBS@ @LIBS@ @GPROF_LIBS@
OBJECTS = $(patsubst protocols/%.c, protocols/%.o, $(wildcard protocols/*.c)) $(patsubst third_party/src/%.c, third_party/src/%.o, $(wildcard third_party/src/*.c)) $(patsubst ./%.c, ./%.o, $(wildcard ./*.c))
HEADERS = $(wildcard ../include/*.h)
@@ -25,6 +28,12 @@ NDPI_LIB_STATIC = libndpi.a
NDPI_LIB_SHARED_BASE = libndpi.so
NDPI_LIB_SHARED = $(NDPI_LIB_SHARED_BASE).@NDPI_VERSION_SHORT@
NDPI_LIBS = $(NDPI_LIB_STATIC) $(NDPI_LIB_SHARED)
USE_HOST_LIBGCRYPT = @USE_HOST_LIBGCRYPT@
ifneq ($(USE_HOST_LIBGCRYPT),0)
TMP_OBJS := $(OBJECTS)
OBJECTS = $(filter-out third_party/src/gcrypt_light.o,$(TMP_OBJS))
endif
ifneq ($(OS),Windows_NT)
OS := $(shell uname)
@@ -63,14 +72,22 @@ clean:
/bin/rm -f $(NDPI_LIB_STATIC) $(OBJECTS) *.o *.so *.lo libndpi.so*
distdir:
cp ndpi_content_match.c.inc '$(distdir)/'
find . -type d | xargs -I'{}' mkdir -p '$(distdir)/{}'
find ../include -type f -name '*.h' | xargs -I'{}' cp '{}' '$(distdir)/{}'
find . -type f -name '*.c' -o -name '*.h' | xargs -I'{}' cp '{}' '$(distdir)/{}'
find ../include -type f -name '*.h' \
-a '!' -name 'ndpi_api.h' \
-a '!' -name 'ndpi_config.h' \
-a '!' -name 'ndpi_define.h' | xargs -I'{}' cp '{}' '$(distdir)/{}'
find . -type f -name '*.c' \
-o -name '*.cc' \
-o -name '*.c.inc' \
-o -name '*.h' | xargs -I'{}' cp '{}' '$(distdir)/{}'
distclean: clean
/bin/rm -f Makefile
check:
true # nothing to do here
cppcheck:
cppcheck --template='{file}:{line}:{severity}:{message}' --quiet --enable=all --force -I ../include *.c protocols/*.c
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,36 @@
/*
*
* This file is generated automatically and part of nDPI
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nDPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* ****************************************************** */
static ndpi_network ndpi_protocol_apple_protocol_list[] = {
{ 0x11000000 /* 17.0.0.0/8 */, 8, NDPI_PROTOCOL_APPLE },
{ 0x39660000 /* 57.102.0.0/15 */, 15, NDPI_PROTOCOL_APPLE },
{ 0x39700000 /* 57.112.0.0/12 */, 12, NDPI_PROTOCOL_APPLE },
{ 0x3F5CE000 /* 63.92.224.0/19 */, 19, NDPI_PROTOCOL_APPLE },
{ 0x41C71600 /* 65.199.22.0/23 */, 23, NDPI_PROTOCOL_APPLE },
{ 0x8BB28000 /* 139.178.128.0/18 */, 18, NDPI_PROTOCOL_APPLE },
{ 0x90B20000 /* 144.178.0.0/19 */, 19, NDPI_PROTOCOL_APPLE },
{ 0x90B22000 /* 144.178.32.0/24 */, 24, NDPI_PROTOCOL_APPLE },
{ 0x90B22400 /* 144.178.36.0/22 */, 22, NDPI_PROTOCOL_APPLE },
{ 0x90B23000 /* 144.178.48.0/20 */, 20, NDPI_PROTOCOL_APPLE },
/* End */
{ 0x0, 0, 0 }
};
@@ -0,0 +1,68 @@
/*
*
* This file is generated automatically and part of nDPI
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nDPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* ****************************************************** */
static ndpi_network ndpi_protocol_bloomberg_protocol_list[] = {
{ 0x3F580300 /* 63.88.3.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
{ 0x4173E200 /* 65.115.226.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BB1000 /* 69.187.16.0/21 */, 21, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BB1800 /* 69.187.24.0/22 */, 22, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BB1D00 /* 69.187.29.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BB1F00 /* 69.187.31.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BB2000 /* 69.187.32.0/23 */, 23, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BB4900 /* 69.187.73.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BF5000 /* 69.191.80.0/21 */, 21, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BF8800 /* 69.191.136.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BFB000 /* 69.191.176.0/21 */, 21, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BFB800 /* 69.191.184.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BFBA00 /* 69.191.186.0/23 */, 23, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BFBC00 /* 69.191.188.0/22 */, 22, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BFC000 /* 69.191.192.0/22 */, 22, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BFC600 /* 69.191.198.0/23 */, 23, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BFC800 /* 69.191.200.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BFCA00 /* 69.191.202.0/23 */, 23, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BFCC00 /* 69.191.204.0/22 */, 22, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BFD000 /* 69.191.208.0/22 */, 22, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BFD400 /* 69.191.212.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BFD600 /* 69.191.214.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BFD800 /* 69.191.216.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BFDA00 /* 69.191.218.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BFDC00 /* 69.191.220.0/23 */, 23, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BFE200 /* 69.191.226.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BFE500 /* 69.191.229.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BFE600 /* 69.191.230.0/23 */, 23, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BFE900 /* 69.191.233.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BFEA00 /* 69.191.234.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BFED00 /* 69.191.237.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BFEE00 /* 69.191.238.0/23 */, 23, NDPI_PROTOCOL_BLOOMBERG },
{ 0x45BFF000 /* 69.191.240.0/20 */, 20, NDPI_PROTOCOL_BLOOMBERG },
{ 0x67FBCC00 /* 103.251.204.0/22 */, 22, NDPI_PROTOCOL_BLOOMBERG },
{ 0xA02BFA00 /* 160.43.250.0/23 */, 23, NDPI_PROTOCOL_BLOOMBERG },
{ 0xA02BFD00 /* 160.43.253.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
{ 0xB90A7400 /* 185.10.116.0/23 */, 23, NDPI_PROTOCOL_BLOOMBERG },
{ 0xC7ACA900 /* 199.172.169.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
{ 0xCCB3F000 /* 204.179.240.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
{ 0xCDD87000 /* 205.216.112.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
{ 0xCE9C3500 /* 206.156.53.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
{ 0xD0163800 /* 208.22.56.0/23 */, 23, NDPI_PROTOCOL_BLOOMBERG },
/* End */
{ 0x0, 0, 0 }
};
@@ -0,0 +1,91 @@
/*
*
* This file is generated automatically and part of nDPI
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nDPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* ****************************************************** */
static ndpi_network ndpi_protocol_citrix_protocol_list[] = {
{ 0x17EFE300 /* 23.239.227.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0x404A1100 /* 64.74.17.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0x404A1200 /* 64.74.18.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
{ 0x405F8000 /* 64.95.128.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
{ 0x43D94400 /* 67.217.68.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0x43D94600 /* 67.217.70.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
{ 0x43D94800 /* 67.217.72.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0x43D94B00 /* 67.217.75.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0x43D94C00 /* 67.217.76.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
{ 0x43D94E00 /* 67.217.78.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0x43D95000 /* 67.217.80.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
{ 0x43D95200 /* 67.217.82.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0x43D95400 /* 67.217.84.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0x43D95600 /* 67.217.86.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0x43D95800 /* 67.217.88.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0x43D95A00 /* 67.217.90.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
{ 0x43D95C00 /* 67.217.92.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0x43D95E00 /* 67.217.94.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
{ 0x44400000 /* 68.64.0.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0x44400800 /* 68.64.8.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
{ 0x44400A00 /* 68.64.10.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0x44400C00 /* 68.64.12.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
{ 0x44400E00 /* 68.64.14.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0x44401100 /* 68.64.17.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0x44401200 /* 68.64.18.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
{ 0x44401400 /* 68.64.20.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0x44401600 /* 68.64.22.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
{ 0x44401800 /* 68.64.24.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
{ 0x44401B00 /* 68.64.27.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0x44401C00 /* 68.64.28.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
{ 0x44401E00 /* 68.64.30.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0x4E6C7400 /* 78.108.116.0/22 */, 22, NDPI_PROTOCOL_CITRIX },
{ 0x4E6C7800 /* 78.108.120.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
{ 0x4E6C7E00 /* 78.108.126.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
{ 0x5FAC4600 /* 95.172.70.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0xADC70000 /* 173.199.0.0/21 */, 21, NDPI_PROTOCOL_CITRIX },
{ 0xADC70C00 /* 173.199.12.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
{ 0xADC70F00 /* 173.199.15.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0xADC71100 /* 173.199.17.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0xADC71200 /* 173.199.18.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
{ 0xADC71400 /* 173.199.20.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0xADC71700 /* 173.199.23.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0xADC71A00 /* 173.199.26.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
{ 0xADC71E00 /* 173.199.30.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
{ 0xADC72000 /* 173.199.32.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
{ 0xADC72B00 /* 173.199.43.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0xADC72C00 /* 173.199.44.0/22 */, 22, NDPI_PROTOCOL_CITRIX },
{ 0xADC73200 /* 173.199.50.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
{ 0xADC73400 /* 173.199.52.0/22 */, 22, NDPI_PROTOCOL_CITRIX },
{ 0xADC73C00 /* 173.199.60.0/22 */, 22, NDPI_PROTOCOL_CITRIX },
{ 0xBC422B00 /* 188.66.43.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0xCAAD1900 /* 202.173.25.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0xCEB76400 /* 206.183.100.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0xD873D000 /* 216.115.208.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0xD873D200 /* 216.115.210.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
{ 0xD873D500 /* 216.115.213.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0xD873D600 /* 216.115.214.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
{ 0xD873D900 /* 216.115.217.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0xD873DA00 /* 216.115.218.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0xD873DD00 /* 216.115.221.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0xD873DE00 /* 216.115.222.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
{ 0xD8DB7200 /* 216.219.114.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
{ 0xD8DB7400 /* 216.219.116.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0xD8DB7700 /* 216.219.119.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
{ 0xD8DB7800 /* 216.219.120.0/22 */, 22, NDPI_PROTOCOL_CITRIX },
/* End */
{ 0x0, 0, 0 }
};
@@ -0,0 +1,33 @@
/*
*
* This file is generated automatically and part of nDPI
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nDPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* ****************************************************** */
static ndpi_network ndpi_protocol_dropbox_protocol_list[] = {
{ 0x2D3A4000 /* 45.58.64.0/20 */, 20, NDPI_PROTOCOL_DROPBOX },
{ 0x40700D00 /* 64.112.13.0/24 */, 24, NDPI_PROTOCOL_DROPBOX },
{ 0x6CA0A000 /* 108.160.160.0/20 */, 20, NDPI_PROTOCOL_DROPBOX },
{ 0xA27D0000 /* 162.125.0.0/16 */, 16, NDPI_PROTOCOL_DROPBOX },
{ 0xB92D0800 /* 185.45.8.0/22 */, 22, NDPI_PROTOCOL_DROPBOX },
{ 0xB969A400 /* 185.105.164.0/24 */, 24, NDPI_PROTOCOL_DROPBOX },
{ 0xC0BDC800 /* 192.189.200.0/23 */, 23, NDPI_PROTOCOL_DROPBOX },
/* End */
{ 0x0, 0, 0 }
};
@@ -0,0 +1,183 @@
/*
*
* This file is generated automatically and part of nDPI
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nDPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* ****************************************************** */
static ndpi_network ndpi_protocol_edgecast_protocol_list[] = {
{ 0x05684000 /* 5.104.64.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x05684200 /* 5.104.66.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0x05684400 /* 5.104.68.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x2E164200 /* 46.22.66.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0x2E164400 /* 46.22.68.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0x2E164700 /* 46.22.71.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x2E164A00 /* 46.22.74.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x31E77E00 /* 49.231.126.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x400C0000 /* 64.12.0.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x400C1000 /* 64.12.16.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x400C2000 /* 64.12.32.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x400C3000 /* 64.12.48.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x400C4000 /* 64.12.64.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
{ 0x400C4400 /* 64.12.68.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0x400C4700 /* 64.12.71.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x400C4800 /* 64.12.72.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x400C8000 /* 64.12.128.0/19 */, 19, NDPI_PROTOCOL_EDGECAST },
{ 0x400CA000 /* 64.12.160.0/20 */, 20, NDPI_PROTOCOL_EDGECAST },
{ 0x400CB000 /* 64.12.176.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
{ 0x400CB400 /* 64.12.180.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x400CFF00 /* 64.12.255.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x44E82000 /* 68.232.32.0/21 */, 21, NDPI_PROTOCOL_EDGECAST },
{ 0x44E82800 /* 68.232.40.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x44E82A00 /* 68.232.42.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x44E82C00 /* 68.232.44.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
{ 0x48155000 /* 72.21.80.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0x48155400 /* 72.21.84.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
{ 0x48155B00 /* 72.21.91.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x48155C00 /* 72.21.92.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x48155E00 /* 72.21.94.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0x5DB8D700 /* 93.184.215.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x5DB8D800 /* 93.184.216.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x5DB8DA00 /* 93.184.218.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0x5DB8DC00 /* 93.184.220.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
{ 0x6CA1F000 /* 108.161.240.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0x6CA1F500 /* 108.161.245.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x6CA1F700 /* 108.161.247.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x6CA1FD00 /* 108.161.253.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x6CA1FE00 /* 108.161.254.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x6EA42400 /* 110.164.36.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x6EE8B000 /* 110.232.176.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x6EE8B200 /* 110.232.178.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x7512E800 /* 117.18.232.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x7512ED00 /* 117.18.237.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x7512EE00 /* 117.18.238.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0x772E5500 /* 119.46.85.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x88E49000 /* 136.228.144.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x98C30400 /* 152.195.4.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x98C30600 /* 152.195.6.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0x98C30800 /* 152.195.8.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0x98C30B00 /* 152.195.11.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x98C30C00 /* 152.195.12.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
{ 0x98C31000 /* 152.195.16.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
{ 0x98C31500 /* 152.195.21.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x98C31600 /* 152.195.22.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0x98C31900 /* 152.195.25.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x98C31A00 /* 152.195.26.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0x98C31C00 /* 152.195.28.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0x98C32000 /* 152.195.32.0/21 */, 21, NDPI_PROTOCOL_EDGECAST },
{ 0x98C33200 /* 152.195.50.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0x98C33400 /* 152.195.52.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
{ 0x98C33800 /* 152.195.56.0/21 */, 21, NDPI_PROTOCOL_EDGECAST },
{ 0x98C34000 /* 152.195.64.0/18 */, 18, NDPI_PROTOCOL_EDGECAST },
{ 0x98C38000 /* 152.195.128.0/20 */, 20, NDPI_PROTOCOL_EDGECAST },
{ 0x98C39000 /* 152.195.144.0/21 */, 21, NDPI_PROTOCOL_EDGECAST },
{ 0x98C39800 /* 152.195.152.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
{ 0x98C39C00 /* 152.195.156.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0x98C3A400 /* 152.195.164.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x98C3A600 /* 152.195.166.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0x98C3B300 /* 152.195.179.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x98C3B500 /* 152.195.181.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x98C3B600 /* 152.195.182.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0x98C3B800 /* 152.195.184.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x98C3BA00 /* 152.195.186.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0x98C3BC00 /* 152.195.188.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0x98C3C400 /* 152.195.196.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
{ 0x98C3CA00 /* 152.195.202.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0x98C3CC00 /* 152.195.204.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
{ 0x98C3D000 /* 152.195.208.0/21 */, 21, NDPI_PROTOCOL_EDGECAST },
{ 0x98C3DB00 /* 152.195.219.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x98C3DC00 /* 152.195.220.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0x98C3DF00 /* 152.195.223.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x98C3E000 /* 152.195.224.0/19 */, 19, NDPI_PROTOCOL_EDGECAST },
{ 0x98C70000 /* 152.199.0.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
{ 0x98C70400 /* 152.199.4.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0x98C70600 /* 152.199.6.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x98C71000 /* 152.199.16.0/21 */, 21, NDPI_PROTOCOL_EDGECAST },
{ 0x98C71800 /* 152.199.24.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x98C72000 /* 152.199.32.0/21 */, 21, NDPI_PROTOCOL_EDGECAST },
{ 0x98C72800 /* 152.199.40.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
{ 0x98C72C00 /* 152.199.44.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x98C73000 /* 152.199.48.0/21 */, 21, NDPI_PROTOCOL_EDGECAST },
{ 0x98C73800 /* 152.199.56.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x98C75A00 /* 152.199.90.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0x98C75C00 /* 152.199.92.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
{ 0x98C76000 /* 152.199.96.0/19 */, 19, NDPI_PROTOCOL_EDGECAST },
{ 0x98C79200 /* 152.199.146.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x98C79B00 /* 152.199.155.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0x98C7BF00 /* 152.199.191.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0xC0100100 /* 192.16.1.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0xC0100200 /* 192.16.2.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0xC0100600 /* 192.16.6.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0xC0100E00 /* 192.16.14.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0xC0101000 /* 192.16.16.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0xC0101200 /* 192.16.18.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0xC0101800 /* 192.16.24.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0xC0102000 /* 192.16.32.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
{ 0xC0102400 /* 192.16.36.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0xC0102600 /* 192.16.38.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0xC0102A00 /* 192.16.42.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0xC0102E00 /* 192.16.46.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0xC0103000 /* 192.16.48.0/21 */, 21, NDPI_PROTOCOL_EDGECAST },
{ 0xC0103A00 /* 192.16.58.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0xC0103C00 /* 192.16.60.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0xC0103F00 /* 192.16.63.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0xC01E1800 /* 192.30.24.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E58000 /* 192.229.128.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E58200 /* 192.229.130.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E58400 /* 192.229.132.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E58800 /* 192.229.136.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E58C00 /* 192.229.140.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E58E00 /* 192.229.142.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E59000 /* 192.229.144.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E59500 /* 192.229.149.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E59600 /* 192.229.150.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E59800 /* 192.229.152.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E59C00 /* 192.229.156.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E5A200 /* 192.229.162.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E5A900 /* 192.229.169.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E5AA00 /* 192.229.170.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E5AD00 /* 192.229.173.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E5B200 /* 192.229.178.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E5B600 /* 192.229.182.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E5BB00 /* 192.229.187.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E5BC00 /* 192.229.188.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E5BE00 /* 192.229.190.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E5C200 /* 192.229.194.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E5C600 /* 192.229.198.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E5CA00 /* 192.229.202.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E5D000 /* 192.229.208.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E5D500 /* 192.229.213.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E5DA00 /* 192.229.218.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E5DC00 /* 192.229.220.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E5E000 /* 192.229.224.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E5E300 /* 192.229.227.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E5E400 /* 192.229.228.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E5E700 /* 192.229.231.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E5E800 /* 192.229.232.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E5EA00 /* 192.229.234.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E5EC00 /* 192.229.236.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
{ 0xC0E5F000 /* 192.229.240.0/20 */, 20, NDPI_PROTOCOL_EDGECAST },
{ 0xC6071000 /* 198.7.16.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
{ 0xC6071400 /* 198.7.20.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0xC6071600 /* 198.7.22.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0xC6071B00 /* 198.7.27.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0xC6071D00 /* 198.7.29.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
{ 0xD5AF5000 /* 213.175.80.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
/* End */
{ 0x0, 0, 0 }
};
@@ -0,0 +1,77 @@
/*
*
* This file is generated automatically and part of nDPI
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nDPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* ****************************************************** */
static ndpi_network ndpi_protocol_facebook_protocol_list[] = {
{ 0x1F0D1800 /* 31.13.24.0/21 */, 21, NDPI_PROTOCOL_FACEBOOK },
{ 0x1F0D4000 /* 31.13.64.0/18 */, 18, NDPI_PROTOCOL_FACEBOOK },
{ 0x2D402800 /* 45.64.40.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
{ 0x42DC9000 /* 66.220.144.0/20 */, 20, NDPI_PROTOCOL_FACEBOOK },
{ 0x453FB000 /* 69.63.176.0/20 */, 20, NDPI_PROTOCOL_FACEBOOK },
{ 0x45ABE000 /* 69.171.224.0/19 */, 19, NDPI_PROTOCOL_FACEBOOK },
{ 0x4A774C00 /* 74.119.76.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
{ 0x66846000 /* 102.132.96.0/20 */, 20, NDPI_PROTOCOL_FACEBOOK },
{ 0x66847000 /* 102.132.112.0/21 */, 21, NDPI_PROTOCOL_FACEBOOK },
{ 0x66847800 /* 102.132.120.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
{ 0x66847A00 /* 102.132.122.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
{ 0x66847C00 /* 102.132.124.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
{ 0x66DDBC00 /* 102.221.188.0/23 */, 23, NDPI_PROTOCOL_FACEBOOK },
{ 0x66DDBF00 /* 102.221.191.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
{ 0x67046000 /* 103.4.96.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
{ 0x81860000 /* 129.134.0.0/17 */, 17, NDPI_PROTOCOL_FACEBOOK },
{ 0x81868000 /* 129.134.128.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
{ 0x81868200 /* 129.134.130.0/23 */, 23, NDPI_PROTOCOL_FACEBOOK },
{ 0x81868400 /* 129.134.132.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
{ 0x81868700 /* 129.134.135.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
{ 0x81868800 /* 129.134.136.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
{ 0x81868C00 /* 129.134.140.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
{ 0x81868F00 /* 129.134.143.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
{ 0x81869000 /* 129.134.144.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
{ 0x81869300 /* 129.134.147.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
{ 0x81869400 /* 129.134.148.0/23 */, 23, NDPI_PROTOCOL_FACEBOOK },
{ 0x81869600 /* 129.134.150.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
{ 0x81869A00 /* 129.134.154.0/23 */, 23, NDPI_PROTOCOL_FACEBOOK },
{ 0x81869C00 /* 129.134.156.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
{ 0x8186A000 /* 129.134.160.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
{ 0x8186A300 /* 129.134.163.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
{ 0x8186A400 /* 129.134.164.0/23 */, 23, NDPI_PROTOCOL_FACEBOOK },
{ 0x8186A800 /* 129.134.168.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
{ 0x8186AC00 /* 129.134.172.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
{ 0x9DF00000 /* 157.240.0.0/17 */, 17, NDPI_PROTOCOL_FACEBOOK },
{ 0x9DF08000 /* 157.240.128.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
{ 0x9DF09C00 /* 157.240.156.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
{ 0x9DF09F00 /* 157.240.159.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
{ 0x9DF0AC00 /* 157.240.172.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
{ 0x9DF0AE00 /* 157.240.174.0/23 */, 23, NDPI_PROTOCOL_FACEBOOK },
{ 0x9DF0B000 /* 157.240.176.0/23 */, 23, NDPI_PROTOCOL_FACEBOOK },
{ 0x9DF0B300 /* 157.240.179.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
{ 0x9DF0B400 /* 157.240.180.0/23 */, 23, NDPI_PROTOCOL_FACEBOOK },
{ 0x9DF0C000 /* 157.240.192.0/18 */, 18, NDPI_PROTOCOL_FACEBOOK },
{ 0xA3728000 /* 163.114.128.0/20 */, 20, NDPI_PROTOCOL_FACEBOOK },
{ 0xADFC4000 /* 173.252.64.0/18 */, 18, NDPI_PROTOCOL_FACEBOOK },
{ 0xB33CC000 /* 179.60.192.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
{ 0xB93CD800 /* 185.60.216.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
{ 0xB959DA00 /* 185.89.218.0/23 */, 23, NDPI_PROTOCOL_FACEBOOK },
{ 0xC7C94000 /* 199.201.64.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
{ 0xCC0F1400 /* 204.15.20.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
/* End */
{ 0x0, 0, 0 }
};
@@ -1,9 +1,6 @@
/*
*
* Copyright (C) 2011-18 - ntop.org
*
* This file is part of nDPI, an open source deep packet inspection
* library based on the OpenDPI and PACE technology by ipoque GmbH
* This file is generated automatically and part of nDPI
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -20,10 +17,13 @@
*
*/
#import <Cocoa/Cocoa.h>
@interface AppDelegate : NSObject <NSApplicationDelegate>
/* ****************************************************** */
@end
static ndpi_network ndpi_protocol_github_protocol_list[] = {
{ 0x8C527000 /* 140.82.112.0/20 */, 20, NDPI_PROTOCOL_GITHUB },
{ 0x8F374000 /* 143.55.64.0/20 */, 20, NDPI_PROTOCOL_GITHUB },
{ 0xC01EFC00 /* 192.30.252.0/22 */, 22, NDPI_PROTOCOL_GITHUB },
/* End */
{ 0x0, 0, 0 }
};
+91
View File
@@ -0,0 +1,91 @@
/*
*
* This file is generated automatically and part of nDPI
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nDPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* ****************************************************** */
static ndpi_network ndpi_protocol_goto_protocol_list[] = {
{ 0x17EFE300 /* 23.239.227.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0x404A1100 /* 64.74.17.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0x404A1200 /* 64.74.18.0/23 */, 23, NDPI_PROTOCOL_GOTO },
{ 0x405F8000 /* 64.95.128.0/23 */, 23, NDPI_PROTOCOL_GOTO },
{ 0x43D94400 /* 67.217.68.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0x43D94600 /* 67.217.70.0/23 */, 23, NDPI_PROTOCOL_GOTO },
{ 0x43D94800 /* 67.217.72.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0x43D94B00 /* 67.217.75.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0x43D94C00 /* 67.217.76.0/23 */, 23, NDPI_PROTOCOL_GOTO },
{ 0x43D94E00 /* 67.217.78.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0x43D95000 /* 67.217.80.0/23 */, 23, NDPI_PROTOCOL_GOTO },
{ 0x43D95200 /* 67.217.82.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0x43D95400 /* 67.217.84.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0x43D95600 /* 67.217.86.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0x43D95800 /* 67.217.88.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0x43D95A00 /* 67.217.90.0/23 */, 23, NDPI_PROTOCOL_GOTO },
{ 0x43D95C00 /* 67.217.92.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0x43D95E00 /* 67.217.94.0/23 */, 23, NDPI_PROTOCOL_GOTO },
{ 0x44400000 /* 68.64.0.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0x44400800 /* 68.64.8.0/23 */, 23, NDPI_PROTOCOL_GOTO },
{ 0x44400A00 /* 68.64.10.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0x44400C00 /* 68.64.12.0/23 */, 23, NDPI_PROTOCOL_GOTO },
{ 0x44400E00 /* 68.64.14.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0x44401100 /* 68.64.17.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0x44401200 /* 68.64.18.0/23 */, 23, NDPI_PROTOCOL_GOTO },
{ 0x44401400 /* 68.64.20.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0x44401600 /* 68.64.22.0/23 */, 23, NDPI_PROTOCOL_GOTO },
{ 0x44401800 /* 68.64.24.0/23 */, 23, NDPI_PROTOCOL_GOTO },
{ 0x44401B00 /* 68.64.27.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0x44401C00 /* 68.64.28.0/23 */, 23, NDPI_PROTOCOL_GOTO },
{ 0x44401E00 /* 68.64.30.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0x4E6C7400 /* 78.108.116.0/22 */, 22, NDPI_PROTOCOL_GOTO },
{ 0x4E6C7800 /* 78.108.120.0/23 */, 23, NDPI_PROTOCOL_GOTO },
{ 0x4E6C7E00 /* 78.108.126.0/23 */, 23, NDPI_PROTOCOL_GOTO },
{ 0x5FAC4600 /* 95.172.70.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0xADC70000 /* 173.199.0.0/21 */, 21, NDPI_PROTOCOL_GOTO },
{ 0xADC70C00 /* 173.199.12.0/23 */, 23, NDPI_PROTOCOL_GOTO },
{ 0xADC70F00 /* 173.199.15.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0xADC71100 /* 173.199.17.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0xADC71200 /* 173.199.18.0/23 */, 23, NDPI_PROTOCOL_GOTO },
{ 0xADC71400 /* 173.199.20.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0xADC71700 /* 173.199.23.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0xADC71A00 /* 173.199.26.0/23 */, 23, NDPI_PROTOCOL_GOTO },
{ 0xADC71E00 /* 173.199.30.0/23 */, 23, NDPI_PROTOCOL_GOTO },
{ 0xADC72000 /* 173.199.32.0/23 */, 23, NDPI_PROTOCOL_GOTO },
{ 0xADC72B00 /* 173.199.43.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0xADC72C00 /* 173.199.44.0/22 */, 22, NDPI_PROTOCOL_GOTO },
{ 0xADC73200 /* 173.199.50.0/23 */, 23, NDPI_PROTOCOL_GOTO },
{ 0xADC73400 /* 173.199.52.0/22 */, 22, NDPI_PROTOCOL_GOTO },
{ 0xADC73C00 /* 173.199.60.0/22 */, 22, NDPI_PROTOCOL_GOTO },
{ 0xBC422B00 /* 188.66.43.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0xCAAD1900 /* 202.173.25.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0xCEB76400 /* 206.183.100.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0xD873D000 /* 216.115.208.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0xD873D200 /* 216.115.210.0/23 */, 23, NDPI_PROTOCOL_GOTO },
{ 0xD873D500 /* 216.115.213.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0xD873D600 /* 216.115.214.0/23 */, 23, NDPI_PROTOCOL_GOTO },
{ 0xD873D900 /* 216.115.217.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0xD873DA00 /* 216.115.218.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0xD873DD00 /* 216.115.221.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0xD873DE00 /* 216.115.222.0/23 */, 23, NDPI_PROTOCOL_GOTO },
{ 0xD8DB7200 /* 216.219.114.0/23 */, 23, NDPI_PROTOCOL_GOTO },
{ 0xD8DB7400 /* 216.219.116.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0xD8DB7700 /* 216.219.119.0/24 */, 24, NDPI_PROTOCOL_GOTO },
{ 0xD8DB7800 /* 216.219.120.0/22 */, 22, NDPI_PROTOCOL_GOTO },
/* End */
{ 0x0, 0, 0 }
};
@@ -1,9 +1,6 @@
/*
*
* Copyright (C) 2011-18 - ntop.org
*
* This file is part of nDPI, an open source deep packet inspection
* library based on the OpenDPI and PACE technology by ipoque GmbH
* This file is generated automatically and part of nDPI
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -20,10 +17,10 @@
*
*/
#import <Cocoa/Cocoa.h>
@interface ViewController : NSViewController
/* ****************************************************** */
@end
static ndpi_network ndpi_protocol_hotspot_shield_protocol_list[] = {
/* End */
{ 0x0, 0, 0 }
};
@@ -0,0 +1,40 @@
/*
*
* This file is generated automatically and part of nDPI
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nDPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* ****************************************************** */
static ndpi_network ndpi_protocol_netflix_protocol_list[] = {
{ 0x17F60000 /* 23.246.0.0/18 */, 18, NDPI_PROTOCOL_NETFLIX },
{ 0x254DB800 /* 37.77.184.0/21 */, 21, NDPI_PROTOCOL_NETFLIX },
{ 0x2D390000 /* 45.57.0.0/17 */, 17, NDPI_PROTOCOL_NETFLIX },
{ 0x40788000 /* 64.120.128.0/17 */, 17, NDPI_PROTOCOL_NETFLIX },
{ 0x42C58000 /* 66.197.128.0/17 */, 17, NDPI_PROTOCOL_NETFLIX },
{ 0x4535E000 /* 69.53.224.0/19 */, 19, NDPI_PROTOCOL_NETFLIX },
{ 0x6CAF2000 /* 108.175.32.0/20 */, 20, NDPI_PROTOCOL_NETFLIX },
{ 0xB902DC00 /* 185.2.220.0/22 */, 22, NDPI_PROTOCOL_NETFLIX },
{ 0xB909BC00 /* 185.9.188.0/22 */, 22, NDPI_PROTOCOL_NETFLIX },
{ 0xC0AD4000 /* 192.173.64.0/18 */, 18, NDPI_PROTOCOL_NETFLIX },
{ 0xC6266000 /* 198.38.96.0/19 */, 19, NDPI_PROTOCOL_NETFLIX },
{ 0xC62D3000 /* 198.45.48.0/20 */, 20, NDPI_PROTOCOL_NETFLIX },
{ 0xCF2D4800 /* 207.45.72.0/22 */, 22, NDPI_PROTOCOL_NETFLIX },
{ 0xD04B4C00 /* 208.75.76.0/22 */, 22, NDPI_PROTOCOL_NETFLIX },
/* End */
{ 0x0, 0, 0 }
};
@@ -0,0 +1,127 @@
/*
*
* This file is generated automatically and part of nDPI
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nDPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* ****************************************************** */
static ndpi_network ndpi_protocol_opendns_protocol_list[] = {
{ 0x43D74000 /* 67.215.64.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x43D74200 /* 67.215.66.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x43D74400 /* 67.215.68.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x43D74600 /* 67.215.70.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x43D74900 /* 67.215.73.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x43D74B00 /* 67.215.75.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x43D74C00 /* 67.215.76.0/22 */, 22, NDPI_PROTOCOL_OPENDNS },
{ 0x43D75000 /* 67.215.80.0/22 */, 22, NDPI_PROTOCOL_OPENDNS },
{ 0x43D75400 /* 67.215.84.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x43D75600 /* 67.215.86.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x43D75800 /* 67.215.88.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x43D75A00 /* 67.215.90.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x43D75C00 /* 67.215.92.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x43D75E00 /* 67.215.94.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x92700000 /* 146.112.0.0/21 */, 21, NDPI_PROTOCOL_OPENDNS },
{ 0x92700800 /* 146.112.8.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x92700B00 /* 146.112.11.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x92700C00 /* 146.112.12.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x92700E00 /* 146.112.14.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x92701000 /* 146.112.16.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x92701200 /* 146.112.18.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x92701400 /* 146.112.20.0/22 */, 22, NDPI_PROTOCOL_OPENDNS },
{ 0x92701800 /* 146.112.24.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x92701A00 /* 146.112.26.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x92701C00 /* 146.112.28.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x92701F00 /* 146.112.31.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x92702100 /* 146.112.33.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x92702200 /* 146.112.34.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x92702400 /* 146.112.36.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x92702600 /* 146.112.38.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x92702800 /* 146.112.40.0/21 */, 21, NDPI_PROTOCOL_OPENDNS },
{ 0x92703000 /* 146.112.48.0/20 */, 20, NDPI_PROTOCOL_OPENDNS },
{ 0x92704000 /* 146.112.64.0/22 */, 22, NDPI_PROTOCOL_OPENDNS },
{ 0x92704800 /* 146.112.72.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x92704E00 /* 146.112.78.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x92705000 /* 146.112.80.0/20 */, 20, NDPI_PROTOCOL_OPENDNS },
{ 0x92706000 /* 146.112.96.0/20 */, 20, NDPI_PROTOCOL_OPENDNS },
{ 0x92707000 /* 146.112.112.0/21 */, 21, NDPI_PROTOCOL_OPENDNS },
{ 0x92708000 /* 146.112.128.0/19 */, 19, NDPI_PROTOCOL_OPENDNS },
{ 0x9270A000 /* 146.112.160.0/20 */, 20, NDPI_PROTOCOL_OPENDNS },
{ 0x9270B000 /* 146.112.176.0/22 */, 22, NDPI_PROTOCOL_OPENDNS },
{ 0x9270B800 /* 146.112.184.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x9270BA00 /* 146.112.186.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x9270BE00 /* 146.112.190.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x9270C000 /* 146.112.192.0/21 */, 21, NDPI_PROTOCOL_OPENDNS },
{ 0x9270C800 /* 146.112.200.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x9270CB00 /* 146.112.203.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x9270CC00 /* 146.112.204.0/22 */, 22, NDPI_PROTOCOL_OPENDNS },
{ 0x9270D000 /* 146.112.208.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x9270D200 /* 146.112.210.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x9270D400 /* 146.112.212.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x9270D600 /* 146.112.214.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x9270D800 /* 146.112.216.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x9270DB00 /* 146.112.219.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x9270DD00 /* 146.112.221.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x9270DE00 /* 146.112.222.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x9270E000 /* 146.112.224.0/19 */, 19, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBE0000 /* 155.190.0.0/22 */, 22, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBE0800 /* 155.190.8.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBE0F00 /* 155.190.15.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBE1100 /* 155.190.17.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBE1200 /* 155.190.18.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBE1400 /* 155.190.20.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBE1C00 /* 155.190.28.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBE2100 /* 155.190.33.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBE2200 /* 155.190.34.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBE2400 /* 155.190.36.0/22 */, 22, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBE2A00 /* 155.190.42.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBE2C00 /* 155.190.44.0/22 */, 22, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBE3000 /* 155.190.48.0/22 */, 22, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBE3500 /* 155.190.53.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBE3600 /* 155.190.54.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBE4200 /* 155.190.66.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBE4400 /* 155.190.68.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBE4600 /* 155.190.70.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBE5300 /* 155.190.83.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBE7400 /* 155.190.116.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBE8000 /* 155.190.128.0/21 */, 21, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBE8900 /* 155.190.137.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBE8A00 /* 155.190.138.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBE8C00 /* 155.190.140.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBE8F00 /* 155.190.143.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBEA000 /* 155.190.160.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBEC000 /* 155.190.192.0/21 */, 21, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBEC800 /* 155.190.200.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBECA00 /* 155.190.202.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBECC00 /* 155.190.204.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBECE00 /* 155.190.206.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBED000 /* 155.190.208.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBED700 /* 155.190.215.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBEF800 /* 155.190.248.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBEFA00 /* 155.190.250.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0x9BBEFE00 /* 155.190.254.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0xB93C5400 /* 185.60.84.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0xB93C5600 /* 185.60.86.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0xCCC2E800 /* 204.194.232.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0xCCC2EA00 /* 204.194.234.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0xCCC2ED00 /* 204.194.237.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
{ 0xCCC2EE00 /* 204.194.238.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
{ 0xD043D800 /* 208.67.216.0/21 */, 21, NDPI_PROTOCOL_OPENDNS },
{ 0xD0452000 /* 208.69.32.0/21 */, 21, NDPI_PROTOCOL_OPENDNS },
/* End */
{ 0x0, 0, 0 }
};
@@ -0,0 +1,58 @@
/*
*
* This file is generated automatically and part of nDPI
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nDPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* ****************************************************** */
static ndpi_network ndpi_protocol_starcraft_protocol_list[] = {
{ 0x052AA800 /* 5.42.168.0/21 */, 21, NDPI_PROTOCOL_STARCRAFT },
{ 0x052AB000 /* 5.42.176.0/20 */, 20, NDPI_PROTOCOL_STARCRAFT },
{ 0x18690000 /* 24.105.0.0/18 */, 18, NDPI_PROTOCOL_STARCRAFT },
{ 0x25F40000 /* 37.244.0.0/19 */, 19, NDPI_PROTOCOL_STARCRAFT },
{ 0x25F42000 /* 37.244.32.0/20 */, 20, NDPI_PROTOCOL_STARCRAFT },
{ 0x25F43000 /* 37.244.48.0/23 */, 23, NDPI_PROTOCOL_STARCRAFT },
{ 0x25F43200 /* 37.244.50.0/24 */, 24, NDPI_PROTOCOL_STARCRAFT },
{ 0x25F43400 /* 37.244.52.0/22 */, 22, NDPI_PROTOCOL_STARCRAFT },
{ 0x25F43800 /* 37.244.56.0/21 */, 21, NDPI_PROTOCOL_STARCRAFT },
{ 0x3B992800 /* 59.153.40.0/23 */, 23, NDPI_PROTOCOL_STARCRAFT },
{ 0x67C62000 /* 103.198.32.0/23 */, 23, NDPI_PROTOCOL_STARCRAFT },
{ 0x6E2DD000 /* 110.45.208.0/24 */, 24, NDPI_PROTOCOL_STARCRAFT },
{ 0x75340600 /* 117.52.6.0/24 */, 24, NDPI_PROTOCOL_STARCRAFT },
{ 0x75341A00 /* 117.52.26.0/23 */, 23, NDPI_PROTOCOL_STARCRAFT },
{ 0x75341C00 /* 117.52.28.0/23 */, 23, NDPI_PROTOCOL_STARCRAFT },
{ 0x75342100 /* 117.52.33.0/24 */, 24, NDPI_PROTOCOL_STARCRAFT },
{ 0x75342200 /* 117.52.34.0/23 */, 23, NDPI_PROTOCOL_STARCRAFT },
{ 0x75342400 /* 117.52.36.0/23 */, 23, NDPI_PROTOCOL_STARCRAFT },
{ 0x79FE8900 /* 121.254.137.0/24 */, 24, NDPI_PROTOCOL_STARCRAFT },
{ 0x79FECE00 /* 121.254.206.0/23 */, 23, NDPI_PROTOCOL_STARCRAFT },
{ 0x79FEDA00 /* 121.254.218.0/24 */, 24, NDPI_PROTOCOL_STARCRAFT },
{ 0x89DD4000 /* 137.221.64.0/19 */, 19, NDPI_PROTOCOL_STARCRAFT },
{ 0x89DD6000 /* 137.221.96.0/21 */, 21, NDPI_PROTOCOL_STARCRAFT },
{ 0x89DD6800 /* 137.221.104.0/22 */, 22, NDPI_PROTOCOL_STARCRAFT },
{ 0x89DD6C00 /* 137.221.108.0/23 */, 23, NDPI_PROTOCOL_STARCRAFT },
{ 0x89DD6E00 /* 137.221.110.0/24 */, 24, NDPI_PROTOCOL_STARCRAFT },
{ 0x9E73C000 /* 158.115.192.0/20 */, 20, NDPI_PROTOCOL_STARCRAFT },
{ 0x9E73D800 /* 158.115.216.0/21 */, 21, NDPI_PROTOCOL_STARCRAFT },
{ 0xB6A21F00 /* 182.162.31.0/24 */, 24, NDPI_PROTOCOL_STARCRAFT },
{ 0xB93C7000 /* 185.60.112.0/22 */, 22, NDPI_PROTOCOL_STARCRAFT },
{ 0xC64A2000 /* 198.74.32.0/22 */, 22, NDPI_PROTOCOL_STARCRAFT },
{ 0xC64A2400 /* 198.74.36.0/23 */, 23, NDPI_PROTOCOL_STARCRAFT },
/* End */
{ 0x0, 0, 0 }
};
@@ -0,0 +1,48 @@
/*
*
* This file is generated automatically and part of nDPI
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nDPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* ****************************************************** */
static ndpi_network ndpi_protocol_steam_protocol_list[] = {
{ 0x670A7C00 /* 103.10.124.0/23 */, 23, NDPI_PROTOCOL_STEAM },
{ 0x671C3600 /* 103.28.54.0/24 */, 24, NDPI_PROTOCOL_STEAM },
{ 0x92429800 /* 146.66.152.0/24 */, 24, NDPI_PROTOCOL_STEAM },
{ 0x92429B00 /* 146.66.155.0/24 */, 24, NDPI_PROTOCOL_STEAM },
{ 0x99FE5600 /* 153.254.86.0/24 */, 24, NDPI_PROTOCOL_STEAM },
{ 0x9B85E000 /* 155.133.224.0/22 */, 22, NDPI_PROTOCOL_STEAM },
{ 0x9B85E600 /* 155.133.230.0/24 */, 24, NDPI_PROTOCOL_STEAM },
{ 0x9B85E800 /* 155.133.232.0/23 */, 23, NDPI_PROTOCOL_STEAM },
{ 0x9B85EA00 /* 155.133.234.0/24 */, 24, NDPI_PROTOCOL_STEAM },
{ 0x9B85EC00 /* 155.133.236.0/22 */, 22, NDPI_PROTOCOL_STEAM },
{ 0x9B85F000 /* 155.133.240.0/23 */, 23, NDPI_PROTOCOL_STEAM },
{ 0x9B85F500 /* 155.133.245.0/24 */, 24, NDPI_PROTOCOL_STEAM },
{ 0x9B85F600 /* 155.133.246.0/24 */, 24, NDPI_PROTOCOL_STEAM },
{ 0x9B85F800 /* 155.133.248.0/21 */, 21, NDPI_PROTOCOL_STEAM },
{ 0xA2FEC000 /* 162.254.192.0/21 */, 21, NDPI_PROTOCOL_STEAM },
{ 0xB919B600 /* 185.25.182.0/23 */, 23, NDPI_PROTOCOL_STEAM },
{ 0xBED92100 /* 190.217.33.0/24 */, 24, NDPI_PROTOCOL_STEAM },
{ 0xC0456000 /* 192.69.96.0/22 */, 22, NDPI_PROTOCOL_STEAM },
{ 0xCDB9C200 /* 205.185.194.0/24 */, 24, NDPI_PROTOCOL_STEAM },
{ 0xCDC40600 /* 205.196.6.0/24 */, 24, NDPI_PROTOCOL_STEAM },
{ 0xD040C800 /* 208.64.200.0/22 */, 22, NDPI_PROTOCOL_STEAM },
{ 0xD04EA400 /* 208.78.164.0/22 */, 22, NDPI_PROTOCOL_STEAM },
/* End */
{ 0x0, 0, 0 }
};
@@ -0,0 +1,33 @@
/*
*
* This file is generated automatically and part of nDPI
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nDPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* ****************************************************** */
static ndpi_network ndpi_protocol_teamviewer_protocol_list[] = {
{ 0x2D936C00 /* 45.147.108.0/22 */, 22, NDPI_PROTOCOL_TEAMVIEWER },
{ 0xB9BC2000 /* 185.188.32.0/22 */, 22, NDPI_PROTOCOL_TEAMVIEWER },
{ 0xB9F51C00 /* 185.245.28.0/23 */, 23, NDPI_PROTOCOL_TEAMVIEWER },
{ 0xB9F51E00 /* 185.245.30.0/24 */, 24, NDPI_PROTOCOL_TEAMVIEWER },
{ 0xC120E100 /* 193.32.225.0/24 */, 24, NDPI_PROTOCOL_TEAMVIEWER },
{ 0xC120E200 /* 193.32.226.0/23 */, 23, NDPI_PROTOCOL_TEAMVIEWER },
{ 0xC13A6400 /* 193.58.100.0/23 */, 23, NDPI_PROTOCOL_TEAMVIEWER },
/* End */
{ 0x0, 0, 0 }
};
@@ -0,0 +1,34 @@
/*
*
* This file is generated automatically and part of nDPI
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nDPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* ****************************************************** */
static ndpi_network ndpi_protocol_telegram_protocol_list[] = {
{ 0x5B69C000 /* 91.105.192.0/23 */, 23, NDPI_PROTOCOL_TELEGRAM },
{ 0x5B6C0400 /* 91.108.4.0/22 */, 22, NDPI_PROTOCOL_TELEGRAM },
{ 0x5B6C0800 /* 91.108.8.0/21 */, 21, NDPI_PROTOCOL_TELEGRAM },
{ 0x5B6C1000 /* 91.108.16.0/21 */, 21, NDPI_PROTOCOL_TELEGRAM },
{ 0x5B6C3800 /* 91.108.56.0/22 */, 22, NDPI_PROTOCOL_TELEGRAM },
{ 0x5FA14000 /* 95.161.64.0/20 */, 20, NDPI_PROTOCOL_TELEGRAM },
{ 0x959AA000 /* 149.154.160.0/20 */, 20, NDPI_PROTOCOL_TELEGRAM },
{ 0xB94C9700 /* 185.76.151.0/24 */, 24, NDPI_PROTOCOL_TELEGRAM },
/* End */
{ 0x0, 0, 0 }
};
@@ -0,0 +1,211 @@
/*
*
* This file is generated automatically and part of nDPI
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nDPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* ****************************************************** */
static ndpi_network ndpi_protocol_tencent_protocol_list[] = {
{ 0x010C0000 /* 1.12.0.0/14 */, 14, NDPI_PROTOCOL_TENCENT },
{ 0x01740000 /* 1.116.0.0/15 */, 15, NDPI_PROTOCOL_TENCENT },
{ 0x01C9B800 /* 1.201.184.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
{ 0x01C9BC00 /* 1.201.188.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0x2ABB8000 /* 42.187.128.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
{ 0x2AC00000 /* 42.192.0.0/15 */, 15, NDPI_PROTOCOL_TENCENT },
{ 0x2AC28000 /* 42.194.128.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
{ 0x2B800000 /* 43.128.0.0/15 */, 15, NDPI_PROTOCOL_TENCENT },
{ 0x2B820000 /* 43.130.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x2B830000 /* 43.131.0.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
{ 0x2B838000 /* 43.131.128.0/19 */, 19, NDPI_PROTOCOL_TENCENT },
{ 0x2B83C000 /* 43.131.192.0/18 */, 18, NDPI_PROTOCOL_TENCENT },
{ 0x2B840000 /* 43.132.0.0/18 */, 18, NDPI_PROTOCOL_TENCENT },
{ 0x2B844400 /* 43.132.68.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
{ 0x2B844600 /* 43.132.70.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0x2B845400 /* 43.132.84.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0x2B845E00 /* 43.132.94.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0x2B846000 /* 43.132.96.0/19 */, 19, NDPI_PROTOCOL_TENCENT },
{ 0x2B848000 /* 43.132.128.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
{ 0x2B850000 /* 43.133.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x2B860000 /* 43.134.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x2B870000 /* 43.135.0.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
{ 0x2B878000 /* 43.135.128.0/18 */, 18, NDPI_PROTOCOL_TENCENT },
{ 0x2B87C000 /* 43.135.192.0/19 */, 19, NDPI_PROTOCOL_TENCENT },
{ 0x2B880000 /* 43.136.0.0/13 */, 13, NDPI_PROTOCOL_TENCENT },
{ 0x2B900000 /* 43.144.0.0/15 */, 15, NDPI_PROTOCOL_TENCENT },
{ 0x2B984000 /* 43.152.64.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
{ 0x2B984200 /* 43.152.66.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0x2B984400 /* 43.152.68.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
{ 0x2B984800 /* 43.152.72.0/21 */, 21, NDPI_PROTOCOL_TENCENT },
{ 0x2B985000 /* 43.152.80.0/20 */, 20, NDPI_PROTOCOL_TENCENT },
{ 0x2B98C000 /* 43.152.192.0/18 */, 18, NDPI_PROTOCOL_TENCENT },
{ 0x2B990000 /* 43.153.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x2B9A0000 /* 43.154.0.0/15 */, 15, NDPI_PROTOCOL_TENCENT },
{ 0x2B9C0000 /* 43.156.0.0/15 */, 15, NDPI_PROTOCOL_TENCENT },
{ 0x2B9E0000 /* 43.158.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x2B9F0000 /* 43.159.0.0/18 */, 18, NDPI_PROTOCOL_TENCENT },
{ 0x2B9F8000 /* 43.159.128.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
{ 0x2BAC0F00 /* 43.172.15.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
{ 0x2BBD6400 /* 43.189.100.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
{ 0x2BBE6F00 /* 43.190.111.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
{ 0x2BF2FC00 /* 43.242.252.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
{ 0x2BF7C400 /* 43.247.196.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
{ 0x2D28C000 /* 45.40.192.0/18 */, 18, NDPI_PROTOCOL_TENCENT },
{ 0x2D714400 /* 45.113.68.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
{ 0x2D927000 /* 45.146.112.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0x31330000 /* 49.51.0.0/19 */, 19, NDPI_PROTOCOL_TENCENT },
{ 0x31332000 /* 49.51.32.0/20 */, 20, NDPI_PROTOCOL_TENCENT },
{ 0x31333000 /* 49.51.48.0/21 */, 21, NDPI_PROTOCOL_TENCENT },
{ 0x31333E00 /* 49.51.62.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0x31334000 /* 49.51.64.0/19 */, 19, NDPI_PROTOCOL_TENCENT },
{ 0x31336000 /* 49.51.96.0/21 */, 21, NDPI_PROTOCOL_TENCENT },
{ 0x31336800 /* 49.51.104.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
{ 0x31336C00 /* 49.51.108.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0x31338000 /* 49.51.128.0/18 */, 18, NDPI_PROTOCOL_TENCENT },
{ 0x3133C000 /* 49.51.192.0/19 */, 19, NDPI_PROTOCOL_TENCENT },
{ 0x3133E000 /* 49.51.224.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0x3133E400 /* 49.51.228.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
{ 0x3133E800 /* 49.51.232.0/21 */, 21, NDPI_PROTOCOL_TENCENT },
{ 0x3133F000 /* 49.51.240.0/20 */, 20, NDPI_PROTOCOL_TENCENT },
{ 0x31E80000 /* 49.232.0.0/14 */, 14, NDPI_PROTOCOL_TENCENT },
{ 0x3A574000 /* 58.87.64.0/18 */, 18, NDPI_PROTOCOL_TENCENT },
{ 0x3EEA0000 /* 62.234.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x51440000 /* 81.68.0.0/14 */, 14, NDPI_PROTOCOL_TENCENT },
{ 0x529C0000 /* 82.156.0.0/15 */, 15, NDPI_PROTOCOL_TENCENT },
{ 0x5EBF0000 /* 94.191.0.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
{ 0x65200000 /* 101.32.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x65210000 /* 101.33.0.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0x65210400 /* 101.33.4.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0x65210A00 /* 101.33.10.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0x65210E00 /* 101.33.14.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0x65211100 /* 101.33.17.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
{ 0x65211200 /* 101.33.18.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0x65211400 /* 101.33.20.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0x65211A00 /* 101.33.26.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0x65211E00 /* 101.33.30.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0x65212000 /* 101.33.32.0/19 */, 19, NDPI_PROTOCOL_TENCENT },
{ 0x65214000 /* 101.33.64.0/18 */, 18, NDPI_PROTOCOL_TENCENT },
{ 0x65218000 /* 101.33.128.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
{ 0x65220000 /* 101.34.0.0/15 */, 15, NDPI_PROTOCOL_TENCENT },
{ 0x652A0000 /* 101.42.0.0/15 */, 15, NDPI_PROTOCOL_TENCENT },
{ 0x67071C00 /* 103.7.28.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
{ 0x67267400 /* 103.38.116.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
{ 0x6734D800 /* 103.52.216.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
{ 0x67743200 /* 103.116.50.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0x67EE1000 /* 103.238.16.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
{ 0x6A340000 /* 106.52.0.0/14 */, 14, NDPI_PROTOCOL_TENCENT },
{ 0x6DF40000 /* 109.244.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x6E288000 /* 110.40.128.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
{ 0x6E2A8000 /* 110.42.128.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
{ 0x6FE50000 /* 111.229.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x6FE60000 /* 111.230.0.0/15 */, 15, NDPI_PROTOCOL_TENCENT },
{ 0x72750000 /* 114.117.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x72840000 /* 114.132.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x739F0000 /* 115.159.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x76180000 /* 118.24.0.0/15 */, 15, NDPI_PROTOCOL_TENCENT },
{ 0x76590000 /* 118.89.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x767E4000 /* 118.126.64.0/18 */, 18, NDPI_PROTOCOL_TENCENT },
{ 0x76C38000 /* 118.195.128.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
{ 0x771BA000 /* 119.27.160.0/19 */, 19, NDPI_PROTOCOL_TENCENT },
{ 0x771C0000 /* 119.28.0.0/15 */, 15, NDPI_PROTOCOL_TENCENT },
{ 0x772D0000 /* 119.45.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x775B0000 /* 119.91.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x78350000 /* 120.53.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x78583800 /* 120.88.56.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0x78E81400 /* 120.232.20.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
{ 0x78F17F00 /* 120.241.127.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
{ 0x78F18000 /* 120.241.128.0/21 */, 21, NDPI_PROTOCOL_TENCENT },
{ 0x78F18800 /* 120.241.136.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
{ 0x79040000 /* 121.4.0.0/15 */, 15, NDPI_PROTOCOL_TENCENT },
{ 0x79330000 /* 121.51.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x7A330000 /* 122.51.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x7A98C000 /* 122.152.192.0/18 */, 18, NDPI_PROTOCOL_TENCENT },
{ 0x7BCE0000 /* 123.206.0.0/15 */, 15, NDPI_PROTOCOL_TENCENT },
{ 0x7C9C0000 /* 124.156.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x7CDC0000 /* 124.220.0.0/14 */, 14, NDPI_PROTOCOL_TENCENT },
{ 0x806C0000 /* 128.108.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x811C0000 /* 129.28.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x81CC0000 /* 129.204.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x81D30000 /* 129.211.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x81E20000 /* 129.226.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x84E80000 /* 132.232.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x86AF0000 /* 134.175.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x8B9B0000 /* 139.155.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x8BBA0000 /* 139.186.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x8BC70000 /* 139.199.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x8C8F0000 /* 140.143.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x9238C000 /* 146.56.192.0/18 */, 18, NDPI_PROTOCOL_TENCENT },
{ 0x94460000 /* 148.70.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x966D0000 /* 150.109.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x969E0000 /* 150.158.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x98880000 /* 152.136.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0x9A088000 /* 154.8.128.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
{ 0x9CF05800 /* 156.240.88.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
{ 0x9E4F0100 /* 158.79.1.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
{ 0x9F4B0000 /* 159.75.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0xA20E0000 /* 162.14.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0xA23E0000 /* 162.62.0.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
{ 0xA23E8000 /* 162.62.128.0/18 */, 18, NDPI_PROTOCOL_TENCENT },
{ 0xA23EC000 /* 162.62.192.0/19 */, 19, NDPI_PROTOCOL_TENCENT },
{ 0xA23EE000 /* 162.62.224.0/20 */, 20, NDPI_PROTOCOL_TENCENT },
{ 0xAA6A0000 /* 170.106.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0xAC51C000 /* 172.81.192.0/18 */, 18, NDPI_PROTOCOL_TENCENT },
{ 0xAF180000 /* 175.24.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0xAF1B0000 /* 175.27.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0xAFB20000 /* 175.178.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0xB6FE0000 /* 182.254.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0xBC838000 /* 188.131.128.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
{ 0xC0908000 /* 192.144.128.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
{ 0xC1700000 /* 193.112.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
{ 0xCBC38000 /* 203.195.128.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
{ 0xCBCD8000 /* 203.205.128.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0xCBCD8600 /* 203.205.134.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0xCBCD8800 /* 203.205.136.0/21 */, 21, NDPI_PROTOCOL_TENCENT },
{ 0xCBCD9000 /* 203.205.144.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
{ 0xCBCD9800 /* 203.205.152.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
{ 0xCBCD9B00 /* 203.205.155.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
{ 0xCBCD9C00 /* 203.205.156.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
{ 0xCBCDBC00 /* 203.205.188.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
{ 0xCBCDBF00 /* 203.205.191.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
{ 0xCBCDC100 /* 203.205.193.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
{ 0xCBCDC200 /* 203.205.194.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0xCBCDC400 /* 203.205.196.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0xCBCDDA00 /* 203.205.218.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0xCBCDDC00 /* 203.205.220.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
{ 0xCBCDE000 /* 203.205.224.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
{ 0xCBCDE800 /* 203.205.232.0/21 */, 21, NDPI_PROTOCOL_TENCENT },
{ 0xCBCDF000 /* 203.205.240.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
{ 0xCBCDF200 /* 203.205.242.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
{ 0xCBCDF800 /* 203.205.248.0/21 */, 21, NDPI_PROTOCOL_TENCENT },
{ 0xD249A000 /* 210.73.160.0/19 */, 19, NDPI_PROTOCOL_TENCENT },
{ 0xD2ABE800 /* 210.171.232.0/21 */, 21, NDPI_PROTOCOL_TENCENT },
{ 0xD2B44A00 /* 210.180.74.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0xD3385C00 /* 211.56.92.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
{ 0xD3988000 /* 211.152.128.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
{ 0xD3988400 /* 211.152.132.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0xD3988A00 /* 211.152.138.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0xD3989000 /* 211.152.144.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
{ 0xD3989400 /* 211.152.148.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0xD3989800 /* 211.152.152.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
{ 0xD3989C00 /* 211.152.156.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
{ 0xD3989E00 /* 211.152.158.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
{ 0xD39F8000 /* 211.159.128.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
{ 0xD4400000 /* 212.64.0.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
{ 0xD4818000 /* 212.129.128.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
/* End */
{ 0x0, 0, 0 }
};
@@ -0,0 +1,35 @@
/*
*
* This file is generated automatically and part of nDPI
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nDPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* ****************************************************** */
static ndpi_network ndpi_protocol_twitch_protocol_list[] = {
{ 0x17A00000 /* 23.160.0.0/24 */, 24, NDPI_PROTOCOL_TWITCH },
{ 0x2D718000 /* 45.113.128.0/22 */, 22, NDPI_PROTOCOL_TWITCH },
{ 0x34DFC000 /* 52.223.192.0/18 */, 18, NDPI_PROTOCOL_TWITCH },
{ 0x63B54000 /* 99.181.64.0/18 */, 18, NDPI_PROTOCOL_TWITCH },
{ 0x67353000 /* 103.53.48.0/23 */, 23, NDPI_PROTOCOL_TWITCH },
{ 0xB92ACC00 /* 185.42.204.0/22 */, 22, NDPI_PROTOCOL_TWITCH },
{ 0xC0104000 /* 192.16.64.0/21 */, 21, NDPI_PROTOCOL_TWITCH },
{ 0xC06CEF00 /* 192.108.239.0/24 */, 24, NDPI_PROTOCOL_TWITCH },
{ 0xC709F800 /* 199.9.248.0/21 */, 21, NDPI_PROTOCOL_TWITCH },
/* End */
{ 0x0, 0, 0 }
};
@@ -0,0 +1,60 @@
/*
*
* This file is generated automatically and part of nDPI
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nDPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* ****************************************************** */
static ndpi_network ndpi_protocol_twitter_protocol_list[] = {
{ 0x0819C200 /* 8.25.194.0/23 */, 23, NDPI_PROTOCOL_TWITTER },
{ 0x0819C400 /* 8.25.196.0/23 */, 23, NDPI_PROTOCOL_TWITTER },
{ 0x403F0000 /* 64.63.0.0/18 */, 18, NDPI_PROTOCOL_TWITTER },
{ 0x450C3800 /* 69.12.56.0/21 */, 21, NDPI_PROTOCOL_TWITTER },
{ 0x45C3A000 /* 69.195.160.0/24 */, 24, NDPI_PROTOCOL_TWITTER },
{ 0x45C3A200 /* 69.195.162.0/23 */, 23, NDPI_PROTOCOL_TWITTER },
{ 0x45C3A400 /* 69.195.164.0/23 */, 23, NDPI_PROTOCOL_TWITTER },
{ 0x45C3A600 /* 69.195.166.0/24 */, 24, NDPI_PROTOCOL_TWITTER },
{ 0x45C3A800 /* 69.195.168.0/23 */, 23, NDPI_PROTOCOL_TWITTER },
{ 0x45C3AB00 /* 69.195.171.0/24 */, 24, NDPI_PROTOCOL_TWITTER },
{ 0x45C3AC00 /* 69.195.172.0/24 */, 24, NDPI_PROTOCOL_TWITTER },
{ 0x45C3AE00 /* 69.195.174.0/23 */, 23, NDPI_PROTOCOL_TWITTER },
{ 0x45C3B000 /* 69.195.176.0/20 */, 20, NDPI_PROTOCOL_TWITTER },
{ 0x67FC7000 /* 103.252.112.0/22 */, 22, NDPI_PROTOCOL_TWITTER },
{ 0x68F42800 /* 104.244.40.0/23 */, 23, NDPI_PROTOCOL_TWITTER },
{ 0x68F42A00 /* 104.244.42.0/24 */, 24, NDPI_PROTOCOL_TWITTER },
{ 0x68F42C00 /* 104.244.44.0/22 */, 22, NDPI_PROTOCOL_TWITTER },
{ 0xB92D0400 /* 185.45.4.0/22 */, 22, NDPI_PROTOCOL_TWITTER },
{ 0xBC40E000 /* 188.64.224.0/21 */, 21, NDPI_PROTOCOL_TWITTER },
{ 0xC02C4500 /* 192.44.69.0/24 */, 24, NDPI_PROTOCOL_TWITTER },
{ 0xC030EC00 /* 192.48.236.0/23 */, 23, NDPI_PROTOCOL_TWITTER },
{ 0xC0854C00 /* 192.133.76.0/22 */, 22, NDPI_PROTOCOL_TWITTER },
{ 0xC7109C00 /* 199.16.156.0/22 */, 22, NDPI_PROTOCOL_TWITTER },
{ 0xC73B9400 /* 199.59.148.0/22 */, 22, NDPI_PROTOCOL_TWITTER },
{ 0xC7603800 /* 199.96.56.0/21 */, 21, NDPI_PROTOCOL_TWITTER },
{ 0xCAA08000 /* 202.160.128.0/22 */, 22, NDPI_PROTOCOL_TWITTER },
{ 0xD1EDC000 /* 209.237.192.0/21 */, 21, NDPI_PROTOCOL_TWITTER },
{ 0xD1EDC800 /* 209.237.200.0/22 */, 22, NDPI_PROTOCOL_TWITTER },
{ 0xD1EDCC00 /* 209.237.204.0/23 */, 23, NDPI_PROTOCOL_TWITTER },
{ 0xD1EDCE00 /* 209.237.206.0/24 */, 24, NDPI_PROTOCOL_TWITTER },
{ 0xD1EDD000 /* 209.237.208.0/22 */, 22, NDPI_PROTOCOL_TWITTER },
{ 0xD1EDD400 /* 209.237.212.0/24 */, 24, NDPI_PROTOCOL_TWITTER },
{ 0xD1EDD600 /* 209.237.214.0/23 */, 23, NDPI_PROTOCOL_TWITTER },
{ 0xD1EDD800 /* 209.237.216.0/21 */, 21, NDPI_PROTOCOL_TWITTER },
/* End */
{ 0x0, 0, 0 }
};
@@ -1,9 +1,6 @@
/*
*
* Copyright (C) 2011-18 - ntop.org
*
* This file is part of nDPI, an open source deep packet inspection
* library based on the OpenDPI and PACE technology by ipoque GmbH
* This file is generated automatically and part of nDPI
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -20,10 +17,14 @@
*
*/
#ifndef ndpi_utils_h
#define ndpi_utils_h
/* ****************************************************** */
// Empty placeholder head file. Just to make the compilations of protocols/attic/ftp.c and
// protocols/attic/secondlife.c don't break.
#endif /* ndpi_utils_h */
static ndpi_network ndpi_protocol_ubuntuone_protocol_list[] = {
{ 0x5BBD5800 /* 91.189.88.0/21 */, 21, NDPI_PROTOCOL_UBUNTUONE },
{ 0xA2D52000 /* 162.213.32.0/22 */, 22, NDPI_PROTOCOL_UBUNTUONE },
{ 0xB97DBC00 /* 185.125.188.0/22 */, 22, NDPI_PROTOCOL_UBUNTUONE },
{ 0xC2A9FE00 /* 194.169.254.0/24 */, 24, NDPI_PROTOCOL_UBUNTUONE },
/* End */
{ 0x0, 0, 0 }
};
@@ -0,0 +1,51 @@
/*
*
* This file is generated automatically and part of nDPI
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nDPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* ****************************************************** */
static ndpi_network ndpi_protocol_webex_protocol_list[] = {
{ 0x17590000 /* 23.89.0.0/17 */, 17, NDPI_PROTOCOL_WEBEX },
{ 0x17598000 /* 23.89.128.0/19 */, 19, NDPI_PROTOCOL_WEBEX },
{ 0x1759A000 /* 23.89.160.0/20 */, 20, NDPI_PROTOCOL_WEBEX },
{ 0x1759B000 /* 23.89.176.0/21 */, 21, NDPI_PROTOCOL_WEBEX },
{ 0x1759C000 /* 23.89.192.0/19 */, 19, NDPI_PROTOCOL_WEBEX },
{ 0x3E6DC000 /* 62.109.192.0/18 */, 18, NDPI_PROTOCOL_WEBEX },
{ 0x40446000 /* 64.68.96.0/19 */, 19, NDPI_PROTOCOL_WEBEX },
{ 0x4272A000 /* 66.114.160.0/20 */, 20, NDPI_PROTOCOL_WEBEX },
{ 0x42A32000 /* 66.163.32.0/19 */, 19, NDPI_PROTOCOL_WEBEX },
{ 0x451AA000 /* 69.26.160.0/19 */, 19, NDPI_PROTOCOL_WEBEX },
{ 0x721DC000 /* 114.29.192.0/19 */, 19, NDPI_PROTOCOL_WEBEX },
{ 0x8BB15C00 /* 139.177.92.0/23 */, 23, NDPI_PROTOCOL_WEBEX },
{ 0x96FD8000 /* 150.253.128.0/17 */, 17, NDPI_PROTOCOL_WEBEX },
{ 0xAA480000 /* 170.72.0.0/17 */, 17, NDPI_PROTOCOL_WEBEX },
{ 0xAA488000 /* 170.72.128.0/18 */, 18, NDPI_PROTOCOL_WEBEX },
{ 0xAA48C000 /* 170.72.192.0/19 */, 19, NDPI_PROTOCOL_WEBEX },
{ 0xAA858000 /* 170.133.128.0/18 */, 18, NDPI_PROTOCOL_WEBEX },
{ 0xAD27E000 /* 173.39.224.0/19 */, 19, NDPI_PROTOCOL_WEBEX },
{ 0xADF30000 /* 173.243.0.0/20 */, 20, NDPI_PROTOCOL_WEBEX },
{ 0xCFB6A000 /* 207.182.160.0/19 */, 19, NDPI_PROTOCOL_WEBEX },
{ 0xD0FDFE00 /* 208.253.254.0/24 */, 24, NDPI_PROTOCOL_WEBEX },
{ 0xD0FE7200 /* 208.254.114.0/24 */, 24, NDPI_PROTOCOL_WEBEX },
{ 0xD1C5C000 /* 209.197.192.0/19 */, 19, NDPI_PROTOCOL_WEBEX },
{ 0xD204C000 /* 210.4.192.0/20 */, 20, NDPI_PROTOCOL_WEBEX },
{ 0xD8978000 /* 216.151.128.0/19 */, 19, NDPI_PROTOCOL_WEBEX },
/* End */
{ 0x0, 0, 0 }
};
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,35 @@
/*
*
* This file is generated automatically and part of nDPI
*
* nDPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nDPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* ****************************************************** */
static ndpi_network ndpi_protocol_cachefly_protocol_list[] = {
{ 0xCDEAAF00 /* 205.234.175.0/24 */, 24, NDPI_PROTOCOL_CACHEFLY },
{ 0xCC5D9600 /* 204.93.150.0/24 */, 24, NDPI_PROTOCOL_CACHEFLY },
{ 0xCC5D8E00 /* 204.93.142.0/23 */, 23, NDPI_PROTOCOL_CACHEFLY },
{ 0xA7589E00 /* 167.88.158.0/24 */, 24, NDPI_PROTOCOL_CACHEFLY },
{ 0x42E1C500 /* 66.225.197.0/24 */, 24, NDPI_PROTOCOL_CACHEFLY },
{ 0x2D588400 /* 45.88.132.0/22 */, 22, NDPI_PROTOCOL_CACHEFLY },
{ 0x5250E0BE /* 82.80.224.190/32 */, 32, NDPI_PROTOCOL_CACHEFLY },
{ 0xA747EE9F /* 167.71.238.159/32 */, 32, NDPI_PROTOCOL_CACHEFLY },
{ 0x08F2E3F8 /* 8.242.227.248/29 */, 29, NDPI_PROTOCOL_CACHEFLY },
/* End */
{ 0x0, 0, 0 }
};

Some files were not shown because too many files have changed in this diff Show More