-
Notifications
You must be signed in to change notification settings - Fork 6
huntress_install_macos.sh
Installs the Huntress security agent on macOS systems with RMM integration.
This is the official Huntress deployment script for macOS systems, designed for use with RMM platforms. It downloads and installs the Huntress agent with proper organization and account key association. The script includes comprehensive error handling, validation, and logging capabilities.
Automates the deployment of the Huntress macOS agent through RMM platforms. The script validates credentials, downloads the official installer from Huntress, and executes the installation with appropriate organization affiliation. It supports both command-line parameters and hardcoded default values for flexibility in deployment scenarios.
- macOS system
- Root/sudo privileges
- Internet connectivity to reach huntress.io
- Valid Huntress account key
- Organization key for agent affiliation
-
accountKey (or defaultAccountKey) - Your Huntress account secret key
- 32-character hexadecimal string
- Obtained from Huntress portal's "download agent" section
- Can be passed via
--account_keyparameter or set as$defaultAccountKey
-
organizationKey (or defaultOrgKey) - Organization identifier
- User-specified name or description
- Used to affiliate agent with specific organization
- Can be passed via
--organization_keyparameter or set as$defaultOrgKey
-
rmm - Name of RMM platform (default: "Superops.ai")
- Helps Huntress support team track deployment methods
-
install_system_extension - Install system extension after agent installation
- Default: false
- Requires MDM configuration to avoid security prompts
- See Huntress KB for MDM setup instructions
- Validates root privileges
- Processes command-line arguments (--account_key, --organization_key)
- Falls back to default values if parameters not provided
- Validates account key format (32-character hex pattern)
- Masks account key in logs for security (shows first 4 and last 4 characters)
- Downloads official installer script from huntress.io
- Validates account key with Huntress servers
- Executes installation with provided credentials
- Optionally installs system extension (if enabled)
- Logs all operations to /tmp/HuntressInstaller.log
- Account keys are partially masked in logs (shows XXXX************************XXXX)
- Downloads installer only from official Huntress domain (huntress.io)
- Validates account key before proceeding with installation
- All operations logged to /tmp/HuntressInstaller.log
- Requires root privileges for system-level agent installation
- 0: Success - Huntress agent installed successfully
- 1: Failure - Invalid credentials, download failure, or installation error
- 2: Failure - Invalid command-line options
=========== INSTALL START AT 20250101-123000 ===============
=========== Superops.ai Deployment Script | Version: 1.0 ===============
--organization_key parameter present, set to: MyOrganization
Provided Huntress key: 1234************************abcd
Provided Organization Key: MyOrganization
=============== Begin Installer Logs ===============
Installing Huntress Agent...
=========== INSTALL FINISHED AT 20250101-123045 ===============
- 1.0 - Official Huntress deployment script for macOS with RMM integration
- View Script Source
- Huntress macOS Installation Guide
- Huntress MDM Configuration Guide
- Scripts - Back to script index