Did you ever face any of the following issue in your server?
- You can’t send email from your domain because your server IP blocked by several RBL Sites
- Your word press website hacked and you can’t login to wp-admin
- In your cPanel/WHM mail que manager, thousands of email in Que. but you don’t know which script sending this emails
Well in this article we will discuss about how to fix bulk email sending problem causing by malicious email script
You may wondering why hacker spending hours to hack your small website. Well first of all this type of hackers do not hack individual websites by going each of them. They use bots to find the backdoor of your website like any coding error, less strong password or easy matching password, wordpress theme error, week server security etc. It is always suggested to use good secure web hosting, premium theme, plugins and update your website regularly. Hackers hack this small websites from all different servers and locations around the world so they can send bulk emails, stilling your website data specially if its an ecommerce website with clients credit card info, email list or sometime they ask for ransom.
So when a hacker send out thousands of email using your server, your IP get listed in RBL sites like Barracuda, Spamcop etc and you cant send your business email anymore from that IP.
Well in cPanel/WHM server, MTA (Mail transfer agent) or Exim handle the Email deliveries. All email activity logged including which script send emails. using this log you can easily track down how many emails was send and what is the script location.
To use this steps you need to login as root to your server via SSH. You can use putty in windows or terminal in Mac to login via SSH. Ones you login run the following command
This command will show you the most used mailing script location from the Exim mail log:
You should get back something like this:
We can see /home/thetech/public_html/ by far has more deliveries coming in than any others.
Now we can run the following command to see what scripts are located in that directory:
In this case we got back:
So we can see there is a script called wp-mall.php in this directory
Knowing the wp-mall.php script was sending mail into Exim, we can now take a look at our Apache access log to see what IP addresses are accessing this script using the following command:
You should get back something similar to this:
We can see the IP address 126.96.36.199 was using our mailer script in a malicious nature.
If you find a malicious IP address sending a large volume of mail from a script, you’ll probably want to go ahead and block them at your server’s firewall so that they can’t try to connect again.
This can be accomplished with the following command:
Or use CSF firewall in you WHM to block the IP.
Looking for a cheap managed web hosting who will handle your server professionally and update your website regularly? Check Gogetspace.com