Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 05:29:40 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155544 Posts in 21714 Topics by 7736 Members
Latest Member: chris85
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: A vulnerability in WB ?  (Read 836 times)
mylesk42

Offline Offline

Posts: 120



WWW
« on: April 19, 2011, 10:25:31 PM »

Hi,
I've just read this topic about WB 281 : http://www.htbridge.ch/advisory/multiple_path_disclosure_in_websitebaker.html

Regards
Logged
pcwacht
AddOn Development
*
Offline Offline

Posts: 2858



WWW
« Reply #1 on: April 20, 2011, 07:36:53 AM »

Hmm missing startline wich checks if user is logged in
Code:
// Must include code to stop this file being access directly
if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }

in these files:
http://[host]/modules/code/add.php
http://[host]/modules/code/delete.php
http://[host]/modules/code/modify.php
http://[host]/modules/code/view.php
http://[host]/modules/form/add.php
http://[host]/modules/form/delete.php

 
There might be more files wich lacks this simple check!


John
Logged

http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....
mylesk42

Offline Offline

Posts: 120



WWW
« Reply #2 on: April 20, 2011, 11:22:04 AM »

Well, seems so serious and must be updated soon ?
Regards
Logged
DarkViper
Development Team
*****
Offline Offline

Posts: 1253


« Reply #3 on: April 20, 2011, 11:47:02 AM »

must of are already fixed for the next packet of 2.8.2
Logged

Anleitungen lesen und selber nachdenken ist anstrengend...  Da lass ich doch lieber andere für mich denken...

In 1984:  Nineteen Eighty-Four is a unrealistic utopia!!
In 2012:  Nineteen Eighty-Four is a little piece only of our reality!!
mylesk42

Offline Offline

Posts: 120



WWW
« Reply #4 on: April 20, 2011, 12:39:29 PM »

Yes, very good. But is there a quick fix (files to be modified) to resolve the problem while waiting for the new release ?
Regards
Logged
DarkViper
Development Team
*****
Offline Offline

Posts: 1253


« Reply #5 on: April 20, 2011, 12:49:46 PM »

see the previous post from John.
insert that line only at top of the files. It will fix 99%.
Logged

Anleitungen lesen und selber nachdenken ist anstrengend...  Da lass ich doch lieber andere für mich denken...

In 1984:  Nineteen Eighty-Four is a unrealistic utopia!!
In 2012:  Nineteen Eighty-Four is a little piece only of our reality!!
PurpleEdge

Offline Offline

Posts: 232



WWW
« Reply #6 on: April 21, 2011, 03:39:15 AM »

http://www.htbridge.ch/advisory/multiple_sql_injections_in_websitebaker.html
Logged
fischstäbchenbrenner

Offline Offline

Posts: 271



« Reply #7 on: April 21, 2011, 09:19:11 AM »

Simple question:
if WB_PATH is not defined, then also TABLE_PREFIX, page_id, section_id is not defined.

So what can one do with this?
Logged

Burn, baby, burn!
DarkViper
Development Team
*****
Offline Offline

Posts: 1253


« Reply #8 on: April 21, 2011, 11:02:24 AM »

Simple question:
if WB_PATH is not defined, then also TABLE_PREFIX, page_id, section_id is not defined.
So what can one do with this?

HTB22929: Multiple Path disclosure:::
a remote user can identify the real physical path on the server. The risk is low, but it's a good, helpful information for a professional attacker.

HTB22928: Multiple SQL Injections:::
very dangerously. a remote user can modify / destroy your whole database.

but don't worry. most of this was fixed some month ago in WB2.8.1 and all in WB2.8.2
Logged

Anleitungen lesen und selber nachdenken ist anstrengend...  Da lass ich doch lieber andere für mich denken...

In 1984:  Nineteen Eighty-Four is a unrealistic utopia!!
In 2012:  Nineteen Eighty-Four is a little piece only of our reality!!
NorHei
Forum administrator
*****
Offline Offline

Posts: 485



WWW
« Reply #9 on: April 21, 2011, 12:13:44 PM »

Quote
Simple question:
if WB_PATH is not defined, then also TABLE_PREFIX, page_id, section_id is not defined.
So what can one do with this?

You can do something like this:
Code:
if (strstr(__FILE__,$_SERVER['PHP_SELF']) == $_SERVER['PHP_SELF'])
{header("HTTP/1.1 301 Moved Permanently"); header("Location: http://$_SERVER[SERVER_NAME]"); die();}

If you dont like the redirect , you can simply exit() or die().
Logged

It is easier to change the specification to fit the program than vice versa.
instantflorian
Betatester
*
Offline Offline

Posts: 804



WWW
« Reply #10 on: April 28, 2011, 01:05:42 PM »

Hi,

@DarkViper: in which revision it was fixed?

@norhei:
Your Code:
Code:
if (strstr(__FILE__,$_SERVER['PHP_SELF']) == $_SERVER['PHP_SELF'])
{header("HTTP/1.1 301 Moved Permanently"); header("Location: http://$_SERVER[SERVER_NAME]"); die();}
Is this a patch? Where should the code lines be added?

@moderator: I think this topic should be moved to the security announcement section of this forum.

BR
-instantflorian.
Logged
NorHei
Forum administrator
*****
Offline Offline

Posts: 485



WWW
« Reply #11 on: April 28, 2011, 02:33:04 PM »

You can use it instead of :
Quote
// Must include code to stop this file being access directly
if(defined('WB_PATH') == false) { exit("Cannot access this file directly");


Its independent from  any WB defined constants or variables.
« Last Edit: May 10, 2011, 03:07:55 PM by Argos » Logged

It is easier to change the specification to fit the program than vice versa.
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!