TMAegisBêta
Plus de règles pour bind

BIND DNS

TMA-BIND-6.2

Hide Nameserver ID

MoyenneNiveau 1Automatiséebind

Description

The server-id option provides a server identifier that will be returned in response to an NSID query. An NSID query is described in RFC-5001, and is a method to identify servers in an environment where there are multiple DNS servers sharing the same IP address. The audit requires server-id to be unset (default none) or none, so id.server/NSID queries return nothing. The audit parses the effective configuration printed by named-checkconf -p (all include files resolved) from /etc/named.conf (RHEL; chroot /var/named/chroot is detected) or /etc/bind/named.conf (Debian/Ubuntu).

Méthode de vérification

Méthode d'audit: Commande shell

shell
if [ -f /var/named/chroot/etc/named.conf ]; then out=$(named-checkconf -t /var/named/chroot -p /etc/named.conf 2>/dev/null) || exit 1
else conf=/etc/named.conf; [ -f "$conf" ] || conf=/etc/bind/named.conf
  out=$(named-checkconf -p "$conf" 2>/dev/null) || exit 1; fi
flat=$(printf '%s\n' "$out" | tr '\t\n' '  ' | tr -s ' ')
opts=$(printf '%s\n' "$out" | awk '/^options[ \t]*\{/{f=1} f{print} f&&/^\};/{exit}' | tr '\t\n' '  ' | tr -s ' ')
s=$(printf '%s\n' "$opts" | grep -Eo '[{; ]server-id [^;]*;')
case "$s" in ''|*' none;'|*'"none";') ;; *) echo "server-id disclosed: $s"; exit 1 ;; esac
printf '%s\n' "$opts" | grep -Eq '[{; ]hostname "[^"]+";' && ! printf '%s\n' "$opts" | grep -Eq '[{; ]hostname "?none"?;' && { echo 'hostname statement discloses a name'; exit 1; }
echo compliant
Sortie attendue
compliant

Méthode de correction

Méthode de correction: Recommandation ou correctif d'infrastructure

To explicitly disable NSID support, add or modify the server-id option in the global BIND options with a value of none as shown below. server-id none;

Propriétés

Systèmes d'exploitation
Tous
Étiquettes
binddnsinformation-disclosure
Référence
CIS ISC BIND DNS Server 9.11 Benchmark v1.0.0 - 6.2 Hide Nameserver ID

Vérifier cet hôte

Exécutez cette commande sur une machine que vous êtes autorisé à auditer. L'analyse est en lecture seule.

shell
tmaegis scan --target bind