PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > php.general > Securing PHP
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Securing PHP

Réponse
 
LinkBack Outils de la discussion
Vieux 21/10/2007, 02h00   #1
Grant
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Securing PHP

Hi all,

You've all likely heard this before...."I was hacked..." , "Had register
globals on..." etc etc.

Well, this is true of me as well.

Does anyone know of a site that would a semi professional lock down
php, i.e.

Perhaps how to install phpsuexec,

Jail users to only have the ability to read/write to thier own files and
directories,

php.ini directives that have simiar affect as mentioned above.

Any appreciated.

-Grant
  Réponse avec citation
Vieux 21/10/2007, 02h44   #2
Nathan Hawks
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] Securing PHP

Are you running a multi-user hosting service?

If so you can create include files on a per-user or per-domain basis.
Use the Apache config directive php_value to set your include_path and
open_basedir appropriately for each account; and other options as
desired.

I don't know of a particular site, but that is the config framework that
Plesk uses.

As for building PHP, make sure you run the testing battery ('make test'
after you 'make' and before you 'make install') in order to see how
'hardened' your build is.



On Sat, 2007-10-20 at 21:00 -0400, Grant wrote:
> Hi all,
>
> You've all likely heard this before...."I was hacked..." , "Had register
> globals on..." etc etc.
>
> Well, this is true of me as well.
>
> Does anyone know of a site that would a semi professional lock down
> php, i.e.
>
> Perhaps how to install phpsuexec,
>
> Jail users to only have the ability to read/write to thier own files and
> directories,
>
> php.ini directives that have simiar affect as mentioned above.
>
> Any appreciated.
>
> -Grant
>

  Réponse avec citation
Vieux 21/10/2007, 13h11   #3
Grant
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] Securing PHP

Hi Nathan,

Thanks for taking the time to reply.

Yes, this is a shared server. Each (UNIX) user's home directory is thier
domain name i.e. /home/usersdomainnamehere.com and thier http root is www
i.e. /home/usersdomainnamehere.com/www

I am running apache 2. and mod_php. Most servers are running php 4.x right
now, but we will be upgrading to 5 soon.

Also, apache is running suexec for perl (cgi).

When files are written via ftp and cgi they are owned by the user who logged
in, and in both cases are limited to writing to thier home directory.

In the case of PHP, the files are owned by www.

Should I consider phpsuexec? Or will the apache directives you mentioned
below take care of it?

-Grant

"Nathan Hawks" <nhawks@gmail.com> wrote in message
news:1192931064.2526.30.camel@dk.localdomain...
> Are you running a multi-user hosting service?
>
> If so you can create include files on a per-user or per-domain basis.
> Use the Apache config directive php_value to set your include_path and
> open_basedir appropriately for each account; and other options as
> desired.
>
> I don't know of a particular site, but that is the config framework that
> Plesk uses.
>
> As for building PHP, make sure you run the testing battery ('make test'
> after you 'make' and before you 'make install') in order to see how
> 'hardened' your build is.
>
>
>
> On Sat, 2007-10-20 at 21:00 -0400, Grant wrote:
>> Hi all,
>>
>> You've all likely heard this before...."I was hacked..." , "Had register
>> globals on..." etc etc.
>>
>> Well, this is true of me as well.
>>
>> Does anyone know of a site that would a semi professional lock down
>> php, i.e.
>>
>> Perhaps how to install phpsuexec,
>>
>> Jail users to only have the ability to read/write to thier own files and
>> directories,
>>
>> php.ini directives that have simiar affect as mentioned above.
>>
>> Any appreciated.
>>
>> -Grant
>>

  Réponse avec citation
Vieux 22/10/2007, 16h40   #4
Philip Thompson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] Securing PHP

On 10/20/07, Grant <gpeel@thenetnow.com> wrote:
>
> Hi all,
>
> You've all likely heard this before...."I was hacked..." , "Had register
> globals on..." etc etc.
>
> Well, this is true of me as well.
>
> Does anyone know of a site that would a semi professional lock down
> php, i.e.
>
> Perhaps how to install phpsuexec,
>
> Jail users to only have the ability to read/write to thier own files and
> directories,
>
> php.ini directives that have simiar affect as mentioned above.
>
> Any appreciated.
>
> -Grant




One resource: http://phpsec.org/

~Philip

  Réponse avec citation
Vieux 22/10/2007, 16h50   #5
Greg Donald
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] Securing PHP

On 10/22/07, Philip Thompson <philthathril@gmail.com> wrote:
> One resource: http://phpsec.org/


I find it very ful to look at the actual exploits and understand
why they work:

http://www.securityfocus.com/swsearc...ldoc&query=php


--
Greg Donald
http://destiney.com/
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 00h56.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,13981 seconds with 13 queries