Domain Generation Algorithms – Why so effective?

Domain Generation Algorithms(DGAs) are used in malware to generate a large number of domain names that can be used in communications to the malware’s command and control servers. One reason that DGAs are used is because a predefined list of domains that will be used as Command & Control (C&C) servers can be easily discovered in the binaries of malware. An algorithm needs to be reverse engineered. Some DGAs can be completely thwarted through reverse engineering, and every possible domain name can be known and then blocked through security layers. The majority of the domain names generated by DGAs do not resolve (NXdomains) and are never registered with any hosting company by the malware author. They will however, create noise in network logs and annoy Analysts attempting to find active C&C domains.

Although these requests to the NXdomains do not resolve, at OpenDNS, we still see the attempted request in our DNS query logs. Recently, I have found that analyzing these sessions of DGA requests in our logs has proven effective at surfacing other types of malicious domains that are queried in the event.

Why so effective?

While malware authors have found DGAs to be an effective way of hiding C&C traffic, what I’ll be talking about is how they’re effective in surfacing other related malicious infrastructure. This surfaces domains that become guilty by hanging out with the wrong crowd. If I can see that there is already some shady DGA business going on, and said domain does not match the known DGA pattern, but appears in the session, it’s worth examining. After singling out a session of DNS requests with many consecutive sudden requests to NXdomains, you will also find some resolving DGA domains. They typically only resolve for a short period of time. Amongst these resolving domains is where it becomes interesting, and becomes an effective place for hunting. Examining these domains will also give you further insight into how specific malware functions.

In an identified session of Necurs DGA callouts, we can identify the first DGA round beginning with a callout to top level ‘com’ domains that are unpredictable, and used by the malware to detect simulated network traffic in order to evade analysis. [1] The 2nd and 3rd round of DGA callouts will then begin if not thought to be running in a lab environment. We find the majority of the 2nd and 3rd round DGAs to be sinkholed.

uqhucsontf[.]com
myypqmvzkgnrf[.]com
ocufxskoiegqvv[.]com
uflhdvsnjmfgcp[.]so
otopshphtnhml[.]net
aiygrmsryphqlkfcld[.]su
etfxkiqtriteysf[.]pw
crigtwrdtxbcmsgjkmx[.]tv
cjyioboxmxhsmrclrhxxl[.]im
soqikjyliunjqaciqlg[.]tj
jrguloma[.]biz
anlxccqeqflidpwyhobm[.]ir

Surfacing malicious infrastructure

On Oct 3rd, an interesting domain stood out amongst this DGA session; xic[.]graphics.

oumulcchlccvhsb[.]la
wolnltrixnidaaqaqty[.]tw
awwxmmbhkpedjnycrh[.]eu
kaxtnqdkxigrg[.]cx
gwhhpnrfkdiedhga[.]ki
sxurcsgyrnob[.]tw
pmir.3g.qq1[.]com
xic[.]graphics

Around this date, messages were received by users on Facebook containing a link to xic[.]graphics. Reportedly, this site was installing a malicious browser extension once a user clicked an image to view a “video” contained in the message.  [2],[3]

After looking at the email registrant of xic[.]graphics, we found that this account had registered numerous other domains that were being used in the same type of campaigns: lololokokokovovovo[.]com, futunga[.]com, todayonlynews[.]com, utopgames[.]com .

lololokokokovovovo[.]com had a similar spike in traffic during this period as xic[.]graphics and shared the same html source code while it was live.

graphics-traffic
lolo-traffic

We are currently blocking all domains registered by this email registrant; mhungetuoy@gmail[.]com.

registrant

The IP address, 51.254.198[.]136 that some of these domains resolve to reveals more infrastructure belonging to the attackers. The domains seem to be involved in similar attacks and were all full of jumbled words, with Facebook image links in the source.
As of this posting, some of the domains seem to be moving IPs and are now resolving to 178.32.125[.]10. The nameservers of ns1.futunga[.]com, ns2.futunga[.]com are still in use.

Resolving to 178.32.125[.]10, utopgames[.]com is still hosting the same type of images used in the Facebook message campaigns of xic[.]graphics. It also has similar source code.

utopgames

image from utopgames[.]com

facebookimage

image from utopgames[.]com

We found some “testing” being done with JS files on various ‘pw’ TLD domains hosted on these IP addresses. The samples simply contained the word “TEST”. However, coming from this infrastructure, it is suspicious.

urls

URLs linking to JS files on PW domain

pw

Traffic spike on PW domain

When sampling a portion of our DGA sessions to see which TLD’s are seen most often, the TLD ‘pw’ ranked at 0.961 (1 being the highest possible ranking.) The following ‘pw’ domains were seen resolving to the IP addresses mentioned and host similar URLs to JS files.

budaner[.]pw
facimago[.]pw
fokelyio[.]pw
kalaner[.]pw
kamirop[.]pw
lakonaci[.]pw
lokelys[.]pw
momeros[.]pw
sokciso[.]pw
sonbkos[.]pw
sonmerahpaga[.]pw
tekcise[.]pw
tokciko[.]pw
vslaner[.]pw

This post is categorized in: