macOS
TMA-MACOS15-4.3
Ensure NFS Server Is Disabled
中等級 1自動化macos
說明
macOS can act as an NFS fileserver. NFS sharing could be enabled to allow someone on another computer to mount shares and gain access to information from the user's computer. File sharing from a user endpoint has long been considered questionable, and Apple has removed that capability from the GUI.
檢查方式
稽核方法: Shell 指令
shell
s=$(/sbin/nfsd status 2>/dev/null | /usr/bin/awk '/nfsd service/ { print $NF }') || exit 1
if [ "$s" = disabled ] && [ ! -e /etc/exports ]; then echo compliant; else echo "nfsd=${s:-unknown}; /etc/exports present or service enabled"; fi- 預期輸出
compliant
修補方式
修補方法: 操作指南或基礎設施修補檔
Terminal: sudo /bin/launchctl disable system/com.apple.nfsd ; sudo /bin/rm -rf /etc/exports.
屬性
- 作業系統
- macos-15
- 標籤
- macosnetwork
- 參考資料
- CIS Apple macOS 15.0 Sequoia Benchmark v2.1.0 - 4.3 Ensure NFS Server Is Disabled
檢查此主機
請在您有權稽核的機器上執行此指令。掃描為唯讀操作。
shell
tmaegis scan --target macos