aboutsummaryrefslogtreecommitdiff
path: root/example/ndpiReader.c
Commit message (Collapse)AuthorAge
* Add unit tests to travis. Move ndpi serializer tests to unit tests.Alfredo Cardigliano2020-09-21
|
* Merge pull request #1012 from IvanNardi/uaLuca Deri2020-09-17
|\ | | | | QUIC: extract User Agent information
| * http: create a common function to parse User Agent fieldNardi Ivan2020-09-08
| | | | | | | | Prepare the code to handle UA information from flows other than HTTP
* | Added extension to detect nested subdomains as used in Browsertunnel attack toolLuca Deri2020-09-09
|/ | | | https://github.com/veggiedefender/browsertunnel
* Fixed invalid memory access leading to a SIGSEGV in ndpiReader's option parser.Toni Uhlig2020-08-28
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Add (optional) dependency on external libraries: libgcrypt and libgpg-errorNardi Ivan2020-08-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To support QUIC payload and header decryption, it is necessary to choose an external crypto library to handle the low-level crypto stuff. Since we will use some Wireshark code, it is quite natural to choose the same library used by Wireshark itself: libgcrypt. More precisely, we will use libgcrypt and libgpg-error. Both libraries have LGPL license, so there should be no issue from this point of view. These libraries are not required to build nDPI, and their usage is optional: nDPI will keep working (and compiling) even if they are not available. However, without them, QUIC sub-classification is next to impossible. The configure flag "--disable-gcrypt" forces the build system to ignore these libraries. libgpg-error is only used for debug to have meaningful error messages and its usage is trivial. The same cannot be said for libgcrypt because its initialization is a significant issue. The rest of this commit message try explaining how libgcrypt is initialized. According to the documentation https://gnupg.org/documentation/manuals/gcrypt/Initializing-the-library.html https://gnupg.org/documentation/manuals/gcrypt/Multi_002dThreading.html#Multi_002dThreading libgcrypt must be initialized before using it, but such initialization should be performed by the actual application and not by any library. Forcing the users to proper initialize libgcrypt in their own code seems unreasonable: most people using nDPI might be complete unaware of any crypto stuff and update each and every one application linking to nDPI with specific libgcrypt code should be out of question, anyway. Fortunately, it seems a workaround exists to initialize libgcrypt in a library https://lists.gnupg.org/pipermail/gcrypt-devel/2003-August/000458.html Therefore, we could provide a wrapper to this initialization stuff in a nDPI function. Unfortunately nDPI API lacks a global init function that must be called only once, before any other functions. We could add it, but that would be a major API break. AFAIK, ndpi_init_detection_module() might be called multiple times, for example to create multiple independent dpi engines in the same program. The proposed solution is to (optionally) initialize libgcrypt in ndpi_init_detection_module() anyway: * if the actual application doesn't directly use libgcrypt and only calls ndpi_init_detection_module() once, everything is formally correct and it should work out of the box [by far the most common user case]; * if the actual application already uses libgcrypt directly, it already performs the required initialization. In this case the ndpi_prefs.ndpi_dont_init_libgcrypt flag should be passed to ndpi_init_detection_module() to avoid further initializations. The only scenario not supported by this solution is when the application is unaware of libgcrypt and calls ndpi_init_detection_module() multiple times concurrently. But this scenario should be uncommon. A completely different option should be to switch to another crypto library, with a huge impact on the QUIC dissector code. Bottom line: crypto is hard, using libgcrypt is complex and the proposed initialization, even if not perfect, should cover the most frequent user cases and should work, for the time being. If anyone has some suggestions...
* Fixed invalid dpdk fn call.Toni Uhlig2020-08-15
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Fixed possible memory leak in TLS certificate handlingLuca Deri2020-08-05
|
* Tiny changes for TLS block lenght dissectionLuca Deri2020-07-29
|
* Minor fixesNardi Ivan2020-07-26
| | | | Fix a memory leak and an issue (re)-introduced in configure script
* Fixed bin similarityLuca Deri2020-07-24
|
* Improved bin clusteringLuca Deri2020-07-22
|
* Added changes for handlign SSSH cipher detectionLuca Deri2020-07-22
|
* wrapper cleanupLuca Deri2020-07-13
|
* Merge pull request #963 from yskcg/devLuca Deri2020-07-13
|\ | | | | add improved boundary check and check malloc return is NULL
| * add improved boundary check and check malloc return is NULLysk2020-07-10
| |
* | Fixed race condition in ndpi_ssl_version2str() caused by static qualifier in ↵Toni Uhlig2020-07-11
|/ | | | | | | | | the version string buffer. * added also GREASE supported tls versions as specified in https://tools.ietf.org/html/draft-davidben-tls-grease-01#page-4 Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Various fixes in bins implementationLuca Deri2020-07-09
| | | | Added -b flag in ndpiReader to test bins
* Merge pull request #957 from lnslbrty/fix/buildLuca Deri2020-07-09
|\ | | | | Fix/build
| * Removed csv_fp as external symbol. Instead passing csv_fp through as argument.Toni Uhlig2020-07-08
| | | | | | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* | Added -b to ndpiReader to evaluate binsLuca Deri2020-07-09
|/
* Fix memory leak reported in #955Nardi Ivan2020-07-08
| | | | | | | This leak is clearly happening because of missing/disabled code in "bins" handling. This is a trivial workaround useful until such code is completed. In this way tavis-ci will stop complaining
* Added testing bin codeLuca Deri2020-07-07
|
* Memory allocation fixesLuca Deri2020-07-07
|
* fixed memory leak in ndpi_cluster_bins / binUnitTestToni Uhlig2020-07-07
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Added ndpi_cluster_bins() for clustering bins and ancillary functions for ↵Luca Deri2020-07-07
| | | | bins manipulation
* Merge pull request #932 from IvanNardi/logLuca Deri2020-07-07
|\ | | | | Log
| * Fix a memory leakNardi Ivan2020-07-07
| |
| * Improve help message of --dbg-proto optionNardi Ivan2020-07-02
| | | | | | | | | | Make it clear that such option is general, not about extcap functionality
* | Added unit testLuca Deri2020-07-03
| |
* | Added ndpi_print_bin() API callLuca Deri2020-06-29
| |
* | Added ndpi_bin_similarity() for computing bin similarityLuca Deri2020-06-29
| |
* | Fix memory leak about purged/expired flowsNardi Ivan2020-06-28
| | | | | | | | | | Create an helper to avoid similar errors in the future Fixes: 1a62f4c7
* | Fix (harmless) memory leaks when DPDK is enabledNardi Ivan2020-06-28
| |
* | Fix startup when DPDK is enabledNardi Ivan2020-06-28
| | | | | | | | Fixes:a58c838c4
* | ndpiReader: fix ports statisticsNardi Ivan2020-06-28
|/ | | | They should take idle/expired flows into account, too
* Fixed harmless memory leak in extcap initializationNardi Ivan2020-06-25
|
* Restore extcap functionality, i.e. integration with wiresharkNardi Ivan2020-06-25
|
* Fixed unitialized values in ndpiReader protocol detection bitmask during dga ↵Toni Uhlig2020-06-23
| | | | | | | | selftest. * make ./tests/vagrind_test.sh directory agnostic Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Fixes #906Luca Deri2020-06-22
| | | | Packet bins are not printed wehn empty
* Added ndpi_bin_XXX APILuca Deri2020-06-22
| | | | Added packet lenght distribution bins
* DGA detection improvementsLuca Deri2020-06-18
|
* Added checks for DGA detectionLuca Deri2020-06-17
|
* Added DGA risk for names that look like a DGALuca Deri2020-06-11
|
* Added HyperLogLog cardinality estimator API callsLuca Deri2020-06-10
| | | | | | | | | | | | | /* Memory lifecycle */ int ndpi_hll_init(struct ndpi_hll *hll, u_int8_t bits); void ndpi_hll_destroy(struct ndpi_hll *hll); /* Add values */ void ndpi_hll_add(struct ndpi_hll *hll, const char *data, size_t data_len); void ndpi_hll_add_number(struct ndpi_hll *hll, u_int32_t value) ; /* Get cardinality estimation */ double ndpi_hll_count(struct ndpi_hll *hll);
* Merge branch 'dev' of https://github.com/ntop/nDPI into devLuca Deri2020-06-06
|\
| * Handle EOR in TLV testAlfredo Cardigliano2020-06-06
| |
* | Removed some obsolete protocols (battlefield, oscar, pcanywhere, tvants)Luca Deri2020-06-06
|/
* removed obsolete yahoo pluginLuca Deri2020-06-06
|
* Support for multiple records in CSV serializationAlfredo Cardigliano2020-06-05
|