tmp folder compromised, Linux



My tmp folder was compromised where a mailicious file was uploaded that explores files with bad permissions. I took the following precautions that seem to work fine:

  • First i mounted the tmp file and var/tmp using this command: /scripts/securetmp –auto  note that the auto is to bypass the confirmation messages
  • Second i setup a cron job to automatically cleanup the tmp folder for files that are few days old. Here is a fantastic article about that: http://forums.cpanel.net/f5/cron-clean-tmp-203701.html

Needless to say, this will not guarantee a full security of your tmp folders but it wild add a level of security.