You are not logged in.

#1 2009-03-01 12:25 am

mxsquid
Member
Registered: 2009-02-28
Posts: 8

On scanner.php

Complete newbie questions.

I made the changes to the php to incorporate phpbb3 and my own site forum path (I thought).   

My remote phpbb3 site is http://megamata.com/forum

In scanner.php I set

$path_to_config = "/var/www/forum/config.php"
$path_to_logfile = "/var/www/forum/scanner.log"

I uploaded (FTP'd) scanner.php with the changes and the script died with

ERROR: could not open/write log file

when I typed in http://megamata.com/forum/scanner.php

Thanks for your site, I'm being bombarded with spambots suddenly.

Offline

#2 2009-03-01 1:14 am

MysteryFCM
Member
From: Tyneside, UK
Registered: 2008-01-16
Posts: 606
Website

Re: On scanner.php

You need to ensure the .log file has the necessary permissions for the server to write to it (usually 777 as it's a Linux server).

Since you're running phpBB3, you may want to take a look at the following too wink

http://temerc.com/forums/viewtopic.php?f=71&t=6175

.. and welcome to SFS smile


Regards
Steven Burn
I.T. Mate / hpHosts
it-mate.co.uk / hosts-file.net

Offline

#3 2009-03-01 5:43 pm

mxsquid
Member
Registered: 2009-02-28
Posts: 8

Re: On scanner.php

Thanks for the reply MysteryFCM, I will be reading your site info.

In my case http://megamata.com/forum required the following code:

$path_to_config = "/home/megamata/public_html/forum/config.php";
$path_to_logfile = "/home/megamata/public_html/forum/scanner.log";

The answer lay in discovering the path name for the current file (megamata.com/forum/scanner.php in this case) as explained on the PHP script documented on the following link.

http://www.bin-co.com/php/articles/curr … e_path.php

I'm still not understanding what causes scanner.php to be run automatically.

Thanks for the welcome!

Offline

#4 2009-03-01 5:57 pm

diabolic.bg
Member
From: Bulgaria, Eastern Europe
Registered: 2008-11-03
Posts: 589
Website

Re: On scanner.php

Hey, mxsquid,
NEVER don't post your path to config.php even in private forums.
Every hacker will be happy.

If you don't know, all your password are in config.php in plain text.

Last edited by diabolic.bg (2009-03-01 6:02 pm)


Funiest jokes and pics

Offline

#5 2009-03-01 6:10 pm

zaphod
Jägermonster
From: USA
Registered: 2008-11-22
Posts: 2,985
Website

Re: On scanner.php

True, but unless they can pop the PHP execution, or include it as textual content, it's unreadable.

Safest bet, is have it include (php must be running so it's safe), another .php from outside the webserver root that actually has the variable setting codes in it.

In other words, change config.php into a wrapper for the real file which is stored in another location.

Zap smile

Last edited by zaphod (2009-03-01 6:11 pm)


Get Protected, Stay Protected...
With ZB Block, GNU/GPL Freeware Anti-Spam/Anti-Hack protection for your php based website.

Little boxes in the server farm, little boxes running php...

Offline

#6 2009-03-01 6:22 pm

diabolic.bg
Member
From: Bulgaria, Eastern Europe
Registered: 2008-11-03
Posts: 589
Website

Re: On scanner.php

Excellent advice, Zap!
I hid my config.php before many time, block access with .htaccess fiile and now can sleep calm. lol

Last edited by diabolic.bg (2009-03-01 6:27 pm)


Funiest jokes and pics

Offline

#7 2009-03-01 6:27 pm

zaphod
Jägermonster
From: USA
Registered: 2008-11-22
Posts: 2,985
Website

Re: On scanner.php

Well, if you really think ya got some retards scrambling for your config.php file, you can have it set false variables in it, and hope they never notice the include at the bottom that then re-sets the variables to their correct values.

But that's just being cruel to the skiddies.

Evil has a name, and it's,
Zap tongue


Get Protected, Stay Protected...
With ZB Block, GNU/GPL Freeware Anti-Spam/Anti-Hack protection for your php based website.

Little boxes in the server farm, little boxes running php...

Offline

#8 2009-03-01 6:33 pm

diabolic.bg
Member
From: Bulgaria, Eastern Europe
Registered: 2008-11-03
Posts: 589
Website

Re: On scanner.php

I'm protected with ZB Block. wink
Cheers! lol


Funiest jokes and pics

Offline

#9 2009-03-01 6:49 pm

mxsquid
Member
Registered: 2009-02-28
Posts: 8

Re: On scanner.php

Ok, now you've got me worried.  Like I said I'm new at the technology and the use of "wrappers" to hide the real location of config.php. 

It seems to me that standard phpbb3 puts config.php in the same path location as index.php, so reading anyone's config is straightforward.  The password is encrypted so hacking into the site isn't all that easy.

Am I missing something?

What would you recommend I do now that I may have compromised my site?

Thanks in advance for your help.

Offline

#10 2009-03-01 7:11 pm

MysteryFCM
Member
From: Tyneside, UK
Registered: 2008-01-16
Posts: 606
Website

Re: On scanner.php

Just to be clear, you have NOT compromised your site by leaving config.php in the web root. The attacker would need a way to read the actual content of config.php, which is very unlikely unless you've told your web server to allow such (you can verify this by pointing your browser to the config.php file - if it's not been told to display it's content, you'll see a blank page).


Regards
Steven Burn
I.T. Mate / hpHosts
it-mate.co.uk / hosts-file.net

Offline

Board footer

Powered by FluxBB

Close
Close