The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Re: Prevent perl script read /etc/named.conf

Discussion in 'General Discussion' started by skyknight, Jul 17, 2011.

  1. skyknight

    skyknight Active Member

    Joined:
    May 1, 2007
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    how to protect /etc/named.conf so PHP script can't read it?
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    How would any script be able to read /etc/named.conf for a script owned by named:named service rather than an individual user unless that individual user has jailed shell or shell access to the machine? If the user does have such access, then anything can be used to read /etc/named.conf files due to the file permissions required for that file to function.
     
  3. ljweb

    ljweb Member

    Joined:
    Nov 26, 2003
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    This seems to be possible via a perl script, i just caught one now which started with "open (d0mains, '/etc/named.conf') or $err=1;" . User does not have shell access at all.. Cpanel/WHM all up to date. I think you should take a closer look at this..
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    If so, please provide the full script contents so we may look into it.
     
  5. ljweb

    ljweb Member

    Joined:
    Nov 26, 2003
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Have sent a PM with full code, wouldnt be appropriate to post here..
     
  6. drhost

    drhost Member

    Joined:
    Jan 19, 2008
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    we have same problem, please post the solutions
     
  7. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Please open up a ticket in WHM > Support Center > Contact cPanel if you have any questions on this.
     
  8. abdelhost77

    abdelhost77 Well-Known Member

    Joined:
    Apr 25, 2012
    Messages:
    81
    Likes Received:
    1
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    The same issue Here , the server is secured with all stuffs , Suhosin , CSF , mod-security , but a perl script can still read /etc/named.conf with "open (d0mains, '/etc/named.conf') or $err=1;" , i think it a serious cpanel vulnerabilitie , any solution please ?
     
  9. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello,

    As stated, please submit a ticket if you believe this is a security issue. Since you appear to be what you consider a product defect, these would be posted to http://go.cpanel.net/bugs or using the Bugs link at the top of the forum.

    Thanks!
     
  10. tiff2342

    tiff2342 Well-Known Member

    Joined:
    Apr 20, 2012
    Messages:
    140
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    How is this a security issue by being able to view domains hosted? You can look up domains hosted on a server by doing reverse lookups.
     
Loading...

Share This Page