id: gitblit-panel

info:
  name: Gitblit Login Panel - Detect
  author: tess,righettod
  severity: info
  description: |
    Gitblit login panel was detected — a pure Java stack for managing, viewing, and serving Git repositories.
  reference:
    - https://www.gitblit.com/
    - https://github.com/gitblit-org/gitblit
  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:gitblit:gitblit:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: gitblit
    product: gitblit
    shodan-query:
      - http.title:"Gitblit"
      - http.title:"gitblit"
      - http.html:"gitblit"
    fofa-query:
      - body="gitblit"
      - title="gitblit"
    google-query: intitle:"gitblit"
  tags: panel,gitblit,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}"

    host-redirects: true
    max-redirects: 2

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "<title>Gitblit</title>"
          - "Welcome to Gitblit"
        condition: or

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - '<span>v([0-9\.]+)</span>'
# digest: 4b0a00483046022100ab57ef84e8a48686c2b8b465afb5062f7a9dc251f5a6b32c604c4abc75a70558022100de826f9021c00e109cd55ce6045a347764d1890f3b2e5ffe6d61217edb7a7c37:922c64590222798bb761d5b6d8e72950