Rev. Voodoo

The Voodoo Empire

Author Archive

Well, Saturday was a big success.  It was Joe’s 30th Birthday party, and I’d say it was a hit!  Thanks to everyone who came out and helped us celebrate in style.  The party was all planned out by Charisse, who despite being quite ill beforehand, put in tonnes of effort to make sure things went off without a hitch!  Clint took care of getting the beer, which was awesome…..seems everyone enjoyed that!  Max and Steph, as always, were such gracious hosts!  The house looked great, anyone who needed a place to crash had one.  And breakfast in the morning was so nice.  Joe’s folks took care of the hairy buffalo/jungle joose…..and some of the other stuff too.  I’d say we definitely surprised Joe, which was the best part!  So to everyone who helped put it all together, and to everyone who came out, a big thank you!

Join the forum discussion on this post

I have received some requests from WP users about how exactly to use access logs to track down rogue php files on their server which can be used to reinfect their blogs after they thought they were nice and clean.  This write-up is from my experience using Godaddy as a host, but the process would be nearly identical on any host where you have access to your access logs.

I unfortunately did not save a copy of my access log from when I was hacked.  However, I can try to describe a bit better what I did/found.  I had never seen an access log before being hacked either, and so it was a bit daunting.  But here is what I found. 

First off, here is a sample line from an access log (This is a legitimate log entry, not from a hack….I’m just using it to try to explain what you are looking at a bit):

208.106.281.6 – - [01/Mar/2010:02:26:53 -0700] “POST www.rvoodoo.com/empire/wp-cron.php?doing_wp_cron HTTP/1.0″ 200 0 “-” “WordPress/2.9.2; http://www.rvoodoo.com

So that’s a possible line from an access log.  First in that line is an IP address (208.106.281.6) you can kind of ignore that for now, it’s not important to this investigation.

Next up, we have the timestamp ([01/Mar/2010:02:26:53 -0700]) this is pretty important, it’ll help you match things up, I’ll explain that in a minute

Next up, the method (POST), it’ll be HEAD, POST, or GET……frequently for a hack, you are looking for the POST method

Then we have the url of the file being affected (www.rvoodoo.com/empire/wp-cron.php?doing_wp_cron ) – this is important, helping us find things which I’ll explain momentarily

Then there is this stuff between the urls, which isn’t so important for us, its user agents and whatnot (HTTP/1.0″ 200 0 )

