Malware Gathering Victim Network Information via Public IP Check Services
Malware and related tools use public IP check services to enumerate victim external IP addresses for reconnaissance and situational awareness.
Triage facts
Revision 2- Evidence
- Unknown
- Severity
- Medium
- Sources
- 1 public source
- Freshness
- Revision 2Jan 2, 12:00 UTC
- Detection
- 2 rules · 26 IOCs
Revision history 1 entry · Revision 2
- Revision 2
Repaired a legacy canonical identity collision
Changed: slug
This brief focuses on the technique of malware and related tools querying public IP check services to identify the external IP address of a compromised host. This activity is typically performed early in the infection lifecycle to give the attacker situational awareness of the victim's network. This information can be used to tailor attacks, identify the victim's geographic location, and potentially identify the organization to which the victim belongs. This technique is used by a wide variety of malware families, including Trickbot, Azorult, and many others, to perform reconnaissance on the compromised host. This behavior is identified using Sysmon EventCode 22 logs, specifically monitoring DNS queries to services.
Attack Chain
- A user unknowingly executes a malicious executable (e.g., via drive-by download or opening a malicious attachment).
- The malicious executable starts on the host, typically with user-level privileges.
- The malware initiates a DNS query to a known IP check service (e.g.,
wtfismyip.com,ipinfo.io,icanhazip.com) using theQueryNamefield in Sysmon Event ID 22. - The DNS query is resolved, and the malware receives the external IP address of the compromised host.
- The malware may then use this IP address for further reconnaissance, such as geolocation lookups or identifying the organization to which the IP address belongs.
- The gathered information is sent back to the attacker-controlled command-and-control (C2) server.
- The attacker uses the gathered information to tailor subsequent attacks, such as lateral movement or data exfiltration.
Impact
Successful execution of this reconnaissance technique provides attackers with valuable information about the victim's network. This information can be used to tailor subsequent attacks, increasing the likelihood of success. In the case of ransomware attacks, knowing the victim's organization can allow the attacker to demand a larger ransom. The use of IP check services has been observed across a diverse range of malware families and impacts organizations across all sectors.
Recommendation
- Enable Sysmon Event ID 22 logging to capture DNS query events.
- Deploy the Sigma rules in this brief to your SIEM and tune for your environment.
- Block the C2 domains listed in the IOC table at the DNS resolver.
- Investigate any unusual process making DNS queries to IP check services, as highlighted by the detection rules.
Detection coverage 2
Detect Process Querying IP Check Services via DNS
mediumDetects processes making DNS queries to known IP check services to determine the external IP address.
Detect Svchost Querying IP Check Services via DNS
highDetects svchost.exe making DNS queries to known IP check services to determine the external IP address.
Detection queries are available on the platform. Get full rules →
Indicators of compromise
26
domain
| Type | Value |
|---|---|
| domain | wtfismyip.com |
| domain | ipinfo.io |
| domain | api.ipify.org |
| domain | icanhazip.com |
| domain | ip.anysrc.com |
| domain | api.ip.sb |
| domain | ident.me |
| domain | www.myexternalip.com |
| domain | zen.spamhaus.org |
| domain | cbl.abuseat.org |
| domain | b.barracudacentral.org |
| domain | dnsbl-1.uceprotect.net |
| domain | spam.dnsbl.sorbs.net |
| domain | iplogger.org |
| domain | ip-api.com |
| domain | ipwho.is |
| domain | ifconfig.me |
| domain | myip.com |
| domain | ipstack.com |
| domain | myexternalip.com |
| domain | ip-api.io |
| domain | trackip.net |
| domain | ipgeolocation.io |
| domain | ipfind.io |
| domain | freegeoip.app |
| domain | ipv4bot.whatismyipaddress.com |