server hacked using www-data exploit

Discussion in 'Server Operation' started by PermaNoob, Nov 2, 2013.

  1. edge

    edge Active Member Moderator

    Looks like it's working for me:

    And
    For the records. This is also a handy link to have (read) http://www.howtoforge.com/forums/showthread.php?t=58062
     
    Last edited: Nov 7, 2013
  2. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Yould you please post your php versions?
    It would be nice to get some information about what output these commands give

    Code:
    /usr/lib/cgi-bin/php5 -v
    Code:
    /usr/bin/php5-cgi -v
    Seems to me that not all versions are vulnerable.
     
  3. edge

    edge Active Member Moderator

    For me it's this:

    /usr/lib/cgi-bin/php5 -v
    /usr/bin/php5-cgi -v
     
  4. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    And with this version you have been vulnerable before using modsec?
    Or have you updated your php5 along with modsec install?
     
  5. edge

    edge Active Member Moderator

    I have updated the PHP at the same time as I installed modsec.
     
  6. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Dou you still know which version was there before? Maybe an update of php would have been enough (doesn't mean modsec isn't helpful ;) )
     
  7. edge

    edge Active Member Moderator

    Sorry.. I do not know. All I needed to do was enable modsec (what I did yesterday) to start working.
    It's maybe not needed, but as I discovered yesterday also a nice tool to debug websites :)
     
  8. sergio.morales

    sergio.morales New Member

    Info you wanted

    root@server1:~# /usr/lib/cgi-bin/php5 -vPHP 5.3.3-1ubuntu9.10 with Suhosin-Patch (cgi-fcgi) (built: Feb 11 2012 06:39:58)
    Copyright (c) 1997-2009 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    root@server1:~#
     
  9. sergio.morales

    sergio.morales New Member

    Info you wanted

    root@server1:~# /usr/bin/php5-cgi -vPHP 5.3.3-1ubuntu9.10 with Suhosin-Patch (cgi-fcgi) (built: Feb 11 2012 06:40:15)
    Copyright (c) 1997-2009 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    root@server1:~#

    And if I did NOT say this earlier, thank you all for the help. I think I speak for all of us when I say we appreciate the hell out of this.

    (big New York style manhug) ROFL!
     
  10. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Hum, to be honest... this looks like a quite old and outdated version that should be vulnerable, I think.
    Try getting a newer version.

    You see there that the package was built more than one year ago (Feb 2012).

    EDIT: Ok, just tested this package. It IS VULNERABLE!
     
    Last edited: Nov 7, 2013
  11. sergio.morales

    sergio.morales New Member

    Still vulnerable?

    So after al the work I've done to the system, I am still vulnerable? This sucks. Looks like I should just get everything moved to the new server and be done with it!

    I have not seen any odd behavior after changing all the settings in PHP though?
     
  12. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    I said the php version is vulnerable ;) not your system. If you deny all possible access to php-cgi, the system might be ok.
    Anyway you would be safer using a newer php version. This one is seriously outdated.
     
  13. toto64

    toto64 New Member

    Hello Again,

    Could you tell me if my version is also vulnerable:
    PHP 5.3.3-7+squeeze3 with Suhosin-Patch (cgi-fcgi) (built: Jun 28 2011 08:20:48)
    Copyright (c) 1997-2009 The PHP Group
    Zend Engine v2.3.0
    Copyright (c) 1998-2010 Zend Technologies with Suhosin v0.9.32.1
    Copyright (c) 2007-2010, by SektionEins GmbH

    I am afraid it is since the built date is from 2011!

    What is a good procedure to update php without breaking anything else (Debian Squeeze + ISPCOnfig 3)?

    Thanks
    Cheers
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    Updates on debian normally do not break anything, I use debian for years and the regular updates never broke one of my servers. It is highly recommended to install all available updates for squeeze, not just php. Otherwise your server might get hacked trough vulnerability in another software package.

    If you do this with:

    apt-get update
    apt-get upgrade

    then the php version after the update should be:

    PHP 5.3.3-7+squeeze17

    (built: Aug 23 2013 15:06:16)) which is not vulnerable for this exploit.
     
  15. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Just check that in your apt sources.list it says "squeeze" and not "stable".
    Otherwise your system would try to upgrade to wheezy, which could indeed break something.
    Upgrading inside queeze should not break anything, as till stated!
     
  16. concept21

    concept21 Active Member

    Try to subscribe Atomic modsecurity Rule Set. They can block many many things! You won't regret! :eek:
     
  17. adrenalinic

    adrenalinic Member

  18. adrenalinic

    adrenalinic Member

    To the attention of the Ispconfig staff

    To the attention of the Ispconfig staff:

    Seem that this security issue that is being used was fixed in the Ubuntu 10.04 LTS package in May 2012 by the following USN:

    http://www.ubuntu.com/usn/usn-1437-1/

    http://people.canonical.com/~ubuntu-security/cve/2012/CVE-2012-2311.html

     
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats a php issue and not ispconfig specific and ispconfig does not provide any own php packages. So as long as you installed your Linux system updates from Ubuntu / Debian/ Centos or whatever Distributuin you use regularily, your system is safe from these attacks since may 2012.
     
  20. adrenalinic

    adrenalinic Member

    This mean that the php problem is other and not this issue?
     

Share This Page