Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    1

    Default server hacked - thoughts?

    2 days ago a hacker was able to obtain root access and then run a script that replaced every index.php file on our server with this wonderful page:
    http://netphonereview.com/

    The account he got in through had phpBB running on it (a point of break-in in the past). the public_html folder in that account was changed to be owned by '507'. there also appears to be malicious binaries on dev/shm and /dev/shm/psybnc.

    The question is: we had the datacenter security team look into this and they claim that our 2.6.x kernel may be outdated, and that we should do an OS Reload. Our administrator says the kernel is fine, and that phpBB is the sole problem. Does anyone have any thoughts on this:

    Neil
    Last edited by hmseas; 05-15-2005 at 12:02 PM.

  2. #2
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Are you sure it was a root compromise? A root compromise is not necessary to achieve what you describe if you haven't protected yourself with phpsuexec (even with it enabled it's still possible). Outdated phpBB installations are quite likely to be the initial point of entry.

    If you have experienced a root compromise you will need to have an OS reload done and if the kernel is out of date, that will need upgrading. If not, have a read of this thread:
    http://forums.cpanel.net/showthread.php?t=30159

    Or consider hiring someone to do it for you.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  3. #3
    Member
    Join Date
    Mar 2002
    Posts
    33

    Default

    Does installing phpsuexec wreck any already installed scripts or have any other issues?

    Or, is it just a matter of updating apache and away you go?

    Many thanks

  4. #4
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    It can cause the following issues:

    1. php related .htaccess directives have to be moved to a local php.ini file instead

    2. The HTTP_AUTH access control method does not work (you usually need to replace it with htpasswd files)

    3. Stricter directory and file permissions are imposed, so you need to ensure directories that contain php files do not have 777 permissions enabled, for example.

    Other than that, it's usually fine. Generally, though, it's usually a good idea to enable it on a server before you put clients on, but you can firefight it once enabled on a loaded server.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  5. #5
    Member
    Join Date
    Oct 2002
    Posts
    751

    Default

    Quote Originally Posted by chirpy
    if you haven't protected yourself with phpsuexec (even with it enabled it's still possible). Outdated phpBB installations are quite likely to be the initial point of entry.
    I still don't quite understand how it's possible to replace the index files in all accounts without phpsuexec. How is that done if the index files are set to 644 ?

    I assume user nobody first needs to change file permissions on (index)files in the public_html directories to get write access to it? (haven't tried that myself)

  6. #6
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Yup. With phpsuexec disabled, all php scripts on the server will run as nobody, since nobody has access to all the web files on all sites (it must have at least read access) then at the very least they can read php script files and easily get MySQL database passwords, for example, which are very often setup the same as users cPanel passwords. Or direct access to htpasswd protected areas.

    As you say, if people have their pages set to 666, anyone on the server can then modify them, if you set them to 644 you cannot do it so easily - you'd need to invoke a local root compromise or as above with password trawling of files.

    If you have phpsuexec enabled, you're restricted by normal file permissions and ownerships and so makes security much simpler. Also any files created are under your accounts username making tracking problems much simpler too.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  7. #7
    Member
    Join Date
    Jan 2004
    Posts
    252

    Default

    What is the kernel version you are using?
    Rack911.com - Competent Server Administration
    Server Security - Administration - Managed Servers - Optimization - High Traffic Clusters

Similar Threads & Tags
Similar threads

  1. Easyapache 3 thoughts
    By sparek-3 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 11-03-2007, 02:13 PM
  2. your thoughts on /scripts/updatemysqlquota
    By big in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 07-02-2005, 03:30 AM
  3. My thoughts on Cpanel /WHM
    By jetson in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 05-04-2004, 06:43 PM
  4. What are your thoughts on something like this?
    By sitehostz in forum Themes and Branding
    Replies: 2
    Last Post: 02-09-2004, 02:22 AM
  5. WebMail: Final Thoughts?
    By trip in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-08-2002, 07:59 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube