TMAegis베타
bind 관련 규칙 더 보기

BIND DNS

TMA-BIND-QUERYLOG

Ensure DNS query logging is enabled

낮음레벨 2자동bind

설명

Query logs support incident response (malware C2 lookups, data exfiltration over DNS). They are verbose, so this is a level 2 control. The audit parses named-checkconf -p output (/etc/bind/named.conf or /etc/named.conf) and passes when "querylog yes;" is set in options or the logging block routes the queries category to a channel.

점검 방법

감사 방식: 셸 명령

shell
conf=/etc/bind/named.conf; [ -f "$conf" ] || conf=/etc/named.conf
out=$(named-checkconf -p "$conf" 2>/dev/null) || exit 1
flat=$(printf '%s\n' "$out" | tr '\t\n' '  ')
printf '%s\n' "$flat" | grep -Eq '[{; ](querylog yes;|category "?queries"? \{)' && echo compliant
예상 출력
compliant

조치 방법

조치 방식: 가이드 또는 인프라 패치

Add to the logging block: channel query_log { file "/var/log/named/query.log" versions 5 size 50m; print-time yes; }; category queries { query_log; }; (or "querylog yes;" in options). Run named-checkconf, then rndc reconfig.

속성

운영 체제
모두
태그
binddnslogging
참고 자료
CIS BIND DNS Server Benchmark - Logging / query logging (verify section number for your release)

이 호스트 점검하기

감사 권한이 있는 시스템에서 실행하세요. 스캔은 읽기 전용입니다.

shell
tmaegis scan --target bind --level 2