d4-core/README.md

123 lines
4.4 KiB
Markdown
Raw Permalink Normal View History

2018-12-05 10:37:20 +01:00
# D4 core
2019-01-25 11:51:41 +01:00
![](https://www.d4-project.org/assets/images/logo.png)
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.
2018-12-05 10:37:20 +01:00
2019-02-14 16:27:06 +01:00
![https://github.com/D4-project/d4-core/releases/latest](https://img.shields.io/github/release/D4-project/d4-core/all.svg)
![https://github.com/D4-project/d4-core/blob/master/LICENSE](https://img.shields.io/badge/License-AGPL-yellow.svg)
2018-12-05 10:37:20 +01:00
## D4 core client
[D4 core client](https://github.com/D4-project/d4-core/tree/master/client) is a simple and minimal implementation of the [D4 encapsulation protocol](https://github.com/D4-project/architecture/tree/master/format). There is also a [portable D4 client](https://github.com/D4-project/d4-goclient) in Go including the support for the SSL/TLS connectivity.
2019-07-11 14:40:40 +02:00
<p align="center">
<img alt="d4-cclient" src="https://raw.githubusercontent.com/D4-project/d4-core/master/client/media/d4c-client.png" height="140" />
</p>
### Requirements
- Unix-like operating system
- make
- a recent C compiler
### Usage
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
Configuration
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
~~~~
### Installation
2018-12-05 10:37:20 +01:00
~~~~
cd client
2018-12-05 10:37:20 +01:00
git submodule init
git submodule update
~~~~
Build the d4 client. This will create the `d4` binary.
~~~~
make
~~~~
Then register the sensor with the server. Replace `API_TOKEN`, `VALID_UUID4` (create a random UUID via [UUIDgenerator](https://www.uuidgenerator.net/)) and `VALID_HMAC_KEY`.
~~~~
curl -k https://127.0.0.1:7000/api/v1/add/sensor/register --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](https://github.com/D4-project/architecture/tree/master/format), control of sensor registrations, management of decoding protocols and dispatching to adequate decoders/analysers.
2018-12-05 10:37:20 +01:00
### Requirements
- Python 3.6
- GNU/Linux distribution
### Installation
2019-02-28 11:47:29 +01:00
- [Install D4 Server](https://github.com/D4-project/d4-core/tree/master/server)
2018-12-05 10:37:20 +01:00
2020-03-12 11:10:27 +01:00
### D4 core server Screenshots
2019-01-25 11:47:45 +01:00
2020-03-12 11:15:35 +01:00
#### Dashboard:
2019-01-25 11:47:45 +01:00
![](https://raw.githubusercontent.com/D4-project/d4-core/master/doc/images/main.png)
2020-03-12 11:10:27 +01:00
2020-03-12 11:15:35 +01:00
#### Connected Sensors:
2019-01-25 11:47:45 +01:00
![](https://raw.githubusercontent.com/D4-project/d4-core/master/doc/images/sensor-mgmt.png)
2020-03-12 11:10:27 +01:00
2020-03-12 11:15:35 +01:00
#### Sensors Status:
2020-03-12 11:10:27 +01:00
![](https://raw.githubusercontent.com/D4-project/d4-core/master/doc/images/sensor_status.png)
![](https://raw.githubusercontent.com/D4-project/d4-core/master/doc/images/sensor_stat_types.png)
![](https://raw.githubusercontent.com/D4-project/d4-core/master/doc/images/sensor_stat_files.png)
2020-03-12 11:15:35 +01:00
#### Server Management:
2020-03-12 11:10:27 +01:00
![](https://raw.githubusercontent.com/D4-project/d4-core/master/doc/images/server-management.png)
2020-03-12 11:15:35 +01:00
![](https://raw.githubusercontent.com/D4-project/d4-core/master/doc/images/server-management-types.png)
2020-03-12 11:10:27 +01:00
2020-03-12 11:15:35 +01:00
#### analyzer Queues:
![](https://raw.githubusercontent.com/D4-project/d4-core/master/doc/images/analyzer-queues.png)
2020-03-12 11:10:27 +01:00
![](https://raw.githubusercontent.com/D4-project/d4-core/master/doc/images/create_analyzer_queue.png)
2019-02-14 16:38:08 +01:00
![](https://raw.githubusercontent.com/D4-project/d4-core/master/doc/images/analyzer-mgmt.png)