Now, let’s see some simple methods to interpret the information stored in the header file.
As an email was sent and received between two users, the email will travel multiple servers. Just consider email headers like passport, and in each destination, we reach there will be stamping done on the passport. Similarly, each server will add its information in header entries. So to find out the server it originated from, we need to look at the first Received entry on the email header.
The domain name and IP address of the sender’s computer can also be checked.
Now let’s try to interpret the mail header that was shown above
Return-path
This term shows where the email address delivery notices will be sent. If the mail is not delivered, we will receive a notification about that. So we will check if the mail address in the return path and sender email id is the same. In most phishing mail, it won’t be the same. I will not enjoy many delivery notices in my mail if I send spam mail to many members.
Return-Path: mrs.dara@charity.net>
In our example, the return path and from address is the same. Now, we can move on to other factors.
Reply-to
This field shows the email address to where the reply will be sent. If we click reply to the mail, it will automatically send our message to the particular email address that was assigned.
Reply-To: <mrs.dara@daum.net>
For our case, the reply to mail is different from the received email address. That means the sender has arranged a different email address to receive the reply. Whether they will check the reply or not, who knows.
Received:
As I have mentioned previously, the email will pass through multiple servers, which will show the information about these servers. Multiple entries will be recorded in this, and the newest information will be stored on the top. If we look for the sender’s information, we need to look at the bottom of the available information.
Received: from unknown (HELO User) ([42.200.180.187])
Now, if we look at this message, there was no proper mail address shown. The missing mail address will not happen if the sender is a genuine party. The IP address of the sender is also displayed, we can use the IP address to check more details about the sender if we need. In general, there will be domain and IP address will be shown here.
The most important factor about this information is that this is the only reliable and accurate information stored in the mail header. The information was recorded by the server automatically, which cannot be forged by the assailant.
by wbironout1v2.netvigator.com with SMTP; 11 Sep 2021 14:45:34 +0800
The next line to ‘received from’ is received by, and this field indicates the first-ever server where the mail has arrived. This should contain the domain name and IP address of that server. But in our mail, the IP address is missing. Usually, there will be a high chance the first server will be completely in control of the malicious sender, or the geographical location of the sender and server will be vastly different. This can be found by using the IP address, and there are many online services to track the IP address.
Message ID
It is a unique identifier for the digital message (email) assigned by the mail system when it was first created. No two mails will have the same message ID, but we should not confuse the same mail in the receiver inbox and sender sent box. It usually shows some random numbers followed by a Fully Qualified Domain Name (FQDN).
Message-Id: <f127a5$7fpmr4@wbironout1v2.netvigator.com>
From this, we can identify the local hostname as wbironoutv2, and the local domain is netvigator.com.
X- Mailer
This field indicates the email client.
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
Here they have used Microsoft outlook express to send mail. Be careful if some random names are displayed.
The lines beginning with X are created by the recipient mail server and can be considered trustworthy.
MIME version
This filed helps to indicate the version of the MIME protocol used by the sender to send the mail.
MIME-Version: 1.0
Content type
It defines the type of data (plain text, HTML, audio, or video content) used in the body of the message.
Content-Type: text/plain
Content – transfer – encoding
This field displays the method (7-bit encoding, 8-bit encoding, etc.) used for encoding the message.
Content-Transfer-Encoding: 7bit
There are more pieces of information available in header files. And one should always remember that the malicious user will try to forge as many details as possible to appear genuine. So being attentive is very important in dealing with random emails.
There are many tools available for free to analyze the email headers. Some of the online tools are listed below
- My toolbox
- Google Admin Toolbox Message header
- What is my IP
- org
- Gaijin
- Microsoft Message Header Analyzer
After opening the email header, copy the entire email header and paste it into any analyzing tool mentioned. Most analyzers provide similar information’s with some additional or less information. You can decide whichever you want to use. Even though many online and offline tools are available, understanding the email headers and how to analyze manually will always come in handy.
Now consider a scenario, we got an office document file attached in an email. We are suspicious of it and used our knowledge on the email header for any vindictive information. But the email header analysis shows it’s a genuine sender. Still, we are not sure whether the attached document is malicious are not.
So we are going to download the suspected file in a virtual machine. We are going to use REMnux virtual machine to analyze the doc file. Never open a malicious file on your personal computer. Always remember to use a virtual machine. It is easy to protect ourselves from malicious attacks by using virtual machines that are not connected to our networks.
I have downloaded a random doc file named statistics.09.20.2021.doc from any.run online sandbox.