Hard disable some functions in phpBB

Learn about Security for code and servers. Learn how to secure your site and your code. Learn about hacking prevention, finding and identifying exploits, and recognising vulnerabilities. Plus, Weekly Security tips and Tutorials.
Forum rules
Post questions related to security, analyse and learn about vulnerabilities and exploits within code to protect yourself against hackers.

Hard disable some functions in phpBB

Postby Derky » 09 Feb 2009, 13:39

I've hard disabled the template editor and database back-up/restore functionality in phpBB.

To disable the template editor (where admin (founders) can place PHP code in), add this line to your config.php
Code: Select all
@define('PHPBB_DISABLE_ACP_EDITOR', true); 

I never use the phpBB back-up/restore function, so to disable it I've just added a trigger_error into ./includes/acp/acp_database.php
I could also remove the module and delete the file but then (the file) might be added again by a phpBB update.
Code: Select all
trigger_error($user->lang['DISABLED'], E_USER_WARNING); 

So if someone manage to login as a founder, he can't insert php code or get a database dump. :)
User avatar
Derky    
phpBB Team Member
phpBB Team Member
 
Posts: 41
Joined: 11 Jan 2007, 11:17
Location: The Netherlands
Gender: Male
phpBB Knowledge: 9




phpBB Academy at StarTrekGuide
Support STG
Using PayPal Donate

Re: Hard disable some functions in phpBB

Postby 3Di » 09 Feb 2009, 14:37

I filed a bug report about the database backups stored into the 'store' folder, there was not an .htaccess file there just a index.html.

Developers said it should be handled by permissions though, they fixed it putting an .htaccess file there, as per the 3.0.5 incoming version.

I do think that's not enough though, when you download a backup file via ACP it is passed through HTTP afaik. I could probably be wrong, don't know.

:scratch:
Give Peace A Chance.. Pass ON It!
Image
The door that leads to the Glory is very narrow but it is mandatory to be Great to be able to cross it.
------------------------- phpBB wiki in Italiano - partecipa con il tuo contributo -----------------------
User avatar
3Di    
MOD Author
MOD Author
 
Posts: 249
Joined: 22 Apr 2008, 14:09
Location: Italy
Favorite Team: Milan
Gender: Male
phpBB Knowledge: 8

Re: Hard disable some functions in phpBB

Postby Derky » 13 Feb 2009, 14:54

There is already an .htaccess in the store folder in 3.0.4, take a look yourself: http://www.ohloh.net/p/phpbb/download?f ... -3.0.4.zip ;)
User avatar
Derky    
phpBB Team Member
phpBB Team Member
 
Posts: 41
Joined: 11 Jan 2007, 11:17
Location: The Netherlands
Gender: Male
phpBB Knowledge: 9

Re: Hard disable some functions in phpBB

Postby 3Di » 13 Feb 2009, 15:03

Derky wrote:There is already an .htaccess in the store folder in 3.0.4, take a look yourself: http://www.ohloh.net/p/phpbb/download?f ... -3.0.4.zip ;)

Security Tracker wrote: Your ticket's status is "Patch written"

A fix for the issue that you reported has been committed to the source code repository and will be part of the next release. Please verify that the patch has completely addressed the issue. Thank you.


:scratch:

EDIT: it was the fact just the .htaccess file was there but windows servers don't use/allow those files. ;) Sorry.
Give Peace A Chance.. Pass ON It!
Image
The door that leads to the Glory is very narrow but it is mandatory to be Great to be able to cross it.
------------------------- phpBB wiki in Italiano - partecipa con il tuo contributo -----------------------
User avatar
3Di    
MOD Author
MOD Author
 
Posts: 249
Joined: 22 Apr 2008, 14:09
Location: Italy
Favorite Team: Milan
Gender: Male
phpBB Knowledge: 8

Re: Hard disable some functions in phpBB

Postby Derky » 13 Feb 2009, 15:40

Ah yes.. then you're right indeed. :banghead:
User avatar
Derky    
phpBB Team Member
phpBB Team Member
 
Posts: 41
Joined: 11 Jan 2007, 11:17
Location: The Netherlands
Gender: Male
phpBB Knowledge: 9


Return to Security Class

Who is online

Users browsing this forum: No registered users and 1 guest