id: teamcity-login-panel

info:
  name: TeamCity Login Panel - Detect
  author: princechaddha
  severity: info
  description: TeamCity login panel was detected.
  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:jetbrains:teamcity:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: jetbrains
    product: teamcity
    shodan-query:
      - http.component:"TeamCity"
      - http.title:teamcity
      - http.component:"teamcity"
    fofa-query: title=teamcity
    google-query: intitle:teamcity
  tags: panel,teamcity,jetbrains,detect,discovery

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

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "<title>Log in to TeamCity &mdash; TeamCity</title>"

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        part: body
        group: 1
        name: version
        regex:
          - "Version</span> ([0-9.]+)"

      - type: regex
        part: body
        group: 1
        name: build
        regex:
          - "Version</span> [0-9.]+ \\(build (.*)\\)</span>"
# digest: 4a0a00473045022100c0a10cf508ed05ba4b38706680e2837d7b0aeecf39e73a7a3798c0e053175eec0220303294d6fdc828844bf31737e86884e359bdc4b96e18a95a13d2de1fb728a494:922c64590222798bb761d5b6d8e72950