← All lessons Stage 5 · Lesson 5
20 min

Phishing email analysis

Stage 5 · Lesson 5 · 20 minutes · Requires Stage 0 Lesson 4 and Lesson 1 of this stage


The one-line answer

A phishing investigation is three questions in order — is it fake, did anyone act on it, and who else got it — and the headers answer the first one in about ninety seconds.


Why you should care

This is the ticket you will work most often. Users report suspicious emails, and someone has to decide quickly whether it is junk, a genuine phishing campaign, or the opening move of an incident already underway.

It is also the most common way intrusions start. Not an exploit, not a zero-day — an email, a convincing login page, and a password typed into it.

The good news is that phishing analysis is one of the most methodical tasks in the job. There is a checklist, it works, and you can be genuinely good at it within a week.


How it actually works

The three questions, in order

1. Is it fake? Headers, sender, links, attachment. 2. Did anyone act on it? Clicks in the proxy log, credentials submitted, attachment opened. 3. Who else received it? Search the mail gateway for the same sender, subject or URL.

Question 2 is the one that decides urgency. A fake email nobody clicked is cleanup. A fake email someone typed their password into is an incident, now.

Reading the headers

The visible "From" is display text. It is as trustworthy as the name written on an envelope — which is to say, not at all.

In Gmail: ⋮ → Show original. In Outlook: File → Properties → Internet headers.

What to look at:

From:          "TrustLeaf Bank Security" <alerts@trustleafbank.in>
Return-Path:   <bounce@mail-delivery-7731.xyz>          ← does not match
Reply-To:      <verify-account@secure-trustleaf-alert.com>   ← does not match either
Received:      from mail-delivery-7731.xyz (103.x.x.x)
Authentication-Results: spf=fail dkim=none dmarc=fail   ← all three failed

Return-Path versus From is the single highest-value check. From is display text the sender chose. Return-Path reflects the envelope sender the receiving server actually dealt with. A mismatch is the core signal.

Reply-To pointing somewhere else again means your reply goes to the attacker even though the message appears to come from a brand.

Received: headers read bottom to top — the bottom is the origin. Each hop adds a line, and the attacker can forge the lower ones but not the ones your own infrastructure added.

Authentication-Results is the quick verdict:

CheckWhat it asserts
SPFThe sending server is authorised to send for that domain
DKIMThe message carries a valid cryptographic signature from the domain
DMARCSPF or DKIM aligned with the visible From domain, and what to do if not

All three are published as TXT records in DNS — which is why Stage 0's DNS lesson matters here.

dmarc=fail on a bank's domain is close to conclusive. But note the reverse is not true: spf=pass does not mean safe. It means the message came from a server authorised for whatever domain is in the Return-Path — and an attacker who owns secure-trustleaf-alert.com can publish perfect SPF for it.

The indicators that actually matter

IndicatorWhy it works
Display name ≠ actual sending addressDisplay names are free text
Link text ≠ actual URL destinationHover, or read the raw HTML
Lookalike domaintrustleafbank-secure.co, rnicrosoft.com (rn ≈ m)
Unexpected attachmentEspecially .htm, .iso, .zip, macro-enabled Office
Urgency and consequence"Account closes in 24 hours" bypasses deliberation
Mismatch with normal processYour bank does not ask you to verify a password by email

What is not a reliable indicator: the time it was sent. Attackers deliberately send during working hours, because that is when people are reading mail and acting quickly. "It arrived at 11am so it is probably fine" is not reasoning.

Nor are spelling mistakes a reliable signal any more. Some campaigns are flawless.

Never click. Instead:

# What does the shortener actually point to? (-I = headers only, no body)
curl -I https://bit.ly/3xRandom

# Follow the chain of redirects without rendering anything
curl -sIL https://suspicious.example/login | grep -i "^location:"

# When was the domain registered? Days-old domains are a strong signal.
whois suspicious-domain.com | grep -i creation

A domain registered four days ago, for a bank that has existed for thirty years, is close to a verdict on its own.

Paste the URL into VirusTotal or urlscan.io — urlscan will even screenshot the page for you, so you can see the fake login form without visiting it.

Do this from an isolated environment, and never with a work account signed in. Analysis is not a reason to put your own session at risk.

