Rules Related To 'usbguard'

Component overview

Relevant packages:

Relevant groups:

Changelog:

No changes recorded.

Relevant rules:

Rule details

Log USBGuard daemon audit events using Linux Audit

configure_usbguard_auditbackend

Description

To configure USBGuard daemon to log via Linux Audit (as opposed directly to a file), AuditBackend option in /etc/usbguard/usbguard-daemon.conf needs to be set to LinuxAudit.

Rationale

Using the Linux Audit logging allows for centralized trace of events.

Install usbguard Package

package_usbguard_installed

Description

The usbguard package can be installed with the following command:

$ apt-get install usbguard

Rationale

usbguard is a software framework that helps to protect against rogue USB devices by implementing basic whitelisting/blacklisting capabilities based on USB device attributes.

Enable the USBGuard Service

service_usbguard_enabled

Description

The USBGuard service should be enabled. The usbguard service can be enabled with the following command:

$ sudo systemctl enable usbguard.service

Rationale

The usbguard service must be running in order to enforce the USB device authorization policy for all USB devices.

Authorize Human Interface Devices in USBGuard daemon

usbguard_allow_hid

Description

To allow authorization of Human Interface Devices (keyboard, mouse) by USBGuard daemon, add the line allow with-interface match-all { 03:*:* } to /etc/usbguard/rules.conf.

Rationale

Without allowing Human Interface Devices, it might not be possible to interact with the system.

Authorize Human Interface Devices and USB hubs in USBGuard daemon

usbguard_allow_hid_and_hub

Description

To allow authorization of USB devices combining human interface device and hub capabilities by USBGuard daemon, add the line allow with-interface match-all { 03:*:* 09:00:* } to /etc/usbguard/rules.conf.

Rationale

Without allowing Human Interface Devices, it might not be possible to interact with the system. Without allowing hubs, it might not be possible to use any USB devices on the system.

Authorize USB hubs in USBGuard daemon

usbguard_allow_hub

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.

Rationale

Without allowing hubs, it might not be possible to use any USB devices on the system.

Generate USBGuard Policy

usbguard_generate_policy

Description

By default USBGuard when enabled prevents access to all USB devices and this lead to inaccessible system if they use USB mouse/keyboard. To prevent this scenario, the initial policy configuration must be generated based on current connected USB devices.

Rationale

The usbguard must be configured to allow connected USB devices to work properly, avoiding the system to become inaccessible.