CAPTUREMalware – Lemonade’s Framework on Malware Response

by | Sep 11, 2026 | Project Methodologies & Best Practices

Capturemalware Lemonade's Framework On Malware Response

How We Capture Malware on WordPress Websites

WordPress malware response is not just about deleting suspicious files. It is a controlled investigation. If a team rushes straight into cleanup, it may remove the evidence needed to understand how the compromise happened, whether attackers still have access, and why the infection may return.

Our approach is simple: capture first, clean second. For WordPress websites, that means preserving evidence, confirming a full backup, scanning both WordPress and the hosting account, reviewing users and access points, cleaning only what has been verified, hardening the site, and monitoring for reinfection before the case is closed.

From WordPress Alert to Investigation

A WordPress malware case can begin in many ways. A security plugin may flag a suspicious PHP file. The site may redirect visitors to an unknown domain. Search results may show spam pages. A client may report defacement. A hosting provider may warn about malware. Or the team may find unexpected administrator users, modified plugin files, unfamiliar files in wp-content/uploads, or suspicious changes in .htaccess.

The first step is to create a support ticket. The ticket records the affected domain, when the issue was detected, who detected it, what symptoms were seen, whether the website is still working, and whether malware is suspected or confirmed. This ticket becomes the single record of truth for the investigation.

The client is then informed that a security investigation has started. The message should be calm and factual. If malware has not yet been confirmed, the update should say that suspicious activity has been detected and is being reviewed. Clear communication matters, especially when the affected website supports sales, enquiries, recruitment, membership, payments, or other business-critical workflows.

Preserve Evidence Before Touching Files

Before deleting, replacing, renaming, or editing anything in WordPress, the team preserves evidence. This includes suspicious file paths, original filenames, timestamps, screenshots, scanner results, access logs, FTP/SFTP activity, usernames, IP addresses, and copies of suspicious files where appropriate.

Common WordPress evidence includes:

  • Unknown PHP files inside wp-content/uploads.
  • Modified WordPress core files.
  • Recently changed plugin or theme files.
  • Suspicious .htaccess rules.
  • Malicious code in wp-config.php.
  • Unknown administrator accounts.
  • Redirect scripts, SEO spam injections, mailer scripts, or web shell code.
  • Logs showing uploads, POST requests, login attempts, or access to vulnerable plugin paths.

Suspicious files are archived in the investigation folder, usually with a clear name such as:

Suspicious-Files-[YYYY-MM-DD]-DO-NOT-RUN.zip

If password protection is available, the archive is protected and the password is recorded in the ticket. Suspicious files should not be emailed directly to the client. If they need to be shared with a hosting provider, security vendor, plugin vendor, or theme vendor, they should be shared through an approved secure method.

Confirm the WordPress Backup

Before permanent cleanup begins, the team confirms that a full backup exists. For WordPress, that backup must include both the website files and the database. The database matters because malware may not live only in files; it can appear in posts, options, widgets, users, redirects, plugin settings, or injected content stored in the database.

The ticket records the backup date and time, the backup source, who confirmed it, and whether the backup is complete. Cleanup can affect production files, plugins, themes, forms, integrations, and database-driven content, so a verified recovery point is essential.

Urgent containment is allowed if the website is actively harming visitors, redirecting users, serving malware, or exposing a public backdoor. Even then, the team preserves evidence wherever possible before changing the site.

Contain Immediate WordPress Risk

Containment reduces immediate damage without destroying the investigation trail. In a WordPress case, containment might include placing the site into maintenance mode, blocking direct access to a malicious PHP file, temporarily renaming a confirmed malicious file after preserving a copy, disabling an active compromised user, restricting an abused upload path, or pausing a vulnerable plugin when necessary.

If a containment step could affect forms, payment flows, job sync, CRM integrations, multilingual features, APIs, DNS, Cloudflare, or other client-facing functions, Support Lead approval is required unless there is immediate active harm.

The goal is to move quickly without making the website harder to recover or the incident harder to explain.

Scan WordPress and the Hosting Account

A WordPress malware investigation should never depend on one tool. The WordPress-level scanner is important, but it only shows part of the picture.

The WordPress scanner should be reviewed for suspicious PHP files, modified core files, plugin or theme changes, unknown administrator users, vulnerable plugins or themes, malicious redirects, and web shell indicators. Tools such as Defender Pro or an equivalent WordPress security plugin can help identify what has changed inside the WordPress application.

The hosting or server scanner is just as important. Malware may sit outside the active WordPress directory, in public_html, hidden folders, temporary directories, shell startup files, old site folders, backups, or other account-level locations. Hosting provider scans, cPanel scans, ImunifyAV, or provider-initiated scans can reveal issues that a WordPress plugin cannot see.

If the hosting scanner is unavailable or cannot scan the full account, that limitation should be recorded in the ticket.

Capture Logs Before They Disappear

Logs often provide the best clues about how attackers entered the site. They should be downloaded before they rotate or disappear.

For WordPress, the team reviews website access logs, SSL access logs, error logs, FTP/SFTP logs, cPanel logs, SSH login logs, cron logs, WordPress security plugin logs, and hosting security scan logs where available.

These logs are checked for suspicious POST requests, uploads, access to unknown PHP files, repeated wp-login.php attempts, XML-RPC abuse, REST API abuse, file manager access, vulnerable plugin or theme paths, unusual user agents, and suspicious IP addresses.

The goal is to connect file evidence with activity evidence. If a malicious file appeared in wp-content/uploads, the logs may show when it was uploaded, which request touched it, which IP accessed it, and whether the same path was used again after cleanup.

Manual Review and Assisted Analysis

