What it checks
Finds double extensions, hidden files, PHP files in image or asset folders, PHP code inside images and known web shell names.
Check ID: files.suspicious
The names and locations of the files in the scan targets are checked. The contents are not read, except the first 4 KB of image files.
- Double extensions such as
.php.jpgor.jpg.php. - Names that start with a dot. Common configuration files of development tools (such as
.gitignore,.editorconfigand.eslintrc) are not reported. - PHP files in folders named
images,image,img,imgs,icons,fonts,font,css,media,uploads,svg,videoorvideos. - PHP file names often used by web shells, and PHP extensions other than
.phpand.inc. - PHP code at the start of image files (SVG excluded).
What a finding means
The titles, severities and explanations below are the ones shown on the Findings screen.
| Finding | Severity | Meaning |
|---|---|---|
Double file extensionsuspicious.double_extension | High | The file name has two extensions, a trick used to upload executable files disguised as images or documents. |
Hidden PHP filesuspicious.hidden_php | Critical | A PHP file whose name starts with a dot is hidden from normal directory listings. Backdoors are often stored this way. |
.htaccess inside the directorysuspicious.htaccess | Medium | An .htaccess file can change how the server executes files. Attackers use it to enable PHP in unexpected places or to redirect visitors. |
Hidden filesuspicious.hidden_file | Low | A file whose name starts with a dot was found. |
PHP file in an asset foldersuspicious.php_in_assets | High | Image, font and CSS folders should not contain PHP. A PHP file here is often an uploaded backdoor. |
File name used by web shellssuspicious.shell_name | High | The file name matches names commonly used by web shells and malware droppers. |
Unusual PHP extensionsuspicious.php_variant | Medium | Extensions such as .phtml, .php5 or .phar are executable on many servers and are used to bypass upload filters. |
PHP code inside an imagesuspicious.php_in_image | Critical | The image file contains PHP code. It may be included by another script to run a backdoor. |
How to fix
The recommended action shown with each finding:
- Double file extension, Hidden PHP file, .htaccess inside the directory, Hidden file, PHP file in an asset folder, File name used by web shells, Unusual PHP extension, PHP code inside an image
Inspect the file. If you do not know why it is there, remove it, check other files changed at the same time and change your passwords.
Related settings
- Settings → Targets: Themes to scan, Plugins to scan and Directories outside WordPress decide which files are checked. Each registered directory has its own Checks and exclusions.
- Settings → Checks → Enabled checks: switch “Suspicious files” on or off.
- Settings → Checks → Exclude patterns: files and folders that are not checked (by default
node_modules,vendor,.git,.svnandcache).