Skip to main content

Phishing mail analysis checklist

1. before reply to any mail, please check that reply address is set as the appropriate one. from the address you received the mail and to the address the mail is suppose to going should be same. as well as check the domain name as well. because sender name, email address and domain name can be spoofed easily. so if the mail looks suspicious then check it reply-to header, domain header. you can do this by checking mail source code. for example, from thunderbard email client navigate to more > view source code 

in this source code all the necessary email header you can get.

2. check mail return path. return path says if the mail bounce back then where should the bounce back mail should come. return-path should be the sender mail address. if it is another mail address then it is suspicious. 

3. check the mail attachment. sometimes it is showing doc or excel attachment but behind this exe file is hidden. so analysis the following headers from the source code. 

Content-Type: Application/Octet-Stream

Content-Transfer-Encoding: base64 

Content-Disposition: Attachment

Here content-type header clearly saying that attachment is application which is binary and non-readable exe format to human. most email service provider forbidden to transfer exe file in email in order to prevent rogue programs transfer. that is why attacker try to hide the exe file under docs or excel or rar files. 

4. check antispam header which is X-Spamd-Bar and X-Spam-Level header. Rspamd antispam filter or if any mail server perform antispam filtering then those mail server add the above two headers in the mail source code. values are written in ++++++ sign or ****** sign. more the value comes the mail is more suspicious. though it has not been standardized so manual analysis based on suspicion.

5. another important header is Received header. it shows the trail or path of a mail message from sender to receiver. the downmost Received header is the origin mail server of the mail message. after that each server adds its header when the email pass through. here delay is count. meaning to cross each email server how much the time delay occured!! generally some seconds needs to cross hops. but if you see here time delay is huge then this is suspicious. Google has a very good online tool to calculate time delay received header. but remember if attacker compromise the email server then he can send email quickly and you cannot notice that. 

https://toolbox.googleapps.com/apps/messageheader/analyzeheader

https://toolbox.googleapps.com/apps/main/

6. check email Authentication-Results header. the value could be none | pass | fail

none means no SPF record found. Pass means SPF, DKIM, DMARC all values are correct. fail means SPF, DKIM, DMARC all values are not correct.

if these 3 values are correct that means your mail servers are authenticated by other mail services, mail servers and ISP's.

SPF - Sender policy framework. it says that what ip address or what servers are allowed to send email from that particular domain. based on that their hostname and ip addresses are published on their dns txt record. 

DKIM - Domain keys identified mail. it follows a cryptographic formula. each mail are signed by the domain private key. and public key are stored on that domain's dns txt record. other mail server or isp's can verify that the email header and email message has not been altered or tempered. 

DMARC - domain-based message authentication, reporting and conformance. it confirms senders email message are protected by both SPF and DKIM values. 

mxtoolbox is a another great tool to analyze mails. 

sometimes you need to extract url from email attachment (.yml file). for example say one of your organization user attach a suspicious email for you to analysis. that email could contain some url or link. on those cases, urlextractor can help. 

urlscan.io can help to find out what that url actually is. virustotal can also help. 

ipinfo.io will also help to find ip address of a company. 



 

Comments

Popular posts from this blog

Install Nessus from docker

The below two commands you need to run first one by one:  docker run -itd --name=ramisec_nessus -p 8834:8834 ramisec/nessus docker exec -it ramisec_nessus /bin/bash /nessus/update.sh Username: admin And you need to change the password: #Enter the command line of the docker container docker exec -it ramisec_nessus bash #Execute the following commands in sequence # Enter this directory cd /opt/nessus/sbin # List logged in users ./nessuscli lsuser # Modify the password of the specified user (take admin as an example) ./nessuscli chpasswd admin After access to the nessus, make sure you turn off the automatic updates otherwise crack will not work after some time. Before any scan you need to run the update.sh command (shown above) to have the latest plugins. Now everytime your system reboots, your docker instance will be shutdown. You need to up it again manually. Here are the commands.  1. docker ps -a    Now note down the container id. 2. docker start <container id> C

net command cheat sheet

  To see what users present in the system: net user To see local groups in the system: net localgroup To see domain groups. This should be run on a domain controller: net group To see the details of a user along with his/her group membership: net user mahim To see who are the members of a particular group (local machine): net localgroup "administrators"    (These are not case sensitive. You can use administrators or Administrators. Both will give you same result. To see who are the members of a particular group (domain machine): net group "domain admins" Create a local user: net user localuser1 MyP@ssw0rd /add Create a domain user: net user domainuser1 MyP@ssw0rd /add /domain Add the local user to local admin group: net localgroup Administrators localuser1 /add Add the user to domain admin group: net group "Domain Admins" domainuser1 /add /domain Avi