boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Security hole in last official b2 releases

 
Post new topic   Reply to topic    boardom Forum Index -> Announcements
View previous topic :: View next topic  
Author Message
michel v
Site Admin


Joined: 25 Jan 2002
Posts: 799
Location: Corsica

PostPosted: Fri May 23, 2003 1:02 am    Post subject: Security hole in last official b2 releases Reply with quote

There is a little security hole in the files gm-2-b2.php and blogger-2-b2.php in the b2tools/ directory.
I say "Little" because it's quite easy to correct, a correction will be done on CVS and a new release made shortly.

In the meanwhile, delete gm-2-b2.php and blogger-2-b2.php or do the following modifications in these files.

In gm-2-b2.php and blogger-2-b2.php, find this line: [php:1:86c891620c]include("b2config.php");[/php:1:86c891620c] and replace it with this line: [php:1:86c891620c]require('b2config.php');[/php:1:86c891620c]
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
allusion



Joined: 16 Jun 2002
Posts: 73
Location: Houston

PostPosted: Fri May 23, 2003 3:20 am    Post subject: Reply with quote

And of course if you're not using these files there's no real reason to keep them around after installation.
_________________
Matthew Mullenweg
Wordpress
Back to top
View user's profile Send private message Visit poster's website AIM Address
lcf



Joined: 05 May 2003
Posts: 92
Location: Malaysia

PostPosted: Fri May 23, 2003 5:11 am    Post subject: Reply with quote

Quote:
I say "Little" because it's quite easy to correct, a correction will be done on CVS and a new release made shortly.


Wow! I can't wait for it! Very Happy
_________________
LcF
http://weblog.lcfwebsite.com
Back to top
View user's profile Send private message Visit poster's website
mikelittle



Joined: 11 May 2002
Posts: 376
Location: UK

PostPosted: Wed Jun 04, 2003 1:47 am    Post subject: More security problems. Reply with quote

There have been another couple of security problems posted on the bugtraq mailing list.
Quote:

"b2 0.6.1 with ljupdate" allow remote command execution in
./b2-include/b2functions.php. A malicious user can inject an url in $b2inc,
and obtain command execution with web server privileges ( usually nobody ).

"b2 0.6.2 and prior" allow sql injection in ./blog.header.php. $posts isn´t
convert to integer, so we can inject a sql in this variable. In MySQL 4.x
UNION and subselects can be used to obtain privileges.

"b2 0.6.2 and prior" has a little flaw. Bored users can force server to read
a remote file using $b2inc in ./b2-include/b2menutop.php


I don't have access to the code to fix the first issue.

The second issue has been fixed in CVS. It is a simple change:
File blog.header.php line 69:
Code:

if ($posts)
   $posts_per_page=$posts;

should be changed to
Code:

if ($posts) {
    $posts = (int)$posts;
   $posts_per_page=$posts;
}


The third has also been fixed in CVS.
File b2-include/b2menutop.php line 32
Code:

$menu = file($b2inc."/b2menutop.txt");

becomes
Code:

require_once("b2config.php");
$menu = file($b2inc."/b2menutop.txt");

Note this will cause an error if the file is loaded on its own. But that's ok it should only be included.


Mike
_________________
Mike Little
http://zed1.com/journalized/
"Share what you know. Learn what you don't."
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
cjc



Joined: 24 Dec 2002
Posts: 146
Location: New York

PostPosted: Wed Jun 04, 2003 3:24 am    Post subject: Re: More security problems. Reply with quote

mikelittle wrote:
There have been another couple of security problems posted on the bugtraq mailing list.
Quote:

"b2 0.6.1 with ljupdate" allow remote command execution in
./b2-include/b2functions.php. A malicious user can inject an url in $b2inc,
and obtain command execution with web server privileges ( usually nobody ).


I don't have access to the code to fix the first issue.


The fix is like the last one:

near the end of the b2-include/b2functions.php file, there is a line like:
Code:
require_once($b2inc."/lj_update.php");


Change this to:
Code:

require_once("b2config.php");
require_once($b2inc."/lj_update.php");


I'm not sure if these problems should be characterized as "little". Yes, they're easy to fix, but not fixing them can have serious consequences. There's a thread in the "Chat Away" forum where someone details his experience of being hacked because of the gm-2-b2.php problem. It should be noted that having php configured to be "register globals" off will stop this exploit, too.
Back to top
View user's profile Send private message Visit poster's website
Mister44



Joined: 31 Oct 2002
Posts: 237
Location: Philadelphia, PA, USA

PostPosted: Wed Jun 04, 2003 12:58 pm    Post subject: Reply with quote

For LjUpdate users, it's far better to update to the latest version... This was fixed two months ago according to my cvs logs.
Back to top
View user's profile Send private message Visit poster's website
michel v
Site Admin


Joined: 25 Jan 2002
Posts: 799
Location: Corsica

PostPosted: Wed Jun 18, 2003 10:59 pm    Post subject: Reply with quote

Mister44, please PM/email me with your Sourceforge ID so I can add you to the people able to do releases.
This way you can just release new versions of b2+ljupdate on the Sourceforge page. Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Sigg3



Joined: 03 Jul 2003
Posts: 760
Location: Oslo, Norway

PostPosted: Fri May 28, 2004 11:22 am    Post subject: Reply with quote

My webpage got de-faced today, and my host says that it's probably because of the security hole in b2..

Thank God for my host taking backups every 24th hour!

See the de-faced page over at:
http://www.sigg3.net/~blog/explore/index.php?action=view&filename=sigg3hacked.JPG&directory=&
Intelligence is everything
lol!
_________________
VOTE for Female of the Year 2004 NOW!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Announcements All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2 © 2001, 2002 phpBB Group