When someone has already clicked

Order matters here, and most people get it wrong.

1. Revoke the sessions, not just the password.

This is the step people miss. Resetting a password does not invalidate sessions that are already active on many platforms — the attacker's session token keeps working. You must force a sign-out of all sessions and reset the credential.

2. Check whether the attacker got in and did anything.

Look for: new mail forwarding rules (the classic follow-up — it silently copies everything outward), new inbox filters, MFA devices added, OAuth applications authorised, and logins from unfamiliar locations.

A mailbox forwarding rule created after a phishing click is a common and easily missed persistence method. Check for it every time.

3. Then the endpoint, if an attachment was opened — isolate it and look for what ran.

4. Then containment for everyone else — purge the message from other mailboxes, block the sender and URL at the gateway.

Who else received it

One report means ten received it. Search the mail gateway by sender address, subject line, and the URL or attachment hash. Phishing arrives in campaigns, and the person who reported it is rarely the only recipient — just the most alert one.

Thank whoever reported it. A team that feels useful reports the next one too, and user reports are a genuine detection source. A team that gets ignored stops reporting and you lose that signal entirely.


See it yourself

Open your own spam folder — you have a free sample set.

  1. Pick one message and view the raw headers.
  2. Compare From against Return-Path. In most spam they will not match.
  3. Read Authentication-Results. Find an spf=fail or dmarc=fail.
  4. Read the Received: chain bottom-up and find where it originated.
  5. Without clicking, extract a link and run whois on the domain. Check the registration date.

Then check your own domain's protection:

dig +short TXT yourdomain.com | grep spf
dig +short TXT _dmarc.yourdomain.com

No DMARC record means anyone can send mail appearing to come from that domain. Many small Indian businesses have none — which is worth knowing, and worth mentioning if you ever audit one.


How attackers abuse this

They register lookalike domains. rnicrosoft.com renders almost identically to microsoft.com at normal size. Unicode makes it worse — characters from other alphabets can be visually identical to Latin ones.

They pass SPF legitimately. By owning the lookalike domain outright, they publish valid SPF and DKIM for it. Everything authenticates perfectly, for a domain that is not yours.

They compromise a real account first. The most effective phishing comes from a genuine, trusted colleague's mailbox — correct domain, real signature, perfect authentication, often replying inside an existing thread. No header check catches this, which is why "did it come from our domain" is not a sufficient control.

They create forwarding rules immediately. Access may be lost when the password is reset, but a forwarding rule quietly continues copying mail outward.

They use legitimate services. Links hosted on well-known cloud storage, forms built in mainstream survey tools, redirects through reputable link shorteners — all with valid certificates and good reputations.

They target the process, not the technology. An invoice with changed bank details, sent to accounts payable at month end, needs no malware at all. Business email compromise costs organisations more than ransomware, and every control involved is a human one.


Common mistakes

Trusting the padlock. HTTPS means the connection is encrypted, not that the site is honest. Phishing pages have valid certificates — they are free.

Treating spf=pass as safe. It authenticates the Return-Path domain, which may be the attacker's own.

Clicking to check. Use curl, urlscan.io or a sandbox. Never your own browser with a work session signed in.

Resetting the password and stopping. Active sessions survive a password change on many platforms. Revoke them explicitly.

Forgetting to check for forwarding rules. The access may be closed while the data keeps flowing out.

Only handling the reported copy. Search for the campaign. One report means many recipients.

Blaming the user. The person who clicked and then reported it did you a favour by reporting. Treat it that way, or the next person hides it — and a hidden click is far more expensive than a reported one.


Check yourself

  1. An email passes SPF, DKIM and DMARC, comes from a real colleague's address, and asks you to review an attached invoice. Is header analysis enough to clear it?
  2. A user entered credentials on a fake login page 40 minutes ago. You reset the password immediately. Why might the attacker still have access?
  3. Why is "it was sent at 2pm on a Tuesday, so it is probably legitimate" bad reasoning?
