Last Updated: 2023-02-06 16:22:38 UTC
by Johannes Ullrich (Version: 1)
Many of the bots I am observing attempt to detect the infected system's public ("WAN") IP address. Most of these systems are assumed to be behind NAT. To detect the external IP address, these bots use various public APIs. It may be helpful to detect these requests. Many use unique host names. This will make detecting the request in DNS logs easy even if TLS is not intercepted.
Note that there is useful software using these APIs. Do not just block them. But keeping an eye on who is sending these requests can be useful
Here are a few I remember seeing. The list I have seen isn't very long, making it easy to detect. Let me know if there are others:
Some of these APIs will block commonly abused user agents like 'curl' or 'pylib.' This will block many of the common bots from using the specific APIs (and they typically do not bother to specify a user agent but instead use a different API without restrictions).
There are some other websites that malware could use with a bit of screen scraping, but I have not seen malware use them. And as you are looking through your logs: Requests for "wanipcn.xml" are not related to looking up the WAN IP address. These requests attempt to exploit an older Realtek SDK vulnerability.