analyzer-d4-passivedns is an analyzer for a D4 network sensor. The analyser can process data produced by D4 sensors (in [passivedns](https://github.com/gamelinux/passivedns) CSV format (more to come)) and
ingest these into a Passive DNS server which can be queried later to search for the Passive DNS records.
analyzer-d4-passivedns is an analyzer for a D4 network sensor including a complete Passive DNS server. The analyser can process data produced by D4 sensors (in [passivedns](https://github.com/gamelinux/passivedns) CSV format (more to come)) or independently from D4 using [COF websocket](https://datatracker.ietf.org/doc/html/draft-dulaunoy-dnsop-passive-dns-cof) streams.
The package include a Passive DNS server which can be queried later to search for the Passive DNS records.
# Features
- A D4 analyzer which can be plugged to one or more [D4 servers](https://github.com/D4-project/d4-core) to get a stream of DNS records
- A compliant [Passive DNS ReST server compliant to Common Output Format](https://tools.ietf.org/html/draft-dulaunoy-dnsop-passive-dns-cof-04)
- [Input stream] - A D4 analyzer which can be plugged to one or more [D4 servers](https://github.com/D4-project/d4-core) to get a stream of DNS records
- [Input Stream] - A websocket stream (or a file stream) in NDJSON [COF format](https://datatracker.ietf.org/doc/html/draft-dulaunoy-dnsop-passive-dns-cof)
- [Output API] A compliant [Passive DNS ReST server compliant to Common Output Format](https://tools.ietf.org/html/draft-dulaunoy-dnsop-passive-dns-cof)
- A flexible and simple analyser which can be configured to collect the required records from DNS records
# Overview
@ -14,21 +16,31 @@ ingest these into a Passive DNS server which can be queried later to search for
## Requirements
- Python 3
- Redis >5.0
- Redis >5.0 or [kvrocks](https://github.com/apache/incubator-kvrocks)
- Tornado
- iptools
## Install
### Redis
~~~~
./install_server.sh
~~~~
All the Python 3 code will be installed in a virtualenv (PDNSENV).
### Kvrocks
~~~
./install_server_kvrocks.sh
~~~
All the Python 3 code will be installed in a virtualenv (PDNSENV).
## Running
### Start the redis server
### Start the redis server or kvrocks server
Don't forget to set the DB directory in the redis.conf configuration. By default, the redis for Passive DNS is running on TCP port 6400
@ -36,6 +48,12 @@ Don't forget to set the DB directory in the redis.conf configuration. By default
./redis/src/redis-server ./etc/redis.conf
~~~~
or
~~~~
./kvrocks/src/kvrocks -c ./etc/kvrocks.conf
~~~~
### Start the Passive DNS COF server
~~~~
@ -44,7 +62,17 @@ cd ./bin/
python3 ./pdns-cof-server.py
~~~~
### Configure and start the D4 analyzer
## Feeding the Passive DNS server
You have two ways to feed the Passive DNS server. You can combine multiple streams. A sample public COF stream is available from CIRCL with the newly seen IPv6 addresses and DNS records.