« automated SQL database backups. | Main | disabling spamassassin in plesk for individual mailboxes. »

checking for exploits on a server: my first bash script.

well, this script was inspired by another script, but i've modified this to send email results and do a few other things, so i'm quite proud of the accomplishment.

the script (exploitcheck.sh) appears below. you can copy and paste this code snippet to a file with an .sh extension.

click here for the code.

this is a good shell script for use with linux environments where apache or the www user stores a lot of files in the typical directories (e.g. /tmp, /dev/shm, etc. it checks to see if anything abnormal is there and sends you the results when executed.

i've put this in my /etc/cron.daily to make sure that it runs on a regular basis.

make sure to change the variables and chmod 755 exploitcheck.sh when you store it on your server.

TrackBack

TrackBack URL for this entry:
http://www.ramblingsofasysadmin.com/cgi-bin/mt/mt-tb.cgi/14

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)