neilgee
7/11/2014 - 1:17 AM

Find Spam Malware and Block It

Find Spam Malware and Block It

/**
 * Malware Block
 *
 * @package   Malware Block
 * @author    Jacob Nicholson
 * @link      http://www.inmotionhosting.com/support/email/exim/find-spam-script-location-with-exim
 * @copyright (c)2014, Neil Gee
 */
 
 
 //Shows likeliest directory
 grep cwd /var/log/exim_mainlog | grep -v /var/spool | awk -F"cwd=" '{print $2}' | awk '{print $1}' | sort | uniq -c | sort -n

//List Directory to get the .php file

//List IP addresses accessing .php files - swap mailer.php
grep "mailer.php" /home/username/access-logs/example.com | awk '{print $1}' | sort -n | uniq -c | sort -n

//Block IP addess