3.1.2 Ensure wireless interfaces are disabled

Information

Wireless networking is used when wired networks are unavailable.

-IF- wireless is not to be used, wireless devices can be disabled to reduce the potential attack surface.

Solution

Run the following script to disable any wireless interfaces:

#!/usr/bin/env bash

{
module_fix()
{
if ! modprobe -n -v "$l_mname" | grep -P -- '^h*install /bin/(true|false)'; then
echo -e " - setting module: \"$l_mname\" to be un-loadable"
echo -e "install $l_mname /bin/false" >> /etc/modprobe.d/"$l_mname".conf
fi
if lsmod | grep "$l_mname" > /dev/null 2>&1; then
echo -e " - unloading module \"$l_mname\""
modprobe -r "$l_mname"
fi
if ! grep -Pq -- "^h*blacklisth+$l_mnameb" /etc/modprobe.d/*; then
echo -e " - deny listing \"$l_mname\""
echo -e "blacklist $l_mname" >> /etc/modprobe.d/"$l_mname".conf
fi
}
if [ -n "$(find /sys/class/net/*/ -type d -name wireless)" ]; then
l_dname=$(for driverdir in $(find /sys/class/net/*/ -type d -name wireless | xargs -0 dirname); do basename "$(readlink -f "$driverdir"/device/driver/module)";done | sort -u)
for l_mname in $l_dname; do
module_fix
done
fi
}

Impact:

Many if not all laptop workstations and some desktop workstations will connect via wireless requiring these interfaces be enabled.

See Also

https://workbench.cisecurity.org/benchmarks/15963

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-6, 800-53|CM-7, CSCv7|15.4, CSCv7|15.5

Plugin: Unix

Control ID: 462b02042a21e8746ee5aeed7ec67416b2d3d303711e7d8c56d0e1aacd379500