TMAegisBeta
更多 macos 规则

macOS

TMA-MACOS15-5.8

Ensure a Login Window Banner Exists

中级别 2自动化macos

说明

A Login window banner warning informs the user that the system is reserved for authorized use only. It enforces an acknowledgment by the user that they have been informed of the use policy in the banner if required. The system recognizes either the .txt and the .rtf formats. Audit: A /Library/Security/PolicyBanner.* file must exist and its mode must have 4 as the third digit.

检查方式

审计方法: Shell 命令

shell
set -- /Library/Security/PolicyBanner.*
[ -e "$1" ] || exit 1
for f in "$@"; do
  p=$(/usr/bin/stat -f %A "$f") || exit 1
  case "$p" in ??4) ;; *) echo "$f mode $p"; exit 0;; esac
done
echo compliant
预期输出
compliant

修复方式

修复方法: 操作指南或基础设施补丁

Terminal: sudo /bin/chmod o+r /Library/Security/PolicyBanner.txt ; sudo /bin/chmod o+r /Library/Security/PolicyBanner.rtf.

属性

操作系统
macos-15
标签
macossystem-access
参考
CIS Apple macOS 15.0 Sequoia Benchmark v2.1.0 - 5.8 Ensure a Login Window Banner Exists

检查本机

请在您有权审计的机器上运行此命令。扫描为只读操作。

shell
tmaegis scan --target macos --level 2