30 Sep 2009


Featured Articles 6 Comments

How to prevent your site from being black listed author Gabriel "The Graphyte" Torres

If you are a WordPress developer, designer, or blogger, new or old, one area of concern is that wordpress has many loop holes for spam bots and hackers to get a hold of personal data. Recently while developing another site I encountered such an issue. Security is one area that should not be over looked when starting or managing your wordpress site. Plugins are a major component to wordpress, with hundreds available at no cost, you can easily download hundreds of plugins without any real knowledge of the developer or the possible loop holes or back doors to those plugins that can potentially allow hackers to access your data. Plugin Developers can have the best of intentions when creating apps that can maximize the functionality of your web site but also not every developer has the time, or has been paid, to fool proof those plugins. Leaving weaknesses in the structure and creating a soft spot in the shell of you're website.

One problem I detected was an unwelcome Iframe on the site I was working on. It was hidden within the index file in the root folder of the site, but thankfully it was detectable using the firefox web developer plugin for the firefox browser. Again I say it was detectable, but I had no idea where it was within the theme I used for this site. The iframe itself was 1 pixel in height and 4 pixels in width, located at the top left corner of the browser. The developer tool merely pointed it out, but did not let me know where the foreign script was hidden. From my research online, thankfully I found some helpful tools that can actually help detect where hidden iframes are hidden within your site.


No Virus thanks is one option you have for locating hidden iframes that house potentially malicious scripts. The name isn't the most attractive as is it may just scare you away but its safe and extremely helpful. You will be provided with a search box where you input the site name and or file and it will search the site for hidden iframes, bare in mind you can also search for malicious code page by page. For example if you have a particuar page that you would like to search inside a theme folder you can input the address to that file as well. Every file or folder can be scanned by inserting address into the search field. By the way thanks to sites like NoVirusThanks & Unmask Parasites for providing tools like this.


Another option that provides the same assistance is Unmask Parasites. I made these two sites available for designers or developers less fortunate to have found a solution early on in there troubles, but also to create awareness, and hopefully derail unlawful entry into your site or database.

Getting Blacklisted

Now this is only part of the problem, when you encounter hidden scripts or code that is malicious in nature you will have a second issue to address. This is where getting blacklisted comes into play. This term refers to searching engines basically putting you on a blacklist and sighting your web site as a malicious site with faulty code or harmful coding. This may possibly lead to a MalWare warning when visiting your site. This is one of the warning signs I noticed when dealing with this code. The more research I did, the more aware I became of how large the issue is. WordPress is one of the most widely used blogging apps for websites, and its security weaknesses have been exploited because of its popularity.

The strongest advice I have to offer is to update whenever possible, and updating wordpress has become impressively easier. WordPress now handles updates internally with little effort, so there is no excuse for not being up to date with the latest version. These updates address security patches and have aggressively tackled weaknesses in the framework, but its not perfect and certainly not hack proof. Here are some helpful plugins for your blog, that can help you sleep at night after reading this. If your are lucky enough to find where the invasion is coming from, that should help you get off the endangered species list, once the scripts are removed from your site search engines will remove you from the blacklist and you will be able to regain any lost ground. Hopes this helps, Happy Hunting!

1. WordPress Database Backup

URL: http://www.ilfilosofo.com/blog/wp-db-backup/.

Description: This plugin does exactly what it says, it backs up your entire WP installation. This has got to be one of the first plugins you install upon first installation. You can back it up to your hard drive, on a server or even to a specified email address. Whether it be a rogue plugin or a hacker (or yourself) that crashes WP, WP Database Backup will reinstate everything as it should be. I like to think of it as my “WP system restore“.

2. Semisecure Login

URL: http://jamesmallen.net/2007/09/16/semisecure-login/.

Description: Semisecure increases the security of your WP Login, it uses client-side MD5 encryption on the password. JavaScript is required to enable encryption. When JavaScript is not available, the password is transmitted in plaintext (as normal), but authentication still completes in this case.

3. AskApache Password Protect

URL: http://www.askapache.com/wordpress/htaccess-password-protect.html.

Description: This will secure your WP Admin with a very powerful htaccess password protection, preventing all unwanted bots from entering your site.

4. Force SSL

URL: http://almosteffortless.com/wordpress/force-ssl/.

