External IP Address Discovery via Curl

Last updated 2 days ago on 2026-02-09
Created 12 days ago on 2026-01-30

About

Detects applications making a curl request to a known public IP address lookup web service. Malware commonly performs this action during reconnaissance to assess potential targets and identify the victim's external IP address.
Tags
Domain: EndpointOS: macOSUse Case: Threat DetectionTactic: DiscoveryData Source: Elastic DefendLanguage: eql
Severity
low
Risk Score
21
MITRE ATT&CK™

Discovery (TA0007)(external, opens in a new tab or window)

License
Elastic License v2(external, opens in a new tab or window)

Definition

Rule Type
Event Correlation Rule
Integration Pack
Prebuilt Security Detection Rules
Index Patterns
logs-endpoint.events.process-*
Related Integrations

endpoint(external, opens in a new tab or window)

Query
text code block:
process where host.os.type == "macos" and event.type == "start" and event.action == "exec" and ((process.parent.executable like ("/Applications/*", "/Volumes/*", "/private/var/folders/*")) or (process.parent.name in ("bash", "sh", "zsh") and process.parent.command_line like "*http*") or (process.parent.code_signature.trusted == false or process.code_signature.exists == false)) and process.name in ("curl", "nscurl") and process.args_count <= 5 and process.command_line like ("*ip-api.com*", "*ipwho.is*", "*checkip.dyndns.org*", "*api.ipify.org*", "*whatismyip.akamai.com*", "*ifcfg.me*", "*ifconfig.me*", "*ident.me*", "*icanhazip.com*", "*ipecho.net*", "*api.myip.com*", "*checkip.amazonaws.com*", "*wtfismyip.com*", "*iplogger.*", "*freegeoip.net*", "*ipinfo.io*", "*geoplugin.net*", "*httpbin.org*", "*myip.opendns.com*")

Install detection rules in Elastic Security

Detect External IP Address Discovery via Curl in the Elastic Security detection engine by installing this rule into your Elastic Stack.

To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).