Advanced Guestbook 2.2 SQL Injection Vulnerability
:: Monday, April 26th, 2004 @ 8:06:36 am
:: Tags: Computers
My guestbook (Advanced Guestbook 2.2) was hacked via a SQL injection vulnerability last week. The hackers were kind and only changed the last guestbook entry. Luckily, my guestbook database lives by itself, so there’s only so much damage they could have done.
The lesson? If you’re running Advanced Guestbook 2.2, you should upgrade to 2.3.1. :)
Shit. I wrote over my anti-spam modifications. I’m going to have to replicate them.
UPDATE After the update, I couldn’t seem to login to my guestbook admin panel. The initial login works, but then I get kicked out if I try to do anything. The solution:
Drop the “book_auth” table, and then recreate it using the following SQL:
ID smallint(5) NOT NULL auto_increment,
username varchar(60) NOT NULL default ”,
password varchar(60) NOT NULL default ”,
session varchar(32) NOT NULL default ”,
last_visit int(11) NOT NULL,
PRIMARY KEY (ID)
) TYPE=MyISAM;
#
# Dumping data for table ‘book_auth’
#
INSERT INTO book_auth VALUES (1,’test’,'773359240eb9a1d9′,’80c1b50318676c8f324c985b94ac780a’,1013100791);
And den, your username will be “test” and password “123″. Log in and change it. :)
UPDATE, AUG 31, 2005: I “upgraded” to Carbonize’s Lazarus Guestbook, which will upgrade your old Advanced Guestbook database, and is supposed to protect against spammers. Thanks, Carbonize! (the very same one who has posted comments here)
Someone just gave me this link. I’d just like to point out that there is no need for people to upgrade as patching the exploit is simple. The instuctions aer on my forum along with a simple anti spam method and other modifications. I have also posted them on the Proxy2 forum.
I know this is an old post but in case anyone reads it. There is no need t upgrade from 2.2 to 2.3.1 as it is simple to fix the login exploit. Instructions can be found on my forum or the proxy2 forum.
BTW a Google search fo carbonize puts me at number 1. this in reference to your recent post.
I tried Eric’s method first. I can login but then when i try to go to any of the admin sections, it takes me back out to the admin login screen. I keep going in circles.
Carbonize, I managed to use your fix to keep another of my clients guest book from getting hacked, thanks. It was just in time, I had just received a notification email and the hacker had already posted 1 guestbook entry and i’m guessing he/she was on their way to destroying the whole book. I beat them though. Thanks again.
Any suggestions on the other. I can login with test and 123 but like I said before, it just takes me in circles. Thanks for all the help.
Hey there Eric,
Thanks for the guestbook fix. Having the sam issue as a previous poster. The Login loop. Loging gets me to the initial admin screen, but choosing any options pops back out to the login. Any suggestions to complete the fix? Much appreciated.
I am neither an administrator nor a geek, but I fixed the lamebrains who ketp trying to hack into my advanced guestbook. It was pretty simple: I changed the name of the directory and made sure the links on my homepage pointed to the guestbook page. You can change the name of the folder to anything you want. The instructions on the hackers’ pages tell them to look for “/guestbook/admin.php” or whatever. Put in a redirect so that they land on the nastiest web page you know of that will start downloading scumware onto their little computers. Oh, and I did change guestbooks completely, using a non-intuitive folder name, but the dirtbags kept trying to access the guestbook folder that had long since been deleted. The result? The attempts to access have stopped, and I betche my web site name has been removed from the hackers’ pages.
good solution!