Answers
  1. No. Those checks confirm the message genuinely came from that colleague's account — which is exactly what you would see if their account were compromised, and that is among the most effective phishing there is. Header analysis has done its job and returned "authentic"; the remaining questions are behavioural. Was this invoice expected? Does the request match normal process? Verify through a channel other than email, such as a phone call to a number you already have.
  1. Because a password reset does not necessarily invalidate existing sessions. If the attacker signed in during those 40 minutes, their session token may still be valid and keeps working after the reset. You must force sign-out of all sessions as well. Then check what they did while in: forwarding rules, inbox filters, MFA devices added, OAuth apps authorised.
  1. Because it inverts the actual behaviour. Attackers deliberately send during working hours, when people are reading mail, acting quickly and least suspicious. Timing is not evidence of legitimacy in either direction — it is a detail, not an indicator, and treating it as one gives false comfort.

Your lab

Challenge 09 — Log file investigation

Stage 5 will add a dedicated phishing challenge. Until then, practise on your own spam folder using the method above — it is a genuinely realistic sample set.

→ Open Stage 1 labs


Summary in your language

हिन्दी सारांश (Hindi summary)

Phishing email की जाँच

तीन सवाल, इसी क्रम में:

  1. क्या यह नक़ली है? — Headers, sender, links, attachment
  2. क्या किसी ने इस पर कार्रवाई की? — Proxy logs, password डाला गया?
  3. और किसे मिला? — Mail gateway में वही sender/subject/URL खोजिए

सवाल 2 तय करता है कि कितनी जल्दी काम करना है।

Headers पढ़ना — 90 सेकंड का काम:

From:        "TrustLeaf Bank" <alerts@trustleafbank.in>
Return-Path: <bounce@mail-delivery-7731.xyz>     ← मेल नहीं खाता
Authentication-Results: spf=fail dmarc=fail       ← तीनों विफल

From बनाम Return-Path सबसे ज़रूरी जाँच है। From सिर्फ़ दिखाने का text है — लिफ़ाफ़े पर लिखे नाम जितना भरोसेमंद। Return-Path असली भेजने वाला बताता है।

Received: headers नीचे से ऊपर पढ़े जाते हैं — सबसे नीचे मूल स्रोत।

SPF / DKIM / DMARC तीनों DNS के TXT records हैं:

  • SPF — क्या यह server इस domain के लिए अधिकृत है
  • DKIM — cryptographic signature सही है
  • DMARC — ऊपर के दोनों दिखने वाले From से मेल खाते हैं या नहीं

ज़रूरी चेतावनी: spf=pass का मतलब सुरक्षित नहीं। इसका मतलब सिर्फ़ इतना है कि Return-Path वाले domain के लिए server अधिकृत था — और हमलावर अपने ख़ुद के domain के लिए सही SPF बना सकता है।

असली संकेत:

  • Display name ≠ असली address
  • Link का text ≠ असली URL
  • मिलता-जुलता domain (rnicrosoft.com में rn ≈ m)
  • अनपेक्षित attachment
  • जल्दबाज़ी और डर — "24 घंटे में account बंद"

जो संकेत नहीं है: भेजने का समय। हमलावर जानबूझकर काम के घंटों में भेजते हैं।

Link बिना click किए जाँचिए:

curl -sIL https://suspicious.example/login | grep -i "^location:"
whois suspicious-domain.com | grep -i creation

चार दिन पुराना domain, तीस साल पुराने बैंक के नाम पर — लगभग निर्णय।

अगर किसी ने पहले ही click कर दिया — सही क्रम:

  1. सिर्फ़ password नहीं, sessions भी revoke कीजिए। कई platforms पर password बदलने से पहले से चालू session बंद नहीं होता — हमलावर का token चलता रहता है।
  2. देखिए कि उसने क्या किया — नया mail forwarding rule (सबसे आम और सबसे आसानी से छूटने वाला), नए filters, नया MFA device, OAuth apps
  3. फिर endpoint — अगर attachment खोला गया
  4. फिर बाक़ी सबके लिए containment — mailboxes से message हटाइए, sender/URL block कीजिए

जिसने report किया उसे धन्यवाद दीजिए। जिस टीम की बात सुनी जाती है वह अगली बार भी report करती है। जिसे डाँटा जाता है वह छुपाने लगती है — और छुपाया गया click कहीं ज़्यादा महँगा पड़ता है।

தமிழ் சுருக்கம் (Tamil summary)

Phishing மின்னஞ்சல் பகுப்பாய்வு

