Skip to content

BIND

Overview

BIND is an implementation of the Domain Name System (DNS) of the Internet. It performs both of the main DNS server roles, acting as an authoritative name server for domains, and acting as a recursive resolver in the network.

  • Vendor: ISC
  • Supported environment: On Premise
  • Version compatibility: 9.18.8 (Latest version as of now)
  • Detection based on: Telemetry
  • Supported application or feature: DNS server

High-Level Architecture Diagram

  • Type of integration: Outbound (PUSH to Sekoia.io)
  • Schema

bind_architecture

Alternative

This will not be detailed in this documentation, but logs can also be sent directly to Sekoia.io over HTTPS using the Sekoia.io Endpoint Agent and the "Collect logs in files" method. This provides an alternative to the specified syslog collection method and may be preferable in certain environments.

Specification

Prerequisites

  • Resource:
    • Self-managed syslog forwarder
  • Network:
    • Outbound traffic allowed
  • Permissions:
    • Administrator or Root access to the BIND server
    • Root access to the Linux server with the syslog forwarder

Transport Protocol/Method

  • Indirect Syslog

Logs details

  • Supported functionalities: See section Overview
  • Supported type(s) of structure: Plain Text
  • Supported verbosity level: Informational

Note

Log levels are based on the taxonomy of RFC5424. Adapt according to the terminology used by the editor.

Step-by-Step Configuration Procedure

Instructions on the 3rd Party Solution

As of now, the main solution to collect BIND logs leverages the Rsyslog recipe. Please share your experiences with other recipes by editing this documentation.

Detailed Procedure on customer environment

  1. Configure BIND to Log Queries:
  2. First, you need to configure your BIND daemon to log queries and forward them to your rsyslog instance.
  3. If rsyslog and BIND are installed on the same box, you can simply add the following statement in your BIND’s main configuration file (named.conf):

    logging {
        channel syslog_chan {
            syslog daemon;
            severity dynamic;
        };
        category default { syslog_chan; };
        category queries { syslog_chan; };
        category config { syslog_chan; };
        category security { syslog_chan; };
    };
    
  4. Restart BIND Service:

  5. Restart the BIND service to apply the logging configuration changes:

    systemctl restart named
    

  6. Configure Rsyslog to Monitor BIND Log Files:

  7. Add the following configuration to your rsyslog configuration file (usually found in /etc/rsyslog.conf or /etc/rsyslog.d/):

    # Bind log
    $InputFileName /var/log/bind.log
    $InputFileTag bind:
    $InputFileStateFile stat-bind
    $InputFileSeverity info
    $InputFileFacility local0
    $InputFilePollInterval 10
    $InputRunFileMonitor
    
  8. Forward Logs to a Concentrator:

  9. Configure rsyslog to forward logs to a syslog concentrator:

    *.* action(type="omfwd"
       target="<Concentrator_FQDN_or_IP>"
       port="<Remote_Port>"
       protocol="tcp"
       TCP_Framing="octet-counted"
    )
    
  10. Verify Syslog Server Configuration:

  11. On your syslog server, verify that it is configured to accept syslog messages from the BIND server on the specified port.

For more informations on how to configure your BIND instance on its official website.

Instruction on Sekoia

Configure Your Intake

This section will guide you through creating the intake object in Sekoia, which provides a unique identifier called the "Intake key." The Intake key is essential for later configuration, as it references the Community, Entity, and Parser (Intake Format) used when receiving raw events on Sekoia.

  1. Go to the Sekoia Intake page.
  2. Click on the + New Intake button at the top right of the page.
  3. Search for your Intake by the product name in the search bar.
  4. Give it a Name and associate it with an Entity (and a Community if using multi-tenant mode).
  5. Click on Create.

Note

For more details on how to use the Intake page and to find the Intake key you just created, refer to this documentation.

Configure a forwarder

To forward events using syslog to Sekoia.io, you need to update the syslog header with the intake key you previously created. Here is an example of your message before the forwarder

