THE FIRST SIGN
The First Sign Something Was Wrong
Ads Kozy Kingdom never placed were showing on the storefront. This was not an advertising settings problem: the store was loading AdSense code that nobody at the business had authorized.
The browser’s network activity tied the visible ads to a single unauthorized publisher ID.

LIVE SITE · UNAUTHORIZED AD PLACEMENT

DEVTOOLS · NETWORK REQUEST CONFIRMING THE PAYLOAD
UNAUTHORIZED PUBLISHER ID
ca-pub-3497225519667559
INCIDENT ONE · AUGUST 2026
Malicious Code Inside Yoast
The payload had been written straight into the plugin’s main file. An injected function loaded Google AdSense using the unauthorized publisher ID on every page.
wp-content/plugins/wordpress-seo/wp-seo.php
Legitimate plugin
→ Main file modified
→ AdSense code injected
→ Unauthorized ads on the live site
Yoast was modified. Yoast was not established as the way the attacker got in.

CODE EVIDENCE · INJECTED FUNCTION IN WP-SEO.PHP
PERSISTENCE
A Hidden Administrator Changed the Investigation
WordPress reported four administrators, but only three were visible on the Users screen. The fourth was a rogue account with the username custom.
Malicious child-theme code deliberately hid that account from the admin screen. The same code allowed unauthorized login through query-string parameters, bypassing the normal login form.
WORDPRESS REPORTS
4 admins
≠
USERS SCREEN SHOWS
3 admins
↓ Hidden administrator discovered
↓ Theme backdoor identified

EVIDENCE · ADMINISTRATOR (4), THREE VISIBLE — EMAILS REDACTED
REMEDIATION
Cleanup and Hardening
Removing the visible payload was only the start. The site was searched for anything else the attacker might have left behind, then hardened.
01 · REMOVE
Malicious code, the hidden-user mechanism, the login backdoor and the rogue administrator.
02 · RESET
WordPress salts regenerated, admin credentials rotated and dashboard file editing disabled.
03 · VERIFY
WordPress core integrity checked, and plugin checksums verified where available.
04 · SEARCH
Themes and plugins searched for more backdoors, and uploads checked for PHP files.
05 · REVIEW
Cron jobs, .htaccess, wp-config.php and common PHP persistence mechanisms reviewed.
06 · RETEST
Caches cleared and the live site retested to confirm the ads were gone.
THE TURNING POINT
Then the Malware Came Back
Weeks after the cleanup, the same payload appeared again, this time inside a completely different plugin.
AUGUST 2026
Payload found in Yoast SEO
→
AFTER INCIDENT ONE
Cleanup and hardening
→
SEPTEMBER 2026
Same publisher ID, now inside Jetpack

INCIDENT ONE · YOAST SEO

INCIDENT TWO · JETPACK
SAME PAYLOAD IN BOTH
ca-pub-3497225519667559
Two unrelated, legitimate plugins had now been modified with the same payload. The investigation could no longer reasonably focus on one plugin.
WIDER SCOPE
The Investigation Expanded Beyond WordPress
The recurrence pointed to something that could still write files into the hosting environment. So the investigation moved outward, layer by layer.
LAYER 1
WordPress
Users · themes · plugins · cron
LAYER 2
Hosting Account
FTP access · cPanel · SSH · filesystem · logs
LAYER 3
Sibling / Legacy Environments
Other installations sharing the same hosting account
ACCESS SURFACE
FTP Access Became an Important Lead
Several FTP accounts existed with different access scopes. One unrecognized account, pws, could reach the entire hosting-account directory rather than only the live site’s folder.
This was an attack surface found during the investigation and secured. It is not proof that this account was used by the attacker.

EVIDENCE · FTP ACCOUNTS AND ACCESS SCOPES
LEGACY INSTALLATION
A Legacy Site Added Another Risk Surface
An old WordPress installation still lived inside the same hosting account. It contained historical non-standard and insecure code, and it ran under the same Unix account as the live store, so it could not be treated as fully trusted.
It was no longer needed, so it was removed. Removing unused environments reduced unnecessary attack surface; it is not claimed to be the source of the reinfection.
FORENSIC LIMITATION
The Missing Logs Became a Forensic Limitation
The infected Jetpack file carried a useful modification time: September 17, 2026 — 2:58 AM. But the web logs still available began several hours later.
The logs for the exact compromise window had already rotated away, so the entry route could not be conclusively reconstructed. Log archiving was then enabled so any future incident keeps far better evidence.

RAW ACCESS LOGS · RETENTION

HOSTING ENVIRONMENT · SERVER INFORMATION (SANITIZED)
JETPACK FILE MODIFIED
Sept 17 · 2:58 AM
GAP
AVAILABLE LOGS BEGIN
Several hours later
Good incident response depends on having the right logs before you need them.
INTEGRITY
Restoring Trusted Plugin Code
After the malicious block was removed, Jetpack’s code was verified against the official WordPress.org release. The goal was not just that the ads disappeared, but that the modified file was back in a verifiable, official state.
Success: Verified 1 of 1 plugins.

EVIDENCE · OFFICIAL CHECKSUM VERIFICATION
THIRD-PARTY PUBLIC REPORTING
A separate, publicly reported WordPress incident described the same rogue identity, custom / [email protected], alongside unauthorized ad injection into plugin code.
This suggests the identity and pattern have appeared elsewhere. It does not establish who compromised Kozy Kingdom, or prove the same attacker was responsible.
INFRASTRUCTURE
Moving to a Cleaner Hosting Architecture
The investigation ended with a clean migration from the old shared hosting environment to a VPS. The benefit is stronger isolation, better logging and more control. No server is immune to compromise.
01
→
Compromised shared environment
02
→
Verified WordPress, code and data
03
→
Clean migration
04
VPS environment
STRONGER ISOLATION
BETTER LOGGING
SERVER-LEVEL CONTROL
SEPARATION FROM LEGACY
BETTER FUTURE INVESTIGATION
Outcome
Unauthorized ads removed
Known malicious payload removed
Hidden administrator removed
Authentication backdoor removed
Official plugin integrity restored
Access accounts secured
Legacy environment removed
Logging improved
Clean VPS migration completed
No further recurrence reported to date
CLIENT FEEDBACK FROM OUR WORK WITH KOZY KINGDOM
Frank Morris
Owner, Kozy Kingdom
Technical Investigation Summary
INCIDENT
Recurring unauthorized AdSense injection
MODIFIED FILES
Yoast SEO → Jetpack
PERSISTENCE / ACCESS FINDINGS
Hidden administrator, unauthorized login code and multiple hosting access surfaces
INTEGRITY VERIFICATION
WordPress core and plugin checksums
HOSTING INVESTIGATION
FTP · SSH · cPanel · logs · filesystem · legacy installation
HARDENING
Credentials · salts · file editing · access cleanup · logging
INFRASTRUCTURE
Clean VPS migration
The exact entry vector could not be conclusively proven, because the relevant logs were no longer available.
Dealing With a WordPress Security Problem That Keeps Coming Back?
Recurring compromises usually need more than deleting the visible malware. They need an investigation into how something keeps getting back in.

