# Malware scan

Find web shells and injected code in your sites, stop code from running in upload folders and quarantine suspicious files. Nothing is deleted without you.

The **Malware scan** (technical names: malware, web shells, ClamAV) looks for what gets sites hacked and keeps them hacked. It is part of the Business plan and sits in a server's **Security** tab. On other plans the page says what it does.

## What it checks

The scan works in layers, and each says what it found:

- **Where a file is.** Upload folders (WordPress `wp-content/uploads`, Laravel `storage`, Bedrock `app/uploads`, and folders you confirm) should hold pictures and documents. A PHP file there, a picture with PHP inside, or a name like `photo.php.jpg` is flagged.
- **What a file contains.** Code that runs what a visitor sends (`eval($_POST[...])`, `system($_GET[...])`), code hidden behind several layers of encoding, the marks of known web shells, scripts that write hidden content or invisible frames into your pages, and settings files that make PHP run an extra file on every page (`.user.ini`).
- **Whether a file is the original.** WordPress files are compared with the official checksums for your version, and plugins with the copies published on wordpress.org. For sites you publish with Fuzops, each update records the checksums of its code, so a PHP file added or changed afterwards is told apart from what you published. For other sites, the first full scan is the reference.
- **The server itself.** Scheduled jobs and background services that download and run something, programs with full rights that no installed package provides, PHP settings that run an extra file before every page, and programs in temporary folders.
- **The antivirus (optional).** With **Antivirus (ClamAV)** installed, files are also checked against its millions of signatures of known malware.

The scan only reads your files. Code it finds is never run.

## What it does not see

No scanner finds everything. New or heavily disguised malware, a hacked database (a WordPress administrator added in the database, spam injected into posts), and stolen passwords are not files it can see. That is why **Stop code from running in upload folders** matters most: a file that gets in cannot run.

The rules are written for PHP sites such as WordPress and Laravel. A site that does not run PHP (Node.js, Python and others) gets only the antivirus layer, when the antivirus is installed.

## Read the page

![The malware scan page of a server: the sentence with the result of the last scan, the four tabs of findings and Stop code from running in upload folders for each site](https://internal.fuzops.com/docs-img/malware-scan.webp "The malware scan of a server after a scan that found nothing.")

The first line names the most serious open finding, for example "2 files on shop.example.com look like web shells." or "Nothing suspicious found. Last scan 3 hours ago."

Findings are grouped by site, most serious first: **Critical**, **High**, **Medium** and **Low**. Each one says in plain words why it was flagged. **Technical details** shows the rule, the matched line (passwords and keys in it are hidden), the file's checksum, size and dates, and when the rule can be harmless.

The tabs are **To decide**, **In quarantine**, **Marked as yours** and **Solved** (the file is gone or clean at a later scan).

## Decide what happens to a file

- **Quarantine** moves the file to a locked folder outside every site. Each site is checked right after: if one stops answering, its files are put back at once. Select several files to move them together.
- **Put the file back** returns a quarantined file where it was, with its owner, permissions and date.
- **Delete for good** removes a file from quarantine. It asks you to type the file's name, and only works on files in quarantine.
- **This file is mine** stops listing a file you know, with a reason. If the file changes, it is checked again.
- **See the file** shows the start of the file as text, never run. It needs permission to see the site's secrets, since a file can hold them.

Nothing is ever deleted on its own. **Quarantine automatically what is certainly a web shell** (in **Scan settings**, off by default) only moves program files in upload folders that also look like a web shell.

## Stop code from running in upload folders

This is the strongest protection. With it on, PHP files and hidden program endings in the site's upload folders answer **403** (refused) instead of running, while pictures and documents are served as before.

Turn it on per site, or **Turn on for all sites**. Before the change you see the folders and the web server lines. Fuzops then checks the web server settings, tries a harmless test file the way a visitor would and checks that a media file and the home page still answer. If anything fails, the previous settings come back and the page says why. **Turn off** undoes it.

The scan also lists folders that often hold uploads (`uploads`, `files`, `media`): tick the ones your visitors upload into. A site with a hand-written web server config gets the lines to add instead.

## When it runs

- **Scan now** runs a quick scan: upload folders and files changed since the last scan. **Full scan** reads everything. The first scan of a server is always full.
- With **Scan by itself** on: a quick scan every day and a full scan every week, at a quiet hour, and a quick scan of a site after each update you publish. It never changes the result of the update.

The scan runs at the lowest priority, a few minutes at a time, so your sites and updates are not slowed down. On a test server with 8 sites and 35,000 files, a full scan took about a minute, and most visits were answered as fast as without a scan.

## The antivirus

**Antivirus (ClamAV)** is optional. It needs about 1 GB of memory while a scan runs, so it is offered on servers with at least 2 GB. When the server is short of free memory at scan time, the antivirus waits for the next scan and the other layers keep working. On servers with 4 GB or more you can keep it loaded in memory for faster scans. Its signatures update 4 times a day.

## Being told

A new high or critical finding is sent once, through the channels set for new critical security alerts on the **Notifications** page, and appears on Home under **Needs you** until it is solved.

## After a break-in

When something is found, **What to do now** lists the steps that close the way in: change the site's passwords and keys, update WordPress and its plugins, check the WordPress administrators, go back to a clean restore point, and replace the code host access key. See the guide below.

## Related

- [Guide: what to do if a site was hacked](https://internal.fuzops.com/docs/guides/what-to-do-if-a-site-was-hacked)
- [Server protection](https://internal.fuzops.com/docs/protection): flood limits, and bans for addresses that keep guessing passwords
- [Backups and restore points](https://internal.fuzops.com/docs/backups)
- [Security alerts](https://internal.fuzops.com/docs/security-alerts)
