nDPId/examples
Toni Uhlig a230eaf061
Improved Keras Autoencoder hyper parameter.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2024-08-16 13:20:35 +02:00
..
c-analysed Extended analyse application to write global stats to a CSV. 2024-08-16 12:33:46 +02:00
c-captured Fixed broken "not-detected" event/packet capture in captured example. 2024-01-29 18:11:34 +01:00
c-collectd Some small fixes. 2024-08-09 11:09:39 +02:00
c-influxd Some small fixes. 2024-08-09 11:09:39 +02:00
c-notifyd Fix example build error if memory profiling enabled. 2024-03-21 07:26:22 +01:00
c-simple Replaced ambiguous naming of "JSON string" to more accurate "JSON message". #2 2023-12-04 13:13:05 +01:00
cxx-graph@68eb1b105d Added docker build&push to the CI. 2023-08-03 10:00:50 +02:00
js-rt-analyzer@87cb7a0af5 Updated js-rt-analyzer and js-rt-analyzer-frontend examples. 2023-04-21 16:51:58 +02:00
js-rt-analyzer-frontend@6806ef7d13 Added docker build&push to the CI. 2023-08-03 10:00:50 +02:00
py-flow-dashboard Bump werkzeug from 3.0.1 to 3.0.3 in /examples/py-flow-dashboard (#37) 2024-05-29 14:03:11 +02:00
py-flow-info flow-info.py: Set min risk severity required to print a risk. 2024-05-08 00:25:31 +02:00
py-flow-muliprocess nDPId: Reduced flow-updates for TCP flows to 1/4 of the timeout value. 2022-09-19 19:39:49 +02:00
py-json-stdout Enable custom JSON filter expressions for Python scripts. 2023-08-27 20:08:01 +02:00
py-machine-learning Improved Keras Autoencoder hyper parameter. 2024-08-16 13:20:35 +02:00
py-schema-validation Added Keras based Autoencode (Work-in-Progress!) 2023-07-16 22:06:36 +02:00
py-semantic-validation Improved InfluxDB push daemon. 2023-12-15 09:16:28 +01:00
ndpid_grafana_example.png Added Grafana example dashboard image. 2023-12-20 19:19:08 +01:00
ndpid_install_and_run.gif Improve README 2022-08-12 11:10:45 +02:00
README.md Removed unmaintained C JSON dumper. 2024-04-17 01:47:31 +02:00

examples

Some ready-2-use/ready-2-extend examples/utils. All examples are prefixed with their used LANG.

c-analysed

A feature extractor useful for ML/DL use cases. It generates CSV files from flow "analyse" events. Used also by tests/run_tests.sh if available.

c-captured

A capture daemon suitable for low-resource devices. It saves flows that were guessed/undetected/risky/midstream to a PCAP file for manual analysis. Used also by tests/run_tests.sh if available.

c-collectd

A collecd-exec compatible middleware that gathers statistic values from nDPId. Used also by tests/run_tests.sh if available.

c-influxd

An InfluxDB push daemon. It aggregates various statistics gathered from nDPId. The results are sent to a specified InfluxDB endpoint.

c-notifyd

A notification daemon that sends information about suspicious flow events to DBUS.

c-simple

Integration example that verifies flow timeouts on SIGUSR1.

cxx-graph

A standalone GLFW/OpenGL application that draws statistical data using ImWeb/ImPlot/ImGui.

js-rt-analyzer

nDPId-rt-analyzer

js-rt-analyzer-frontend

nDPId-rt-analyzer-frontend

py-flow-info

Console friendly, colorful, prettyfied event printer. Required by tests/run_tests.sh

py-machine-learning

Contains:

  1. Classification via Random Forests and SciLearn
  2. Anomaly Detection via Autoencoder and Keras (Work-In-Progress!)

Use sklearn together with CSVs created with c-analysed to train and predict DPI detections.

Try it with: ./examples/py-machine-learning/sklearn_random_forest.py --csv ./ndpi-analysed.csv --proto-class tls.youtube --proto-class tls.github --proto-class tls.spotify --proto-class tls.facebook --proto-class tls.instagram --proto-class tls.doh_dot --proto-class quic --proto-class icmp

This way you should get 9 different classification classes. You may notice that some classes e.g. TLS protocol classifications have a higher false-negative/false-positive rate. Unfortunately, I can not provide any datasets due to some privacy concerns.

But you may use a pre-trained model with --load-model.

py-flow-dashboard

A realtime web based graph using Plotly/Dash. Probably the most informative example.

py-flow-multiprocess

Simple Python Multiprocess example spawning two worker processes, one connecting to nDPIsrvd and one printing flow id's to STDOUT.

py-json-stdout

Dump received and parsed JSON objects.

py-schema-validation

Validate nDPId JSON messages against pre-defined JSON schema's. See schema/. Required by tests/run_tests.sh

py-semantic-validation

Validate nDPId JSON messages against internal event semantics. Required by tests/run_tests.sh