Jump to content

PrestaShop hacked, how to repair index.php


Recommended Posts

Hello! My prestashop site has been hacked and now displays a message on the index.php from the hackers. I have changed my password in cPanel but now I wonder how I can recover my old index.php. I do not know if other files have been modified. 

 

How can I repair my index.php? Do I just upload a new index.php from the prestashop installation? 

Link to comment
Share on other sites

first thing, put shop offline in maintenance mode, if google has not marked your site already as malicious this will save you loads of headache later.

 

First change all ftp passwords, better yet delete them all and create new one.

make sure you have up to date antivirus on your computer

download, via FTP (antivirus should catch anything via FTP), or if you zip and then download site files run antiivurs against them.

download and unpack your version of PS from downloads.  This will be used to replace any native ps files.

Check that your permissions are 755 folder 644 files 664 .htaccess file, this is common best set up for most hosting

ensure your file group owner (ask hosting) is your domain name, i.e. only you group name has permissions to read/write/delete etc.

 

Anitivurs may find offending files, that's key,  but if it did not (you can do this anyway) using hosting filer manager or ftp, look at your shop files, sort on last modified, look for newly updated files, espeicilly .js.

 

When you get it all sorted, then and only then take shop out of maintenance mode.

 

And then you can look at one of my modules that will alert you when file changed either by ftp/hack/etc.

https://www.prestashop.com/forums/topic/303132-module-prestavault-malware-trojan-virus-protection/

 

Good luck!

Edited by El Patron (see edit history)
  • Like 3
Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...