nDPI/example
Ivan Nardi e9e09ce795
PowerShell: detect remote administration over SMB and DCE/RPC (#3292)
Classify as PowerShell the traffic used by Windows to execute remote
commands, i.e. the svcctl (MS-SCMR) and winreg (MS-RRP) interfaces:
* SMBv2/3: after the flow has been classified, look into SMB2 CREATE
  requests for the "svcctl"/"winreg" named pipes (and for PsExec
  binary/pipes). Flows without these pipes are reported with the
  FILE_SHARING category.
* DCE/RPC over TCP: check the interface UUID in the BIND request
* HTTP: don't report generic WS-Management traffic (Openwsman clients,
  Intel AMT) as PowerShell

Close #3289

Also fix a memory leak in the IPsec JSON serialization (the transforms
sub-serializer was never freed).
2026-10-23 13:21:31 +02:00
..
calls.conf STUN: fix monitoring (#2639) 2024-12-06 20:19:28 +01:00
categories.txt IPv6: add support for custom categories (#2126) 2023-10-29 12:56:44 +01:00
config.txt Fix test configuration 2025-06-03 12:53:23 +02:00
config_only_classification.txt Add configuration for the new nDPI server fingerprint (#3147) 2026-03-27 19:52:04 +01:00
ja4_fingerprints.csv Add (kind of) support for loading a list of JA4C malicious fingerprints (#2678) 2025-01-14 12:05:03 +01:00
Makefile.dpdk.in Build system: Respect user CFLAGS and LDFLAGS, remove hardcoded -g (#3034) 2025-11-20 12:43:11 +01:00
Makefile.in Build: compiler-driven header dependency tracking; fix --with-ndpi-pro (#3239) 2026-08-29 14:54:11 +02:00
mining_hosts.txt Implemented custom category loading. 2018-04-26 21:10:59 +02:00
ndpi2timeline.py ipaddr2list.py, ndpi2timeline.py: reformatted (#2509) 2024-07-18 20:35:47 +02:00
ndpiReader.c PowerShell: detect remote administration over SMB and DCE/RPC (#3292) 2026-10-23 13:21:31 +02:00
ndpiSimpleIntegration.c Dynamic host_server_name and add JA5 implementation(#3257) 2026-09-14 10:34:33 +02:00
obfuscation.conf Improved configuration to enable/disable export of flow risk info (#2780) 2025-03-25 21:35:01 +01:00
only_classification.conf Add configuration for the new nDPI server fingerprint (#3147) 2026-03-27 19:52:04 +01:00
perf.conf Add configuration for the new nDPI server fingerprint (#3147) 2026-03-27 19:52:04 +01:00
perf.sh ndpiReader: add perf support for "runtime" code (#3124) 2026-02-20 12:27:49 +01:00
protos.txt tests: extend utests 2025-11-18 13:32:14 +01:00
protos_huge.txt Add a configuration to test a huge number of custom protocols (#2865) 2025-06-03 20:46:58 +02:00
protos_overwrite_domains.txt Allow to overwrite domain matching via custom rules (#2999) 2025-10-20 15:28:16 +02:00
reader_util.c Kerberos: rework dissector and export request/response metadata (#3276) 2026-10-13 18:52:53 +02:00
reader_util.h Kerberos: rework dissector and export request/response metadata (#3276) 2026-10-13 18:52:53 +02:00
README.DPDK Added DPDK support to ndpiReader 2018-11-10 16:10:22 +01:00
README.md ndpiReader: install custom memory allocators before any nDPI API usage (#3164) 2026-04-21 10:20:33 +02:00
risky_domains.txt Added risky domain flow-risk support 2021-02-21 21:45:46 +01:00
sha1_fingerprints.csv fuzz: extend fuzzing coverage (#2205) 2023-12-11 12:48:50 +01:00
tcp_fingerprints.csv Updated nDPI TCP fingerprint format 2026-09-29 10:32:21 +02:00
utests.c Add TLS 1.3 negotiated non-PQC group risk (#3267) 2026-10-08 08:57:27 +02:00

nDPI example tools

This directory contains sample programs that link against libnDPI, mainly ndpiReader (CLI over pcaps and live capture) and ndpiSimpleIntegration. DPDK-specific notes live in README.DPDK.

Custom memory allocators

nDPI can use application-provided allocators via ndpi_set_memory_alloction_functions() (see ndpi_api.h / ndpi_memory.c). Every pointer obtained through ndpi_malloc(), ndpi_calloc(), ndpi_strdup(), APIs that allocate internally (e.g. ndpi_init_bin()), or memory owned by the library must be released with the matching ndpi_free() path that uses the same allocator configuration as at allocation time. From a practical point of view, that means that the application code must installs its hooks once, via ndpi_set_memory_alloction_functions() before ANY library functions.

IF your own application wants to use ndpi_malloc() and similar functions also for its own allocations, ndpi_set_memory_alloction_functions() must be called before ANY allocations, from the library and from the application, both. All these memory must be freed via ndpi_free().