# Cleaning WordPress Malware Infections With AI — Hasin Hayder > [!question] Lingering Questions > - How does multi-model AI scan accuracy hold up against zero-day or heavily obfuscated malware not well-represented in any model's training data? > - Is there a liability/trust gap when an AI model reads `wp-config.php` secrets during a scan, even transiently, versus a purely local signature-based scanner? > - What's the actual accuracy/safety track record of AI-generated DELETE SQL statements across a larger sample of real cleanups, beyond the single example shown? > [!tip] Article Ideas > - "Maintenance mode isn't isolation" — a short, myth-busting piece for WordPress site owners on why DNS-forwarding to a placeholder page is the actual first incident-response step, not the admin's maintenance toggle. #articleseed > [!link] Cross Reference > - [[3. Resources/Permanent Notes/WordPress Maintenance Mode Does Not Isolate a Compromised Site]] — new Permanent note from this article. #xref > - [[3. Resources/Permanent Notes/AI-Generated Destructive SQL Requires Human Review Before Execution]] — new Permanent note from this article. #xref > - [[3. Resources/Permanent Notes/Detection Quality Is Downstream of Network Participation Not Model Cleverness]] — adjacent claim from a different source (BitNinja/PhantomGuard) about what improves detection accuracy; that note is about pooled telemetry across many victims, this article's multi-model consensus scanning is a different mechanism (ensemble agreement across LLMs on one target) — related but not duplicate. #xref > - [[3. Resources/Permanent Notes/Perm · BitNinja + PhantomGuard represent the shift to runtime detection as primary defense]] — same general shift (detection over pure prevention), different mechanism. #xref > - [[3. Resources/MOCs/WordPress Hosting Security Stack MOC]] — best-fit MOC for WordPress incident-response/security content. #xref > [!quote] Vocabulary > - **Isolation (in this talk)** — cutting outside access via DNS-forwarding to a static placeholder page; explicitly distinguished from WordPress's own "maintenance mode," which does not block direct file access. > - **Multi-model consensus scanning** — running the same codebase/SQL dump through 2–3 different AI models and treating agreement across models as a stronger signal than any single model's flag. ## Bib capsule Hasin Hayder, "Cleaning WordPress Malware Infections With AI," WordCamp Bangladesh (YouTube, Bengali-language talk). A practitioner playbook for using consumer AI coding-agent tools (DeepSeek V4 Pro, "Kimi 2.5," GLM 5.2, a CLI tool called "Command Code") to detect and remediate WordPress malware at a claimed cost of cents per site. ## Author's thesis **Q1 (what's the talk about):** How to respond to an already-infected WordPress site using cheap, general-purpose AI coding agents instead of $100–$300 commercial malware-scanning services. **Q2 (how does it develop that):** Hayder opens with a dental-hygiene analogy (hardening doesn't guarantee immunity) and two cautionary backup stories, then walks an 8-step process — isolate via DNS-forward (not maintenance mode), snapshot via rsync (never run the copy), rotate secrets, AI-scan the codebase across multiple models for consensus, export and AI-scan the SQL dump for spam, generate and manually verify a DELETE statement, then harden and verify integrity via `wp core verify-checksums` → `wp core download` → `wp plugin update --all`. ## Key arguments - Backups and hardening are not sufficient protection on their own — malware can lie dormant in a backup and reactivate on restore, and this talk is explicitly about post-infection response, not prevention. - WordPress's own maintenance mode does not isolate a compromised site, because malware files remain directly accessible by URL even while it's active. - AI-generated remediation (a scan finding a backdoor, or a drafted DELETE statement) still requires a mandatory human verification step before anything destructive runs. ## Claim atoms ### Backups can carry dormant malware that survives restore > [!quote] ID:rw_bn_backup > এখন ব্যাকাপের মধ্যেও যদি মেলোয়ার থাকে আপনি যে ব্যাকআপ রাখছেন ওটা যে ক্লিন সেটার গ্যারান্টি কই **Where/why**: Early framing anecdote, before the 8-step process is introduced. Directly challenges the assumption that "having backups" is sufficient security practice — Hayder cites a case where a client's backup restore reintroduced malware, and a worse case where malware wiped a site's files and database with no usable backup left at all. **Tags**: #xref ### Maintenance mode doesn't block direct malware file access > [!quote] ID:rw_bn_maintmode > সো আপনি ডিএনএস চেঞ্জ করেন। আপনার সাইটটাকে টেম্পোরারি ভাবে একটা কোথাও ফরওয়ার্ড করেন। **Where/why**: Step 1 of the 8-step process (isolation). WordPress's own maintenance mode still allows direct URL access to backdoor files, so DNS-forwarding to a static placeholder page is the actual isolation step, not the admin toggle. **Tags**: #xref ### Multi-model AI scan finds a real backdoor cheaply > [!quote] ID:rw_bn_scan > প্রথমে বলে দিছে যে ওই যে আরসি ব্যাকডোর। উপরে প্রথম ফাইলটাযে টেমপ্লেট রেজিস্ট্রি নামে একটা হিডেন ফাইল আছে। **Where/why**: Real demonstrated example, mid-talk, after describing the multi-model scanning approach. A remote-code-execution backdoor disguised as a WordPress-core-looking file was found by the AI scan in 15–20 minutes for about 5 cents — the talk's strongest concrete evidence for its core cost/effectiveness claim. **Tags**: #xref #addendum ### SQL-dump spam-scan prompts work in Bengali too > [!quote] ID:rw_bn_sqlprompt > সেটার জন্য আপনি এতটুকু একটু প্র যে চেক এসকউএল ডিভিডাম এন্ড আইডেন্টিফাই অল স্প্যাম ইনক্লুডিং ফার্মা হ্যাক বেটিং এন্ড গ্যামলিং রিলেটেড স্প্যাম আপনি যদি ইংলিশে না লেখেন আপনি পিওর বাংলাশে লেখেন বাংলায় লেখেন আন্ডারস্ট্যান্ড মোস্ট গুড মডেল আন্ডারস্ট্যান্ড এভিথিং **Where/why**: Introducing steps 6–7 (database scan and cleanup). The SQL-dump spam-scanning prompt can be written in Bengali, not just English — used with a `wp db export` dump to find gambling/betting and pharma-hack spam injected into the database. **Tags**: #xref ## Permanent candidates - **WordPress maintenance mode does not isolate a compromised site from direct file access** — promoted to [[3. Resources/Permanent Notes/WordPress Maintenance Mode Does Not Isolate a Compromised Site]]. Checked existing Permanents for "maintenance mode," "isolat.*compromised," "dns.forward" — no duplicate found. Genuinely non-obvious to most WordPress site owners, who conflate the maintenance-mode toggle with taking a site offline. - **AI-generated destructive SQL requires mandatory human review before execution** — promoted to [[3. Resources/Permanent Notes/AI-Generated Destructive SQL Requires Human Review Before Execution]]. Evidence for this is the talk's Step 7 (drawn from the deep-read's machine-written analysis of the DELETE-statement-review step, not a directly quoted atom above — see Permanent Note for sourcing care). Checked existing Permanents for "manual review," "human review," "destructive sql," "delete statement" — found related-but-distinct notes about human review of AI output generally (e.g. [[3. Resources/Permanent Notes/Human Review Is the Actual Authenticity Control Not AI Use Itself]] is about authenticity/trust, not execution safety); no exact duplicate for the execution-safety framing. - Third candidate considered and dropped: multi-model consensus scanning reducing false positives. Related to [[3. Resources/Permanent Notes/Detection Quality Is Downstream of Network Participation Not Model Cleverness]] in theme (ensemble/consensus improves detection) but a different mechanism; judged not distinct or non-obvious enough on its own to clear the resonance bar as a third Permanent — left as a Literature atom (H3) only. ## Processing checklist - [x] All claim atoms have header + verbatim quote + where/why - [x] Triage callouts populated for every tagged highlight - [x] Checked existing Permanents first — no duplicates found for the two promoted claims; one adjacent-but-distinct candidate identified and left unpromoted - [x] Connected into MOC — [[3. Resources/MOCs/WordPress Hosting Security Stack MOC]] ## Links - [[3. Resources/MOCs/WordPress Hosting Security Stack MOC]] — WordPress security/incident-response MOC; best fit for this content - [[3. Resources/Permanent Notes/WordPress Maintenance Mode Does Not Isolate a Compromised Site]] — because evidence-for; new Permanent note from this article - [[3. Resources/Permanent Notes/AI-Generated Destructive SQL Requires Human Review Before Execution]] — because evidence-for; new Permanent note from this article - [[3. Resources/Permanent Notes/Detection Quality Is Downstream of Network Participation Not Model Cleverness]] — because contrasts; a different mechanism for the same general "what improves detection" question - [[3. Resources/Readwise/Articles/Cleaning WordPress Malware Infections With AI — WordCamp Bangladesh Talk]] — source document