Go to file
Jean-Louis Huynen cb3d618ee1
Merge pull request #50 from cudeso/master
Contributions to the documentation and small type for "registered"
2023-12-23 17:58:53 +01:00
client fix: [d4-client] Removed hardcoded gcc command from Makefile 2021-10-08 11:32:38 +02:00
doc/images fix: [README] 2020-03-12 11:15:35 +01:00
server Contributions to the documentation small type for "registered" 2023-12-22 18:31:40 +01:00
.gitchangelog.rc add: [doc] gitchangelogrc added 2019-02-14 16:20:55 +01:00
.gitignore chg: [gitignore] update 2019-03-13 10:42:18 +01:00
.gitmodules chg: [dept] hmac submodule added 2018-12-05 09:53:16 +01:00
LICENSE Initial commit 2018-11-26 15:07:13 +01:00
README.md Contributions to the documentation small type for "registered" 2023-12-22 18:31:40 +01:00


D4 core

D4 core are software components used in the D4 project. The software includes everything to create your own sensor network or connect to an existing sensor network using simple clients.

https://github.com/D4-project/d4-core/releases/latest https://github.com/D4-project/d4-core/blob/master/LICENSE

D4 core client

D4 core client is a simple and minimal implementation of the D4 encapsulation protocol. There is also a portable D4 client in Go including the support for the SSL/TLS connectivity.



  • Unix-like operating system
  • make
  • a recent C compiler


The D4 client can be used to stream any byte stream towards a D4 server.

As an example, you directly stream tcpdump output to a D4 server with the following script:

tcpdump -n -s0 -w - | ./d4 -c ./conf | socat - OPENSSL-CONNECT:$D4-SERVER-IP-ADDRESS:$PORT,verify=0
d4 - d4 client
Read data from the configured <source> and send it to <destination>

Usage: d4 -c  config_directory


The configuration settings are stored in files in the configuration directory
specified with the -c command line switch.

Files in the configuration directory

key         - is the private HMAC-SHA-256-128 key.
              The HMAC is computed on the header with a HMAC value set to 0
              which is updated later.
snaplen     - the length of bytes that is read from the <source>
version     - the version of the d4 client
type        - the type of data that is send. pcap, netflow, ...
source      - the source where the data is read from
destination - the destination where the data is written to


cd client
git submodule init
git submodule update

Build the d4 client. This will create the d4 binary.


Then register the sensor with the server. Replace API_TOKEN, VALID_UUID4 (create a random UUID via UUIDgenerator) and VALID_HMAC_KEY.

curl -k --header "Authorization: API_TOKEN" -H "Content-Type: application/json" --data '{"uuid":"VALID_UUID4","hmac_key":"VALID_HMAC_KEY"}' -X POST

If the registration went correctly the UUID is returned. Do not forget to approve the registration in the D4 server web interface.

Update the configuration file

cp -r conf.sample conf
echo VALID_UUID4 > conf/uuid
echo VALID_HMAC_KEY > conf/key

D4 core server

D4 core server is a complete server to handle clients (sensors) including the decapsulation of the D4 protocol, control of sensor registrations, management of decoding protocols and dispatching to adequate decoders/analysers.


  • Python 3.6
  • GNU/Linux distribution


D4 core server Screenshots


Connected Sensors:

Sensors Status:

Server Management:

analyzer Queues: