|
| 1 | +--- |
| 2 | +title: "Email Sender Authentication and Phishing Investigation" |
| 3 | +description: "Interpret SPF, DKIM, DMARC and alignment through five synthetic receiver cases." |
| 4 | +category: network |
| 5 | +tags: [Email Security, DNS, Blue Team, DFIR, SPF, DKIM, DMARC] |
| 6 | +level: Beginner |
| 7 | +updated: "2026-11-19" |
| 8 | +translation_url: /ko/wiki/mail-auth-evidence/ |
| 9 | +--- |
| 10 | + |
| 11 | +## A message carries several sender identities |
| 12 | + |
| 13 | +The SMTP envelope contains MAIL FROM for bounce handling and RCPT TO for requested delivery. The visible From is a message header. Reply-To directs replies. An order notification provider may use its bounce domain while retaining a customer’s visible author domain. SMTP acceptance, mailbox delivery and a recipient following a link are separate events. |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | +## Read SPF, DKIM and DMARC |
| 18 | + |
| 19 | +| Check | What it evaluates | Identity to record | |
| 20 | +| --- | --- | --- | |
| 21 | +| SPF | Whether the connecting IP is authorized by the SMTP sender policy | MAIL FROM domain. A null reverse path uses the HELO identity | |
| 22 | +| DKIM | Whether the signed header and body scope validates | Signing domain d= and DNS key selector s= | |
| 23 | +| DMARC | Whether at least one passing SPF or DKIM identity aligns with From | Author domain, passing mechanism and aligned domain | |
| 24 | + |
| 25 | +**Alignment** compares an authenticated identity to the visible From domain. Strict alignment requires equality. Relaxed alignment compares Organizational Domains discovered under the applicable standard. SPF and DKIM can each pass without either identity aligning. Aligned DKIM can yield a DMARC pass even when SPF fails. |
| 26 | + |
| 27 | +For ordinary outsourced notifications, assume From is orders.example.test and SPF passes for mailer.example.test. Strict SPF alignment fails. A passing DKIM signature from orders.example.test aligns. Reading DNS later gives current policy. Preserve receiver results and configuration history to establish the policy at receipt. |
| 28 | + |
| 29 | +**Current standard:** RFC 9989 (May 2026) supersedes RFCs 7489 and 9091 and defines DNS Tree Walk for policy and Organizational Domain discovery. Verify deployed behavior when interpreting older public-suffix-list guidance. The p=none, quarantine and reject values signal the domain owner’s preferences. Verify actual delivery, quarantine or rejection in receiver evidence. |
| 30 | + |
| 31 | +## Compare misuse hypotheses with ordinary explanations |
| 32 | + |
| 33 | +| Observation | Possible cause | Evidence to check | |
| 34 | +| --- | --- | --- | |
| 35 | +| SPF fails after forwarding | Forwarder IP falls outside original policy | Trusted Received hops and forwarding path | |
| 36 | +| DKIM fails after a mailing list | Covered subject or body changed | Relay evidence and signature coverage | |
| 37 | +| DMARC fails | Spoofing candidate or misconfigured legitimate service | Approved sender list and alignment results | |
| 38 | +| DMARC passes for a familiar-looking From | Lookalike authenticates as its own domain | Exact From domain and sending authorization | |
| 39 | +| Risky link from a legitimate domain | Account or sending service may be abused | Session, mail audit and click evidence | |
| 40 | + |
| 41 | +The domain 0rders.example.test resembles orders.example.test and can pass authentication for its own identity. Confirm payment or bank changes using an established contact channel. Preserve link text and actual destination separately. |
| 42 | + |
| 43 | +## Blue-team investigation |
| 44 | + |
| 45 | +1. Acquire the original message and headers through approved mailbox or gateway access. Record UTC, internal trace ID, Message-ID, recipient and disposition. Corroborate Message-ID using time, recipient and internal trace ID. |
| 46 | +2. Find Authentication-Results written by the trusted receiving boundary. Check the authorized authentication service identifier and header handling. Separate external copies of the header from trusted output. Read Received from a known receiver boundary. |
| 47 | +3. Check provider-specific fields and confirm generation and ingestion with an ordinary message. Compare increased failures for protected domains against a baseline and approved forwarding or vendor changes. |
| 48 | +4. When evidence supports phishing, use trace records to scope mailboxes and quarantine under local policy. Check proxy, endpoint and account sessions where a click or credential entry is indicated. Protect original messages and any private information. |
| 49 | + |
| 50 | +## Offline exercise and answer key |
| 51 | + |
| 52 | +[mail-auth.csv]({{ '/assets/labs/mail-auth.csv' | relative_url }}) · [mail-auth.py]({{ '/assets/labs/mail-auth.py' | relative_url }}) |
| 53 | + |
| 54 | +Keep the files together and run using Python 3. Use precomputed synthetic checks to compare strict alignment. |
| 55 | + |
| 56 | +```bash |
| 57 | +python3 mail-auth.py |
| 58 | +``` |
| 59 | + |
| 60 | +| Case | Expected result | |
| 61 | +| --- | --- | |
| 62 | +| A | Aligned SPF passes | |
| 63 | +| B | Both checks pass but strict alignment fails | |
| 64 | +| C | Aligned DKIM passes despite SPF failure | |
| 65 | +| D | A separate lookalike aligns through both checks | |
| 66 | +| E | A transient error leaves the worksheet unresolved | |
| 67 | + |
| 68 | +Expect PASS and printed receiver dispositions. Check filenames and folder if loading fails. Assess relaxed alignment in B using the applicable Organizational Domain calculation. For E, check the retry and disposition in receiver logs. This run verified the offline CSV exercise. Live DNS, signature verification and vendor logging require separate validation. |
| 69 | + |
| 70 | +**Completion criteria:** Record the envelope, header and signing identities. Explain the results in B and D and document the lookalike concern separately. In an authorized environment, match one ordinary test message’s trusted authentication header to mailbox trace evidence. |
| 71 | + |
| 72 | +[DNS]({{ '/wiki/dns-investigation/' | relative_url }}) · [Previous · HTTP logs]({{ '/wiki/http-evidence/' | relative_url }}) |
| 73 | + |
| 74 | +## Official references |
| 75 | + |
| 76 | +Reviewed 19 November 2026. Verify behavior in the deployed receiver. |
| 77 | + |
| 78 | +- [SMTP · RFC 5321, 2008](https://www.rfc-editor.org/rfc/rfc5321.html) |
| 79 | +- [SPF · RFC 7208, 2014](https://www.rfc-editor.org/rfc/rfc7208.html) |
| 80 | +- [DKIM · RFC 6376, 2011](https://www.rfc-editor.org/rfc/rfc6376.html) |
| 81 | +- [DMARC · RFC 9989, 2026](https://www.rfc-editor.org/rfc/rfc9989.html) |
| 82 | +- [Authentication-Results · RFC 8601, 2019](https://www.rfc-editor.org/rfc/rfc8601.html) |
0 commit comments