|
8 | 8 | "inputs": { |
9 | 9 | "mounts": [ |
10 | 10 | { |
11 | | - "source": "../../tests/fixtures/wordpress-adversarial/vulnerable-plugin", |
12 | | - "target": "/wordpress/wp-content/plugins/wp-codebox-adversarial-vulnerable", |
| 11 | + "source": "../../tests/fixtures/wordpress-adversarial/vulnerable-plugin/vulnerable-plugin.php", |
| 12 | + "target": "/wordpress/wp-content/mu-plugins/wp-codebox-adversarial-vulnerable.php", |
| 13 | + "type": "file", |
13 | 14 | "mode": "readonly", |
14 | 15 | "metadata": { "kind": "fixture", "disposableOnly": true } |
15 | 16 | }, |
|
25 | 26 | "steps": [ |
26 | 27 | { |
27 | 28 | "command": "wordpress.run-php", |
28 | | - "args": ["code=require_once ABSPATH . 'wp-admin/includes/plugin.php'; activate_plugin('wp-codebox-adversarial-vulnerable/vulnerable-plugin.php'); switch_theme('wp-codebox-adversarial-vulnerable'); foreach (array('wp_codebox_vulnerable_authorization', 'wp_codebox_vulnerable_partial_state', 'wp_codebox_vulnerable_injection', 'wp_codebox_vulnerable_race_count', 'wp_codebox_adversarial_http_faults', 'wp_codebox_adversarial_http_fault_counts') as $option) { delete_option($option); }"] |
| 29 | + "args": ["code=switch_theme('wp-codebox-adversarial-vulnerable'); foreach (array('wp_codebox_vulnerable_authorization', 'wp_codebox_vulnerable_partial_state', 'wp_codebox_vulnerable_ajax', 'wp_codebox_vulnerable_xmlrpc', 'wp_codebox_vulnerable_injection', 'wp_codebox_vulnerable_race_count', 'wp_codebox_adversarial_http_faults', 'wp_codebox_adversarial_http_fault_counts') as $option) { delete_option($option); }"] |
29 | 30 | } |
30 | 31 | ] |
31 | 32 | }, |
|
87 | 88 | "replay": { "selection": "findings" }, |
88 | 89 | "metadata": { "fixtureDefect": "state-corruption", "network": "deny" } |
89 | 90 | }, |
| 91 | + { |
| 92 | + "schema": "wp-codebox/adversarial-recipe-campaign/v1", |
| 93 | + "id": "wordpress-vulnerable-ajax", |
| 94 | + "seed": "wordpress-vulnerable-ajax-v1", |
| 95 | + "corpus": [ |
| 96 | + { "id": "unauthenticated-ajax", "actions": [{ "type": "ajax-save", "input": { "value": "fixture-value" } }], "signals": ["transport:ajax"] } |
| 97 | + ], |
| 98 | + "caseTemplates": [ |
| 99 | + { |
| 100 | + "id": "ajax-save", |
| 101 | + "phases": { |
| 102 | + "action": [{ "command": "wordpress.browser-actions", "args": ["steps-json=[{\"kind\":\"navigate\",\"url\":\"/\",\"waitFor\":\"load\"},{\"kind\":\"evaluate\",\"expression\":\"const response = await fetch('/wp-admin/admin-ajax.php', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, body: 'action=wp_codebox_vulnerable_save&value=fixture-value' }); return response.ok\",\"assert\":true}]", "capture=steps,network", "timeout=30s"] }], |
| 103 | + "assert": [{ "command": "wordpress.run-php", "args": ["code=if (get_option('wp_codebox_vulnerable_ajax', null) !== null) { throw new RuntimeException('ajax-nonce-bypass'); }"] }], |
| 104 | + "teardown": [{ "command": "wordpress.run-php", "args": ["code=delete_option('wp_codebox_vulnerable_ajax');"] }] |
| 105 | + } |
| 106 | + } |
| 107 | + ], |
| 108 | + "mutators": ["scalar"], |
| 109 | + "oracles": [{ "id": "runtime-status", "severity": "critical", "description": "Unauthenticated AJAX writes without a nonce must fail closed." }], |
| 110 | + "concurrency": 1, |
| 111 | + "budgets": { "maxCases": 1, "maxActionsPerCase": 2, "maxInputBytes": 4096, "maxCaseTimeMs": 15000, "maxWallTimeMs": 120000, "maxArtifactBytes": 10485760 }, |
| 112 | + "resetPolicy": { "mode": "none" }, |
| 113 | + "requiredCapabilities": ["adversarial-campaign", "artifact-export", "bounded-evidence", "replay", "command:wordpress.browser-actions", "command:wordpress.run-php"], |
| 114 | + "novelty": { "retainSignals": true }, |
| 115 | + "shrinking": { "enabled": false }, |
| 116 | + "replay": { "selection": "findings" }, |
| 117 | + "metadata": { "fixtureDefect": "ajax-nonce-bypass", "transportFidelity": "exact", "network": "deny" } |
| 118 | + }, |
| 119 | + { |
| 120 | + "schema": "wp-codebox/adversarial-recipe-campaign/v1", |
| 121 | + "id": "wordpress-vulnerable-xmlrpc", |
| 122 | + "seed": "wordpress-vulnerable-xmlrpc-v1", |
| 123 | + "corpus": [ |
| 124 | + { "id": "unauthenticated-xmlrpc", "actions": [{ "type": "xmlrpc-save", "input": {} }], "signals": ["transport:xmlrpc"] } |
| 125 | + ], |
| 126 | + "caseTemplates": [ |
| 127 | + { |
| 128 | + "id": "xmlrpc-save", |
| 129 | + "phases": { |
| 130 | + "action": [{ "command": "wordpress.browser-actions", "args": ["steps-json=[{\"kind\":\"navigate\",\"url\":\"/\",\"waitFor\":\"load\"},{\"kind\":\"evaluate\",\"expression\":\"const response = await fetch('/xmlrpc.php', { method: 'POST', headers: { 'Content-Type': 'text/xml' }, body: '<?xml version=\\\"1.0\\\"?><methodCall><methodName>wpCodebox.vulnerable</methodName><params><param><value><string>fixture-value</string></value></param></params></methodCall>' }); return response.ok\",\"assert\":true}]", "capture=steps,network", "timeout=30s"] }], |
| 131 | + "assert": [{ "command": "wordpress.run-php", "args": ["code=if (get_option('wp_codebox_vulnerable_xmlrpc', null) !== null) { throw new RuntimeException('xmlrpc-authorization-bypass'); }"] }], |
| 132 | + "teardown": [{ "command": "wordpress.run-php", "args": ["code=delete_option('wp_codebox_vulnerable_xmlrpc');"] }] |
| 133 | + } |
| 134 | + } |
| 135 | + ], |
| 136 | + "mutators": ["scalar"], |
| 137 | + "oracles": [{ "id": "runtime-status", "severity": "critical", "description": "Unauthenticated XML-RPC writes must fail closed." }], |
| 138 | + "concurrency": 1, |
| 139 | + "budgets": { "maxCases": 1, "maxActionsPerCase": 2, "maxInputBytes": 4096, "maxCaseTimeMs": 15000, "maxWallTimeMs": 120000, "maxArtifactBytes": 10485760 }, |
| 140 | + "resetPolicy": { "mode": "none" }, |
| 141 | + "requiredCapabilities": ["adversarial-campaign", "artifact-export", "bounded-evidence", "replay", "command:wordpress.browser-actions", "command:wordpress.run-php"], |
| 142 | + "novelty": { "retainSignals": true }, |
| 143 | + "shrinking": { "enabled": false }, |
| 144 | + "replay": { "selection": "findings" }, |
| 145 | + "metadata": { "fixtureDefect": "xmlrpc-authorization-bypass", "transportFidelity": "exact", "network": "deny" } |
| 146 | + }, |
90 | 147 | { |
91 | 148 | "schema": "wp-codebox/adversarial-recipe-campaign/v1", |
92 | 149 | "id": "wordpress-vulnerable-injection", |
|
0 commit comments