ADNS is a stub resolver for the DNS protocol written in Ada. Currently the project provides a D-Bus service and a simple command-line tool.

The ADNS D-Bus service implements ResolveHostname and SetLinkDNS of the org.freedesktop.resolve1.Manager interface, which on most modern Linux distributions allows it to be used as replacement for other stub resolvers such as systemd’s systemd-resolved.

Licence

Copyright (C) 2019 Tobias Brunner <tbrunner@hsr.ch>
Copyright (C) 2019 Reto Buerki <reet@codelabs.ch>
Copyright (C) 2019 Adrian-Ken Rueegsegger <ken@codelabs.ch>

Free use of this software is granted under the terms of the GNU General Public
License as published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.

Download

Development version

The latest version of ADNS is available through its git repository:

$ git clone https://git.codelabs.ch/git/adns.git

Build

To compile ADNS on your system, you need to have the following software installed:

After the build, the D-Bus service adns_resolved will be located in the bin directory.

If you want to do fuzzing of the DNS message deserialization code you also need to have the following installed:

Testing

Before you use ADNS services on your system, you might want to test if everything works as expected. ADNS contains a unit test suite which can be run by entering the following command:

$ make tests

All tests should be marked with PASS behind the test name.

Installation

To install the D-Bus service and debug utility on your system, type the following:

$ make DESTDIR=/ install

If DESTDIR is not specified, /usr/local is used.

Fuzzing

ADNS provides facilities to use American Fuzzy Lop (afl) to fuzz DNS message deserialization. You can issue the following command to start fuzzing:

$ make fuzz

Fuzzing can also be parallelized using the following command:

$ make fuzz_parallel

The NUM_CPUS variable, which defaults to the number of CPUs, specifies how many fuzzer instances should be run in parallel.

If you would like to generate a coverage report for the fuzzing results, issue the following command:

$ make fuzz_cov

Since ADNS comes with a large fuzzing corpus the coverage of DNS.Message.Deserialize and indirect calls is quite extensive.