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"
      - "Set-Cookie: i_like_gogs="
      - http.favicon.hash:-449283196
      - http.favicon.hash:917966895
      - http.favicon.hash:1935513730
    google-query:
      - intitle:"Sign In - Gogs"
      - intitle:"sign in - gogs"
    fofa-query:
      - title="sign in - gogs"
      - "Set-Cookie: i_like_gogs="
      - icon_hash="-449283196"
      - icon_hash="917966895"
      - icon_hash="1935513730"
  tags: panel,gogs,discovery

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

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '<meta property="og:description" content="Gogs is a painless self-hosted Git service.">'
          - '<meta name="description" content="Gogs is a painless self-hosted Git service" />'
          - "<title>Sign In - Gogs</title>"
        condition: or

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        group: 1
        regex:
          - "Version: ([0-9.]+) Page:"
# digest: 490a004630440220674e86a3d1973488abbab68519b260141271649f517fdafb114c0d6559e1c01c0220671ccf0ba2681a731ce63062e2903433277d0f7d209bcb24566df5d34b4a4371:922c64590222798bb761d5b6d8e72950