SpamAssassin 3.4.2 fixes security problems, adds HashBL and phishing plugins
New SpamAssassin 3.4.2 release
Important security fixes
If you're using SpamAssassin, you should upgrade as soon as possible because this release addresses four security issues:
CVE-2017-15705, a malformed HTML email part may cause a denial of service through resource exhaustion;
CVE-2016-1238, incomplete sanitization of Perl's include path;
CVE-2018-11780, potential remote code execution in SpamAssassin's PDFInfo plugin;
- CVE-2018-11781, code injection in SpamAssassin
The source distribution is available directly from the Apache mirrors; RPMs and other distribution-specific packages should update in the coming days.
SpamAssassin 3.4.2 introduces several new features. Two of these plugins,
Mail::SpamAssassin::Plugin::Phishing, I can't wait to play with!
HashBL support for the EBL blocklist
A HashBL is a special type of DNS blocklist. While most anti-spam DNSBLs are geared towards querying the IP address of the sending MTA, a HashBL can be created for any arbitrary data.
One of the most common HashBLs currently in use is the EBL, or Email Blocklist. It's configured to allow queries for the hash of an email address, and will respond for email addresses that are known to be associated with scams and spam campaigns. To use the EBL, you convert an email address to lowercase, remove any
+tag segments, and compute the sha1sum of the result. That hash is then used as the hostname part to query the EBL DNS server.
For example, consider this 419 scam email:
Subject: Proposal To: inbox <email@example.com> From: "Ms. Ella Golan" <firstname.lastname@example.org> Date: Thu, 29 Mar 2018 18:31:53 -0700 Reply-To: email@example.com Message-Id: <20180330013242.AD5A46803FD7@mikulas.south.park>
From address in scam messages is often forged at random, the
Reply-To address is likely to remain consistent. The scammer wants to hear back from potential victims, after all. Since replies to this message are directed to
firstname.lastname@example.org, we'd query the EBL for that address:
Convert the address to lowercase (here, it's already lowercase);
+tagsegments from the address (here, there are none);
gmail.com(here, not applicable);
- Take the sha1sum of the result:
[user@host ~]$ echo -n 'email@example.com' | sha1sum 959e5a12ccbc20ae4fd18db5919c211f8c77c9b1
Use that hash as the hostname part to query the EBL:
[user@host ~]$ host 959e5a12ccbc20ae4fd18db5919c211f8c77c9b1.ebl.msbl.org 959e5a12ccbc20ae4fd18db5919c211f8c77c9b1.ebl.msbl.org has address 127.0.0.2 [user@host ~]$ dig +short TXT 959e5a12ccbc20ae4fd18db5919c211f8c77c9b1.ebl.msbl.org "AFF dropbox in Reply-to"
The EBL returns a positive response, indicating that the 419 dropbox
firstname.lastname@example.org blacklisted. Addresses that aren't on the list will return
I've been wanting to implement this for awhile (I've been meaning to blog about it for awhile, too; you can see the example message header I kept around is from 6 months ago). But until now, the only way to get EBL support in Postfix was to add yet another milter, and I have enough as it is. Now that SpamAssassin includes HashBL support, querying the EBL is as simple as turning on a plugin.
Checking PhishTank and OpenPhish
I signed up for PhishTank back in 2006, and spent some time contributing a few dozen phishing mails and verifying around 1,000 reports from other users. It's a great tool, but not something I had the inclination to keep up with by hand. Based on the usernames now submitting the majority of suspect links, most reporting to this system is now automated, and so is the ability to query it.
Mail::SpamAssassin::Plugin::Phishing supports checking URLs found in email messages against both PhishTank and OpenPhish feeds.
If you have SpamAssassin installed through your operating system's package manager (
apt, etc.), it's likely that updated packages will be available this week. Otherwise, you can get the latest sources directly from the Apache SpamAssassin download page.
SpamAssassin logo by James ThompsonDidier Misson, via Wikimedia Commons