I Built MailGuard XDR: An AI-Powered Email Security Platform for SOC Analysts

I Built MailGuard XDR: An AI-Powered Email Security Platform for SOC Analysts

I Built MailGuard XDR: An AI-Powered Email Security Platform for SOC Analysts

MailGuard XDR dashboard

A suspicious email almost never has a single tell. The sender name can look fine while the return path points somewhere else entirely. The domain can look plausible while a link underneath it doesn't. An attachment can look like an ordinary invoice while its hash matches something already flagged elsewhere. Looking at any one of those signals in isolation — just the sender, just the subject line — misses the picture that only shows up when you look at all of them together.

That's the problem MailGuard XDR is built to solve. It's not a spam filter or a simple "does this look like phishing" scanner — it's an AI-powered email security platform built around how a SOC analyst actually investigates a suspicious email: pulling apart headers, content, links, and attachments, extracting indicators of compromise, and arriving at a risk assessment backed by evidence rather than a gut feeling.

What this covers: The multi-indicator analysis pipeline MailGuard XDR runs every email through. What it actually inspects — sender data, headers, domains, URLs, attachments, IOCs, and phishing characteristics. A technical breakdown of email header fields. How indicators of compromise get extracted and visualized. How this all maps to the real SOC investigation workflow.

The Problem: One Signal Isn't Enough

Most consumer-facing "is this phishing" tools work off a single heuristic — a domain reputation check, or a keyword scan for "urgent" and "verify your account." Real phishing has gotten past that a long time ago. A convincing email today can pass a domain check on the surface, use clean language, and still be malicious — the tell is often buried in a header field nobody looks at, or a mismatch between what a link says and where it actually goes.

MailGuard XDR's whole design starts from that observation: no single indicator is reliable enough on its own. Multiple weak signals, correlated together, are far more trustworthy than any one strong-looking signal alone.

The Analysis Pipeline

MailGuard XDR email submission screen

Every submitted email runs through the same structured pipeline, moving from raw structure to evidence to a final verdict:

Suspicious Email
Header Analysis
Content Analysis
Link Inspection
Attachment Analysis
IOC Extraction
Threat Analysis
Risk Assessment

Email Threat Analysis

MailGuard XDR threat analysis screen

At a high level, here's what the tool is actually looking for across an email:

Sender Information
Whether the display name matches the actual sending address, and whether that address is consistent with the identity it's claiming to represent.
Email Headers
The full technical routing and authentication metadata behind the email — often where the most reliable evidence lives, since it's far harder for an attacker to convincingly fake than the visible message body.
Suspicious Domains
Lookalike domains, unusual top-level domains, and recently registered domains — patterns that show up disproportionately in phishing infrastructure.
URLs
Whether a link's visible text matches its actual destination, and whether that destination shows signs of being a credential-harvesting or malware-delivery page.
Attachments
File types, naming patterns, and other attachment characteristics commonly associated with malware delivery, without requiring the analyst to open anything directly.
Indicators of Compromise
Concrete artifacts — domains, URLs, IPs, file hashes — extracted from the email so they can be checked against known threat data or tracked across other alerts.
Phishing Characteristics
The broader social-engineering patterns — urgency, credential requests, spoofed branding — layered on top of the technical evidence rather than analyzed in isolation.

Header Inspection: Where the Real Evidence Lives

MailGuard XDR header inspection screen

This is the part of email analysis most people never look at, and it's often the most revealing. Email headers carry the actual routing and authentication history of a message — much harder for an attacker to fake convincingly than the sender name shown in an inbox.

From The claimed sender address — the one most people trust at a glance, and the one most easily spoofed in isolation.
To The intended recipient — useful for spotting when an email was sent to an address that doesn't match how it claims to be addressed to you.
Reply-To Where a reply would actually go — a classic phishing tell when it doesn't match the From address at all, redirecting any response straight to the attacker.
Return-Path Where bounce notifications get routed — another address that should logically align with the sender, and often doesn't in spoofed mail.
Received Headers The chain of mail servers the message actually passed through on its way to the inbox — read from bottom to top, this reconstructs the email's real journey regardless of what the visible sender claims.
Authentication Results SPF, DKIM, and DMARC outcomes — the closest thing email has to a built-in "is this really who it says it is" check, and one of the strongest single signals available when it fails.
# Simplified header excerpt From: "IT Support" <it-support@company-help-desk.net> Reply-To: admin@differs-entirely.ru Return-Path: <bounce@differs-entirely.ru> Authentication-Results: spf=fail dkim=fail dmarc=fail

Phishing Detection in Action

MailGuard XDR phishing detection result screen

Content and social-engineering analysis run alongside header inspection — urgency language, credential requests, and spoofed branding are weighed together with the technical evidence rather than treated as a separate, lesser signal.

Attachment Analysis

MailGuard XDR attachment analysis screen

