TMA-BIND-2.2
Give the BIND User Account an Invalid Shell
Trung bìnhCấp 1Tự độngbind
Mô tả
The BIND user account, named by default, must not be used as a regular login account, and should be assigned an invalid or nologin shell to ensure that the account cannot be used to login. The audit reads /etc/passwd and requires the named (or bind) account shell to be /sbin/nologin, /bin/false or /dev/null.
Cách kiểm tra
Phương pháp kiểm tra: Lệnh shell
shell
bad=0; n=0
for u in named bind; do
s=$(awk -F: -v u=$u '$1==u{print $7}' /etc/passwd) || exit 1
[ -n "$s" ] || continue; n=1
case "$s" in /sbin/nologin|/usr/sbin/nologin|/bin/false|/usr/bin/false|/dev/null) ;; *) echo "$u shell $s"; bad=1 ;; esac
done
[ "$n" -eq 1 ] || { echo 'no named/bind account'; exit 1; }
[ "$bad" -eq 0 ] && echo compliant- Đầu ra mong đợi
compliant
Cách khắc phục
Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng
Change the named account to use the nologin shell as shown: # chsh -s /sbin/nologin named
Thuộc tính
- Hệ điều hành
- Bất kỳ
- Thẻ
- binddnspermissions
- Tham chiếu
- CIS ISC BIND DNS Server 9.11 Benchmark v1.0.0 - 2.2 Give the BIND User Account an Invalid Shell
Kiểm tra máy này
Chạy lệnh này trên máy bạn được phép kiểm tra. Lần quét chỉ ở chế độ đọc.
shell
tmaegis scan --target bind