And finally, the second url, (WordPress/2.9.2; http://www.rvoodoo.com) this tells us which file is doing the action, it’s also important…..this could point to your rogue file if you have one

So now you have a pretty basic understanding of what the lines in your access log look like, and how to read them…..how to use this info to investigate for rogue files?

It’s pretty simple really.  When your files get hacked, some code is added to them…..well, when  that happens…the timestamp of the file changes in your godaddy file manager.  So, find a file that has been hacked.  Check the timestamp.  Now, open your access log for that date.  Cross reference in your access log for the time and date that your hacked file was changed.  Especially look, at that date and time, for any requests using the POST method.  Then, in the first url find the path to your file that was changed.  When you find the url to the file that had been changed, take a look at the second url in that line of your log.  The second url will be the path to the file which was used to change the hacked file.  For instance for me it was (http://www.rvoodoo.com/shop/includes/products/2008/06/images/settings.php).  This file is totally outside of my Wordpress install, but it was accessing my WP install for some reason.  When I went to that folder and took a look at the code from that file from within Godaddy’s file editor, it was just a bunch of gibberesh.  So I deleted the file, and along with the other cleanup steps in the reading links I provided, that took care of my problem!

Hopefully this can help you track down whether or not you have any rogue files sitting around, or at least give you a bit of a better understanding on how to use your access logs!  Good luck!

Join the forum discussion on this post

Mix of the Moment-iO

Posted by Rev. Voodoo under Mix of the Moment

Here ya go!  We promised recently to have part 2 of the mix from iO for you, and here it is!  Now youo can enjoy the full set!

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 4.00 out of 5)
Loading ... Loading ...
Join the forum discussion on this post

Team Canada Wins the Gold!

Posted by Rev. Voodoo under Empire News

Mix of the Moment-iO

Posted by Rev. Voodoo under Mix of the Moment

It’s high time we post another mix up here on The Voodoo Empire.  This is a nice Tech House mix off of Proton Radio, the Brand New Vibes show.  This mix is by iO from February 9th.  Enjoy! (check us out soon for the second half of this mix)

Join the forum discussion on this post

I sure hope I’m not speaking to soon here, but after Team Canada destroyed Russia last night, the possibility is looking quite good for a Canada/USA rematch for the Gold in Men’s hockey.  And, we already have that match up in women’s hockey going on tonight!  The next few days promise to be some very exciting olympic hockey watching!  You know I’ll be watching the women tonight, and keeping a close eye on Friday’s games to see what happens Sunday!  If the rematch happens, you know we’ll be enjoying it Sunday at 3:15pm…..you are welcome to join us!

Join the forum discussion on this post

This is going to be my absolute favourite event of the 2010 olympics. Team Canada vs. Team USA in olympic hockey.  Grab your Molson (Labatt is acceptable), kick back, turn on the tube…..it’s time for some hockey!  Lets go Canada!

Seems like more and more, I see people having a terrible time with their Wordpress installs being hacked.  While I’m no expert on the internets, or security, or anything like that….I did suffer through 2 rounds of attacks here on The Voodoo Empire, and recovered fully….and learned a lot.  So here is the process I went through.  The first time I wasn’t thorough enough, and that is how it happened again.  I’ve been clean for months now, after doing things properly the second time.  Before I describe my process, here are some great reads that pretty much set me straight and got me going on the cleanup process.

These got me going through the cleanup process, and one other good link, after you get everything cleaned up:

So that’s the required reading out of the way….now onto my process.

I first noticed some gibberesh (the base64 stuff) showing up in my theme’s files when I went in to do some editing.  It had been months since I had worked on my theme, so who knows how long the spam had been in there.  I deleted all the rogue code from all my theme’s files and thought I was golden.  Until it showed up again, I layed the find and delete game for some time…..but it kept coming back.  Then I started to dig around some more…..The Voodoo Empire has 5 Wordpress installs, and at the time we had Drupal, Joomla, ZenCart, MediaWiki, and many other software packages.  This totals up to a few thousand php files on the server.  Each and every php file had the base64 stuff in it.  So next up, every php file was either cleaned, or replaced.  I thought I’d had it beat.  A month later it was back.  I’d developed the habit of viewing my source code from within my browser each time I visited my websites now to look for bad stuff.  But this time, even though there was spam in my source code, there wasn’t any files altered.  So I dug and dug, and finally found a php file that didn’t belong buried about 4 level deep.  It was inserting spam links.  I deleted it and thought I was good.  But alas, it was too good to be true…..soon, all my php files on my server got altered again.  This time though, I did some research and finally cleaned up properly.

First thing I did was change all my passwords.  FTP, WP (and all other programs), all DB passwords, etc.  After I changed all my passwords, I took a look at one of the files that had been altered, and checked out it’s timestamp.  My host (GoDaddy) offers server access logs to peruse at my leisure (if you’ve never seen an access log, they are scary).  I had no idea what was in a log, I’d never seen one, but I decided to dive in.  I checked my access logs agains the times that the altered files had last been changed and found that a rogue php file buried way deep in the 2008 uploads folder of a different WP install was affecting my main WP install.  Upon further investigation, I found another rogue php file that was altering my other files.  So I deleted the rogue php files.  I then reinstalled every single software package on my server.  Then I went in and manually cleaned the rest of the php files that didn’t get replaced (WP theme files, wp-config file, etc).  After that it was on to plugins.  I deleted all plugins and installed from clean downloads.  So now every php file on my server was accounted for, and clean.  No rogue php files existed anywhere.  No rogue code was added on to any of my existing php files. 

It was time to finish thing up….on to the database.  I manually scanned through exports of my database looking for any suspicious code that I found, and ran some basic sql queries on my existing database looking for suspicious code, and got my database all squeeky clean.  And now, with everything nice and clean, I changed up all my passwords once again.

There you have it!  My long and painful travel to a clean WP.  Keep everything up to date, WP installs, themes, plugins, etc.  Check your source code often. Maybe install some of the various security plugins that are out there (none of them stopped my attacks, but they do have a use).  And if you do get hacked…..be thorough.  If you are not, you are just wasting your time!  Remember, server access logs can be your friend!  Hopefully you can avoid being hacked, if you are reading this because it happened to you, I hope I helped you just a little, be patient, be thorough, and good luck!

Check out my post here if you are looking for more information on rogue files, and using your access logs to find them.

Join the forum discussion on this post

Just a quick little Valentine’s Day love from The Voodoo Empire to all of you!  Have a nice relaxing day, maybe some nice dinner, hopefully yummy dessert, and watch you some Olympics!

Join the forum discussion on this post

Tomorrow night, Friday, February 12th is the Opening Ceremonies for the 2010 Winter Olympics in Vancouver Canada!  You are welcome to stop by the house around 7pm if you’d like to join us while we watch them.  Bring grub or drinks with ya if you’d like (or even a chair….).  I hope I’m not speaking too soon, but we should have renovations finished in the back rooms.  Unfortunately, I’m nearly certain we will not have time to furnish the rooms….since we don’t actually even own the furniture yet.  Anyway, we hope to see you tomorrow!

Subscribe to Rev. Voodoo