Attachments get evaluated for characteristics associated with malware delivery — file type mismatches (a "PDF" that's actually an executable), naming patterns designed to look mundane, and other structural red flags — all without needing to actually execute or open the file.

IOC Extraction & Visualization

Once the pipeline has pulled evidence out of the headers, content, links, and attachments, it consolidates everything into a structured set of indicators of compromise — the concrete artifacts an analyst can actually act on, track, or search for elsewhere.

MailGuard XDR IOC visualization screen
Email
 ├── Domain — sending/lookalike domains
 ├── URL — embedded links and true destinations
 ├── IP — originating and routing addresses
 ├── Hash — attachment file hashes
 └── Attachment — file names and types

Representing indicators this way — as a tree branching out from the email itself — mirrors how an analyst actually thinks about an investigation. It's not one flat list of suspicious things; it's an email that produced a domain, which relates to a URL, which resolves to an IP, alongside an attachment with its own hash. Seeing the relationships, not just the individual artifacts, is what turns a pile of data into an actual investigative lead — the same reason IOC pivoting is such a core skill in real threat intelligence work.

Final Verdict & Risk Assessment

MailGuard XDR final verdict and risk score screen

Every stage of the pipeline feeds into a final risk assessment — not a single arbitrary score, but a verdict backed by exactly which pieces of evidence drove it: failed authentication, a mismatched Reply-To, a suspicious attachment hash, whatever combination applies. The AI layer's job here is to explain that reasoning clearly, the same way a senior analyst would walk a junior analyst through why a specific email got flagged.

8 Pipeline stages: from raw email to risk assessment
5 IOC categories extracted: domain, URL, IP, hash, attachment

How This Connects to Real SOC Work

The entire design of MailGuard XDR maps directly onto the same investigation loop that runs through real SOC work — the same one I explored in SOCVerse AI:

Alert
Investigation
Evidence
Verdict
Response

A suspicious email is the alert. Header, content, link, and attachment analysis is the investigation. The extracted IOCs are the evidence. The risk assessment is the verdict. And whatever action follows — block the domain, quarantine the email, escalate further — is the response. MailGuard XDR isn't a separate idea from that loop; it's that loop, applied specifically to email.

Why Headers Became the Centerpiece

I didn't expect header inspection to end up being the most technically interesting part of this project. But the more I worked with real header data, the clearer it became that this is where attackers have the hardest time hiding — a convincing subject line costs an attacker nothing, but faking a clean SPF/DKIM/DMARC pass, or a Received chain that doesn't contradict itself, is a much higher bar. That's exactly why building strong header analysis felt like the highest-leverage part of the whole pipeline.

What This Approach Teaches

Core Takeaways From Building MailGuard XDR

  • No single indicator is trustworthy alone: Correlated weak signals beat one strong-looking signal every time.
  • Headers are harder to fake than content: Authentication results and routing history carry more evidentiary weight than anything in the visible message body.
  • IOCs are relationships, not just a list: Visualizing them as a tree branching from the email mirrors how real investigation and pivoting actually works.
  • AI's role is explanation, not verdict-by-fiat: The value is in clearly explaining which evidence drove a risk score, not just outputting a number.
  • This is the SOC loop, not a different idea: Alert → investigation → evidence → verdict → response is the same structure whether the alert is an email, a network event, or an endpoint anomaly.
Try it yourself

Submit an email and see the full header-to-verdict investigation play out.

Open MailGuard XDR

What's Next

I'm planning to expand the IOC visualization to show relationships across multiple analyzed emails, not just within a single one — so patterns across a campaign, not just a single message, become visible. If there's a header field, IOC type, or attachment characteristic you think the pipeline is missing, I'd like to hear about it.

MailGuard XDR FAQs

Is MailGuard XDR just a phishing scanner?
It's built to go further than a single-signal scanner — it correlates header authentication results, content patterns, link destinations, attachment characteristics, and extracted IOCs together into one risk assessment, similar in spirit to how a SOC analyst would investigate a suspicious email manually.
Is it free to use?
Yes. You can submit an email for analysis without creating an account.
What are SPF, DKIM, and DMARC?
They're email authentication standards that let a receiving mail server verify whether a message actually came from who it claims to be from. A failure in any of them is one of the stronger technical red flags an analyst can rely on.
What does IOC extraction actually give me?
A structured breakdown of the concrete artifacts pulled from the email — domains, URLs, IPs, and file hashes — organized by relationship to the email, so they can be checked against other threat data or tracked across future alerts.
Does the AI decide whether an email is malicious?
The AI layer explains the reasoning behind the risk assessment — which specific evidence drove the score — rather than acting as an unexplained black-box verdict.

About the Author

Amardeep Maroli

Built MailGuard XDR to model real SOC email investigation — headers, content, links, attachments, and IOCs, correlated into one risk assessment instead of a single-signal scan. Writes about practical, hands-on cybersecurity topics based on real experiments and projects.

Tags: email security, XDR, SOC, phishing detection, IOC, threat intelligence, AI, side project

Tried it? Let me know which header field caught you off guard.

Post a Comment

0 Comments