Disable Bluetooth Service
An XCCDF Rule
Description
Thebluetooth
service can be disabled with the following command:
$ sudo systemctl mask --now bluetooth.service
$ sudo service bluetooth stop
Rationale
Disabling the bluetooth
service prevents the system from attempting
connections to Bluetooth devices, which entails some security risk.
Nevertheless, variation in this risk decision may be expected due to the
utility of Bluetooth connectivity and its limited range.
- ID
- xccdf_org.ssgproject.content_rule_service_bluetooth_disabled
- Severity
- Medium
- References
- Updated
Remediation Templates
script:kickstart
service disable bluetooth
OS Build Blueprint
[customizations.services]
masked = ["bluetooth"]
A Kubernetes Patch
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
spec:
config:
ignition:
version: 3.1.0
A Puppet Snippet
include disable_bluetooth
class disable_bluetooth {
service {'bluetooth':
enable => false,
ensure => 'stopped',
}
}
An Ansible Snippet
- name: Gather the package facts
package_facts:
manager: auto
tags:
- CCE-87231-7
- NIST-800-171-3.1.16
A Shell Script
# Remediation is applicable only in certain platforms
if rpm --quiet -q kernel; then
SYSTEMCTL_EXEC='/usr/bin/systemctl'
"$SYSTEMCTL_EXEC" stop 'bluetooth.service'
"$SYSTEMCTL_EXEC" disable 'bluetooth.service'
"$SYSTEMCTL_EXEC" mask 'bluetooth.service'