Description: For those will an SSL certificate, the Force SSL plugin for WordPress forces for an HTTPS connection for security purposes. This is useful for those who with to enforce a higher level of security regarding the delivery of WordPress content to the browser.

5. WP Security Scan

URL: http://wordpress.org/extend/plugins/wp-security-scan/.

Description: I love this plugin, it scans your site for security issues and checks passwords, file permissions, database security, WP version hiding and WordPress admin protection/security. It also makes me a little paranoid.

6. Secure Files

URL: http://wordpress.org/extend/plugins/secure-files/#post-271.

Description: This plugin allows you to upload and download files from outside of your web document root for security purposes. When used in conjunction with a plugin that requires a user to be logged in to see your site, you can restrict file downloads to users that are logged in.

7. WP-SpamFree

URL: http://www.hybrid6.com/webgeek/plugins/wp-spamfree.

Description: I had heard a lot about this plugin before I tried it, it said it is better than Akismet. To be honest I never noticed much difference (I get 500+ spam a day at the moment) between the two. User choice I suppose. I wish there was a way to stop the spammers instead.

8. BackUpWordPress

URL: http://wordpress.designpraxis.at/plugins/backupwordpress/.

Description: Almost identical as the first plugin, just not as straight forward. The list of features goes on and on, this is for the WP Pro. Some features: Database backup including uploaded files, plugins, etc.; EMail notofication on new backups; Trigger backup manually; Set schedules for your backups; restore backups; Staggered SQL import; Automatically continue unfinished backups in background; Language Support. (And thats just the Easy Mode, wait until you see the advanced).

9. Anonymous WordPress Plugin Updates

URL: http://f00f.de/blog/2007/10/02/plugin-anonymous-wordpress-plugin-updates.html.

Description: Anonymizes the plugin update checking system which is a new feature in WordPress 2.3. The plugin prevents WordPress from transmitting a list of active plugins, the blog url and WordPress version. Ideal for privacy-aware administrators of WordPress installation.

10. Replace WP-Version

URL: http://wordpress.org/extend/plugins/replace-wp-version/#post-2859.

Description: (We have all read about the security issue of showing your WP version, this resolves it). If you’re running an older version of WordPress, anyone can view source to see what attacks might work against your blog. This plugin replace the WP-version with a random string < WP 2.4 and eliminate WP-version > WP 2.4

These are only Ten great plugins to look into when trying to secure your site, thanks to Specky Boy for compiling this list. You can also search wordpress plugins for more security options, and always keep in mind that you should cross reference all plugins to be added to your blog.

  • TheGraphyte

    Every chance I get I try to post something informative when not related to graph or creative article or news. So any comments to better help inform me of the type of content visitors would like to see helps.

  • http://imagination2.com The Graphyte

    Thanks for the positive feedback guys, as an additional note one of the best methods of insuring that this iframe doesn't show up on your site is by having a rock hard password for your server login. Its a pain in the ass to create something you can barely remember without referring to it on a piece of paper but this will almost insure that your site cannot be accessed. Make sure you use a lot of numbers, symbols, Upper case and lower case for your password. Best line of defensive is protecting your hosting account so no one can access your site through FTP.

  • Joe Dirt

    Dude, this is a great post, definitely helpful. I'm not a web designer by any means but I've been using WordPress for a few years now and always thought it was too much of pain in the ass to upgrade but I started hearing about the weaknesses within wordpress and had no choice. Thank god they made it easier to upgrade so this kinda stuff doesn't mess up all your hard work. Very interesting though, I'be sure to follow your RSS feed.

  • Xavier

    i havent had the chance to read this but you know i am trying to put up a site soon so i will be reading this intently since it i will probably save me a lot of future hassle. thanks ahead of time!

  • David

    Great post Graphyte, I just googled this problem and it linked me to this post. This is great stuff and definitely helpful, especially when your not a strong coder as Paul puts it. The same thing is happening to me and I didn't know what to do. At least I can scan my files through "no virus thanks" and find the bad iframes. Thanks for putting this on your site, which by the way has a great layout and gorgeous design element. I will post back here once I clean my site.

  • Paul

    This isn't the first time I've heard about this kinda stuff, unfortunately I had to remove my WordPress account off the server in order to be sure it didn't happen again. I'm not the most strongest coder at all but your tips definitely help, and already looking into getting some security plugins to prevent this attack again. Thanks for posting this, definitely helps.