Suspicious Windows Public IP Address Discovery via DNS
Adversaries frequently use public IP lookup services to perform network reconnaissance and verify egress connectivity prior to establishing C2 channels, a behavior detectable via DNS query analysis from suspicious processes.
This threat brief focuses on the behavioral pattern of Windows-based processes querying public IP address discovery web services. Threat actors utilize these lookups as an initial reconnaissance step to confirm network connectivity, determine their egress IP, or identify network environment restrictions before initiating command-and-control (C2) operations.
The activity is particularly concerning when performed by Living-off-the-Land binaries (LOLBins) such as powershell.exe, bitsadmin.exe, or rundll32.exe, as well as unsigned binaries or processes executing from high-risk user-writable directories (e.g., \Users\Public or \ProgramData). Defenders must distinguish between this malicious reconnaissance and routine administrative tasks performed by managed system updaters or endpoint security agents. Because both benign and malicious software leverage the same common public IP services, detection engineering teams must utilize process lineage, code signing status, and network connection correlation to reduce false positives.
Attack Chain
- An attacker gains initial access or code execution on a Windows host.
- The attacker selects a LOLBin or drops an unsigned malicious binary into a writable directory.
- The process initiates a DNS lookup for a public IP discovery service (e.g.,
api.ipify.orgorcheckip.amazonaws.com). - The operating system resolves the domain via DNS, leaving an artifact in host-level network logs or Sysmon Event ID 22.
- The process receives the resolution, verifying external internet connectivity.
- The attacker establishes a network connection to a C2 infrastructure or exfiltrates data, often using the previously verified egress path.
Impact
Successful reconnaissance via IP discovery services indicates that an attacker has achieved a foothold and is actively preparing for further malicious operations. If left undetected, this stage often leads to full C2 communication, internal network scanning, lateral movement, and data exfiltration. The impact varies depending on the attacker's objective, but identifying this stage provides a critical window to disrupt the attack chain before significant damage occurs.
Recommendation
- Deploy the provided Sigma rule to detect DNS queries to known IP lookup services from suspicious processes and tune based on internal administrative software profiles.
- Enable Sysmon (specifically Event ID 22) or equivalent DNS telemetry to capture
dns.question.nameand process association. - Correlate DNS query events with child process creation and network connection logs to identify C2 initiation.
- Do not create exceptions based solely on the IP lookup domain or process name; require verification of the process hash, code signing certificate, and parent process lineage.
Detection coverage 1
Detect Public IP Discovery via DNS Query
highDetects DNS queries to common public IP address lookup services by LOLBins or suspicious processes running from user-writable paths.
Detection queries are available on the platform. Get full rules →
Indicators of compromise
33
domain
| Type | Value |
|---|---|
| domain | ip-api.com |
| domain | checkip.dyndns.org |
| domain | api.ipify.org |
| domain | api.ipify.com |
| domain | whatismyip.akamai.com |
| domain | bot.whatismyipaddress.com |
| domain | ifcfg.me |
| domain | ident.me |
| domain | ipof.in |
| domain | ip.tyk.nu |
| domain | icanhazip.com |
| domain | curlmyip.com |
| domain | wgetip.com |
| domain | eth0.me |
| domain | ipecho.net |
| domain | ip.appspot.com |
| domain | api.myip.com |
| domain | geoiptool.com |
| domain | api.2ip.ua |
| domain | api.ip.sb |
| domain | ipinfo.io |
| domain | checkip.amazonaws.com |
| domain | wtfismyip.com |
| domain | freegeoip.net |
| domain | freegeoip.app |
| domain | geoplugin.net |
| domain | myip.dnsomatic.com |
| domain | api64.ipify.org |
| domain | ip4.seeip.org |
| domain | api.db-ip.com |
| domain | geolocation-db.com |
| domain | httpbin.org |
| domain | myip.opendns.com |