In short
pax_cmd is the HTTP request parameter used by a WordPress theme backdoor that Odin Research described in Monograph 30. Scripts written to abuse a stolen Google Cloud service-account key overwrite theme files in a storage bucket that feeds the site. Any request that carries pax_cmd can then run system commands on the web server.
Key takeaways
- What it is
- The name of the parameter checked by a backdoored WordPress 404.php and functions.php. Its value is passed to PHP system command functions.
- How it gets there
- Two Python deployer scripts use a stolen Google Cloud service-account key to write PHP theme files into a Cloud Storage bucket that syncs into the web root.
- Why it matters
- When a bucket feeds a web root, write access to the bucket is write access to the site's code. No web login is needed.
- What Odin Research saw
- Two versions of the deployer in an exposed ARTEX archive, written for an iGaming staging site, plus twin Behinder webshells rebuilt for PHP 8. Whether the upload worked is unknown.
- What to do first
- Block requests that carry pax_cmd at the WAF, let only CI/CD accounts write to theme folders, and remove service-account keys from workstations.
What is pax_cmd?
pax_cmd is the HTTP request parameter used by a WordPress theme backdoor that Odin Research found in an exposed attack archive. Scripts in that archive overwrite theme files with code that reads pax_cmd from any request and runs its value as a system command. Anyone who knows the name can use the gate.
The name comes from the scripts themselves. It is not a WordPress feature, a plugin or a known malware family name. Odin Research documented it in Monograph 30, published in November 2026. Outside that report, there is no public reporting on pax_cmd that we could find, so this page relies mainly on Odin's own analysis.
A parameter like this turns a site into a web shell. MITRE ATT&CK tracks the technique as Server Software Component: Web Shell (T1505.003).
How the pax_cmd backdoor works
The chain abuses a common hosting design. Many WordPress platforms run stateless PHP containers and keep themes and media in cloud object storage that syncs into wp-content/. If executable theme files live in that bucket, cloud IAM decides who can change the site's code.
- Stolen key. The deployer reads a stolen Google Cloud service-account key, a JSON file that holds an RSA private key.
- Token. It signs a JWT and trades it for a one-hour OAuth bearer token through Google's standard server-to-server flow. It asks for broad storage and cloud-platform scopes.
- Bucket write. It lists up to 500 objects, looks for names such as
.php,wp-config,404and.env, then uploads two files into the active theme folder. - The gate. The new theme
404.phpchecks the request for apax_cmdvalue and passes it to PHP'ssystemfunction, falling back topassthru,execorshell_exec. - Every page. The new
functions.phpadds the same hook. WordPress loads the active theme'sfunctions.phpafter plugins, so the gate is reached far more often than a missing-page handler alone. - Probe. The script then tests the gate with a harmless identity command.
WordPress uses 404.php as the first template for missing pages, which is why it is a convenient hiding place.
What Odin Research observed
Monograph 30 reviewed 29 code files from nine open web directories. Only four were offensive scripts. Fifteen were ordinary package files. All host addresses are withheld.
- Two deployer versions.
deploy_gcs_webshell.py(5,251 bytes) anddeploy_gcs_webshell2.py(5,480 bytes) sat in an exposed ARTEX archive, next to the records of an iGaming task with 1,231 recorded worker runs. - A bug and a fix. Version 1 strips newlines from the key file, which corrupts the PEM key and breaks signing. Version 2 parses the key correctly and ships
functions.phpBase64-encoded, keeping a stub of the original so the theme still renders. - Victim withheld. The bucket, theme and iGaming staging site are withheld because they identify the victim. These are scripts, not logs of a result. Nothing shows whether the upload or the probe worked.
- Behinder twins. A separate directory held two small PHP webshells using the Behinder v3 protocol and its public default key. The first breaks on PHP 8.0. The second was rebuilt to run on PHP 8, showing the same fix-and-retry habit.
- Unverified claims. The same archive logs a crypto-exchange task with 2,178 worker runs. Its records claim SQL injection, a NAS webshell and a harvested cloud key. Odin treats all of them as unconfirmed claims from an AI-driven tool.
Every network address in the 29 files was already known from Monograph 11. For a shorter summary, read the short read.
How to detect pax_cmd
- Web requests. Search web and WAF logs for any request with a
pax_cmdparameter, in the query string or the body. There is no legitimate use for it. - Direct theme requests. Requests straight to a theme's
404.phpare unusual and worth a look. - PHP spawning shells. Alert when a PHP worker process starts
sh,bashorid. - Cloud audit logs. Alert on PHP objects written to a bucket that feeds a web root, and on token requests from service-account keys outside CI/CD.
- File integrity. Baseline the deployed theme files and alert when
404.phporfunctions.phpchanges outside a release.
Odin Research publishes rules for each layer. Monograph 30 carries Suricata signatures for pax_cmd gates, direct theme template requests and PHP uploads to Cloud Storage. It adds a Sentinel KQL hunt and Sigma rules for PHP theme writes in Cloud Storage audit logs and for PHP workers spawning shells. YARA rules cover the deployer scripts, injected theme files and the Behinder twins. All are in the Defense Kit.
How to defend against pax_cmd and similar backdoors
- Treat web-root buckets as production code. Only deployment accounts should write to theme folders. Alert on any PHP written there.
- Get rid of long-lived keys. Google recommends attached service accounts and Workload Identity Federation over keys. Enforce the "Disable service account key creation" and "Disable service account key upload" organization policies, and keep keys out of repositories and download folders. See non-human identity.
- Cut scopes. Remove project-editor rights and broad cloud-platform scopes from service accounts that only need one bucket.
- Harden PHP. MITRE suggests disabling PHP functions attackers abuse for web shells and limiting who can change the web directory.
- If a key leaks. Disable it, review audit logs for its use, and compare the deployed theme with a known-good copy. See How to respond to leaked credentials and check your sites with the WordPress exposure check.
pax_cmd compared with other web shell types
| Backdoor | How it is placed | Access control | Traffic |
|---|---|---|---|
| pax_cmd theme gate | Cloud bucket write with a stolen service-account key | None | Plain parameter, any page |
| Behinder | Uploaded PHP file (Monograph 30) | Public default key in the samples seen | AES-128 encrypted POST bodies |
| China Chopper | See our China Chopper profile | See profile | See profile |
Frequently asked questions about pax_cmd
What is pax_cmd?
pax_cmd is the request parameter used by a WordPress theme backdoor described in Odin Research's Monograph 30. Any request carrying it can make the server run system commands.
Is pax_cmd malware?
It is the trigger for a backdoor, not a standalone malware family. The malicious part is the PHP code written into the theme's 404.php and functions.php files.
How does the pax_cmd backdoor get onto a site?
Deployer scripts use a stolen Google Cloud service-account key to upload PHP theme files into a Cloud Storage bucket that syncs into the WordPress web root. No web login is needed.
Does pax_cmd need a password?
No. The gate has no IP restriction and no secret check, so anyone who knows the parameter name can use it.
How do I check my WordPress site for pax_cmd?
Search theme files for the string pax_cmd, search web logs for requests that carry it, and compare 404.php and functions.php with a known-good copy of your theme.
How do I block pax_cmd?
Add a WAF rule that rejects any request with a pax_cmd parameter. Then fix the root cause: restrict bucket writes and remove leaked service-account keys.
Is pax_cmd linked to a known threat group?
No named group. Odin Research models the wider infrastructure as one collector-operator cluster, which is an analytical model rather than an attribution.
pax_cmd vs Behinder: what is the difference?
Behinder is a known webshell manager that encrypts its traffic with a key. The pax_cmd gate takes a plain parameter with no key at all, and is planted through cloud storage rather than a file upload.
Sources
- Google Cloud, Best practices for managing service account keys. docs.cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys (checked 21 November 2026)
- MITRE ATT&CK, T1505.003 Server Software Component: Web Shell. attack.mitre.org/techniques/T1505/003/ (checked 21 November 2026)
- WordPress Developer Resources, Theme Functions. developer.wordpress.org/themes/basics/theme-functions/ (checked 21 November 2026)
- WordPress Developer Resources, Template Hierarchy. developer.wordpress.org/themes/basics/template-hierarchy/ (checked 21 November 2026)
Related tools and terms
What is XWorm?
XWorm is a commodity .NET remote access trojan sold to criminals. It offers remote control, keylogging and plugin modules.
Remote access trojanWhat is Quasar?
Quasar is an open-source .NET remote access tool for Windows that criminals and some state actors use as a RAT.
Remote access trojanWhat is AsyncRAT?
AsyncRAT is an open-source .NET remote access trojan widely used in commodity malware campaigns.
Remote access trojanWhat is DCRat?
DCRat (DarkCrystal RAT) is a low-cost commodity .NET remote access trojan sold on underground forums.
Remote access trojanWhat is VenomRAT?
VenomRAT is a commodity remote access trojan descended from the Quasar and AsyncRAT code bases.
Remote access trojanWhat is PureRAT?
PureRAT, also tracked as PureHVNC, is a commercial modular .NET remote access trojan with hidden-desktop control.
Odin Research
Get the rules, not just the definition
Every Odin Research report ships with verified indicators and detection rules you can load today.