Skip to content

1.7.0: fewer false alarms, new PHP2Shell and wp2shell indicators - #15

Merged
CptNope merged 1 commit into
mainfrom
fewer-false-alarms
Nov 5, 2026
Merged

CptNope merged 1 commit into
mainfrom
fewer-false-alarms

Conversation

@CptNope

@CptNope CptNope commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Merging this releases 1.7.0. The version is bumped, so once CI passes on main the release workflow publishes the GitHub release and deploys to WordPress.org SVN.

Fewer false alarms

Clean sites were getting "Suspicious" or "Compromised" verdicts. The causes were files that newly installed plugins and hosts create, and two signatures that matched ordinary code.

Before Now
PHP in uploads/<plugin>/ or cache/<plugin>/: high when recent named after the installed plugin or theme (exact folder-name match only). Older files are low; recent or request-handling files are medium, so an attacker naming a folder after a plugin still gets a "needs review". Code signatures still apply. Generic names (cache, files, backups…) are never claimed by a plugin.
Each PHP file of an update left half-unpacked in wp-content/upgrade/: high one medium finding per folder, only for WordPress's real layout (wordpress-<ver>/wordpress/…, <slug>[.<ver>]/<slug>/…)
Must-use files from ManageWP, Health Check, WP Staging and others: medium low for known names, or for files that do nothing but require an installed plugin. Files that also log people in or read requests stay medium.
Drop-ins from caches not on the list: medium recognised by name (Jetpack Boost, Super Page Cache, FlyingPress…), or a low note when they load an installed plugin
All In One WP Security's aios-bootstrap.php firewall: high "backdoor" Wordfence, AIOS and MalCare firewalls are trusted only at the site root while their plugin is installed. Previously any path containing wordfence-waf.php, malcare or imunify was trusted.
auto_prepend_file into host vendor folders (/usr/local/<x>/, /opt/<x>/, /usr/share/<x>/, /var/imunify360/) or an installed plugin's folder: high low. Session files, temp folders, .. paths and site data folders stay high.
public function exec( $request ): critical not matched; only real calls are
file_put_contents() with $_POST (custom CSS, imports): high medium. Still high when the file name comes from the request, a PHP file is written, or decoded input is written.
aios-bootstrap.php, malcare-waf.php in the site root; GoDaddy's gd-config.php: "unknown file" known files, but only while their plugin (or GoDaddy's must-use plugin) is installed

CI: the false-alarm job now also scans the shipped zips of about 55 of the most-installed wordpress.org plugins (security, backup, cache, snippets, SEO, forms, management) and 7 themes.

Independent adversarial review. A separate review found ways to hide a webshell behind the first draft:

  • an attacker-chosen folder name like uploads/users/ counted as User Switching's folder
  • upgrade/wordpress-1/ counted as a core update
  • /var/lib/php/sessions counted as a host-only folder
  • an aios-bootstrap.php anywhere was trusted
  • a mention of a plugin in a comment could make a login backdoor look like a loader

All are fixed and have regression tests.

New indicators (sources checked)

  • PHP2Shell (0x4D31 honeypot captures, Oct 22–24; Defused and Prophet Security):
    • log markers: PHP2SHELL_CORE_…, …CHAIN_OK, …CHECK, the p2s_v2 "alive" probe, shellflow_canary, recon0xdeadbeef, p2s-rider, fixed session IDs and boundaries, /pwn-<ip>
    • shell_<8 hex>.php webshell names
    • response markers in code
    • session files
    • 26 addresses (medium, "investigate")
  • wp2shell persistence (Dosdediez incident report):
    • fake plugin folders advanced-cache-handler-<hex>, database-repair-assistant-<hex>, wp2shell-<hex>
    • w2s_ / wpsvc_ admin accounts
    • the _site_transient_health_<hex> option
    • WP_Core_Integrity and wp_compat_<hex> markers
    • class-wp-cache-<hex>.php
  • WordPress's Oct 28 security release (7.1.4, 7.0.8, 6.9.11…): a medium reminder for sites below it. It covers the update race-condition RCE. Only wp2shell versions read as "Vulnerable".

Checks

  • Integration: 208/208 on the GitHub edition. 207/208 on the WordPress.org build; the miss is the expected self-checksum check, since WordPress.org has no checksums for 1.7.0 yet. 27 new checks are in section 17b, including the reviewer's attack cases.
  • Code signatures over 14,337 PHP files from 34 popular plugin repos: no high/critical matches in shipped code. The only 2 are W3 Total Cache's test fixtures, which aren't in its release zip.
  • Plugin Check: no errors. Reviewer ruleset: clean.
  • Nonce audit with annotations off: every handler checks its nonce and capability. The only reads without one are display-only (tab, done, err), now all annotated.

https://claude.ai/code/session_011ejUFSkKi2KuJi647biNmu


Generated by Claude Code

@CptNope
CptNope force-pushed the fewer-false-alarms branch 2 times, most recently from 1dd2fab to d06954c Compare November 5, 2026 05:02
False alarms on clean sites came from newly installed plugins and host
files, and from two signatures that matched ordinary code:

- PHP in an uploads/cache folder named exactly after an installed plugin
  or theme names its owner: older files low, recent or request-handling
  files medium (not high). Code signatures still apply; generic names
  never count.
- Packages left half-unpacked in wp-content/upgrade/ (WordPress's real
  layout only) are one medium finding per folder, not high per file.
- Must-use files that only require an installed plugin, and drop-ins that
  load one, are low; more host and tool names are known.
- Firewall bootstraps (Wordfence, AIOS, MalCare) are trusted only at the
  site root while their plugin is installed; auto_prepend_file into host
  vendor folders or an installed plugin is low; session files, temp
  folders and ".." paths stay high.
- A method named exec()/system() is not a shell call; file_put_contents()
  with form input is medium unless the file name comes from the request,
  a PHP file is written, or decoded input is written.
- CI's false-positive test also covers ~55 wordpress.org plugins and 7
  themes as shipped.

An independent adversarial review found ways to hide a webshell behind
the first draft (attacker-chosen folder names, fake upgrade folders,
session files as "system" paths, firewall names anywhere, comment-only
loaders); all are closed and tested.

New indicators: PHP2Shell honeypot markers, shell_<8 hex>.php, session IDs
and addresses (Oct 22-24); wp2shell persistence (fake plugin folders,
w2s_/wpsvc_ admins, _site_transient_health_<hex> incl. multisite,
WP_Core_Integrity and wp_compat_<hex> markers); a reminder for WordPress's
Oct 28 security release (7.1.4 and backports).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011ejUFSkKi2KuJi647biNmu
@CptNope
CptNope force-pushed the fewer-false-alarms branch from d06954c to 9b92d26 Compare November 5, 2026 05:04
@CptNope
CptNope merged commit e6f0eb3 into main Nov 5, 2026
20 checks passed
@CptNope
CptNope deleted the fewer-false-alarms branch November 5, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant