31 May

WordPress Plugin Hacking Attempts Are Not Always Done By People Who Have Much Clue What They Are Doing

One of the things we feel is important in discussing security threats to websites is to be realistic about the potential dangers of those threats. Far to often security companies will try to hype up minor issues, leading to unnecessary concerns about some things and to little concern about other things. One thing we see them doing is making a big deal about the amount of hacking attempts going on, while not mentioing that the success rate of those hacking attempts is incredibly small and many are done by people who clearly don’t know what they are doing. That second issues involves things like hackers try to exploit vulnerabilities that don’t actual exist or, as discussed in this post, doing things that make sure they won’t be successful in their hacking attempts.

In the past on this blog we have said that if it were not for us a lot of known vulnerable WordPress plugins would remain in the Plugin Directory. A quick reminder of that came last week when looking through a series of hacking attempts we saw one for a plugin that we did not have any vulnerabilities listed for yet:


Through a quick search we found that a local file inclusion vulnerability had been disclosed in that plugin, Spicy Blogroll, July 13, 2013. The plugin was still available in the Plugin Directory despite that vulnerability still being in the current version (we notified the Plugin Directory of the issue last week, but they have yet to take action).

The plugin hasn’t been updated in five years, so not surprisingly it isn’t in wide use at this point, with just 60+ active installs according to wordpress.org. The stats page also shows that they are not many downloads of it these days either:


A hacker trying to exploit the vulnerability at this point really doesn’t seem to make much sense, seeing as the chance that you would happen to hit a website running it are incredibly low.

In this case there is the larger problem that their exploitation attempt could not succeed even if the website had the plugin installed. To understand why that is we need to look at the code the  relevant plugin file, /spicy-blogroll-ajax.php.

The local file inclusion occurs here:


That require_once() function using variables defined here:

$var2 = unscramble($_GET['var2']);
$var4 = unscramble($_GET['var4']);

Those take user inputted variables and pass them through the function unscramble(), which is defined later in the file:

function unscramble($text1){
 for($i=2; $i<=$len-1; $i++) {
 if ($ch==42){$ch.=92;}
 return $text2;

The hackers clearly didn’t look closely at the code or test the vulnerability attempt before attempting to attack websites as they missed the GET values they sent would be run through that unscramble() function.

So instead of including the file


the file


is included.

That obviously isn’t going to accomplish what they were trying to accomplish.

That isn’t the end of their problems. It looks they thought this was an arbitrary file viewing vulnerability, which would have allowed them to view the contents of the wp-config.php file. But since it is a local file inclusion vulnerability, it would have instead caused that file to be included. Since the wp-config.php is included whenever you request a WordPress page, including it in this instance would haven’t been dangerous.