Identify modified files
The first thing to do is to identify which files have been changed. You can do this in several ways:
- Connect to the server (if it is possible). Use command
“$ find ./ -type f -mtime -10”, where -10 means day interval.
- Use the FileZilla program. First, choose Server -> Search remote files… In the window that opens, select search conditions -> date, after, and enter the date, e.g. 10 days earlier than today.
- Refer to the hosting. If you can’t access your server, you can try to contact your hosting administrator and request a help.
If you do not find any modified files, it is possible that the CoinHive mining code is loaded into the database. In this case, you should look up for “CoinHive” keyword in your database table. If you have access to phpMyAdmin, use the Search tool or try to search using SQL LIKE request for connecting to the server.
View modified files
There should be CoinHive code in the modified files. If all the files look clean, then try searching for a “coinhive” keyword in all the website files. How to do this:
- If you have access to the server, use the following command:
grep -rnw '/' -e 'coinhive'
- If you are not able to access the server, you can use a code editor such as Notepad ++. Select “Search text string in all files and folders” and start searching.
Clean up CoinHive code
TnKJQivLdI92CHM5VDumyS is used to identify the user of the script and may vary. You can also take a look at our removal guide here: How To Clean A Hacked WordPress Site On Your Own
Reduce the risk so that it does not happen again
Change your hosting, database and FTP passwords. Change passwords for all users, make sure all the passwords are strong. Renew WordPress and all plugins, make sure all plugins you use do not have security holes – use our database.