In-My-Opinion.org

»How to protect your phpBB forum against hackers«







No more tipps so far

posted by knn
  

in-my-opinion.org -> Technology, Computers, Science, Internet -> Software by the admin -> How to protect your phpBB forum against hackers

TIP 5 QUESTION



You say to FIND:

if ( $auto_create )
        { 



I cant find that (version 2.0.21)
I CAN find:

else if (!$auto_create)
        { 



is this the same thing? Set your George Michael free

Thanks


posted by Sippenhaft
  Rebellion is the only way to reform!



No, it's not the same.

posted by knn
  



So, what is one to do...or is this tip not necessary anymore due to the new versions and updates by phpbb?

posted by Sippenhaft
  

Is TIP 5 still valid?



I want to use this tip, but can find the line of code you say to find.
Is this tip not needed anymore since I have updated to 2.0.21?
Or do you have an update for this tip? Or is the code there and Im just missing it?

Thanks
Sipp

posted by Sippenhaft
  

Help needed please



Big problem I don't know what to do

Ive used this code:
TIP A: Force an ADDITIONAL login to access the admin panel.

I think one of the best ideas is to password-protect your admin folder.

I have written a .php script that will do that for you.• Upload htaccess-protectthisfolder.zip (see below) into your admin folder and call it.

But now I cant go to my adminpanel in my forum it gives a error:
Forbidden
You don't have permission to access /bdforum/admin/index.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

I have removed the installed .htacces and that other folder that it installed, I even uploaded a new admin folder but it doesnt give me acces I don't know what to do I don't know what to do

Can someone please help me, ive been hacked 4 times within 2 months now (newest phpbb version) and now this problem i'm getting desperate I don't know what to do

I really would like to remove it

Thx in advance for any help.

posted by Tired of being cracked
  



knn:
TIP B: Rename the folder "admin/" to something else. This is ONE OF THE BEST things you can do to keep crackers out.
After doing so you will most probably get an error message the next time you log in. Most probably you will have to • Open "includes/functions.php"
• Update

include($phpbb_root_path . 'admin/
with your new foldername.
• Open "admin/pagestart.php"
• Find

if ($HTTP_GET_VARS['sid'] != $userdata['session_id'])
• Before add:

if ($HTTP_GET_VARS['sid'] != $userdata['session_id'])
{
redirect(append_sid(
basename(dirname($HTTP_SERVER_VARS['PHP_SELF']),"/").'/'.basename($HTTP_SERVER_VARS['PHP_SELF'])
));
}

hmm, i tryid this and now if i use the link to get to the ACP i enter the htachess password and then i have been redirected to login normal as it was before, if i do this, i got an error page with not existing file Sad


posted by chilli
  

Re: Tip 11:Encrypt config.php that contains clear text passw



knn:
A weak point in phpBB installations is that "config.php" contains the database password and the table prefix as clear text = unencoded.

It reads something like

$dbuser 'admin';
$dbpasswd 'abc123';
$table_prefix 'phpbb_'



Usually there is no way someone can view this file, but don't be so sure if there won't be some crack around. Actually there was a bug in PHP recently (not in phpBB but in PHP itself) that made it possible that intruders spy config.php out.

Also, when the %2725 bug hit the internet (see above) intruders could view "config.php" in clear text.

TIP A: I have written a mod that lets you use encrypted values for your phpBB config.php file:
• Download the attachment (see below)
• Upload "secureconfig.php" and "a.php" into the folder where your phpbb forum is located
• Set the attributes of a.php to "world writable" (666)
• Run "secureconfig.php" and replace the three parameters ($dbuser, $dbpasswd, $table_prefix) as "secureconfig.php" tells you when you run it.
• Delete "secureconfig.php"


This security mod encrypts/decrypts the 3 values using the "server path"

$_SERVER['DOCUMENT_ROOT'

as the key.

The server path (= the path where your phpBB is installed) is something like

/home/users/tp1983/forumfolder

and is pretty unique for each phpBB installation. Even on the same server this path differs for each phpBB installation.

Thus EVEN IF AN ATTACKER knows the decryption algorithm (from the attached file a.php) AND knows the encrypted password, he couldn't decrypt anything because the server path is unknown to him.

In other words: It's pretty secure. An intruder would have to find out your server path (which is unlikely unless an attacker has FTP access) AND he would have to know the code of "a.php" (which is unlikely, unless he knows in-my-opinion.org) AND he would need to install "a.php" somewhere AND he would have to modify it a bit.

Please note: If your path changes then you have to rerun the program.
• Open "config.php"
• Type in the clear text (= unencoded values) for the three parameters ($dbuser, $dbpasswd, $table_prefix)
• Upload "secureconfig.php" and "a.php" again
• Rerun "secureconfig.php"


TIP B: Don't use the same password for your database as you use for your FTP login or for phpBB login.

Make sure, when you edit your config.php, that the last line does not contain any character (not even a space or a newline) and contains only 2 characters:

?> 


Hello, i have uploaded a.php(chmoded to 666) and secureconfig.php, then i run the secureconfig.php but it isays an error that the script ant get to the a.php Sad i have both files in the main forum folder...


posted by chilli
  



to the secureconfig.php problem, OK i have now run the file and it generated the ecrypted things, i have added it to the config.php but it is not working, i got error "could not connect to the database"

Could it be because i have moved config.php to another directory for security?

posted by chilli
  



Hello,

so i have tested this secureconfig and i have decrypted it on my another forum and it still doesnt works, is it good? i mean the mod Sad it works for someone?

posted by chilli
  



sorry, not decrypted, i have encrypted Smile

posted by chilli
  



omg, does anybody read this? Sad Rolling Eyes

posted by chilli
  



It works on my board. Thumb Up

I don't think you should be moving the config file to another folder...that may be your problem...

posted by Sippenhaft
  

Help needed with a.php and/or uninstall the whole encrypt



It works on my board too, but now I need something new.. a portal - can I make Encrypt your config.php to work with portals like MKportal or ez portal?

MKportal says: Fatal error: Cannot redeclare ech0() (previously declared in /my/path/to/forums/a.php:16) in /my/path/to/forums/a.php on line 16

So do I have to decrypt my config, or is there any other way to make my phpBB work with MKportal or some other portal, like ez_portal.. I learned something new, I guess

posted by Coach_
  

hacker inserts users into users table



hi, is there a solution for this, as someone is periodically inserting 50-100 users into my users table (dumbly called phpbb_users). I managed to stop him to post into forums, but i can't seem to stop this! pls help.

Nicolas

posted by supaK
  



Goto page Previous  
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15  Next

Reply to topic
Goto page Previous  
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15  Next






RegisterRegister
Log inLog in
The time now is 6 July 2008, 04:20
php B.B.