webshell - /dev/shm and /tmp

saros

Active Member
Aug 28, 2013
30
0
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?
 
Last edited by a moderator:

quizknows

Well-Known Member
Oct 20, 2009
1,008
87
78
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
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.