Unix Technical Forum

PHP 4, 5, or neither?

This is a discussion on PHP 4, 5, or neither? within the comp.unix.bsd.openbsd.misc forums, part of the OpenBSD category; --> I need to install PHP on my system for a web app. The web app can work with either ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > comp.unix.bsd.openbsd.misc

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-16-2008, 07:50 AM
dave
 
Posts: n/a
Default PHP 4, 5, or neither?

I need to install PHP on my system for a web app.
The web app can work with either PHP4 or PHP5.
My impression is that PHP has a reputation for weak security.
Which of PHP4 / PHP5 is more secure? Or are both bad news?

Thanks,
Dave Feustel
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-16-2008, 07:50 AM
Joachim Schipper
 
Posts: n/a
Default Re: PHP 4, 5, or neither?

dave <daf@a64.comcast.net> wrote:
> I need to install PHP on my system for a web app.
> The web app can work with either PHP4 or PHP5.
> My impression is that PHP has a reputation for weak security.
> Which of PHP4 / PHP5 is more secure? Or are both bad news?


Both are probably bad news, but the 5.x series is more regularly updated
in OpenBSD, and also includes some patches that should enhance security
(hardened-php in 4.0's -hardened flavour, suhosin in -current, IIRC).

Joachim
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-16-2008, 07:50 AM
dave
 
Posts: n/a
Default Re: PHP 4, 5, or neither?

Joachim Schipper <joachim@melpomene.jschipper.dynalias.net> wrote:
> dave <daf@a64.comcast.net> wrote:
>> I need to install PHP on my system for a web app.
>> The web app can work with either PHP4 or PHP5.
>> My impression is that PHP has a reputation for weak security.
>> Which of PHP4 / PHP5 is more secure? Or are both bad news?

>
> Both are probably bad news, but the 5.x series is more regularly updated
> in OpenBSD, and also includes some patches that should enhance security
> (hardened-php in 4.0's -hardened flavour, suhosin in -current, IIRC).
>
> Joachim


Thanks for the info. The web app that I'm interested in is Zoneminder, a
comprehensive video security application. Zoneminder uses both mysql and
php, either 4 or 5. I am not eager to install php. I am considering the
alternative of building my own much simpler video security application
using videod, fwtv and scripting tools.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-16-2008, 07:50 AM
Josh Grosse
 
Posts: n/a
Default Re: PHP 4, 5, or neither?

On Mon, 19 Feb 2007 07:25:20 -0600, dave wrote:

> Thanks for the info. The web app that I'm interested in is Zoneminder, a
> comprehensive video security application. Zoneminder uses both mysql and
> php, either 4 or 5. I am not eager to install php. I am considering the
> alternative of building my own much simpler video security application
> using videod, fwtv and scripting tools.


If php is used only for the application's management interface, you can
reduce your risk by NOT allowing that management interface to be accessed
from the internet.

--
Replying directly will get you locally blacklisted.
Change the address; use my first name in front of the @ if you want to
communicate privately.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-16-2008, 07:50 AM
Clever Monkey
 
Posts: n/a
Default Re: PHP 4, 5, or neither?

dave wrote:
> Joachim Schipper <joachim@melpomene.jschipper.dynalias.net> wrote:
>> dave <daf@a64.comcast.net> wrote:
>>> I need to install PHP on my system for a web app.
>>> The web app can work with either PHP4 or PHP5.
>>> My impression is that PHP has a reputation for weak security.
>>> Which of PHP4 / PHP5 is more secure? Or are both bad news?

>> Both are probably bad news, but the 5.x series is more regularly updated
>> in OpenBSD, and also includes some patches that should enhance security
>> (hardened-php in 4.0's -hardened flavour, suhosin in -current, IIRC).
>>

> Thanks for the info. The web app that I'm interested in is Zoneminder, a
> comprehensive video security application. Zoneminder uses both mysql and
> php, either 4 or 5. I am not eager to install php. I am considering the
> alternative of building my own much simpler video security application
> using videod, fwtv and scripting tools.


This is a serious question: how do you know your home-made solution
would not have holes of its own? The Intertubes are littered with the
dead bodies of home-grown projects that were considered safe before
falling apart. Security is hard to get right.

There are hardened PHP5 packages that go through some source-level
auditing, and include all known security issues of merit. These also
get updated as the package maintainer folds solutions to newly
discovered security problems into the package.

As suggested else-thread, you must assess, first, what your threat
profile is. How available is this service, and to whom?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-16-2008, 07:50 AM
dave
 
Posts: n/a
Default Re: PHP 4, 5, or neither?

Clever Monkey <clvrmnky.invalid@hotmail.com.invalid> wrote:
> dave wrote:
>> Joachim Schipper <joachim@melpomene.jschipper.dynalias.net> wrote:
>>> dave <daf@a64.comcast.net> wrote:
>>>> I need to install PHP on my system for a web app.
>>>> The web app can work with either PHP4 or PHP5.
>>>> My impression is that PHP has a reputation for weak security.
>>>> Which of PHP4 / PHP5 is more secure? Or are both bad news?
>>> Both are probably bad news, but the 5.x series is more regularly updated
>>> in OpenBSD, and also includes some patches that should enhance security
>>> (hardened-php in 4.0's -hardened flavour, suhosin in -current, IIRC).
>>>

>> Thanks for the info. The web app that I'm interested in is Zoneminder, a
>> comprehensive video security application. Zoneminder uses both mysql and
>> php, either 4 or 5. I am not eager to install php. I am considering the
>> alternative of building my own much simpler video security application
>> using videod, fwtv and scripting tools.

>
> This is a serious question: how do you know your home-made solution
> would not have holes of its own? The Intertubes are littered with the
> dead bodies of home-grown projects that were considered safe before
> falling apart. Security is hard to get right.
>
> There are hardened PHP5 packages that go through some source-level
> auditing, and include all known security issues of merit. These also
> get updated as the package maintainer folds solutions to newly
> discovered security problems into the package.
>
> As suggested else-thread, you must assess, first, what your threat
> profile is. How available is this service, and to whom?


It's available to me when I activate it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-16-2008, 07:50 AM
Clever Monkey
 
Posts: n/a
Default Re: PHP 4, 5, or neither?

dave wrote:
> Clever Monkey <clvrmnky.invalid@hotmail.com.invalid> wrote:
>> dave wrote:
>>> Joachim Schipper <joachim@melpomene.jschipper.dynalias.net> wrote:
>>>> dave <daf@a64.comcast.net> wrote:
>>>>> I need to install PHP on my system for a web app.
>>>>> The web app can work with either PHP4 or PHP5.
>>>>> My impression is that PHP has a reputation for weak security.
>>>>> Which of PHP4 / PHP5 is more secure? Or are both bad news?
>>>> Both are probably bad news, but the 5.x series is more regularly updated
>>>> in OpenBSD, and also includes some patches that should enhance security
>>>> (hardened-php in 4.0's -hardened flavour, suhosin in -current, IIRC).
>>>>
>>> Thanks for the info. The web app that I'm interested in is Zoneminder, a
>>> comprehensive video security application. Zoneminder uses both mysql and
>>> php, either 4 or 5. I am not eager to install php. I am considering the
>>> alternative of building my own much simpler video security application
>>> using videod, fwtv and scripting tools.

>> This is a serious question: how do you know your home-made solution
>> would not have holes of its own? The Intertubes are littered with the
>> dead bodies of home-grown projects that were considered safe before
>> falling apart. Security is hard to get right.
>>
>> There are hardened PHP5 packages that go through some source-level
>> auditing, and include all known security issues of merit. These also
>> get updated as the package maintainer folds solutions to newly
>> discovered security problems into the package.
>>
>> As suggested else-thread, you must assess, first, what your threat
>> profile is. How available is this service, and to whom?

>
> It's available to me when I activate it.


Is this who you want it available to, or is it also available to others?

If this service is on your net but is accessible by the internet at
large, then you have made that service "available" to everyone here.

If this is a web service, then you have to consider what other
user-agents, and from where, might have access to the service. This is
the first level of the threat consideration.

i.e., Who has access?

Then you have to determine the vectors of attack those connections can
leverage to subvert your service.

i.e., What can these people do with this access.

The answers to this last question can be many and complicated. Start by
answering the first one _properly_ first to determine the scope of the
second question.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-16-2008, 07:50 AM
Joachim Schipper
 
Posts: n/a
Default Re: PHP 4, 5, or neither?

Clever Monkey <clvrmnky.invalid@hotmail.com.invalid> wrote:
> dave wrote:
>> Clever Monkey <clvrmnky.invalid@hotmail.com.invalid> wrote:
>>> dave wrote:
>>>> Joachim Schipper <joachim@melpomene.jschipper.dynalias.net> wrote:
>>>>> dave <daf@a64.comcast.net> wrote:
>>>> The web app that I'm interested in is Zoneminder, a comprehensive
>>>> video security application. Zoneminder uses both mysql and php,
>>>> either 4 or 5. I am not eager to install php. I am considering the
>>>> alternative of building my own much simpler video security
>>>> application using videod, fwtv and scripting tools.
>>> This is a serious question: how do you know your home-made solution
>>> would not have holes of its own? The Intertubes are littered with the
>>> dead bodies of home-grown projects that were considered safe before
>>> falling apart. Security is hard to get right.
>>>
>>> There are hardened PHP5 packages that go through some source-level
>>> auditing, and include all known security issues of merit. These also
>>> get updated as the package maintainer folds solutions to newly
>>> discovered security problems into the package.
>>>
>>> As suggested else-thread, you must assess, first, what your threat
>>> profile is. How available is this service, and to whom?

>>
>> It's available to me when I activate it.

>
> Is this who you want it available to, or is it also available to others?
>
> If this service is on your net but is accessible by the internet at
> large, then you have made that service "available" to everyone here.
>
> If this is a web service, then you have to consider what other
> user-agents, and from where, might have access to the service. This is
> the first level of the threat consideration.
>
> i.e., Who has access?
>
> Then you have to determine the vectors of attack those connections can
> leverage to subvert your service.
>
> i.e., What can these people do with this access.
>
> The answers to this last question can be many and complicated. Start by
> answering the first one _properly_ first to determine the scope of the
> second question.


Just as a suggestion: enable proper, IP-level (pf) security, and don't
use the webserver on the box for anything else (for added paranoia,
don't use any part of the box for anything else, and don't connect it to
any network - this is highly dependent on just how hard it is to get
at all your camera data, and how much you'd care if someone did).

This way, PHP's usual security issues and any bugs in the application
won't matter all that much. Of course, it will be somewhat inconvenient.

Joachim
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:58 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com