Skip to main content

Suspicious files in /var/tmp

Comments

4 comments

  • GOT
    /var/tmp is owned by root, but it is chmod 777 which gives all users full access, as it needs to be. You cannot disable these perl functions in any useful way and yes it would break many other things, much of cPanel is written using perl. You can stop regular users from directly sending mail which is what most of these types of malware do. They bypass exim and connect out directly to destinations. If you have CSF installed, the option is SMTP_BLOCK and further refinement are in the subsequent settings. If you do not have CSF installed, cPanel has its own method of doing it which is in tweak settings called Restrict outgoing SMTP to root, exim, and mailman (FKA SMTP Tweak)
    0
  • mwabini
    /var/tmp is owned by root, but it is chmod 777 which gives all users full access, as it needs to be. You cannot disable these perl functions in any useful way and yes it would break many other things, much of cPanel is written using perl. You can stop regular users from directly sending mail which is what most of these types of malware do. They bypass exim and connect out directly to destinations. If you have CSF installed, the option is SMTP_BLOCK and further refinement are in the subsequent settings. If you do not have CSF installed, cPanel has its own method of doing it which is in tweak settings called Restrict outgoing SMTP to root, exim, and mailman (FKA SMTP Tweak)

    Thanks GOT for the reply. I have enabled the options SMTP_BLOCK in CSF and I have seen these changes along with others take positive effect on spamming from the servers. In this case, is there any other particular thing that can be done to prevent upload of the malicious files on the /var/tmp folder? Or is it something that will always be done and all I can do is ensure scripts sent there cant spam even when run?
    0
  • GOT
    You could use an active malware scanner. Here's a couple good ones Imunify360 - home cPMalScan - cPanel Malware Scanner | Tijeers
    0
  • cPanelLauren
    In this case, is there any other particular thing that can be done to prevent upload of the malicious files on the /var/tmp folder? Or is it something that will always be done and all I can do is ensure scripts sent there cant spam even when run?

    I'd second @GOT suggestion for a malware scanner such as Imunify, you can also configure ClamAV which comes with cPanel to scan Configure ClamAV Scanner - Version 80 Documentation - cPanel Documentation
    0

Please sign in to leave a comment.