Authorize USB hubs in USBGuard daemon
An XCCDF Rule
Description
To allow authorization of USB hub devices by USBGuard daemon,
add line
allow with-interface match-all { 09:00:* }
to /etc/usbguard/rules.conf
.
warning alert: Warning
This rule should be understood primarily as a convenience administration feature. This rule ensures that if the USBGuard default rules.conf file is present, it will alter it so that USB hub devices are allowed. However, if the rules.conf file is altered by system administrator, the rule does not check if USB hub devices are allowed. This assumes that an administrator modified the file with some purpose in mind.
Rationale
Without allowing hubs, it might not be possible to use any USB devices on the system.
- ID
- xccdf_org.ssgproject.content_rule_usbguard_allow_hub
- Severity
- Medium
- References
- Updated
Remediation - Ansible
- name: Allow hubs
lineinfile:
path: /etc/usbguard/rules.conf
create: true
line: allow with-interface match-all { 09:00:* }
state: present
Remediation - Shell Script
# Remediation is applicable only in certain platforms
if ( [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ] && ! grep -q s390x /proc/sys/kernel/osrelease ); then
echo "allow with-interface match-all { 09:00:* }" >> /etc/usbguard/rules.conf
else