Skip to content
Threat Feed
low advisory

Detection of External IP Discovery via Curl on macOS

Threat actors utilize curl or nscurl on macOS to query public IP geolocation services for reconnaissance, enabling them to assess network context and stage follow-on malicious activity.

Adversaries targeting macOS endpoints frequently engage in reconnaissance to identify the victim's external-facing IP address and network environment. This process is commonly automated by scripts or dropped binaries that invoke the built-in curl or nscurl utilities to query various public "what is my IP" and geolocation services. By understanding the host's external network context, attackers can tailor subsequent C2 communications, routing, or staging decisions based on the target's geography or ISP. This behavior is often observed originating from unsigned processes, temporary file locations (e.g., /private/var/folders), or suspicious parent shell processes (bash/zsh) containing network-related command line arguments. Identifying this activity early can help defenders block unauthorized reconnaissance before deeper persistence or data exfiltration occurs.

Impact

Successful reconnaissance allows attackers to map the network infrastructure of the target, increasing the likelihood of successful C2 establishment and targeted exploitation. While the discovery action itself is low-impact, it is a precursor to more severe activities such as credential theft, lateral movement, and unauthorized exfiltration, potentially affecting any enterprise environment where macOS endpoints are present.

Recommendation

  • Deploy the provided Sigma rule to monitor for suspicious curl executions; tune for administrative diagnostic scripts and known legitimate telemetry tools used in the environment.
  • Monitor process-creation events for curl or nscurl spawned by untrusted or unsigned parent applications.
  • Block egress access to known public IP lookup domains (e.g., ipify.org, ipinfo.io) from unauthorized or suspicious processes at the network edge or DNS resolver.
  • Review endpoints for indicators of persistence (e.g., LaunchAgents, cron jobs) if suspicious IP discovery is confirmed, as this often indicates an active infection stage.

Immediate actions

Deploy Sigma rule to detect suspicious curl reconnaissance

Detection Engineering 7d

Threat Hunt

Search for curl/nscurl execution with short command lines pointing to public IP services

T1016.001 low medium confidence convert to detection

Data: process_creation logs with CommandLine

Mitigations

Tighten macOS app execution controls and restrict curl context

medium_term IT Operations

T1016.001

Detection coverage 1

Detect External IP Address Discovery via Curl

low

Detects macOS processes launching curl or nscurl to query common public IP lookup services from potentially untrusted parents or unusual locations.

sigma tactics: discovery techniques: T1016.001 sources: process_creation, macos

Detection queries are available on the platform. Get full rules →

Indicators of compromise

1

domain

TypeValue
domainipinfo.io