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.

webshell - /dev/shm and /tmp

Discussion in 'Security' started by saros, Mar 11, 2014.

  1. saros

    saros Active Member

    Joined:
    Aug 28, 2013
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    What better way to block these scripts?

    - removed -

    I would like to lock in my server...


    I installed the system ConfigServer eXploit Scanner (cxs) ,but not solved 100%

    Takes too long to detect and delete.

    What function should I disable and not affect other sites?
     
    #1 saros, Mar 11, 2014
    Last edited by a moderator: Mar 11, 2014
  2. quizknows

    quizknows Well-Known Member

    Joined:
    Oct 20, 2009
    Messages:
    942
    Likes Received:
    57
    Trophy Points:
    28
    cPanel Access Level:
    DataCenter Provider
    /dev/shm and /tmp are world writeable; any user can write files there.

    There is no 100% way to block these. ModSecurity and CXS can help. However the only way to not have your customers be infected with these is to make them keep their CMS software (joomla, wordpress, etc.) fully updated and with good strong administrative passwords.

    You can also set in /usr/local/lib/php.ini the disable_functions setting to disallow exec and other risky php functions. Mine is set something like:
    Code:
     disable_functions = show_source, system, shell_exec, passthru, exec, phpinfo, popen, proc_open
    
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Yes, as quizknows mentioned, the best way to avoid these types of attacks is to make sure your customers use updated versions of their scripts with strong passwords. This might seem like a tedious task, but in the long run it's a good investment of your time compared to the time it might take to handle an account that has been exploited.

    Thank you.
     

Share This Page