id: metersphere-login

info:
  name: MeterSphere Login Panel - Detect
  author: pdteam
  severity: info
  description: MeterSphere login panel was detected.
  reference:
    - https://github.com/metersphere/metersphere
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
    cwe-id: CWE-200
    cpe: cpe:2.3:a:metersphere:metersphere:*:*:*:*:*:*:*:*
  metadata:
    max-request: 2
    vendor: metersphere
    product: metersphere
    fofa-query:
      - body="metersphere"
      - title="metersphere"
    shodan-query: http.html:"metersphere"
  tags: panel,metersphere,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}/favicon.ico"
      - "{{BaseURL}}/login"

    stop-at-first-match: true

    matchers-condition: or
    matchers:
      - type: dsl
        dsl:
          - "status_code==200"
          - "('1023469568' == mmh3(base64_py(body)))"
        condition: and

      - type: dsl
        dsl:
          - "status_code==200"
          - "contains(tolower(body), 'metersphere')"
        condition: and

      - type: dsl
        dsl:
          - "contains(tolower(header), 'ms_session_id')"
# digest: 4b0a00483046022100af2be13e721abaeede487633f4c8c79b3722ce7fd7d3a847c05e159970fb6d050221008683cbbc5c0e8660ae23a68bb1cae1ba3dc48168867fa92b237b7ed8631aebf3:922c64590222798bb761d5b6d8e72950