Jump to content

Malicious code

Recommended Posts

Hi All,


Our customers were being redirected from the cart / orders page to the following address  http://cwcargo.com/Checkout


On doing a search on the files, we found the below malicious code within the shopping-cart.tpl  



Apart from deleting this code and changing FTP passwords - what can we do to prevent this


We are using PrestaShop version:   and third party theme 



Thanks in advance 



Share this post

Link to post
Share on other sites

If you look around the forum you will see that there are a lot of issues about hacked sites at the moment and that the main reason is some theme that has been hacked.


So it is important that you answer the question of Endriu. 


If indeed you have one of the hacked themes than you would need to do a much more radical cleanup as you are doing now.

Share this post

Link to post
Share on other sites

Follow this path it may help


first change all ftp passwords, 

make sure you have up to date virus protection on your local computer


using ftp downlaod to your computer shop files (here we expect to catch the virus/trojan).  Key is to get current anti-virus to scan your shop files on your computer...typically the infect/inject a .js file...these then modify other files you  might have already fixed but come back.


(to replace files of native ps)...download your version from PS and unzip it for later reference


(to replace files of theme) get original source of your downlaoded theme.


Also, using ftp or hosting control panel (files), sort files by date looking for files that have been updated recently...


note : folder 755  files 644 (is typical permissions)


Then hopefully with other tips you can resolve, then consider this module (by me).



also see this from themeforest comments section,  search 'hacked'


Edited by El Patron (see edit history)

Share this post

Link to post
Share on other sites

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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More