Sara with No H
Monday, July 30, 2007
  Geeky Girl
I had a very geeky day. If you are not a geek, you'll likely think this is the most geeky post ever. However, I think the winner for geeky posts in the guy who regularly posts his del.ico.us list of guitar finger charts he finds on a website. Memo to self: Remove Del.ico.us guy from Google Reader.

Okay, so I'm being asked to take over administration of a new area at work. The area has been largely administered by graduate students, and while these folks are not untalented, network security for their servers (and whatever else) has been lacking.

I looked at the web server (Windows Server) last week, and found, among other things...an installation of Unreal Tournament 2004, a hacked FTP server, several shared directories (including the c: directory) and some indication that there were people hosting sites from the Netherlands at one point. Not good.

How can you clean a server in this state? You don't. You get a good backup and erase it. You start over. You do the security first and then get it working the way it was.

I started to get another server ready to take on the website in a semi-interim manner. I needed to get Apache installed, PHP installed, mysq1 installed, ssh working, samba up and running. Did I mention that the machine that had been hacked was a Windows Server 2003 and that I know next to nothing about it?

I threw Debian Linux stable on a new server, and got it ready to go.

So, that was Friday. Today I get in and not only is the webserver is a pretty bad way, but someone has now hacked phpMyAdmin to attack other machines. We have a incident response team that contacts you about these things, and they usually "blackhole" machines with this sort of problem. Basically, turn off their network port. Anyway, for some reason, they just told us about the problem and didn't blackhole it, so the web site was still running. For now....

Disclaimer: I think phpMyAdmin is the devil. When it was first shown to me, I said, "Gosh, that looks easy to hack." I was told that is possible to secure it, and we do have secured copies of it running on some of our servers, but I never bothered to learn exactly how. I do my mysql administration the old fashion way....from the command line. Yes, it's annoying sometimes, but I think I have a pretty good grasp of what has to happen there. Someday, I'll have to sit down and examine it...some of my more saavy users really want it.

Anyway, first chance I get, I go over and look at the phpMyAdmin folder on the webserver. 3AM on Saturday morning someone installed several php files and something called network.exe. Looking in the php files, I find little messages like "I hack you real good" and an allusion to a home directory in the C:\Recycler folder. I deleted these files after rendering them inert by renaming and changing the attribution and permissions.

Following the lead, I go to the C:\Recycler folder. I find there another folder with a list of computers that it is telling phpMyAdmin to attack to find vulnerabilites. So, it was using the server as a robot. I am showing one of the graduate students the traces left behind, then copying them to a secure place (in case they are important) and then deleting them. I believe we got most of it stamped out.

In the course of this, he askes why people do this sort of thing. It's a question I get a lot. Why do viruses exist? Why do people invent spyware? Why do people hack machines? I don't have answers other than...because they can. Because they have nothing better to do. Because they want to see what will happen. I don't have a psychological profile of these sort of people; I just know they cause havoc and make a lot of work for me.

I did a search for other files hacked around 3AM on Saturday. A lot of them came up; mostly log files. But there were others too, and it is difficult to know exactly what he did.

We changed the passwords, removed old users, and we removed the shares. But it was just a matter of time before it got hacked again; I could feel it.

I really needed to get the website to that new server. The website is database driven. I needed to get the pages over, and get the server backed up. On a Windows Server. Which I know very little about.

Poking around, I found the website. That was easy to copy over. Then it was time to get Apache pointing at the right place. Apache2, actually. If you really want to feel like a fully fledged geek, try out hacking conf files on different versions of Apache. It's like they felt the need to redesign it every version number.

Luckly, Debian is outstandingly easy to use for configuration of things like this, and the help instructions are really good.

So after a bit of fooling, Apache is pointing to the right place, the php5 stuff is installed, and the website is throwing errors because the mysql backend isn't working.

Go back to hacked server, do a mysqldump of the database. Transfer that to the new server.

Try to install mysql-server on the new server.

And it fails.

It's one thing to have something like this fail, but when you are SO CLOSE and you need something SO BAD, it's particularly annoying.

It's erroring out and the error is so cryptic. I google the error message and 18 different suggestions are offered. I try some. They don't work.

I leave work, go to the gym, come home, make dinner, and then sit down to work on it again. I study the cryptic error messages again. It says something about permissions, and when I dig a little deeper, I find it is looking for a group called adm. There is no group called adm. I create one.

I try the install again. IT WORKS!

Now, I'm dancing around my living room, and J thinks I am nuts.

IT WORKS! IT WORKS! IT WORKS!

Of course, I still need to see if this website will work with PHP5, and get the mysql dump back into the new database, and deal with permissions and granting on THAT, but ...

IT WORKS! IT WORKS! IT WORKS!

It's a small victory, but I live for small victories.

Labels: , ,

 
Comments:
I'd comment, but I don't speak your strange moon language.
 
Now I have this SQL Server 2000 running on my Vista Ultimate home machine. Could you....
 
Post a Comment



<< Home
noh.blogspot.com was taken. Not updated since 2000. Let my blog address go.

My Photo
Name: Sara
Location: Verona, Wisconsin, United States

Computer Geek. Bicycling Nut. Fun Loving Friend. Gym Rat. Gamer. Slightly off-kilter artist. Madison Liberal. Crazy Cat Lady. Organic Produce Fan. Use your own label.

Email: ziemendorf at GMAIL dot com

ARCHIVES
July 2004 / August 2004 / September 2004 / October 2004 / November 2004 / December 2004 / January 2005 / February 2005 / March 2005 / April 2005 / May 2005 / June 2005 / July 2005 / August 2005 / September 2005 / October 2005 / November 2005 / December 2005 / January 2006 / February 2006 / March 2006 / April 2006 / May 2006 / June 2006 / July 2006 / August 2006 / September 2006 / October 2006 / November 2006 / December 2006 / January 2007 / February 2007 / March 2007 / April 2007 / May 2007 / June 2007 / July 2007 / August 2007 / September 2007 / October 2007 / November 2007 / December 2007 / January 2008 / February 2008 / March 2008 / April 2008 / May 2008 / June 2008 / July 2008 / August 2008 / September 2008 / October 2008 / November 2008 / December 2008 / January 2009 / February 2009 / March 2009 / April 2009 / May 2009 / June 2009 / July 2009 /

My Gift List

I've been Simpsonized!

2009 Books I Fully Intend on Completing

2009 Books that I Will Probably Never Finish

2009 What's I've Read

2009 Movies I've Seen

Currently Watching

MultiSport Events

Del.icio.us bookmarks

Flickr PhotoStream

Picasa Photostream

Gratuitious Groupiness

Friends

Local Stuff

Miscellaneous Fun

Tri/Bike Training Stuff

Drupal is so cool!

Work Stuff

I'm Famous!


Maybe in my own mind...


Shelfari: Book reviews on your book blog
Powered by Blogger






A friend of mine created a blog to talk about his experiences getting ripped off by a company called Lifestyle Pets, who claim to sell a hypoallergic cat called Allerca, but really just seem to charge thousands of dollars for the honor of being put on an endless waiting list.
Thank you!