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

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: 4a0a00473045022100e518b0b6bd8879b988651ce45f5483ff96e5b565b72897631e529bd20158ef0a022047cde2dc744d2401825bf65363455cafb309591a40ebb2f0275588631332ab51:922c64590222798bb761d5b6d8e72950