[mod] sql vulnerabi...
 
Notifications
Clear all

[mod] sql vulnerability fix

3 Posts
3 Users
0 Reactions
3,405 Views
 Kari
(@jayleesy)
Posts: 21
Eminent Member
Topic starter
 

First, you may want to test if your site is even vulnerable to this, it seems only some versions are affected.

type into your address bar:

http://www.yourpage.com/viewuser.php?uid='select'

If you get any form of a mysql error, then your site is vulnerable to injections.

The fix is:

open header.php
find:


foreach ($_GET as $check_url) {
if ((eregi("<[^>]*script*"?[^>]*>", $check_url)) || (eregi("<[^>]*object*"?[^>]*>", $check_url)) ||
(eregi("<[^>]*iframe*"?[^>]*>", $check_url)) || (eregi("<[^>]*applet*"?[^>]*>", $check_url)) ||
(eregi("<[^>]*meta*"?[^>]*>", $check_url)) || (eregi("<[^>]*style*"?[^>]*>", $check_url)) ||
(eregi("<[^>]*form*"?[^>]*>", $check_url)) || (eregi("([^>]*"?[^)]*)", $check_url)) ||
(eregi(""", $check_url))) {
die (_FATALERROR."  "._POSSIBLEHACK);
}
}

add:

(eregi("", $check_url)) ||

before

(eregi(""", $check_url))) 

Now test your site again, and you should see the hack message.


 
Posted : 17/01/2007 3:28 pm
(@tammy)
Posts: 2577
Member Moderator
 

A different fix will be included in the next update, but this is a good addition as well.


 
Posted : 17/01/2007 3:59 pm
(@becca)
Posts: 553
Honorable Member
 

I believe this has now been fixed in 3.1, I just tested it on my site. Thanks.


 
Posted : 01/02/2007 10:27 am
Share: