Even though sending malware via zipped attachments in spam emails is nothing new and had been around for eons but many people are still puzzled at how it works. Thus, I will go through with you on how to do it with Profiler. I will try to fill in required information about where to look out for information and how decode some of the information.
Firstly, we are going to learn how are a bit about the .msg file format and how is it used to store a message object in a .msg file, which then can be shared between clients or message stores that use the file system.
From an investigator’s point of view, you should always analyze the .msg file without installing Outlook. In order to analyze the .msg file without Outlook, we can read more about the file format from:
The purpose of this post is to give a better technical understanding of how attackers makes use spam emails to spread malware.
[ Sample used in the analysis ]
[ Part 1 : Getting Started ]
For those who want to follow along, this is a link to the .msg file. Do note, this is a MALICIOUS file, so please do the analysis in a “safe” environment. The password to the attachment is “infected29A”
Now, let’s start getting our hands dirty…and open the suspicious .msg file.
The msg file is already flagged by Profiler, as it contains some suspicious features.
Each “__substg” contains valuable pieces of information. The first four of the eight digits at the end tells you what kind of information it is (Property). The last four digits tells you the type (binary, ascii, Unicode, etc)
- 0x007d: Message header
- 0x0C1A: Sender name
- 0x0C1F: Sender email
- 0x0E1D: Subject (normalized)
- 0x1000: Message body
[ Part 2 : Email investigation ]
If we are interested in email investigation, let’s check out the following file, “__substg1.0_0C1F001F”.
As we can see below, the sender’s email address is “QuinnMuriel64997@haarboutique-np.nl”
But is it really sent from Netherlands?
Well, let’s check out the message header located in “__substg1.0_007D001F” to verify that.
If we were to do through the message header, do a whois on “haarboutique-np.nl” and check out the MX server. We can confirm that the sender is spoofing email as well.
From the message header, we can conclude that the sender sent the email from “220.127.116.11” as shown in the image and the extracted message header as shown below.
- Received: from [18.104.22.168] ([22.214.171.124])
- by mta02.dkim.jp (8.14.4/8.13.8) with ESMTP id u44L8X41032666
- for <email@example.com>; Thu, 5 May 2016 06:08:35 +0900
Whois information showed that IP address where this spam email is sent from is from Vietnam.
But it doesn’t mean that the attacker is from Vietnam. Anyone in the world can buy web hosting services in Vietnam. This is just to let you know that the attacker is definitely not sending from “haarboutique-np.nl”
[ Part 3 : Email investigation ]
Using this information opening the “__substg1.0_0E1D001F” file and we can see the subject, “Re:“
Hmmmm…this doesn’t look any useful at all. Let’s try opening the file, “__substg1.0_1000001F”, containing the “subject body” instead.
- “Hi, info
Please find attached document you requested. The attached file is your account balance and transactions history.
Awesome, Muriel Quinn is sending me my account balance and transactions history which I may or may not have requested at all. Awesome, he is also attaching the files to the email just for me. This is definitely suspicious to me.
[ Part 4 : Email attachment ]
Now that we are interested in the attachments, let’s look at “Root Entry/__attach_version1.0_#00000000” and refer to the specifications again.
- //Attachments (37xx):
- 0x3701: Attachment data
- 0x3703: Attach extension
- 0x3704: Attach filename
- 0x3707: Attach long filenm
- 0x370E: Attach mime tag
If we were to look at “__substg1.0_3704001F”, we will see that the filename of the attachment is called “transa~1.zip” and the display name “__substg1.0_3001001F” of the attachment is called “transactions-625.zip”.
Now let’s look at the actual data located within “__substg1.0_37010102” as shown below.
Now, let’s press “Ctrl+A” to select the entire contents. Then copy it into a new file as shown in the image below.
Now let’s fire up “New Text View” and copy the contents of “transactions 774219.js” as shown below.
As we can see from the image above, it is downloading from “http://infograffo[.]com[.]br/lkdd9ikfds” and saving it as “ew3FbUdAB.exe” in the victims’ TEMP directory.
We won’t be going through on reversing the malware.
In the meantime, we hope you enjoyed reading this and would be happy to receive your feedback!