1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to disable Perl for all users?

Discussion in 'General Discussion' started by konrath, Sep 21, 2009.

  1. konrath

    konrath Member

    Joined:
    May 3, 2005
    Messages:
    372
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Brasil
    Hello

    I want disable perl for all users. How to ? :confused:

    Hackers are using perl files to change the index page of all
    sites on the server.

    If I put 750 permission to /user/bin/perl the WHM, CPANEL and WEBMAI stop
    working.

    I want no more keep PERL to my users. Perl is very insecure !!!!

    Thank you
    Konrath
     
  2. thewebhosting

    thewebhosting Active Member

    Joined:
    May 9, 2008
    Messages:
    1,202
    Likes Received:
    1
    Trophy Points:
    38
  3. konrath

    konrath Member

    Joined:
    May 3, 2005
    Messages:
    372
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Brasil
    Thank you

    Konrath
     
  4. konrath

    konrath Member

    Joined:
    May 3, 2005
    Messages:
    372
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Brasil
    Hello

    The AddHandler cgi-script .cgi .pl was removed from httpd but scripts in perl still working.

    Another sugestion?

    Thank you
    Konrath
     
  5. agressor

    agressor Member

    Joined:
    May 15, 2005
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    if you remove from httpd.conf that line, hackers can add in .htaccess lines for execute cgi files with diferent extention like

    AddHandler cgi-script .txt

    and must be carfefull with allowoverirde because this can stop of work sites what use htaccess.


    i create a thread there: http://forums.cpanel.net/f5/how-can-disable-cgi-bin-131657.html

    but as u can see... the reply from tech.. is not satistactory. and the security problem still


    Edit by cPanel staff:

    This will break cPanel. The permissions of the Perl binary file need to be left as 755 in order for cPanel to work. Changing the permissions of the Perl binary is not a valid way to secure your cPanel server.



    cherss

    Francisco.-
     
    #5 agressor, Sep 23, 2009
    Last edited by a moderator: Jun 18, 2010
  6. cPanelJared

    cPanelJared cPanel Staff
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,835
    Likes Received:
    12
    Trophy Points:
    38
    Location:
    Houston, TX
    This will break cPanel

    This will break cPanel. Most cPanel functions run as the account user, and if the Perl binary file is not executable by anybody, errors will occur in cPanel. The permissions on the Perl binary file need to be left as 755 on a cPanel server.
     
  7. Stefan

    Stefan New Member

    Joined:
    Jul 24, 2003
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    Do you have any update about this issue.
    I have tried also to disable cgi from whm for an user , but it is still working.
    On httpd.conf for that site i have :
    "
    Options -ExecCGI -Includes
    RemoveHandler cgi-script .cgi .pl .plx .ppl .perl
    "
    but not result.

    I need also an solution that cant be overwritten by an user from htaccess.

    Thank you

    Stefan
     
  8. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    710
    Likes Received:
    2
    Trophy Points:
    18
    I'd start by revisiting the premise that “Perl is very insecure !!!!”:
    1. You can do the same thing w/ a shell, php, ruby, python, etc etc.
    2. They are probably leveraging a PHP exploit to, ultimately, execute arbitrary commands (that happen to be executing the perl binary in the case that prompted the question)

    The real solution here is to harden PHP (how Apache runs it, what its allowed to do, etc) and make sure your users always update their PHP scripts.

    Similar to my note here: http://forums.cpanel.net/f185/how-prevent-running-binary-files-178881.html#post1228062
     

Share This Page