DKIM Pass, DMARC Fail: Tracing the Third-Party Alignment Blind Spot
When a phish survives authentication checks, the killer isn't a broken signature. It is a severed link between the signing domain and the sender's identity.

A Tier 2 analyst stares at a green checkmark in their email gateway dashboard, bewildered by the contradiction on their screen. The payload attached to the message is an obvious credential harvester, the visible sender mimics the Chief Financial Officer, and yet the Authentication-Results header broadcasts a flawless DKIM pass. The instinct is to blame the gateway vendor or assume the cryptographic key was stolen. But cryptography rarely lies. The signature is mathematically perfect. The problem is that the signature belongs to an attacker.
This scenario exposes a fundamental misunderstanding of what domain keys actually validate. A verified cryptographic signature only guarantees that the sender owned the private key for the domain listed in the signature and that the message body survived transit intact. It makes absolutely no promises about the domain the user actually sees in their mail client.
Bridging that gap is the entire reason DMARC exists. When you execute proper dmarc alignment failure triage, you stop looking at authentication as a binary pass or fail. You start looking at the relationship between the cryptographic identity and the display identity. That misalignment is exactly where the most sophisticated business email compromise campaigns operate today.
The Anatomy of an Alignment Failure
The Cryptographic Reality of RFC 6376
To understand how an email can pass a cryptographic check but fail an alignment check, we have to isolate the mechanics of RFC 6376. When a mail server signs an outbound message, it generates a cryptographic hash of the message body and specific headers, encrypts that hash with its private key, and attaches the result as the DKIM-Signature header. Crucially, this header includes the domain tag, which tells the receiving mail server exactly which domain hosts the public key required to decrypt and verify the hash.
The protocol designers built this mechanism strictly for transit integrity and non-repudiation. They did not build it for sender authorization. The protocol allows any server to sign a message on behalf of any sender, provided the signing server owns the private key for the domain it places in the signature tag. The receiver pulls the public key from the DNS records of that specific domain, verifies the math against the body hash, and stamps a pass verdict.
Enter DMARC and RFC 7489
This architectural reality is precisely why RFC 7489 introduced DMARC. DMARC forces a relationship check between the RFC 5322 From header, which is the exact address the end user sees in their mail client, and the authenticated domain. For a signature to be useful for authorization, DMARC requires that the domain in the From header matches the domain in the signature tag.
When they match, alignment passes. When they diverge, even if the math checks out perfectly, alignment fails. Attackers exploit receivers who configure lenient quarantine policies or rely on legacy gateways that weight a cryptographic pass higher than an alignment failure. They know that many security platforms parse the headers linearly and stop processing once they see the verified signature.
Case Study of a Borrowed Reputation
Let us look at a real architecture deployed by initial access brokers. The adversary registers a cheap lookalike domain or compromises a legitimate tenant on a bulk mailing infrastructure provider like a marketing automation platform. They craft a spearphishing lure targeting your accounts payable department. The visible address is spoofed to read vendor-invoices at yourcompany.com.
When the attacker sends the message through their compromised bulk sender, the provider infrastructure does exactly what it was engineered to do. It signs the outbound message. But it signs the message using the domain value of the attacker-controlled tenant or the shared infrastructure domain. The receiving gateway processes the inbound SMTP connection and evaluates the cryptography.
Authentication-Results: mx.victim.com; dkim=pass (signature verified) header.d=attacker-esp.com; dmarc=fail action=none header.from=yourcompany.com;
The gateway verifies the signature against the external attacker domain and returns a pass. It then evaluates DMARC for your own internal domain. Because your internal policy might be set to an observation mode during a protracted deployment phase, or because the gateway has a static rule bypassing filters for messages with valid signatures, the credential harvester sails straight into the inbox. The attacker borrowed the cryptographic reputation of the mailing provider to bypass the spam filter, while borrowing the display reputation of your own domain to bypass human suspicion.
Dissecting the Header to Isolate the Threat
Hunting the Selector and Domain
When you are deep in incident response, the summary dashboard of your security information and event management tool is insufficient. You need the raw headers to reconstruct the attack chain. The signature header itself is a treasure trove of adversarial infrastructure intelligence if you parse it correctly. You must extract the raw SMTP transaction logs and pull the full text of the signature block.
The two most critical tags for attribution are the domain tag, representing the signing domain, and the selector tag. The selector is essentially a DNS namespace partition that tells the receiver exactly which text record to query. Attackers abusing shared infrastructure will often leave the provider default selectors intact. Finding a generic selector attached to a highly reputable domain but paired with an internal sender address is a massive behavioral anomaly.
You must also examine the header inclusion tag, which lists the exact headers included in the cryptographic signature. Sophisticated operators will sign the Date, Subject, and From headers to ensure the message routes cleanly through aggressive anti-spam engines. If the attacker modifies the sender address after the message is signed, the body hash will mismatch and the signature will break. Therefore, a valid signature on a spoofed address proves the spoofing occurred at the origin of the attack, prior to the cryptographic signing phase.
Validating the Attacker Infrastructure
Once you extract the signing domain and selector, the next operational step is validating the public key infrastructure. This requires querying the DNS records of the adversary or the abused provider. You construct the query by combining the selector, the literal string _domainkey, and the signing domain. Doing this manually allows you to inspect the exact cryptographic parameters the attacker provisioned.
dig +short TXT s1._domainkey.attacker-esp.com
The resulting text record reveals the public key and its parameters. You are looking specifically at the key type tag and the public key data itself. Why do we care about the attacker public key? Because tracking key reuse across different campaigns provides high fidelity cluster attribution. Threat intelligence platforms often index these public keys, allowing you to pivot from a single phishing email to an entire campaign infrastructure.
If the public key matches a known shared key from a major email service provider, you are dealing with a tenant abuse scenario. The adversary created a fraudulent account on legitimate infrastructure. If the public key is entirely unique and the domain is recently registered, the adversary built dedicated infrastructure for the campaign. This distinction dictates your containment strategy. Blocking an abused shared IP range will cause massive collateral damage to legitimate mail flow, whereas blocking a dedicated attacker domain is a targeted containment action.
The Relaxed Alignment Blind Spot
We must address how the alignment parameter in your DMARC record influences this failure mode. The alignment tag controls the strictness of the domain matching, accepting either relaxed or strict configurations. The vast majority of organizations deploy with relaxed alignment because it prevents legitimate mail flow disruption when regional subdomains send corporate messages.
In relaxed mode, the protocol requires only an organizational domain match. If the sender address points to a human resources subdomain but the signature domain is the root corporate domain, relaxed alignment passes. Strict mode requires a character for character exact match. The blind spot occurs when defenders assume relaxed alignment will still protect against third party spoofing. They see the word alignment and assume it means rigorous validation against external threats.
Relaxed alignment provides zero protection when the signing domain belongs to a completely different organizational boundary. The attacker relies on the fact that legacy anti-spam engines evaluate the cryptographic pass verdict in isolation, treating the structural integrity as a positive reputation signal that offsets the negative signal of the alignment failure. Furthermore, attackers know that this exact signature mismatch happens constantly with legitimate forwarded mail. They blend their malicious traffic into the background noise of broken calendar invites and automated mailing lists. This is why reaching enforcement policies is the only definitive control. Until you reach enforcement, every mismatched signature is a potential breach.
Building Detections for Mismatched Signatures
Writing Rules for the Mismatch
Defensive architecture requires translating these protocol failures into deterministic detection logic. You cannot alert on every alignment failure, or your security operations center will drown in noise from misconfigured marketing vendors and broken forwards. The detection must tightly scope the behavioral anomaly to highlight active exploitation rather than administrative errors.
The highest fidelity detection rule requires three intersecting conditions. First, the Authentication-Results header must contain a verified cryptographic pass verdict. Second, the same header must contain an alignment failure verdict. Third, the visible sender domain must match your internal organizational domain or a highly targeted vendor domain. You write this logic into your detection engineering platform to catch the exact moment an external actor borrows trust.
When you implement this logic, you filter out the noise of generic external spam and isolate the specific spearphishing attempts that are actively abusing trust boundaries. You can further refine this by maintaining a lookup table of known bulk sender domains. When an email claims to be your Chief Executive Officer but is signed by a bulk provider you do not have a contract with, the automation should immediately quarantine the message and trigger an incident ticket. The goal is to detect the mismatch before the user ever sees the lure.
Turning the Adversary's Architecture Against Them
A mathematically perfect cryptographic signature on a malicious payload is not a failure of the protocol. It is a highly specific intelligence asset. Every valid signature carries the exact routing information, selector conventions, and infrastructure choices of the adversary who generated it. By discarding the simplistic binary of passed or failed authentication, defenders can turn the very mechanisms attackers use to bypass filters into the exact indicators used to track them.
When you dissect the alignment between cryptographic identity and display identity, you strip attackers of their most reliable evasion technique. If you need to scale this extraction across thousands of inbound messages, platforms like MailSleuth.AI can automatically parse and correlate these header discrepancies for your response team. The telemetry is already sitting in your gateway logs, waiting for you to ask the right questions about who exactly is signing your mail.
The takeaway
A mathematically perfect cryptographic signature on a malicious payload is not a failure of the protocol. It is a highly specific intelligence asset. Every valid signature carries the exact routing information, selector conventions, and infrastructure choices of the adversary who generated it. By discarding the simplistic binary of passed or failed authentication, defenders can turn the very mechanisms attackers use to bypass filters into the exact indicators used to track them.
When you dissect the alignment between cryptographic identity and display identity, you strip attackers of their most reliable evasion technique. If you need to scale this extraction across thousands of inbound messages, platforms like MailSleuth.AI can automatically parse and correlate these header discrepancies for your response team. The telemetry is already sitting in your gateway logs, waiting for you to ask the right questions about who exactly is signing your mail.
We dissect phishing campaigns and email infrastructure so you don't have to.


