Potential Successful SSH Brute Force on macOS
Attackers are conducting brute-force or password-spraying attacks against macOS SSH services, identified by a burst of authentication failures followed by a successful login.
This threat involves adversaries targeting macOS hosts with publicly exposed SSH services. Attackers utilize automated tools to conduct brute-force or password-spraying campaigns, attempting to gain unauthorized access by cycling through common or compromised credential pairs. The activity is characterized by a high volume of failed authentication attempts logged by the sshd-session process on the macOS host. Defenders can monitor this activity using macOS Security Events logs. The correlation of a rapid sequence of failure messages followed immediately by a successful Accepted authentication event serves as a high-fidelity indicator that an attacker has likely bypassed authentication and successfully gained access to the system. This behavior is particularly dangerous as it represents a successful breach of the perimeter, enabling subsequent malicious activity such as persistence, privilege escalation, or lateral movement.
Attack Chain
- Attacker performs network reconnaissance to identify internet-facing macOS hosts with TCP port 22 open.
- Attacker initiates an automated SSH connection attempt to the target host.
- Attacker sends authentication requests using guessed or credential-stuffed passwords.
- macOS
sshdlogs repeated failures (e.g., "Failed password for") to the unified log. - Attacker eventually sends a correct credential pair that matches an existing account.
sshdrecords an "Accepted" authentication message indicating a successful session establishment.- Attacker proceeds to execute post-exploitation commands to establish persistence or exfiltrate data.
Impact
Successful brute-force attacks on macOS hosts grant adversaries unauthorized remote access, potentially leading to full system compromise. If the targeted account has administrative privileges, the attacker may gain elevated access, facilitating malware deployment, exfiltration of sensitive files, or the use of the host as a pivot point for lateral movement within the environment.
Recommendation
Prioritize detection and hardening to mitigate SSH-based brute-force attempts:
- Deploy the provided Sigma-compatible detection logic to SIEM platforms to monitor for failed-to-successful authentication sequences on macOS.
- Review and harden SSH configurations: disable password authentication in favor of public-key authentication, restrict SSH access using
AllowUsersorAllowGroupsdirectives, and block SSH access entirely if not required for remote management. - Implement network-level rate limiting or geo-blocking on internet-facing SSH services.
- Reset credentials immediately for any accounts identified as targets in a successful brute-force event.
- Perform incident response procedures on compromised hosts, including searching for unauthorized SSH keys and persistence mechanisms like Launch Agents or Login Items.
Immediate actions
Deploy the SSH brute force detection rule to identify active targeting.
Threat Hunt
Search authentication logs for bursts of failed logins followed by success across all macOS endpoints.
Data: macOS Security Events
Mitigations
Disable password-based SSH authentication and enforce key-based access.
Credential Access / Brute Force
Detection coverage 1
Potential Successful SSH Brute Force Attack via macOS Security Events
highDetects a sequence of 10 or more failed SSH authentication attempts followed by a successful login within 15 seconds on a macOS host.
Detection queries are available on the platform. Get full rules →