Home Fighting Trackback Spam with Email Blacklists

Fighting Trackback Spam with Email Blacklists

(For MT-Banned-List plugin for publishing the internal MT IP ban list, please see GitHub)

Overnight I got slammed by two trackback spam attacks to my blog, both lasting about two hours and originating from over 20 IPs. I added all of them to my banned list to prevent further occurrences. HOWEVER, I also sat down and analyzed the data to see if it correlates with email spam. Logically speaking it is highly unlikely that comment spammers have so many machines so the most logical conclusions is that they are either using open proxies or infected residential machines. Incidentally the same type of machines are also used for email spam, so it is logical to assume that the data will crossmatch.

WARNING: The amount of data that I collected is probably not statistically sufficient to draw conclusions

To get my results, I collated a list of IPs used in the first attack, did a reverse DNS check on them and looked them up in SenderBase. Out of 28 IPs, only 13 had rDNS entries (46%), out of which about 8 looked like straight broadband or dialup (28%). All of the IPs were located all over the world including universities, companies, and regular users, leading me further to believe that these were hijacked machines.

The most interesting data came from SenderBase: 17 IPs (60%) were listed in at least one spam blacklist as follows:

DSBL open proxy - 8 (28%)
CBL open proxy - 10 (35%)
SORBS open proxy - 4 (14%)
Blitzed open proxy - 4 (14%)
SpamCop spam - 5 (17%)
SORBS spam - 1 (3%)

Out of the remaining 11 IPs, 4 (14%) had their mail volume spiked in the past 30 days, with some spiking as high as over 1500% in the past day. All together, only 7 (25%) were not listed in any blacklist or had volume spikes.

What this means is that we can successfully use email spam blacklists for blocking comment and trackback spam, especially the ones that check for open proxies NOT spam. For example, using the four blacklists that detect open proxies (CBL, DSBL, SORBS and Blitzed) would take care of 16 IPs (57%) of trackback spam I got. Unfortunately, the current plugins (MT-DSBL and WP-DSBL) only check against one list - DSBL which in my case catches only 28% of spam. Of course, adding URL blacklists such as SURL makes this stuff work even better.

UPDATE #1: For MT 2.6 there is currently no way to check blacklists since Brad's MT-DSBL plugin is only for MT v3. For MT v2.6, do the following:
1. In your blog directory, go to lib/MT/App/.
2. Open "Trackback.pm" in a text editor (backup first!).
3. Find a line starting "## Check if user has pinged recently".
4. Insert the following right above that line:

## Check blacklists
my $rem_ip = $app->remote_ip;
my ($a, $b, $c, $d) = split(/./, $rem_ip);
my $rev = "$d.$c.$b.$a";
## DSBL list
my $lookup = "$rev.list.dsbl.org";
{ return $app->_response(Error =>
$app->translate("Your IP is blacklisted by DSBL, $lookup see http://dsbl.org/listing?$rem_ip."));

You can easily change it for any other blacklist as well.

UPDATE #2: As per Andy Newton's comment, keep in mind that blacklists for email have not been all that good so caution is advised (also see this draft).

In any case, here is my raw data:, CBL, SORBS (open proxy) (open proxy) (open proxy), SORBS (open proxy) (Last Day : 2528%, Last 30 days: 765%), CBL (openproxy); SpamCop (spam), CBL (openproxy); SpamCop (spam) (open proxy), DSBL, Blitzed (open proxy), CBL (openproxy); SpamCop (spam), CBL (openproxy); SpamCop (spam) (Last 30 days : 584%) (Last day: 7080%, Last 30 days: 744%) (open proxy), Blitzed (open proxy) (Last day: 1791%) (open proxy) (open proxy), SORBS (open proxy) (spam), CBL, SORBS (open proxy); SpamCop (spam)
This post is licensed under CC BY 4.0 by the author.