id: cgit-panel

info:
  name: CGIT - Detect
  author: tess,righettod
  severity: info
  description: CGIT panel was detected.
  reference:
    - https://git.zx2c4.com/cgit/about/
  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:cgit_project:cgit:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: cgit_project
    product: cgit
    shodan-query:
      - http.title:"Git repository browser"
      - http.title:"git repository browser"
    fofa-query: title="git repository browser"
    google-query: intitle:"git repository browser"
  tags: panel,git,cgit_project,discovery

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

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains_all(to_lower(body), "git repository browser", "cgit")'
        condition: and

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - '(?i)<meta\s+name=.?generator.?\s+content=.?([a-z0-9\s.]+).?'
# digest: 4a0a00473045022100f628cfd1117755e21e89f353635ec9e98c0fa2b49963c2d1a6c3315789d7bd9c02203d330ab9b4b180099adc53f754f2893f2d1ca81870c3672efd04bf895e71691d:922c64590222798bb761d5b6d8e72950