id: gogs-panel

info:
  name: Gogs Login Panel - Detect
  author: DhiyaneshDk,daffainfo
  severity: info
  description: Gogs login panel was detected.
  reference:
    - https://gogs.io/
  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:gogs:gogs:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: gogs
    product: gogs
    shodan-query:
      - title:"Sign In - Gogs"
      - http.title:"sign in - gogs"
      - cpe:"cpe:2.3:a:gogs:gogs"
    google-query:
      - intitle:"Sign In - Gogs"
      - intitle:"sign in - gogs"
    fofa-query: title="sign in - gogs"
  tags: panel,gogs

http:
  - method: GET
    path:
      - '{{BaseURL}}/user/login'

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '<meta property="og:title" content="Gogs'
          - 'js/gogs.js?v='
        condition: and

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        group: 1
        regex:
          - 'Version: ([0-9.]+) Page:'
# digest: 4b0a0048304602210086bc7c4c37ee3a5356c5dc7d6833d2a22ec732df966d3de9a19ff4ce4bec6b69022100ff979901e0c9231c55596ee9060b17eaa07611763179bce8e08d9bf50395c00a:922c64590222798bb761d5b6d8e72950