Detection of Unusual Network Connections to Web Services on macOS
This brief details a detection strategy for identifying potential command-and-control (C2) and exfiltration activity on macOS by monitoring for outbound connections to abused cloud services, paste sites, and tunnel providers.
Adversaries often weaponize legitimate web services to facilitate command-and-control (C2) communication and data exfiltration from compromised macOS endpoints. By blending in with routine enterprise traffic, attackers leverage infrastructure such as paste sites, cloud storage providers, and dynamic DNS or tunneling services to bypass traditional network defenses. This threat intelligence focuses on a detection methodology designed to baseline and identify unusual outbound connections from non-standard or non-browser processes to a curated list of high-risk domains. Defenders should monitor for these connections, especially when initiated by unsigned binaries or unexpected system processes, as they often indicate malware or post-exploitation tooling attempting to exfiltrate sensitive information or establish a persistent remote foothold.
Attack Chain
- An attacker gains initial execution on a macOS host via a malicious file or script.
- The payload initiates an outbound network connection to a publicly accessible web service (e.g., a paste site, cloud storage, or tunnel provider).
- The malicious process attempts to blend in by mimicking legitimate HTTP/S traffic to avoid detection by basic network filters.
- The process performs a C2 check-in to download secondary stages or configuration data from the external service.
- The attacker executes commands or scripts to discover sensitive local information.
- Data is staged locally within the compromised environment.
- The staged data is exfiltrated to the previously identified external web service or tunnel endpoint.
Impact
Successful exploitation of these techniques allows adversaries to maintain long-term command and control of macOS systems while exfiltrating sensitive organizational data. Because these connections utilize legitimate, often unblocked web infrastructure, defenders may face challenges in isolating malicious traffic from normal business operations. Failure to detect these patterns can lead to undetected data breaches, unauthorized remote access, and persistent threat actor presence.
Recommendation
Deploy the provided detection logic to flag unusual connections to high-risk domains and tune the environment by whitelisting legitimate, organization-specific cloud storage and collaboration tool usage.
- Deploy the Sigma rule below to detect suspicious network connections from processes that are not standard web browsers or trusted enterprise applications.
- Use endpoint telemetry to baseline normal network behavior for critical assets and create exclusions for authorized internal processes.
- Investigate alerts by confirming the source process path and the reputation of the destination domain to determine if the activity is related to unauthorized tool usage.
Immediate actions
Review and deploy the provided network detection rule
Threat Hunt
Search network logs for connections to known public tunnel providers
Data: destination.domain
Mitigations
Implement Egress filtering for unauthorized tunnel and paste services
T1071.001
Detection coverage 1
Unusual Network Connection to Suspicious Web Service
mediumDetects outbound network connections from non-browser/non-trusted processes to known suspicious web services used for C2 or exfiltration.
Detection queries are available on the platform. Get full rules →