Belt (and suspenders?) protection?

This is where youll find security related information.
Discuss Integramod/phpbb security issues here.

Moderator: Integra Moderator

Belt (and suspenders?) protection?

PostAuthor: jwernerny » Tue Aug 29, 2006 5:33 pm

Now that the patches have been stabilzed for a few days, I decided to go back in and fix remove my even more brutal absolute path hack. Okay, the fact that the absolute path was breaking things also had some influence.

I noticed two interesting things.

1. $phpbb_root_path is used two different ways. One way is for machine local access where an absolute directory path on the server will work. The second is a relative path in a URL. 15+ years of writing code says this is a great recipe for disaster.

2. Many files still don't contain the simple
Code: Select all
if ( !defined('IN_PHPBB') ){    die('Hacking attempt');}

block.

Before I go off and stick that code in all of the files, particularly in include, is there something I might break?

Are any of the other files vulnerable?

Did I just tell everyone how to do the next hack?

- John

2.
Last edited by jwernerny on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
User avatar
jwernerny
Members
Members
 
Posts: 87
Likes: 0 post
Liked in: 0 post
Joined: Wed Apr 12, 2006 3:58 am
Cash on hand: 0.00
Location: Fairport, NY

Re: Belt (and suspenders?) protection?

PostAuthor: found it » Wed Aug 30, 2006 2:13 am

I have added that code to all my files in the include folder and have not experianced any problems with my site as of yet...

:mrgreen:
Last edited by found it on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 3:29 am
Cash on hand: 0.00

PostAuthor: Michaelo » Wed Aug 30, 2006 5:20 pm

I a nut shell... If a hacker knows there is a function in a file, its name and params and a way to utilise it to hack by calling it directly, the die hacking attempt code will prevent this from happening...

I have wondered about this many many time, and came to the conclusion that those coder guy in phpBB (and all the other bb's) know best... They have not added it to every file so I guess it is not needed... or perhaps by adding it I could do some harm... Bull add it... at worst you will get an error message down the road and at best it might stop a hack...

One other thing that might prove worthwhile is adding a number to each instance of the 'die hacking', so the report would indicate which file was responsible... As in die("Hacking attempt #24"); incidentally no one will know which file it is except you...

Mike
Last edited by Michaelo on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
Kiss Portal Engine phpbbireland (status: Released)
User avatar
Michaelo
Administrator
Administrator
 
Posts: 1646
Likes: 0 post
Liked in: 0 post
Joined: Sat Mar 11, 2006 5:14 pm
Cash on hand: 0.00
Location: Dublin, Ireland

PostAuthor: found it » Thu Aug 31, 2006 1:10 am

"Michaelo";p="14614" wrote:
One other thing that might prove worthwhile is adding a number to each instance of the 'die hacking', so the report would indicate which file was responsible... As in die("Hacking attempt #24"); incidentally no one will know which file it is except you...

Mike


An excellant idea


I will add it to mine now...

:mrgreen:
Last edited by found it on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 3:29 am
Cash on hand: 0.00


Return to Forum Security

Who is online

Registered users: Bing [Bot], Google [Bot], Helter, Majestic-12 [Bot]