Download April 2011
Transcript
VIRUS BULLETIN www.virusbtn.com in people’s inboxes. Users were being fooled by the messages, clicking the links, and their workstations were being compromised. This was occurring regularly enough for the IT personnel of the company to escalate the matter to us1. and the result is SPF None. It continues to pass it down to the rest of the filter. At the time, I knew that SPF was an anti-spoofing technology but I didn’t know much more beyond the basics so I did some research and learned a lot more. The spammer was sending mail from a domain with no SPF records in the ‘P1 Mail From’ and was spoofing the recipient’s organization in the ‘P2 From’ address field. The result was that the recipients of the message were fooled into believing that it was from an internal sender because they recognized their ‘own’ domain as the sender. For example, suppose that the organization receiving the mail was the government of Washington State2: SMTP Mail From: [email protected] P2 From: [email protected] To: [email protected] Subject: Update your credentials Dear recipient, We are upgrading our security infrastructure. Please login to the following site and enter your credentials so it will update in our systems otherwise your account will be locked out. http://security.wa.state.gov/user/login Thanks for your co-operation in this regards. Department of IT Security Let’s take this message apart and see what happened: 1. The state of Washington has published SPF records and tagged them with ‘-all’, which means that receivers should Hard Fail any mail that purports to come from its servers but whose sending IP is not in its SPF record. This is something that a responsible organization does to prevent being spoofed and then delivered to someone’s inbox. 2. Upon receipt of the message, the spam filter executes an SPF check on the email address in the ‘P1 Mail From’, which is the randomized [email protected]. The domain zebuzez.com exists in DNS and has an A-record but does not publish SPF records. The spam filter checks it out 1 This was the first instance I had seen of a spear phishing attack, although in retrospect it was probably less sinister than it sounds. A targeted spear phishing attack customizes everything, right down to the recipients. This attack spoofed the From: address, but nothing else in the message content was customized. 2 The government of Washington State is not our customer, I use this as an example. 3. The URL in the message is a newly created domain, and the message is sent from a new IP address that is part of a botnet but is not on any blocklists. It evades the spam filter’s other reputation checks and ends up in the customer’s inbox. This is a false negative. 4. The user sees the mail which appears to come from their own internal department, [email protected]. Since it seems to come from a domain they recognize, they trust the message and decide to click on the link. The spammer has been clever enough to send the message in HTML format and the link in the message actually points to a spammer’s domain. The user’s computer has now become part of a botnet because they clicked on the link3. If you only use SPF as part of your spam filter, then your filter will be prone to these types of attack. Whether spammers spoof your specific domain intentionally or are randomizing the domains in the senders, the fact is that SPF cannot prevent these emails from reaching your inbox. I was left scratching my head. How could we combat these types of spam messages using content filtering? I started to investigate SPF and how it executes on the ‘P1 From’ address. The SPF documentation discourages the use of SPF on the ‘P2 From’ address because, while the P1 and P2 From addresses are often the same, sometimes they are not, and it is difficult to predict what will occur in the event that they are not the same. Will a spam filter flag legitimate messages as spam (i.e. generate false positives)? For example, suppose that the state of Washington wanted to send out a large mail campaign to residents of the state who had opted in to receive special announcements – e.g. about road repairs, government office closures, breaking news reports or results of legislative changes. Rather than sending these out themselves, the state might decide to use a marketing company, say, Big Communications, Inc. The marketing company wants the emails to look like they came from the state of Washington, but needs to avoid them being marked as spam. Since SPF is the most common authentication technology, they would do something like the following: 3 One dismissive argument I hear regarding SPF’s ability to prevent spoofing by Hard Failing spoofed addresses is that all a spammer has to do to circumvent it is to send mail from a slightly different account, say, state.wa.gov.ghsataw.com. This is true, and spammers do this. However, they also spoof the actual domains and they do this a lot. I have not measured which is more prolific, but the spoofing occurs so often that it is a legitimate scenario that requires a solution. APRIL 2011 21