Client protection: this material has been anonymised. I do not publish the domain, client data, infrastructure addresses, keys, account names or technical details that could make repeating the attack easier.

This was not a typical payment-module failure. A legitimate store module contained a critical vulnerability through which the attacker wrote a backdoor to the server. They then placed malicious code in several locations: a statistics module, theme files and generated JavaScript cache.

The fake form imitated a payment gateway, intercepted details entered by the buyer, displayed an apparent error, and then redirected the customer to the real payment. This allowed an order to appear normally paid despite the prior data compromise.

In briefThe entry point, backdoors and payment skimmer were identified, a log-based timeline was reconstructed, the store was cleaned, and a secure deployment package was prepared.

Initial situation: payments disabled, but the threat was still active

The payment operator blocked the access keys and reported suspected fraudulent payment method use. The store was taken offline to limit risk to further buyers. Disabling the official gateway alone did not solve the problem because the fake form was injected independently of the legitimate integration.

Urgent goal

Stop further customer exposure

The store remained in maintenance mode until all identified infection mechanisms were removed.

Technical goal

Establish the source, not only remove symptoms

Removing one file is not enough when an attacker can write further files and execute commands.

What did the store analysis detect?

The infection was layered. Each element had a different function and could sustain the attack even after partial cleaning.

01

Vulnerable filtering module

An outdated version of a legitimate module allowed an unauthenticated person to write an executable file to the store directory.

02

Backdoor with command execution

The malicious file allowed reading the configuration, running system commands and modifying further store elements.

03

Payment skimmer

The script displayed a full-screen imitation of card payment, collected data and only later launched the real gateway.

04

Loaders and infected cache

Code that launched the skimmer was located in the theme and in many generated cache files, making fast removal more difficult.

Important finding

The malicious code was not a separate module installed by an employee. It was added to legitimate store elements after the vulnerability was exploited.

How was the post-compromise analysis performed?

The files were not executed. The analysis was static, and findings were confirmed in several independent sources.

Preserving evidence

Copies of files, the database and logs were retained so that cleaning would not destroy evidence needed to establish the course of events.

Scanning files and modules

The directory structure, unusual dates, obfuscation, system functions, external connections, and changes to the theme and cache were checked.

Database review

Module settings, custom JavaScript, employee accounts, sessions, filter cache and traces of calls to non-existent files were verified.

Server log correlation

HTTP requests, the moment the web shell was created, command execution and later skimmer calls were linked together.

Preparing remediation

Clean versions of modified files were recreated, vulnerable locations were secured, and a package with target FTP paths was prepared.

Timeline: from reconnaissance to active data theft

File dates can be altered, so access logs were the primary timeline source. They made it possible to distinguish scanning itself from successful code execution.

Automated vulnerability reconnaissance

External addresses checked the module version, environment files and common web shell names.

Successful writing of the first backdoor

A series of specially crafted requests to a category page resulted in a new PHP file appearing and returning status code 200.

Reading configuration and preparing the skimmer

The attacker obtained database details, checked orders and started placing fake payment elements in the module and theme.

Testing and data transmission

Logs confirmed form testing, communication with a relay and real calls originating from the purchasing process.

Extending the concealment mechanism

A later version of the code started omitting administrators and selected IP addresses to make detection during store testing harder.

Complete scope of remediation work performed

  • removal of identified backdoors and the data relay,
  • removal of the skimmer and loaders from the store theme,
  • restoration of clean versions of JavaScript files and templates,
  • cleaning infected theme-cache files and filter cache in the database,
  • securing the module directory against direct PHP file execution,
  • blocking public access to SQL dumps, logs and auxiliary administration scripts,
  • checking administrator accounts, sessions, integrations and external scripts,
  • preparing a deployment package while preserving the FTP directory structure,
  • syntax checking modified files and rescanning infection indicators,
  • preparing a technical report, timeline and list of next actions.

Cleaning files is not the end of the procedure

After such an incident, passwords and keys for hosting, SFTP/SSH, the database, Redis, the store panel, email, the payment operator, order integrator, couriers and other APIs must be changed. Payment keys should be generated again only after cleaning is complete.

Result: store prepared for safe restoration

01

Identified threats removed

Backdoors, the skimmer, loaders and infected cache copies were removed or safely replaced.

02

Attack vector established

Logs confirmed exploitation of a vulnerable module rather than manual installation of a suspicious plugin by an employee.

03

Completed on the same day

Analysis, remediation, security implementation and the report were prepared in urgent mode.

The client also received a list of accounts and access details to change, a recommendation to generate new payment-operator keys, and to update the remaining modules to the latest versions compatible with the PrestaShop version in use.

Honest limitation

I do not declare that any store is "100% secure". After an incident, access rotation, updates, file-change monitoring and continued log observation are also essential.

Related case studies

Frequently asked questions after a PrestaShop store infection

Is it enough to remove the detected malicious file?

No. A backdoor can create further copies, and code that runs the skimmer can be located simultaneously in the module, theme, database and cache.

Did the attack require an administrator password?

In the case analysed, no. The vulnerability allowed a file to be written without logging in to the panel. After entry, however, the attacker read the configuration and could obtain further access credentials.

Do computers in the office need to be checked?

Yes, as a precaution, devices used for the panel, hosting, FTP and email should be scanned. The available evidence pointed to the store vulnerability as the original vector, but passwords must be changed only from a computer considered safe.

When can payments be restarted?

After cleaning the store, updating vulnerable elements, rotating access details and generating new payment-operator keys. Previous keys should be treated as invalidated.

How can the risk of a similar incident be limited?

Regularly update modules, remove unused plugins from the server, monitor file integrity, limit SFTP access, store backups outside the public directory and analyse payment-operator alerts.