Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Move and or Rename config.php Details »»
Move and or Rename config.php
Version: 1.0.1, by Protoman Protoman is offline
Developer Last Online: May 2011 Show Printable Version Email this Page

Version: 3.5.x Rating:
Released: 11-06-2005 Last Update: 04-18-2006 Installs: 11
Code Changes  
No support by the author.

What does this do?
This mod allows you to move your config.php file for added security.

Version Compatibility
3.5.4+, 3.6.0 Gold+


4/18/2006 - 1.0.1 update
fixes for file changes in the newest version of diagnostic.php, no other changes

I take no credit for this mod by Zachery and have ported it with permission.
vb 3.0.x version here

file edits:2


Quote:
Originally Posted by Zachery
Downsides?

At the moment, during the install / upgrade sequence you will need to move config.php back.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 06-30-2006, 04:55 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How exactly does this contribute to security? If your server is correctly configured then noone would have access to the file anyway.
Reply With Quote
  #13  
Old 06-30-2006, 08:16 PM
Protoman's Avatar
Protoman Protoman is offline
 
Join Date: Jan 2005
Posts: 237
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

exactly. and when they decide to upgrade your server and php wont start for some BS reason it just spits out the source code of any files, which has happened to me before.
Reply With Quote
  #14  
Old 06-30-2006, 08:18 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, in that case, it would still be possible to identify where config.php is located, just by looking at the source. The only solution is to change the host.
Reply With Quote
  #15  
Old 07-01-2006, 03:31 PM
raramomo raramomo is offline
 
Join Date: Jan 2006
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hello thank you very much I just try it but there are some errors

Code:
In 'includes/class_core.php'
======
 Find
======
include(CWD . '/includes/config.php');

==============
 Replace With
==============

include(CWD . '/PATH/TO/YOUR/config.php');


======
 Find
======

if (file_exists(CWD. '/includes/config.php'))

==============
 Replace With
==============

if (file_exists(CWD . '/PATH/TO/YOUR/config.php'))
Reply With Quote
  #16  
Old 07-01-2006, 04:38 PM
Protoman's Avatar
Protoman Protoman is offline
 
Join Date: Jan 2005
Posts: 237
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

CWD would only be useful if you are renaming the config.php and not moving it. otherwise CWD would cause errors because you're calling the file from outside the current directory.

you can add the CWD if you want to keep the /file/path shorter, but if outside of /includes/ it will cause problems.
Reply With Quote
  #17  
Old 11-04-2006, 08:12 AM
greyhat greyhat is offline
 
Join Date: Nov 2006
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Personally I consider the config.php to be vbulletin's biggest security problem. If the file can be read (and I believe it requires the httpd to have read and execute, please correct me if I'm wrong).As if you know the user/pass for MySQL an attacker can connect to the database and get up to all sorts of mischief.

I'd like to encrypt (not just encode) config.php but any product that'll do this costs a few hundred $$ if not more.

If config.php is renamed and put in a dir with only execute on it, it'll stop anyone finding it easily if PHP safe mode is on as well.

If the file can be read by an attacker they can connect to the database then create themselves an admin user or alter an admin user's password hash in MySQL.

Works great in 3.6.2
Reply With Quote
  #18  
Old 11-25-2006, 09:13 PM
Gbml2u's Avatar
Gbml2u Gbml2u is offline
 
Join Date: Mar 2006
Location: Inside
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i have a question

what is " /PATH/TO/YOUR/CONFIGDIR " ?
I mean full path (home/user/configdir - outsite public HTML ) or short path (/configdir - inside publicHTML )
Reply With Quote
  #19  
Old 11-26-2006, 07:15 PM
Protoman's Avatar
Protoman Protoman is offline
 
Join Date: Jan 2005
Posts: 237
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you want the full path outside the web root
so /home/user/configdir/
Reply With Quote
  #20  
Old 09-30-2008, 06:32 PM
Quarterbore Quarterbore is offline
 
Join Date: Mar 2005
Location: Valley Forge PA
Posts: 538
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by greyhat View Post
Personally I consider the config.php to be vbulletin's biggest security problem. If the file can be read (and I believe it requires the httpd to have read and execute, please correct me if I'm wrong).As if you know the user/pass for MySQL an attacker can connect to the database and get up to all sorts of mischief.

I'd like to encrypt (not just encode) config.php but any product that'll do this costs a few hundred $$ if not more.

If config.php is renamed and put in a dir with only execute on it, it'll stop anyone finding it easily if PHP safe mode is on as well.

If the file can be read by an attacker they can connect to the database then create themselves an admin user or alter an admin user's password hash in MySQL.

Works great in 3.6.2
I have been studing hacker's tools and there are a number of them that are purpost built fo get a config file and try to find the password and username. Then, I have seen scripts go one step further and try using the Usename and Password to access cpanel!

Anybody with a cpanel username or password that can be figured out by your database connections would be very wise to evaluate that cpanel password based on what I have seen.

The problem is these hackers just need to find one file that lets them upload a script and then they can get access to your config files and from there they get your database. If they can get FTP or CPANEL access too, well damn your are going to get hurt!

Hiding config files looks like a good idea to me the more I try to study the tools hackers use.

I am working on a project to look for fulnerable situations as well as scan for potential hacker scripts that could be on your server. I have quite a bit more to do but I found this thread looking for things I need to include in the script. In essense, I have a server side spider that can be installed in any directory including those by .htaccess permissions and the goal is to identify hacker tools when they are installed as well as potentially identify scripts that hackers might get if they managed to get a file on your server.

Oh well, I am tagging this as I want to change my config locations.
Reply With Quote
  #21  
Old 10-14-2008, 11:47 PM
Say3 Say3 is offline
 
Join Date: May 2008
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i have changed my config.php dir , after that the home page ( VBadvanced ) get white blank ?

VbSeo Not Working , i have fix VbSeo but don't know how to fix VbAdvanced ? can you help plz ?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:12 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04504 seconds
  • Memory Usage 2,307KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete