Skip to content
NewCybercrime Report 2026 · Eight Chapters · A Post Is Not An Incident → Explore The ChaptersCybercrime Report 2026 → Explore
All short reads
Short readEnterprise exploitation5 min read

Config-Restore CMS Injection and Polymorphic PHP: Inside a 532-Entry Workbench

By
Odin by Brandefense
Published
30 November 2026
Reading time
5 min read

Key takeaways

  • Workbench A on a Hong Kong cloud server exposed 532 deduplicated root entries (373 sized files = 3,005,041 bytes, all stored; 159 unsized) on TCP 8000 on 13 November 2026.
  • Generated _payload_* PHP factory files account for 282 entries (2.62 MB, 87.3% of bytes), led by 155 polymorphic XOR-gzip shells and 29 taglib modules (24 AES-128-ECB at 3,202 B).
  • Staged Python scripts pair SOCKS5-proxied CMS sys_info injection into include/taglib/*.lib.php with immediate restoration of original settings and modified JavaScript files.
  • Every encrypted PHP implant avoids literal eval() by executing unpacked code through ephemeral dot-prefixed temp .dat files or custom stream_wrapper_register classes.
  • Mount CMS include/taglib/ paths read-only, block direct HTTP POST to library folders, lock php.ini disable_functions, and scan webroots with structural YARA rules.

An open TCP 8000 directory on a Hong Kong cloud server paired 181 Python CMS scripts with 155 polymorphic PHP shells and 29 taglib stream-wrapper modules (24 AES-encrypted). Odin by Brandefense analyzed all 532 deduplicated root entries from that adversary staging server, designated Workbench A, recorded on 13 November 2026.

Workbench A holds session cookies and Python scripts referencing 18 external target prefixes. Zero IPv4 addresses, zero per-build tokens, and zero target names are therefore published. The full report's Indicators tab lists 170 SHA-256 digests of the attacker's own PHP tools.

How Were the 532 Root Entries on Workbench A Organized Across PHP and Python Layers?

Workbench A was recorded on 13 November 2026 on TCP 8000. Its directory listing reported 532 root files, matching our deduplicated count of 532 entries across 373 sized and stored script files (3,005,041 bytes, 3.01 MB) and 159 unsized entries.

Web platform teams rely on external attack surface management to find internet-facing legacy CMS panels and open staging ports before session cookies are replayed. Detection engineers also use cyber threat intelligence to turn invariant PHP loader code into structural YARA, Sigma, and Suricata alerts. Unlike stolen cloud credentials documented in an earlier Odin study on WordPress persistence, Workbench A focuses on DedeCMS and WCM sys_info injection paired with setting rollback.

Figure 1: Four staged tracks span all 532 entries behind clean CMS settings
Figure 1: Four staged tracks span all 532 entries behind clean CMS settings

Across (root), 282 generated _payload_* PHP factory files (ZONE-01, all sized and stored) total 2,624,055 bytes (87.3% of sized bytes). Target-prefixed Python scripts (ZONE-02, 117 entries across 18 withheld target prefixes) add 86 sized scripts (379,841 B) and 31 unsized items. Standalone PHP files and notes (ZONE-03, 69 entries: 5 sized = 1,145 B plus 64 unsized) and 64 unprefixed Python playbooks (ZONE-04, unsized) complete the 532 total.

Cluster (CL-01 to CL-06)EntriesSized bytesVerified Workbench A artifacts
CL-01: Polymorphic & Legacy PHP Shells1792,495,247155 _payload_*_gz_*.php builds (151 at ~16 KB), 3 standalone _payload_* shells, 20 aa_php52*/aa_php53* shells, and godzilla_shells.txt.
CL-06: Multi-Target CMS & Upload Scripts161303,14367 sized .py campaign scripts (303,143 B) and 94 unsized playbooks, notes, and test files across 18 withheld target prefixes.
CL-05: PHP Version & Execution Echo909,17282 33-byte _payload_*_phpver_echo_*.php files emitting PHPVER= (2,706 B), 5 sized echo .php files (6,466 B), and 3 unsized echo/jpg items.
CL-02: Stream Taglib & sys_info Write64144,24029 err*.lib.php modules (24 AES at 3,202 B + 5 variants = 112,785 B), explore2.lib.php (1,335 B), 7 sized sys_info .py injectors (30,120 B), and 27 unsized items.
CL-03: Self-Unlink Wipers & Restore2638,1095 92–97-byte _cleanup_*.lib.php @unlink(__FILE__) wipers (471 B), 9 sized JS/config restore .py scripts (37,638 B), and 12 unsized restore items.
CL-04: disable_functions Escape1215,1307 sized PHP escape/diag files (6,190 B, incl. bypass_try.lib.php [2,664 B] and diag_df.lib.php [722 B]), 3 sized diag .py scripts (8,940 B), and 2 unsized .php files.

How Do Config-Restore Scripts Pair With Eval-Free Polymorphic PHP Implants?

Four staged technical patterns span Workbench A, and every cluster reflects operator preparation rather than confirmed external compromise:

  1. CMS sys_info taglib injection and immediate rollback (64 and 26 entries). Python scripts route signed WcmUserID__ckMd5 cookies over socks5h://127.0.0.1:10808, save the baseline ORIG field value, and stage sys_info edits targeting /include/taglib/err.lib.php. Companion restore scripts reset sys_info to ORIG and repair modified .js files, while 5 92–97-byte _cleanup_*.lib.php modules (471 B) unlink test files and call @unlink(__FILE__).
  2. Polymorphic XOR-gzip shells with .dat and stream-wrapper execution (179 entries). Each of the 155 _payload_*_gz_*.php builds (6,310–16,093 B; 151 at ~16 KB) changes its filename, ak_<6char> and sb_<6char> function names, and single-byte XOR seed. Every build keeps str_pad($key, 16, chr(0)), pack("H*"), 56-byte handshake masking, and eval-free execution via temp /.<5char><md5>.dat @include+@unlink or split "stream_wr"."apper_" memory streams.
  3. Cookie-keyed AES-128-ECB CacheStream taglib implants (24 of 29 CL-02 err*.lib.php builds). Twenty-four 3,202-byte err*.lib.php files decrypt hex chunks in __destruct() via openssl_decrypt(..., 'AES-128-ECB', $pC), using the live HTTP cookie $pC as the AES key. Each module then registers CacheStream_<6char> via stream_wrapper_register(), runs @include('<scheme>://1') in memory, clears static state, and unregisters the wrapper.
  4. Version echo and disable_functions escape checks (90 and 12 entries). Eighty-two 33-byte PHPVER= scripts (2,706 B) identify PHP 5.2, 5.3, or 7/8 runtimes ahead of deployment. Diagnostic modules diag_df.lib.php (722 B) and bypass_try.lib.php (2,664 B) check open_basedir, mail()/mb_send_mail(), and error_log mode-3 file appends when system and exec are disabled.
Figure 2: Mutable evasion surface vs invariant skeleton in 184 PHP builds
Figure 2: Mutable evasion surface vs invariant skeleton in 184 PHP builds

Figure 3 models how staged sys_info injection and immediate setting rollback leave the sys_info settings clean while /include/taglib/err.lib.php remains staged on disk.

Figure 3: Analytical model of staged CMS config injection, taglib write, and rollback
Figure 3: Analytical model of staged CMS config injection, taglib write, and rollback

What Should CMS Platform, PHP Runtime, and Detection Teams Do First?

Blue teams can close each of these staged paths with three concrete actions:

  1. Mount /include/taglib/ read-only and rotate CMS cookie salts. Enforce read-only permissions for web workers across /include/, /include/taglib/, and /templets/. Return HTTP 403 on external requests to /include/ or *.lib.php, and rotate cfg_cookie_encode signing keys to invalidate captured WcmUserID__ckMd5 cookies.
  2. Deploy structural YARA scans and off-host file-event logging. Match webroot files against the 170 published tool hashes. Then scan PHP webroots with odin_polymorphic_php_and_stream_wrapper_kits.yar (Rules 1–4) to catch 16-byte zero-padded XOR shells and CacheStream AES taglib modules. Forward auditd or Sysmon file-create and file-delete logs off-host and schedule Sentinel KQL and Sigma Rules 1–2 for *.lib.php and /tmp/.*.dat events.
  3. Lock php.ini escape primitives and web-tier egress. Add putenv, mail, mb_send_mail, imap_open, imap_mail, pcntl_exec, and dl to disable_functions, set ffi.enable=false, enforce open_basedir, and fix error_log to an immutable log path. Block unproxied web-server HTTP egress and deploy Suricata sid:9574001–9574006.
Figure 5: CL-01 holds 83.0% of bytes while six clusters map to layered controls
Figure 5: CL-01 holds 83.0% of bytes while six clusters map to layered controls

Frequently asked questions

How Were the 532 Root Entries on Workbench A Organized Across PHP and Python Layers?

Workbench A was recorded on 13 November 2026 on TCP 8000. Its directory listing reported 532 root files, matching our deduplicated count of 532 entries across 373 sized and stored script files (3,005,041 bytes, 3.01 MB) and 159 unsized entries.

How Do Config-Restore Scripts Pair With Eval-Free Polymorphic PHP Implants?

Four staged technical patterns span Workbench A, and every cluster reflects operator preparation rather than confirmed external compromise: Figure 3 models how staged sys_info injection and immediate setting rollback leave the sys_info settings clean while /include/taglib/err.lib.php remains staged on disk.

What Should CMS Platform, PHP Runtime, and Detection Teams Do First?

Blue teams can close each of these staged paths with three concrete actions:

Read the full report · 19 min read

Config-Restore CMS Injection and Polymorphic PHP: Inside a 532-Entry Workbench

On 13 November 2026, Odin by Brandefense analyzed Workbench A, a 532-entry adversary staging directory on TCP port 8000 of a Hong Kong server totaling 3.01 megabytes. The workspace pairs ...

Full report, 170 indicators and detection rules