How to Find Suspicious PHP Files in a Joomla Website

Joomla legitimately contains many PHP files, so a filename ending in .php is not suspicious by itself. Find suspicious PHP by combining location, change history, comparison with trusted packages, code review, and server logs. If you find a confirmed backdoor, assume the incident may extend beyond that one file.

Start with expected Joomla and extension locations

Record the Joomla version and installed extensions/templates, then obtain trusted matching packages. PHP inside Joomla core or a known extension can be normal; PHP appearing unexpectedly in media, image, upload, cache, temporary, backup, or abandoned site directories deserves immediate review.

Do not decide based on a familiar-looking filename. Malicious files often use names that resemble legitimate Joomla code.

Search the entire site for PHP and recent changes

Use the hosting file manager, SSH, or a security scanner to enumerate PHP files and sort by path and modification time. Include hidden files and old/staging copies of the site. Review unexpected files created near the time suspicious behavior began.

Modification time is only a lead: legitimate updates change timestamps, and an attacker may alter them. Record suspicious paths and preserve copies before deleting or replacing anything.

Compare suspicious files with trusted packages

  1. For a core path, compare it with the official package for the exact Joomla release.
  2. For an extension or template path, compare it with the matching trusted vendor package.
  3. For custom code, compare it with source control or a known-good deployment.
  4. Investigate files that have no legitimate counterpart.

A difference can be a customization, so preserve evidence and confirm its origin before replacing it.

Inspect questionable code without running it

Open suspicious files as plain text in a safe environment. Warning signs include unexplained obfuscation, encoded payloads, command execution, remote code retrieval, credential collection, or code that writes additional executable files. Some legitimate software also contains minified or encoded data, so comparison with the vendor's clean copy is essential.

Do not browse directly to a suspicious PHP file merely to see what it does; that can execute it.

Use logs to determine whether the file was active

Search web-server access/error logs for requests to suspicious paths, especially direct requests, repeated POST traffic, or unusual query strings. Also review hosting security logs and authentication activity. Evidence that an unknown PHP file was requested successfully is more serious than an unused orphan file.

Respond as an incident if malicious PHP is confirmed

Do not stop after deleting the first payload. Restrict or take the site offline when appropriate, preserve evidence, notify the host, rotate Joomla/hosting/SFTP/SSH/database credentials from a clean device, review privileged users, patch or remove vulnerable extensions, and rebuild compromised code from trusted sources.

Finally, check the systems used to administer the site. Stolen workstation or deployment credentials can reinfect an otherwise clean Joomla installation.


Need More Help with Joomla?

Still having trouble? Open a support ticket with QuantaCade Support and we'll be happy to help where we can.

Support priority is given to QuantaCade products, services, and customers. However, we're also happy to assist fellow Joomla users with general Joomla questions and troubleshooting when possible.

QuantaCade is an independent Joomla extension developer and is not official Joomla support. Some issues involving third-party extensions, hosting environments, server configurations, or other systems outside our development control may be beyond what we're able to resolve.

Open a Support Ticket