Hostgator

Hostgator

Hostgator WordPress Dashboard

The WordPress Hidden Link Injection exploit has been the cause of concern for many users who use WordPress on a daily basis. For those unfamiliar with the issue, the attack inserts links into the files of your active WordPress theme mostly pointing to adult material elsewhere on the web. The lainks are completely hidden from view so you may never know about them and nor will your visitors. But the search engine spiders will certainly pick them up – and penalize you for it.

Detection

Seeing if your WordPress install has been compromised is easy. Simply view the source of your homepage and look for any code that does not belong. Check near the top and near the bottom of the file as this is the place I’ve found the hidden links to mostly exist. They’re also usually wrapped in HTML comments.

Some website 1

Some website 2

Some website n

If you see code like that, chances are, you are a victim of the WordPress Hidden Link Injection exploit.

How are “they” doing this?

Apparently, there was a security hole in WordPress versions 2.8.x that allowed outside users to hijack the /wp-admin/upload.php file and insert files on your server that could be used for all sorts of malicious purposes. One of those purposes is the hidden link injection. WordPress 2.9 fixed this hole, however, simply upgrading is not enough. Outside users will no longer be able to hijack upload.php but the files that they have already inserted will still orchestrate the attack.

That’s why simply removing the links from header.php or footer.php (the two places I’ve seen the links) is not enough. You’ll notice that the links will simply reappear. We’ve got to treat the disease now, not just the symptom.

Fixing the problem

First and foremost, always keep your WordPress install up-to-date! Updating could not be any easier. Simply click on the alert that appears at the top of your Dashboard and follow the instructions. It takes literally 10 seconds.

Next, change the admin WordPress user’s password. Also change your MySQL user’s password.

Lastly, find the files that have been inserted by the exploit via upload.php. I have found two separate instances of these files, both located in the wp-includes folder. Check the permissions of each of the files in wp-includes and investigate any file that has 777 permission (that’s your first clue that something is wrong). class-rss.php and feed-atom2.php are two files that I have seen cause issues. Cleverly named files. These two files are not native to the WordPress codebase and can be safely removed. If you were to open either of these files and know a bit of PHP, you’ll see that these files are certainly the culprit.

Going through these steps should safeguard your WordPress installation against the hidden link injection exploit.

Stay vigilant

Just because we’ve fixed this does not guarantee that you’ll be immune forever. Hackers are constantly looking for newer and better ways to tear stuff up. WordPress has been exceptionally good at patching security issues, but someone somewhere has to be the guinea pig to get hit with an attack – and then report it to WordPress.

One great plugin I’ve begun to use is WordPress File Monitor. This plugin scans your WordPress installation and reports if any files have been added, deleted, or changed. The plugin is customizable to run on a schedule that you set. You can also exclude directories from the plugin’s reporting so that you’re not alerted every time you upload a picture to insert into a post. I, however, recommend that you do not exclude directories as that directory may be the next location of the next exploit.


  • K M says:

    Help with wordpress to edit a website?
    I am not internet savvy in regards to building/maintaining websites. I had a friend of mine build a few websites. I bought the domains, and the hosting (with hostgator), and he built the sites on there. He did this with wordpress. However, he is out of the country right now, will be back in two weeks and I have to edit some stuff on the website. He sent me an e-mail with directions, and told me to go to the wordpress dashboard, but I don’t see that option in my cpanel. Do I have to re-install wordpress, or am I missing something? I hope that’s enough information, if I left out some detail that would help you let me know the answer, just let me know. Thanks for any help, sorry to be a dingbat, but I’m trying to learn everything.
    If he installed wordpress, he would then have the log-in information?

    August 8, 2011 at 9:00 pm
    • Greg says:

      Hi K M,

      Regarding your last question, yes your friend should have the log-in information. That is the missing piece of the puzzle.

      You need the WordPress user-name and password in order to access the WordPress administration area. Once you do that, you can make changes to the site.

      Lastly, don’t be so hard on yourself. We’ve all been where you are. Hang in there.

      Cheers.

      August 28, 2011 at 9:20 pm

Your email address will not be published. Required fields are marked *

*


*

Current month ye@r day *

Social Widgets powered by AB-WebLog.com.