Scanner results need human review. A scanner may flag suspicious code that turns out to be legitimate, or it may miss a small loader hidden inside a plugin file.

Suspicious WordPress files are reviewed for web shell behaviour, obfuscated PHP, unauthorized admin-user creation, SEO spam injection, mailer functions, redirect logic, loader behaviour, malicious cron activity, and persistence mechanisms. Logs are reviewed for timelines, source IPs, upload paths, usernames, and likely entry points.

Codex can support this review by explaining suspicious PHP in plain language, decoding obfuscated snippets, summarising access logs, identifying likely entry points, separating confirmed evidence from assumptions, and drafting a technical timeline. It does not replace human approval. Risky production actions still require review and sign-off.

Check WordPress Access Points and Persistence

Removing visible malware is not enough. WordPress reinfections often happen because the original access path was never closed.

Every case includes an access-point and persistence review. The team checks:

  • WordPress administrator users.
  • FTP/SFTP accounts.
  • cPanel or hosting users.
  • SSH keys where available.
  • Cron jobs.
  • .htaccess.
  • wp-config.php.
  • Unknown PHP files in wp-content/uploads.
  • Recently modified plugin files.
  • Recently modified theme files.
  • Unknown files in public_html.
  • Hidden directories and temporary folders.
  • Shell startup files such as .bashrc, .zshrc, .profile, and .bash_profile.

The key question is not only “which files are infected?” It is “how did the attacker get in, and can they still get back in?”

Root cause should be described carefully. It may be a compromised WordPress admin account, vulnerable plugin, vulnerable theme, outdated WordPress core, exposed upload endpoint, compromised FTP/SFTP account, compromised hosting account, leftover backdoor, server-level compromise, or unknown cause. Findings should be labelled as confirmed, likely, suspected, or unknown based on the strength of the evidence.

Clean, Harden, and Test WordPress

Cleanup begins only after evidence is preserved, a full backup is confirmed, and required approvals are recorded.

WordPress cleanup may include quarantining or removing confirmed malicious files, replacing infected WordPress core files with clean copies, replacing compromised plugin or theme files with clean versions, removing unknown PHP files from uploads, removing malicious .htaccess rules, deleting malicious cron jobs, removing unauthorized users, clearing malicious shell startup entries, and patching or updating vulnerable plugins and themes.

The team does not delete files just because they look unfamiliar. Actions should be backed by scanner evidence, file review, vendor documentation, known-good replacements, or Support Lead review.

After cleanup, the site is hardened. WordPress administrator passwords are rotated, unused admin accounts are removed, two-factor authentication is enabled where available, hosting and FTP/SFTP passwords are rotated, unknown hosting users are removed, SSH keys are reviewed, file permissions are checked, vulnerable plugins and themes are updated, unused plugins and themes are removed, the security plugin is confirmed active, and backups are verified.

The website is then tested. At minimum, the homepage, key pages, forms, search or filter features, login/admin page, redirects, PHP errors, cache behaviour, and important integrations are checked. If the WordPress site uses job sync, ecommerce, CRM, membership, multilingual features, or APIs, those workflows need extra validation.

Re-scan and Monitor for Reinfection

After cleanup, the team runs post-cleanup scans. The WordPress malware scanner is run again, the hosting or server scanner is run where available, and previously affected paths are manually checked.

If suspicious files reappear, the case is not ready to close. Reinfection means persistence is still present or the original entry point remains open.

Monitoring is required after cleanup. The site is checked immediately, again after 24 hours, and again after 7 days for confirmed malware. Serious cases may be monitored for up to 14 days.

During monitoring, the team checks whether suspicious files reappear, .htaccess changes again, unknown WordPress users return, scanner alerts reappear, redirects or spam pages return, FTP/SFTP logs show new suspicious activity, or unusual access patterns continue.

Reporting and Closure

For confirmed WordPress malware cases, the final technical report should include case facts, issue summary, timeline, evidence reviewed, confirmed findings, root cause assessment, actions taken, resolution result, remaining risks or limitations, recommendations, and monitoring status.

The client receives a closing email summarising what was found, what was done, whether cleanup is complete, which scans were performed, what actions were taken, whether any client action is required, and how monitoring has been handled.

The ticket should be closed only when the client has been informed, evidence has been preserved, the backup was confirmed, WordPress and hosting scans were completed where available, manual review was performed, access points were checked, risky actions were approved, cleanup and hardening were completed, the site was tested, post-cleanup scans were completed, monitoring status was recorded, and the final client update was sent.

The CAPTURE Framework for WordPress

CAPTURE is the memory aid behind the workflow:

  • C – Create the ticket and contain immediate WordPress risk.
  • A – Archive suspicious files, logs, screenshots, and scanner results.
  • P – Probe root cause through WordPress scans, hosting scans, logs, access checks, and manual review.
  • T – Treat the infection after evidence, backup, and approvals are in place.
  • U – Upgrade and harden WordPress users, plugins, themes, credentials, permissions, and settings.
  • R – Restore normal service, test the site, and re-scan.
  • E – Evaluate through monitoring, reporting, client communication, and ticket closure.

This structure keeps WordPress malware response disciplined. The objective is not only to remove malicious files. It is to preserve evidence, identify how the compromise happened, close the attacker’s access path, reduce the risk of reinfection, and give the client a clear record of what was found and what was done.

Reads you might be interested in

Moving to a New Website Platform: How We Handle Content Migration

Moving to a New Website Platform: How We Handle Content Migration

Inside Our WordPress Security SOP: How We Keep Sites Safe

Inside Our WordPress Security SOP: How We Keep Sites Safe

How We Optimise Website Speed: From Foundations to Advanced Performance

How We Optimise Website Speed: From Foundations to Advanced Performance

No results found.