← All articles

Remote Website Scanning Can Miss Malware Hidden on Servers

Remote Website Scanning Can Miss Malware Hidden on Servers

Remote website scanning shows what visitors and search engines receive, but it cannot prove that a website is clean. Sucuri explains that external and internal scans inspect different parts of a site, which is why a host may suspend an account for spam or a visitor may see a browser warning even after a free online scan reports no problem.

A remote scanner, also called an external scanner, requests web pages over the internet in the same broad way as a browser or search engine crawler. It examines the returned HTML, JavaScript, CSS, redirects and HTTP headers. JavaScript is code that runs in a visitor’s browser, while HTTP headers are technical information sent with a web response.

This view is useful for finding injected scripts loaded from unfamiliar domains, hidden iframes, spam links and keyword-filled text placed in a footer or hidden section. It can also detect redirects that send mobile visitors somewhere else. External scanners may check security blocklists, which are lists maintained by search engines and antivirus providers, showing whether a domain has already been flagged. Sucuri’s free SiteCheck works this way: a user enters a URL and receives findings based on the visible response, together with blocklist status, without logging in or installing anything.

The limitation is fundamental. If malicious code does not appear in the response received by the scanner, there is nothing for that scan to report. Attackers can use cloaking, meaning rules that show different content to different visitors. Malware may react to the user agent, the referring URL, a cookie or the visitor’s IP address. A payload might run only for people arriving from a Google search or only for mobile Safari users. SEO spam can similarly show keyword-filled pages to crawlers while displaying a normal page to the site owner.

Server-side scanning runs where the website is hosted and examines the file system, and sometimes the database. It can inspect PHP files, theme and plugin directories, upload folders, scheduled tasks, .htaccess rules, database settings and post content. A web shell, which is a hidden file that lets an attacker issue commands, might be placed at wp-content/uploads/2024/08/thumb.php. It may never appear on the homepage, but someone who knows its URL could use it to read files, write new ones or run commands.

Many internal scanners compare current files with a known record of how they should look. A WordPress core file that differs from the official distribution, a theme file changed at 3 a.m. or a new file in a directory that has been unchanged for two years can all be important signals. Internal scanning can also find persistence mechanisms, such as scheduled tasks that restore malware after cleanup, injected database rows and altered configuration files. These are common reasons an infection returns after it seemed to have been removed.

The two methods therefore answer different questions. Remote scanning asks what visitors and search engines are seeing now, including whether the domain has been blocklisted. Server-side scanning asks what is actually stored in the files and database. Remote checks are fast, require no installation and have no performance impact on the site. A full internal scan can take minutes depending on the number of files, and it may briefly use resources while reading them. On constrained shared hosting, a deep scan may be noticeable, so it can be scheduled for low-traffic periods and limited in depth or frequency.

Remote scanning is strong at client-side injections because it sees what a visitor’s browser receives. It can miss a server-side payment skimmer, however. Sucuri describes an earlier case in which a credit card skimmer hidden in an obscure plugin stole payment data in PHP while an order was processed. The checkout page and its source looked normal because no malicious JavaScript had been injected into the page.

External checks also cannot reliably expose a compromise in the web server itself. In an earlier Sucuri investigation, iframe injections were traced to a compromised Apache module. The website files were clean because the server was rewriting responses as they left the server, and it did not necessarily do so for every request. File-based scanning has a boundary here too. Malicious code outside the web root may require server logs and host-level access to find, including a system module, compiled binary or another account on the same server.

Internal scanning has blind spots of its own. It cannot tell whether a third-party JavaScript file, tag manager, advertising script or chat widget is malicious at that moment merely by inspecting local files or database entries. Content delivered by a content delivery network, browser extensions on a visitor’s machine and code changed on another provider’s server can also appear normal from inside the hosting account. Internal tools do not normally reveal that a domain remains on a blocklist after an earlier infection, so an outside check is still needed when visitors see a warning page.

Sucuri recommends using both approaches in most situations. A small site on shared hosting without server access can use scheduled remote scans and add a security plugin able to read files and compare WordPress core files with official versions. Sucuri says its free plugin also performs file integrity checks and last-login auditing without shell access. Ecommerce sites need internal coverage because payment skimmers can leave the page source looking normal, while remote monitoring remains useful for client-side skimmers and visible changes.

For agencies managing many sites, remote scanning can monitor numerous domains for defacement, blocklist status and unexpected redirects without touching each server. It can serve as an alerting layer, while internal scanning is retained for sites where a compromise would be especially costly. If there is no file system access, such as on a managed platform or when a client will not provide credentials, reporting should clearly state that the results cover only external findings and whatever logs or integrity reports the platform provides.

When the results disagree, that disagreement is useful information. If a remote scan is clean but internal scanning flags changes, inspect the paths and timestamps. New PHP files under an uploads directory, modified core files and recently changed .htaccess files deserve attention, although caching plugins and legitimate updates can also create findings. If an external scan reports an injection while local files look untouched, request the page with a crawler user agent, a search-engine referrer and a different browser. If the bad content appears only under those conditions, check the database, server configuration and access logs for conditional delivery.

A site should not be submitted for blocklist review until the disagreement has been resolved.

Also available in: DeutschItalianoShqip