Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Interesting data cPanel users know about the server

Discussion in 'Security' started by postcd, Nov 15, 2016.

  1. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    691
    Likes Received:
    14
    Trophy Points:
    68
    The cPanel user can see alot of data
    For example these are readable to the cPanel user on standard CentOS/Apache/WHM server:

    /etc/named.conf + /etc/dovecot/sni.conf - hosted domains
    /etc/shadow + /etc/trueuserowners - cpanel user list
    /etc/fstab - filesystems, like ramdisks
    /etc/localaliases - e-mail of the root/nobody user
    /etc/cron.d/ - cronjobs contents if have more than 700 permission (ie 644)
    /etc/my.cnf - mysql configuration file
    /usr/local/apache/conf/modsec2.user.conf - mod security rules
    /etc/sysconfig/network-scripts/ - ips used on the server
    + phpinfo() - many other details about apache, php, mysql
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,856
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    691
    Likes Received:
    14
    Trophy Points:
    68
    the files i mentioned can be read without SSH access enabled on that particular cpanel.
    it can be read thru a php script while following php functions are disabled on that particular cpanel: disable_functions: show_source, system, passthru, shell_exec, popen, proc_open, allow_url_fopen

    i assume virtfs can't change this.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,856
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    691
    Likes Received:
    14
    Trophy Points:
    68
    Thank you i went thru the pages you linked and applied all the things.

    RE: PHP open_basedir Tweak - Documentation - cPanel Documentation

    In Home >> Security Center >> PHP open_basedir Tweak i have option "Enable php open_basedir Protection." ticked, but at Yours linked page is mentioned "If you configure PHP to run as a CGI, suPHP, or FastCGI process, you must manually specify the open_basedir directive in the appropriate php.ini file.", and i am using suPHP and i think im happy with it. So i would need to setup some script that would append open_basedit for each cpanel to the global php.ini, only solution?
    i mean like:
    ?

    RE: PHP Security Concepts - cPanel Knowledge Base - cPanel Documentation

    The php script tells me: Disable Functions : show_source, system, passthru, shell_exec, popen, proc_open, proc_close, curl_exec, curl_multi_exec, allow_url_fopen, allow_url_include, symlink, link, unlink, copy, mkdir, rmdir, file, readfile, filegetcontents, dl, mail

    yet all files i mentioned in first post are readable for a cpanel user and also following commands can be executed by cpanel user from within php script: netstat, ps aux, last, w, vmstat, /proc/version

    Please any ideas what can be done to prevent some of these sensitive data be revealed?
    CentOS 6.x, Apache, suPHP, EasyApache 3
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,856
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice