Linux
View all Worklets
LinuxLinux

Linux - System Preferences - Ensure Mounting of Hfs Filesystems is Disabled

Disable HFS filesystem mounting on Linux endpoints to prevent unauthorized data access

Worklet Details

What the HFS filesystem disabler does

This Automox Worklet™ disables the HFS kernel module on Linux systems, preventing the mounting of HFS volumes. The Worklet first checks whether the HFS module is currently loaded using the kernel module inspection tools.

If the module is active, the Worklet creates a configuration file at /etc/modprobe.d/hfs.conf that prevents HFS from loading in the future. It then unloads the module from kernel memory using the rmmod command, achieving immediate compliance.

The Worklet targets both workstation and server systems, making it useful for organizations that need consistent security controls across their entire Linux fleet.

Why disable HFS on your Linux network

HFS and HFS+ are Apple filesystems rarely needed on standard Linux deployments. Leaving the HFS module enabled creates an unnecessary attack surface that could allow unauthorized filesystem mounting or data extraction. Disabling it reduces complexity and strengthens your compliance posture.

This configuration aligns with CIS Distribution Independent Linux v2.0.0 benchmarks, which recommend disabling unused filesystem drivers. Organizations subject to compliance requirements such as PCI-DSS, HIPAA, or SOC 2 benefit from eliminating unnecessary kernel modules that increase risk exposure.

By automating HFS removal across your fleet, you maintain consistent security controls without manual configuration on individual endpoints. This is especially valuable in large environments where manual verification becomes impractical.

How HFS filesystem disabling works

  1. Evaluation phase: The Worklet uses modprobe -n -v hfs to check if HFS configuration exists, then examines lsmod output to detect whether the HFS kernel module is currently loaded in memory.

  2. Remediation phase: The Worklet creates /etc/modprobe.d/hfs.conf with the directive "install hfs /bin/true" to blacklist the module, then executes rmmod hfs to immediately unload it from kernel memory. If unloading succeeds, the Worklet exits with success.

HFS filesystem remediation requirements

  • Linux endpoints with any distribution (CIS Distribution Independent Linux v2.0.0 compliant)

  • Root or sudo access required to modify kernel modules and create configuration files

  • Automox agent 1.42.22 or later

  • Kernel module support (modprobe, lsmod, and rmmod utilities must be available)

  • Both workstations and servers are supported

Expected Linux filesystem security state

After remediation completes, the HFS module will not load during boot or runtime. Verify success by checking that /etc/modprobe.d/hfs.conf exists and contains the blacklist directive. Running lsmod | grep hfs should return no results, indicating the module is no longer in kernel memory.

If the endpoint requires a reboot to fully reflect kernel module changes, this occurs due to boot-time module loading. The blacklist persists after restart. The Worklet reports success when it successfully removes the module from memory and creates the persistent configuration file.

How to validate verify mounting of hfs filesystems is disabled changes

  1. Run this Worklet on a pilot Linux endpoint and review evaluation output for verify mounting of hfs filesystems is disabled.

  2. Confirm Automox activity logs show successful completion and exit code 0.

  3. Verify endpoint state using checks aligned to evaluation script logic, such as else, exit.

  4. Validate remediation effects from script operations such as function, touch, rmmod, then rerun evaluation for compliance.

For technical validation, compare endpoint state to the Worklet evaluation logic and remediation flow for verify mounting of hfs filesystems is disabled. This supports repeatable system preferences workflows, faster change control review, and auditable compliance evidence.

Useful script references for this Worklet include evaluation operations such as else, exit and remediation operations such as function, touch, rmmod. Use these indicators to verify that endpoint changes match intended policy outcomes.

View in app
evalutation image
remediation image

Consider Worklets your easy button

What's a Worklet?

A Worklet is an automation script, written in Bash or PowerShell, designed for seamless execution on endpoints – at scale – within the Automox platform. Worklet automation scripts perform configuration, remediation, and the installation or removal of applications and settings across Windows, macOS, and Linux.

do more with worklets