os_tftpd_disable Disable Trivial File Transfer Protocol Service
All changes in this version
Title
Disable Trivial File Transfer Protocol Service
Control
result="FAIL"
enabled=$(/bin/launchctl print-disabled system | /usr/bin/grep '"com.apple.tftpd" => enabled')
running=$(/bin/launchctl print system/com.apple.tftpd 2>/dev/null)
if [[ -z "$running" ]] && [[ -z "$enabled" ]]; then
result="PASS"
elif [[ -n "$running" ]]; then
result=result+" RUNNING"
elif [[ -n "$enabled" ]]; then
result=result+" ENABLED"
fi
echo $result
Discussion
If the system does not require Trivial File Transfer Protocol (TFTP), support it is non-essential and _MUST_ be disabled.
The information system _MUST_ be configured to provide only essential capabilities. Disabling TFTP helps prevent the unauthorized connection of devices and the unauthorized transfer of information.
NOTE: TFTP service is disabled at startup by default macOS.
Related controls
ac-17, ac-3, ia-5.1
Fix
[source,bash]
----
/bin/launchctl bootout system/com.apple.tftpd
/bin/launchctl disable system/com.apple.tftpd
----
The system may need to be restarted for the update to take effect.