Replay & Multiple From
This attack combines email replay techniques with multiple From headers to create sophisticated spoofing attacks that can bypass authentication mechanisms and appear legitimate to recipients.
Attack Summary: Combining email replay techniques with multiple From headers to bypass authentication and create convincing spoofed emails.
Background: Email Replay and Multiple From
This attack combines two techniques we've discussed separately:
- Email Replay: Capturing and resending legitimate emails with modifications
- Multiple From Headers: Exploiting inconsistent handling of multiple From headers
By combining these techniques, attackers can create sophisticated spoofing attacks that are difficult to detect and can bypass multiple layers of email security.
Attack Methodology
This attack involves capturing legitimate emails, modifying them to include multiple From headers, and resending them to create convincing spoofed emails.
This variant involves capturing a legitimate email, adding multiple From headers, and resending it.
Replay with Multiple From Example
Replaying an email with multiple From headers
How It Works
- Attacker captures a legitimate email with valid authentication
- Attacker adds a second From header to the email
- Attacker resends the modified email through a different server
- The DKIM signature may still validate if it only covers the first From header
- Different email clients display different From headers
- Recipients may see the email as coming from the legitimate sender
- The email appears to have passed authentication checks
This variant involves selectively replaying only specific headers from a legitimate email.
Selective Header Replay Example
Replaying only authentication headers
Authentication Header Replay
Attackers can replay various authentication headers:
- DKIM-Signature: Makes it appear that the email was signed by the legitimate domain
- Authentication-Results: Makes it appear that the email passed authentication checks
- Received: Makes it appear that the email passed through legitimate servers
- ARC-Authentication-Results: Makes it appear that the email passed authentication at previous hops
- SPF-Results: Makes it appear that the email passed SPF checks
This variant involves capturing legitimate emails and replaying them after a time delay with modifications.
Time-Delayed Replay Example
Replaying emails after a delay
Timing-Based Attacks
Attackers can use timing to make replay attacks more effective:
- Expected communications: Replaying emails when similar legitimate emails are expected
- Business events: Timing attacks around known business events (e.g., end of quarter)
- Out-of-office periods: Targeting recipients when key personnel are away
- High-volume periods: Replaying during times when recipients receive many emails
- After-hours: Replaying emails outside normal business hours when scrutiny may be lower
Impact
This attack allows attackers to:
- Create highly convincing spoofed emails that appear to have passed authentication
- Exploit inconsistent client behavior to control how emails are displayed
- Bypass multiple layers of email security
- Conduct sophisticated phishing or business email compromise attacks
- Target specific recipients with customized attacks
Detection
Organizations can detect these attacks by:
- Implementing email security solutions that check for multiple From headers
- Using solutions that validate the entire email, not just specific headers
- Monitoring for unusual patterns in email headers
- Checking for inconsistencies between authentication headers and email content
- Implementing time-based checks for duplicate or similar emails
Mitigation
To protect against these attacks, organizations should:
- Reject multiple headers: Configure email servers to reject messages with multiple From headers
- Implement DMARC: Use strict DMARC policies to prevent spoofing
- Use email authentication: Implement SPF, DKIM, and DMARC for all domains
- Validate authentication: Use email security solutions that validate the entire email
- Train users: Educate users about the risks of email spoofing and phishing
- Implement additional verification: Use out-of-band verification for sensitive requests
- Monitor for anomalies: Implement monitoring for unusual email patterns
Testing
Security professionals can test for this vulnerability using the following approach:
- Capture legitimate emails with valid authentication
- Modify them to include multiple From headers
- Resend them through different servers
- Check if email clients display different From headers
- Check if email security solutions detect the modifications
- Document inconsistencies in how different systems handle the emails
References
- RFC 5322: "Internet Message Format." https://tools.ietf.org/html/rfc5322
- RFC 7489: "Domain-based Message Authentication, Reporting, and Conformance (DMARC)." https://tools.ietf.org/html/rfc7489
- Chen, J., Duan, H., Weaver, N., Paxson, V., & Jiang, J. (2021). "Measuring and Mitigating Email Sender Spoofing Attacks." In Proceedings of the 30th USENIX Security Symposium.
- Foster, I. D., Larson, J., Masich, M., Snoeren, A. C., Savage, S., & Levchenko, K. (2015). "Security by Any Other Name: On the Effectiveness of Provider Based Email Security." In Proceedings of the 22nd ACM SIGSAC Conference on Computer and Communications Security.