<%pri%>1 %timestamp:::date-rfc3339% %hostname% %app-name% %procid% LOG RAW_MESSAGE
and after
<%pri%>1 %timestamp:::date-rfc3339% %hostname% %app-name% %procid% LOG [SEKOIA@53288 intake_key=\"YOUR_INTAKE_KEY\"] RAW_MESSAGE

To achieve this you can:

  • Use the Sekoia.io forwarder which is the official supported way to collect data using the syslog protocol in Sekoia.io. In charge of centralizing data coming from many equipments/sources and forwarding them to Sekoia.io with the apporpriated format, it is a prepackaged option. You only have to provide your intake key as parameter.
  • Use your own Syslog service instance. Maybe you already have an intance of one of these components on your side and want to reuse it in order to centralize data before forwarding them to Sekoia.io. When using this mode, you have to configure and maintain your component in order to respect the expected Sekoia.io format.

Warning

Only the Sekoia.io forwarder is officially supported. Other options are documented for reference purposes but do not have official support.

Raw Events Samples

In this section, you will find examples of raw logs as generated natively by the source. These examples are provided to help integrators understand the data format before ingestion into Sekoia.io. It is crucial for setting up the correct parsing stages and ensuring that all relevant information is captured.

client @0x7f62b80115d0 192.168.101.70#55575 (docs.sekoia.io): query: docs.sekoia.io IN AAAA + (192.168.100.102)
client 192.168.101.70#55575 (docs.sekoia.io): query: docs.sekoia.io IN AAAA +TC (192.168.100.102)
client 192.168.103.66#42811 (ipv6.google.com): query: ipv6.google.com IN A +EDC (192.168.100.102)
client @0x7f4f8003d9e0 192.168.101.61#38251 (global.vortex.data.trafficmanager.net): query: global.vortex.data.trafficmanager.net IN AAAA +E(0) (192.168.100.102)
client 192.168.103.66#57980 (ipv6.google.com): query: ipv6.google.com IN AAAA - (192.168.100.102)
client 192.168.103.66#45041 (107.100.168.192.in-addr.arpa): query: 107.100.168.192.in-addr.arpa IN PTR +E (192.168.100.102)
client 192.168.101.70#55575 (docs.sekoia.io): query: docs.sekoia.io IN AAAA +ET (192.168.100.102)

Detection section

The following section provides information for those who wish to learn more about the detection capabilities enabled by collecting this intake. It includes details about the built-in rule catalog, event categories, and ECS fields extracted from raw events. This is essential for users aiming to create custom detection rules, perform hunting activities, or pivot in the events page.

The following Sekoia.io built-in rules match the intake BIND. This documentation is updated automatically and is based solely on the fields used by the intake which are checked against our rules. This means that some rules will be listed but might not be relevant with the intake.

SEKOIA.IO x BIND on ATT&CK Navigator

Bazar Loader DGA (Domain Generation Algorithm)

Detects Bazar Loader domains based on the Bazar Loader DGA

  • Effort: elementary
Cobalt Strike DNS Beaconing

Detects suspicious DNS queries known from Cobalt Strike beacons. The threshold is more than 50 suspicious DNS requests to avoid false positives.

  • Effort: advanced
Correlation Potential DNS Tunnel

Detects domain name which is longer than 95 characters. Long domain names are distinctive of DNS tunnels.

  • Effort: advanced
Cryptomining

Detection of domain names potentially related to cryptomining activities.

  • Effort: master
Dynamic DNS Contacted

Detect communication with dynamic dns domain. This kind of domain is often used by attackers. This rule can trigger false positive in non-controlled environment because dynamic dns is not always malicious.

  • Effort: master
EvilProxy Phishing Domain

Detects subdomains potentially generated by the EvilProxy adversary-in-the-middle phishing platform. Inspect the other subdomains of the domain to identify the landing page, and determine if the user submitted credentials. This rule has a small percentage of false positives on legitimate domains.

  • Effort: intermediate
Exfiltration Domain

Detects traffic toward a domain flagged as a possible exfiltration vector.

  • Effort: master
Potential DNS Tunnel

Detects domain name which is longer than 95 characters. Long domain names are distinctive of DNS tunnels.

  • Effort: advanced
Remote Access Tool Domain

Detects traffic toward a domain flagged as a Remote Administration Tool (RAT).

  • Effort: master
Remote Monitoring and Management Software - AnyDesk

Detect artifacts related to the installation or execution of the Remote Monitoring and Management tool AnyDesk.

  • Effort: master
Remote Monitoring and Management Software - Atera

Detect artifacts related to the installation or execution of the Remote Monitoring and Management tool Atera.

  • Effort: master
SEKOIA.IO Intelligence Feed

Detect threats based on indicators of compromise (IOCs) collected by SEKOIA's Threat and Detection Research team.

  • Effort: elementary
Sekoia.io EICAR Detection

Detects observables in Sekoia.io CTI tagged as EICAR, which are fake samples meant to test detection.

  • Effort: master
Sliver DNS Beaconing

Detects suspicious DNS queries known from Sliver beaconing

  • Effort: intermediate
Suspicious TOR Gateway

Detects suspicious TOR gateways. Gateways are often used by the victim to pay and decrypt the encrypted files without installing TOR. Tor intercepts the network traffic from one or more apps on user’s computer, usually the user web browser, and shuffles it through a number of randomly-chosen computers before passing it on to its destination. This disguises user location, and makes it harder for servers to pick him/her out on repeat visits, or to tie together separate visits to different sites, this making tracking and surveillance more difficult. Before a network packet starts its journey, user’s computer chooses a random list of relays and repeatedly encrypts the data in multiple layers, like an onion. Each relay knows only enough to strip off the outermost layer of encryption, before passing what’s left on to the next relay in the list.

  • Effort: advanced
TOR Usage Generic Rule

Detects TOR usage globally, whether the IP is a destination or source. TOR is short for The Onion Router, and it gets its name from how it works. TOR intercepts the network traffic from one or more apps on user’s computer, usually the user web browser, and shuffles it through a number of randomly-chosen computers before passing it on to its destination. This disguises user location, and makes it harder for servers to pick him/her out on repeat visits, or to tie together separate visits to different sites, this making tracking and surveillance more difficult. Before a network packet starts its journey, user’s computer chooses a random list of relays and repeatedly encrypts the data in multiple layers, like an onion. Each relay knows only enough to strip off the outermost layer of encryption, before passing what’s left on to the next relay in the list.

  • Effort: master
Telegram Bot API Request

Detects suspicious DNS queries to api.telegram.org used by Telegram Bots of any kind

  • Effort: advanced

Event Categories

The following table lists the data source offered by this integration.

Data Source Description
DNS records BIND provides detailed logs on handled DNS queries

Transformed Events Samples after Ingestion

This section demonstrates how the raw logs will be transformed by our parsers. It shows the extracted fields that will be available for use in the built-in detection rules and hunting activities in the events page. Understanding these transformations is essential for analysts to create effective detection mechanisms with custom detection rules and to leverage the full potential of the collected data.

{
    "message": "client @0x7f62b80115d0 192.168.101.70#55575 (docs.sekoia.io): query: docs.sekoia.io IN AAAA + (192.168.100.102)",
    "dns": {
        "header_flags": [
            "RD"
        ],
        "question": {
            "class": "IN",
            "name": "docs.sekoia.io",
            "registered_domain": "sekoia.io",
            "subdomain": "docs",
            "top_level_domain": "io",
            "type": "AAAA"
        },
        "type": "query"
    },
    "related": {
        "hosts": [
            "docs.sekoia.io"
        ],
        "ip": [
            "192.168.101.70"
        ]
    },
    "source": {
        "address": "192.168.101.70",
        "ip": "192.168.101.70",
        "port": 55575
    }
}
{
    "message": "client 192.168.101.70#55575 (docs.sekoia.io): query: docs.sekoia.io IN AAAA +TC (192.168.100.102)",
    "dns": {
        "header_flags": [
            "CD",
            "RD"
        ],
        "question": {
            "class": "IN",
            "name": "docs.sekoia.io",
            "registered_domain": "sekoia.io",
            "subdomain": "docs",
            "top_level_domain": "io",
            "type": "AAAA"
        },
        "type": "query"
    },
    "network": {
        "transport": "tcp"
    },
    "related": {
        "hosts": [
            "docs.sekoia.io"
        ],
        "ip": [
            "192.168.101.70"
        ]
    },
    "source": {
        "address": "192.168.101.70",
        "ip": "192.168.101.70",
        "port": 55575
    }
}
{
    "message": "client 192.168.103.66#42811 (ipv6.google.com): query: ipv6.google.com IN A +EDC (192.168.100.102)",
    "dns": {
        "header_flags": [
            "CD",
            "RD"
        ],
        "question": {
            "class": "IN",
            "name": "ipv6.google.com",
            "registered_domain": "google.com",
            "subdomain": "ipv6",
            "top_level_domain": "com",
            "type": "A"
        },
        "type": "query"
    },
    "related": {
        "hosts": [
            "ipv6.google.com"
        ],
        "ip": [
            "192.168.103.66"
        ]
    },
    "source": {
        "address": "192.168.103.66",
        "ip": "192.168.103.66",
        "port": 42811
    }
}
{
    "message": "client @0x7f4f8003d9e0 192.168.101.61#38251 (global.vortex.data.trafficmanager.net): query: global.vortex.data.trafficmanager.net IN AAAA +E(0) (192.168.100.102)",
    "dns": {
        "header_flags": [
            "RD"
        ],
        "question": {
            "class": "IN",
            "name": "global.vortex.data.trafficmanager.net",
            "registered_domain": "trafficmanager.net",
            "subdomain": "global.vortex.data",
            "top_level_domain": "net",
            "type": "AAAA"
        },
        "type": "query"
    },
    "related": {
        "hosts": [
            "global.vortex.data.trafficmanager.net"
        ],
        "ip": [
            "192.168.101.61"
        ]
    },
    "source": {
        "address": "192.168.101.61",
        "ip": "192.168.101.61",
        "port": 38251
    }
}
{
    "message": "client 192.168.103.66#57980 (ipv6.google.com): query: ipv6.google.com IN AAAA - (192.168.100.102)",
    "dns": {
        "header_flags": [],
        "question": {
            "class": "IN",
            "name": "ipv6.google.com",
            "registered_domain": "google.com",
            "subdomain": "ipv6",
            "top_level_domain": "com",
            "type": "AAAA"
        },
        "type": "query"
    },
    "related": {
        "hosts": [
            "ipv6.google.com"
        ],
        "ip": [
            "192.168.103.66"
        ]
    },
    "source": {
        "address": "192.168.103.66",
        "ip": "192.168.103.66",
        "port": 57980
    }
}
{
    "message": "client 192.168.103.66#45041 (107.100.168.192.in-addr.arpa): query: 107.100.168.192.in-addr.arpa IN PTR +E (192.168.100.102)",
    "dns": {
        "header_flags": [
            "RD"
        ],
        "question": {
            "class": "IN",
            "name": "107.100.168.192.in-addr.arpa",
            "registered_domain": "192.in-addr.arpa",
            "subdomain": "107.100.168",
            "top_level_domain": "in-addr.arpa",
            "type": "PTR"
        },
        "type": "query"
    },
    "related": {
        "hosts": [
            "107.100.168.192.in-addr.arpa"
        ],
        "ip": [
            "192.168.103.66"
        ]
    },
    "source": {
        "address": "192.168.103.66",
        "ip": "192.168.103.66",
        "port": 45041
    }
}
{
    "message": "client 192.168.101.70#55575 (docs.sekoia.io): query: docs.sekoia.io IN AAAA +ET (192.168.100.102)",
    "dns": {
        "header_flags": [
            "RD"
        ],
        "question": {
            "class": "IN",
            "name": "docs.sekoia.io",
            "registered_domain": "sekoia.io",
            "subdomain": "docs",
            "top_level_domain": "io",
            "type": "AAAA"
        },
        "type": "query"
    },
    "network": {
        "transport": "tcp"
    },
    "related": {
        "hosts": [
            "docs.sekoia.io"
        ],
        "ip": [
            "192.168.101.70"
        ]
    },
    "source": {
        "address": "192.168.101.70",
        "ip": "192.168.101.70",
        "port": 55575
    }
}

Extracted Fields

The following table lists the fields that are extracted, normalized under the ECS format, analyzed and indexed by the parser. It should be noted that infered fields are not listed.

Name Type Description
dns.header_flags keyword Array of DNS header flags.
dns.question.class keyword The class of records being queried.
dns.question.name keyword The name being queried.
dns.question.type keyword The type of record being queried.
dns.type keyword The type of DNS event captured, query or answer.
network.transport keyword Protocol Name corresponding to the field iana_number.
source.ip ip IP address of the source.
source.port long Port of the source.

For more information on the Intake Format, please find the code of the Parser, Smart Descriptions, and Supported Events here.

Further readings