PrestaShop Back-Office Security: Resolving Google's 'Dangerous Site' Warning After Malware
Navigating a PrestaShop Back-Office Security Scare: A Community Case Study
A PrestaShop 9.2.0 merchant, JC50, recently faced a critical security incident: Google Chrome displayed a "Dangerous Site" warning specifically when attempting to access their PrestaShop back-office. While the public-facing store remained accessible, Google Search Console flagged "Deceptive pages" related to administration URLs, effectively blocking access to the store's backend. This case study highlights the community's role in diagnosing, resolving, and hardening a PrestaShop installation against such threats.
The Initial Incident and Diagnosis
The issue began after an Imunify360 scan detected and neutralized three malicious files, notably in the modules/explorerpro/filemanager.php and modules/ntbackupandrestore/restore.txt directories. Despite subsequent clean scans and renaming the `explorerpro` module folder, Google's warning persisted. The merchant sought advice on whether malware removal was sufficient, if other checks were needed, and the necessity of a full site restoration.
Community Interventions and Troubleshooting
PrestaShop community members quickly offered actionable advice:
- Google Re-evaluation: Alexandre Carette emphasized that Google's re-evaluation can take several days. He advised verifying the complete absence of malicious files (including hidden ones or modifications to core files like `index.php` or `config/settings.inc.php`) and submitting detailed re-examination requests via Google Search Console.
- Back-Office Access & Integrity: Mediacom87 suggested attempting to rename the back-office directory to regain access, though cautioning it might not be a complete solution. He also recommended uninstalling file manager modules after use and referring to backup module documentation for `restore.txt` files. Crucially, Mediacom87 later provided a link to his free "Configuration Serveur" module for comprehensive integrity checks.
- Failed Admin Folder Rename: JC50 tested renaming the admin folder on a staging site. While the Google warning disappeared for the new URL, PrestaShop immediately returned a 500 Internal Server Error, indicating that a simple rename is not sufficient for PrestaShop 9.2.0 without further configuration.
- Deep File Inspection: Alexandre Carette further advised comparing `admin/` directory files with a clean PrestaShop 9.2.0 version and inspecting the `admin/.htaccess` file for suspicious rules or redirections.
Resolution and Post-Incident Hardening
Within a day, Google Search Console confirmed a successful re-examination, and the Chrome security warning disappeared, restoring back-office access. Following this, JC50 took several critical steps to enhance security:
- Modified PrestaShop administrator and o2switch account passwords.
- Verified no unknown employee accounts were present.
- Activated two-factor authentication (2FA) on cPanel.
- Installed Mediacom87's "Configuration Serveur" module on a migration environment. The module successfully compared 20,575 core PrestaShop files, confirming their integrity. It also detected and helped remove unexpected empty `index.php` files within a YBC Blog module's image directories and old, unneeded files at the root.
Ongoing Security Considerations
The "Configuration Serveur" module also highlighted several server configuration points for further improvement:
- `allow_url_include` is activated.
- PHP 8.1, which is no longer maintained (End-of-Life).
- Missing HTTP security headers.
JC50 specifically sought advice on disabling `allow_url_include` to strengthen security, questioning its potential impact on PrestaShop 9.2.0 and third-party modules (payments, carriers), especially in a shared hosting environment. This ongoing discussion underscores the continuous effort required for maintaining a secure e-commerce platform.
This incident demonstrates the invaluable support of the PrestaShop community in navigating complex security challenges, providing practical steps, and fostering a culture of continuous improvement in store security.