Last Updated: 2014-02-21 18:48:49 UTC
by Johannes Ullrich (Version: 1)
The "Sender Policy Framework" is a simple system to identify which mail servers are allowed to send e-mail on behalf of your domain. We have talked about this (and other standards like DMARC, DKIM) before.
These systems are usually implemented on your mail gateways. The outbound gateway will sign e-mail using your domain key (for DKIM). The receiving mail gateway will check if the headers are present and correct. The mail gateway will then add a special header with the result of the check, and this special header is then used by spam filters to decide if to keep the e-mail (or not).
It appears that spammers are learning and found a way to fool some badly configured mail gateways and spam filters. The spammer will add a header indicating that the e-mail passed the SPF validation. William sent us a sample of a UPS themed e-mail that included a malicious attachment. It included the following headers:
Subject: UPS Delivery Notification Tracking Number : <random string>
Date: Mon, 17 Feb 2014 11:56:04 -0300
From: UPS Quantum View <email@example.com>
X-Mailer: PHPMailer 5.1 (phpmailer.sourceforge.net)
Received-SPF: pass (google.com: domain of firstname.lastname@example.org does designate 22.214.171.124 as permitted sender) client-ip=126.96.36.199;
Received: from 188.8.131.52 (EHLO mailer.ups.com) (184.108.40.206)
Received: by mailer.ups.com (Postfix, from userid 1000) id A838D7824B;
X-Mailer: MIME-tools 5.41 (Entity 5.404)
X-SID-PRA: UPS Quantum View<email@example.com>
The red line indicates that the e-mail passed SPF validation. However, if you are checking the UPS.com SPF record: