in

Dotnetpanel Forums

Community support forums for DotNetPanel products

Protection against PHP Shells ??

Last post 08-12-2008 12:30 PM by Rubal. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 07-31-2008 10:15 AM

    • fadi
    • Top 500 Contributor
    • Joined on 07-31-2008
    • Posts 6

    Protection against PHP Shells ??

    Hi,

    I have been hosting my own site (http://drhack.net) for quite a while. But now I want to start a small hosting company.

    With shared hosting come security issues. What I have been trying to get around is protecting the server against PHP Shells (like c99 and r57 etc.)

    I read in numerous forums to disable php functions like exec(), fopen and numerous more.

    BUT this does not solve my problem. If i plant a c99 shell on my server, I can still see the 3 drive letters and a directory listings DO open up. Removing IUSR (under which PHP fastCGI is running i guess) from the permissions solves the problem of READING/WRITING content, but still directory listings for drives shows up.

    I managed to get my hands on a .dll extension of "suhosin" (Hardened PHP Project). It does show up in phpinfo() indicating that it is working BUT I have not been able to cripple the c99 and r57 shells with it. Any suggestions ?

    Any suggestions and solutions??

    Regards,

    Fadi
  • 08-05-2008 2:03 PM In reply to

    Re: Protection against PHP Shells ??

     Fadi,

     Under each root drive only allow permissions for Administrators and System. This should secure it.

  • 08-05-2008 3:31 PM In reply to

    • fadi
    • Top 500 Contributor
    • Joined on 07-31-2008
    • Posts 6

    Re: Protection against PHP Shells ??

    well, i found another way... separate PHP settings for each directory (can be a user's root which applies across all his/her websites... and can overwrite that even a single site (by giving that site different php settings)

     

    Regards,

    Fadi

  • 08-05-2008 3:38 PM In reply to

    Re: Protection against PHP Shells ??

     Fadi, are you using CGI for PHP then instead of ISAPI?

  • 08-05-2008 4:58 PM In reply to

    • fadi
    • Top 500 Contributor
    • Joined on 07-31-2008
    • Posts 6

    Re: Protection against PHP Shells ??

    Server runs is Windows Server 2008 IIS7 with FastCGI module integrated. So i preferred running php in CGI/FastCGI mode !!
  • 08-05-2008 6:53 PM In reply to

    Re: Protection against PHP Shells ??

     Ok, so that explains why. We had issues with FASTCGI, once you get more than 50 - 100 app pools running it starts throwing errors, just random "CGI Error" errors.

  • 08-07-2008 12:24 PM In reply to

    • fadi
    • Top 500 Contributor
    • Joined on 07-31-2008
    • Posts 6

    Re: Protection against PHP Shells ??

    this is totally off-topic but i really loved the site template of your site www.reliablesite.net Where can i find it ?

     

    thanks

  • 08-07-2008 12:30 PM In reply to

    Re: Protection against PHP Shells ??

    It's not a template, the entire design was developed in-house to match our advertising goal.

  • 08-12-2008 12:30 PM In reply to

    • Rubal
    • Top 10 Contributor
    • Joined on 03-16-2006
    • India
    • Posts 495

    Re: Protection against PHP Shells ??

    If ACLs are setup fine on server's drive root and its definately possible to stop shell scripts like c99 and r57.

     Running each site under its own app pool adds more security to it.

     

    Rubal Jain // Email - Rubal @ Rubal [dot] Net

    Windows Server Setup, Configuration, Troubleshooting, Basic Security & Hardening
    DotNetPanel - Helm Control Panel Setup, Installation, Configuration, Troubleshooting
    Server setup includes installation of PHP, Perl, Python, ASP.Net Frameworks, SQL Express, MySQL etc and complete integration with control panel.

    Authorised DNP Reseller. Get 20% Discount on all DNP Licenses
    Authorised SmarterTools, Declude, SimpleDNS (JHSoft), Gene6 FTP, Helicon, Kayako, Icewarp Merak, MailEnable, Deerfield Reseller.
Page 1 of 1 (9 items)
Powered by Community Server (Commercial Edition), by Telligent Systems