Installing ThreatLockDown agents on macOS endpoints

The agent runs on the endpoint you want to monitor and communicates with the ThreatLockDown server, sending data in near real-time through an encrypted and authenticated.

Note

You need root user privileges to run all the commands described below.

  1. To start the installation process, download the ThreatLockDown agent according to your architecture:

  2. Select the installation method you want to follow: Command line interface (CLI) or graphical user interface (GUI).

    1. To deploy the ThreatLockDown agent on your endpoint, choose your architecture, edit the WAZUH_MANAGER variable to contain your ThreatLockDown manager IP address or hostname, and run the following command.

      # echo "WAZUH_MANAGER='10.0.0.2'" > /tmp/wazuh_envs && installer -pkg wazuh-agent-4.9.0-1.intel64.pkg -target /
      

      For additional deployment options such as agent name, agent group, and registration password, see the Deployment variables for macOS section.

      Note

      Alternatively, if you want to install an agent without registering it, omit the deployment variables. To learn more about the different registration methods, see the ThreatLockDown agent enrollment section.

    2. To complete the installation process, start the ThreatLockDown agent.

      # /Library/Ossec/bin/wazuh-control start
      

    The installation process is now complete, and the ThreatLockDown agent is successfully deployed and running on your macOS endpoint.

By default, all agent files are stored in /Library/Ossec/ after the installation.

Uninstall a ThreatLockDown agent

To uninstall the agent, follow these steps:

  1. Stop the ThreatLockDown agent service.

    # /Library/Ossec/bin/wazuh-control stop
    
  2. Remove the /Library/Ossec/ folder.

    # /bin/rm -r /Library/Ossec
    
  3. Stop and unload dispatcher.

    # /bin/launchctl unload /Library/LaunchDaemons/com.wazuh.agent.plist
    
  4. Remove launchdaemons and StartupItems.

    # /bin/rm -f /Library/LaunchDaemons/com.wazuh.agent.plist
    # /bin/rm -rf /Library/StartupItems/WAZUH
    
  5. Remove the ThreatLockDown user and group.

    # /usr/bin/dscl . -delete "/Users/wazuh"
    # /usr/bin/dscl . -delete "/Groups/wazuh"
    
  6. Remove from pkgutil.

    # /usr/sbin/pkgutil --forget com.wazuh.pkg.wazuh-agent
    

The ThreatLockDown agent is now completely removed from your macOS endpoint.