On Wednesday 2018-08-01, @dvk01uk from myonlinesecurity.co.uk tweeted about a recent example of malicious spam (malspam) pushing malware (link to tweet). In recent weeks, this type of malspam has been pushing malware using the Agent Tesla keystroke logger. It looks like Agent Tesla is still involved with today's malspam, but this time, it's not so straight-forward. An Agent Tesla binary was found hiding in an animated gif.
Today's diary examines the malspam, infection traffic, and associated malware.
The email and my infected lab host
The email seems like a typical example of mass-distribution malspam. It has a spoofed sender's address, but it isn't very convincing as an actual DHL email. Header information follows:
The link returned a zip archive that contained a file named "Arrival Notification.exe" which looks like "Arrival Notification" when the file extensions are hidden (a default setting for Microsoft Windows). In my lab host, double-clicking Arrival Notification.exe caused it to copy itself to the user's AppData\Roaming directory. This malware was made persistent through a script file in the Windows Startup folder.
Network traffic consisted of the URL from the email, which redirected to a different URL to deliver the zip archive. After that, I saw an HTTP request to mydocuments1.is that returned an animated gif. The final line of infection traffic was an IP address check by my infected lab host to checkip.dyndns.org.
IP address checks may be suspicious, but they are not inherently malicious. My suggested block list based on this infection traffic is:
The animated gif
The HTTP request to mydocuments1.is returned an animated gif, which is somewhat strange. This gif was provided to Didier Stevens, who quickly found and extracted two malware binaries from it--a Windows EXE file and a Windows DLL file. According to Didier, the malware binaries were appended to the end of the gif. I reviewed the gif in a hex editor and found the PE headers for both files. It was pretty easy to carve out the binaries based on that.
Malware and artifacts
The following files are associated with this infection:
SHA256 hash: 7a8e7f7cd18c0f9e74c36fb792b46ca67a20e0851caa4a21a0f341debc23e7d9
SHA256 hash: a486a258a822173a9e621252853b8eea343d20946252042b28d454aa6db98fe4
SHA256 hash: 96834c98d7c9e58068e78e4f4bf755a87c9c44655b4b2b4097ffc83aa3c61a3d
SHA256 hash: 9dea34a4df20f3e2392f92d2f26dad88ba66827269431aa824c9aa8a0b80289b
SHA256 hash: 81e882a394af440cea06cb490105efd721ffba30ca88ea92573d2f9ef27d2c86
SHA256 hash: fda201abced38c6cb1bfb82e0e42f6e48709d5dd8c8a738a4d2d47128464afcc
Outside of the embedded malware in the animated gif, I couldn't find anything unusual in my lab setup. I could not find either items of malware extracted from the gif in my infected lab host, and I didn't see any Agent Tesla-specific traffic during the infection.
Criminals have embedded malware in images before, so this is not a new trick. Still, I don't commonly run into this technique among the mass-distribution malware I frequently see. Embedding malware in an animated gif might provide a way to avoid detection by security solutions. As I write this, the gif shows a detection ratio of 3 / 58 in VirusTotal.
As usual, properly-administered and up-to-date Windows hosts are not likely to get infected. System administrators and the technically inclined can also implement best practices like Software Restriction Policies (SRP) or AppLocker to prevent these types of infections.
A pcap of the infection traffic, associated malware, and the email example for today's diary can be found here.
Aug 2nd 2018
10 months ago
since this post the scum have changed behaviour slightly and are using working MP3 files to deliver the embedded malware
Aug 6th 2018
10 months ago