My website has been defaced twice in the past few days. Yesterday, i checked my site for the first time in a while (someone has to look at it) and was very surprised to see that my homepage had been replaced by a plain white webpage with the text “defaced by YELLOW MOUSE” and a photo of a yellow stuffed animal (presumably a mouse). Here is a copy for the curious.
Well, I changed my passwords, removed a couple of old ftp accounts and looked for any obvious security holes. I had no unsecured upload scripts, anonymous ftp accounts, etc. My hosting service has links to ftp logs for my web space; either they don’t exist or I am unable to access them. The FTP stats don’t show any activity this month… I’d worked all day and I have a cold so I decide that I have done all I can for the time being. I replace the defaced page with an old copy of my homepage and go home for the day.
This morning I discover my site has once again been defaced. Unfortunately, my phone starts ringing early and doesn’t stop until mid morning. I was hoping work would be quiet today so I could take a closer look at this problem. O well – that’s what lunch breaks are for.
(excuses: )
I have been bested (and a bit embarrassed). I have not intentionally written any insecure scripts, I acknowledge that I am by no means an expert on php. Most of the php on my site is between two and three years old. I definitely didn’t know what I was doing when I first started learning php three years ago, so it won’t surprise me if I find something stupid in my code. I guess I will spend my evening going over every script. In hindsight – I probably should have done this yesterday.
(passing the buck: )
I also suspect other people’s code. My hosting service provides several content management and blogging applications. While I do not use any of them, I have installed several and I am certain they have not been kept up–to–date. Needless to say, I will be removing any code that I didn’t write. I believe I will also look for a hosting service that provides sftp or scp access.
(crying uncle: )
What ever the case is – I want to thank the person who has discovered this exploit for not being destructive or doing anything vulgar. If you’re interested in helping a guy out – I am dying to know how you gained access. I am not rich, but if you could shoot me an anonymous email, maybe I could figure out some kind of reward in exchange for your knowledge.