by DAN CALLOWAY
Published 6 November 2010
WEAVERVILLE, NC – Do you have a blog? Most people nowadays have one for any number of reasons. Blogs are a good way of expressing one’s self to the world or simply a means of logging one’s thoughts or ideas on the Web. Besides, it’s called a Blog because the term means Web Log.
I like blogging. It gives me an opportunity to say what I want to say or to express my opinion about areas of interest to me and allows me to share that opinion or those ideas with the World. If someone has a concurring or dissenting opinion, they are welcome to comment on the posts I leave here. That’s perfectly fine. What isn’t fine, however, are those people who wish to attack my blog with HTML or script injection.
HTML or script injection is the intentional insertion of hypertext markup language or scripting language code into what appears to be a normal comment, but has the injected script or HTML hidden from view. The reason attackers perform the HTML or script injection is obvious. They want to advertise their business or their products on your blogsite.
The problem with this is two-fold. First, I haven’t given the HTML or script attacker to my blog the permission to advertise on my blog. Secondly, such attacks flood my blog’s server and slow down the site, making it difficult for those legitimate subscribers and anonymous guests to my blog to enjoy the site.
Well, I’ve decided to take a stand. I installed WP-Sentinel, a plugin for WordPress blogs that monitors and stop incoming HTML or script injection attacks against my blog. The plugin allows one to ban the attacker–identified by IP address–for 24 hours or for any number of hours if you manually ban someone. Well, I take it a step further. I don’t worry about temporary banning. If someone takes the time to launch an HTML or script attack against my blog, then I will ban them permanently–NO WARNING!
I take the IP address of the attacker that WP-Sentinel reveals in an email message that it sends to me and I update my .htaccess file in WordPress. This file is located in the root of your WordPress installation folder and controls access to your blog. The default access command in that file is: “allow from all.” However, you can insert a “Deny” statement on a separate line(s) below the “allow from all” statement, one for every IP address you intend to ban permanently from commenting on any of your blog posts. Thus if you were intending to ban IP addresses 78.113.23.54 and 98.223.14.33, for instance, the .htaccess statements would look like this:
allow from all
deny from 78.113.23.54
deny from 98.223.14.33
I keep a copy of my latest .htaccess file in a folder on my user folder in Linux. When I receive an attack notification, I log into my Dashboard in WordPress, navigate to my WP-Sentinel plugin, locate the IP address of the attacker, append the IP address deny statement to the last line of the file, and then upload and overwrite the existing file with the new one–banning the new user along with the others.
I take a hard line against those who wish to attack me. You should too.

Recent Comments