மூன்று கேள்விகள், இதே வரிசையில்:

  1. இது போலியா? — Headers, sender, links, attachment
  2. யாராவது இதன்படி செயல்பட்டார்களா? — Proxy logs, password கொடுக்கப்பட்டதா?
  3. வேறு யாருக்கு வந்தது? — Mail gateway-இல் அதே sender/subject/URL-ஐத் தேடுங்கள்

கேள்வி 2 தான் அவசரத்தை முடிவு செய்கிறது.

Headers படிப்பது — 90 வினாடி வேலை:

From:        "TrustLeaf Bank" <alerts@trustleafbank.in>
Return-Path: <bounce@mail-delivery-7731.xyz>     ← பொருந்தவில்லை
Authentication-Results: spf=fail dmarc=fail       ← மூன்றும் தோல்வி

From vs Return-Path தான் மிக முக்கியமான சோதனை. From என்பது காட்சி உரை மட்டுமே — உறையில் எழுதப்பட்ட பெயரைப் போல். Return-Path உண்மையான அனுப்புநரைக் காட்டுகிறது.

Received: headers கீழிருந்து மேலாகப் படிக்கப்படும் — கீழே உள்ளதுதான் மூலம்.

SPF / DKIM / DMARC மூன்றும் DNS-இல் TXT records:

  • SPF — இந்த server இந்த domain-க்கு அங்கீகரிக்கப்பட்டதா
  • DKIM — cryptographic signature சரியா
  • DMARC — மேற்கண்ட இரண்டும் From domain-உடன் பொருந்துகிறதா

முக்கிய எச்சரிக்கை: spf=pass பாதுகாப்பானது என்று பொருளல்ல. Return-Path domain-க்கு server அங்கீகரிக்கப்பட்டது என்று மட்டுமே — தாக்குபவர் தன் சொந்த domain-க்கு சரியான SPF உருவாக்க முடியும்.

உண்மையான அறிகுறிகள்:

  • Display name ≠ உண்மையான address
  • Link உரை ≠ உண்மையான URL
  • ஒத்த domain (rnicrosoft.com-இல் rn ≈ m)
  • எதிர்பாராத attachment
  • அவசரமும் பயமும் — "24 மணி நேரத்தில் account மூடப்படும்"

அறிகுறி அல்லாதது: அனுப்பப்பட்ட நேரம். தாக்குபவர்கள் வேண்டுமென்றே வேலை நேரத்தில் அனுப்புகிறார்கள்.

Click செய்யாமல் link சோதிப்பது:

curl -sIL https://suspicious.example/login | grep -i "^location:"
whois suspicious-domain.com | grep -i creation

நான்கு நாள் பழைய domain, முப்பது ஆண்டு பழைய வங்கியின் பெயரில் — கிட்டத்தட்ட முடிவு.

ஏற்கனவே யாராவது click செய்திருந்தால் — சரியான வரிசை:

  1. Password மட்டுமல்ல, sessions-ஐயும் ரத்து செய்யுங்கள். பல platforms-இல் password மாற்றினாலும் ஏற்கனவே இயங்கும் session நிற்காது.
  2. அவர் என்ன செய்தார் என்று பாருங்கள் — புதிய mail forwarding rule (மிகவும் பொதுவானது, எளிதில் தவறவிடப்படுவது), புதிய filters, புதிய MFA சாதனம், OAuth apps
  3. பிறகு endpoint — attachment திறக்கப்பட்டிருந்தால்
  4. பிறகு மற்றவர்களுக்கான containment — mailboxes-இலிருந்து செய்தியை நீக்குங்கள்

புகாரளித்தவருக்கு நன்றி சொல்லுங்கள். மதிக்கப்படும் குழு அடுத்த முறையும் புகாரளிக்கும். திட்டப்படும் குழு மறைக்கத் தொடங்கும் — மறைக்கப்பட்ட click மிக விலை உயர்ந்தது.

Want this summary in Malayalam, Telugu, Kannada or another language? Tell us — the most requested languages get added next.


What's next

You can find the real alerts and analyse the emails. The last piece is what happens when something is genuinely wrong — the order of response, and the write-up that lets someone else act on your work.

→ Lesson 6: Incident response and writing it up