id: code-server-login

info:
  name: Code-Server Login Panel - Detect
  author: tess
  severity: info
  description: Code-Server 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:coder:code-server:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: coder
    product: code-server
    shodan-query: http.title:"code-server login"
    fofa-query: title="code-server login"
    google-query: intitle:"code-server login"
  tags: panel,detect,misc,coder,discovery

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

    host-redirects: true
    max-redirects: 2

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "Welcome to code-server"
          - "Please log in below. Check the config file at ~/.config/code-server/config.yaml
            for the password."
        condition: and

      - type: status
        status:
          - 200
# digest: 4a0a004730450220719ee809c30ccb18eb1ec5fd090f82a9253224c1444b503fbc052e6d87f9924202210088912f6be87ec503ff73a36d23df55610791ed00decaec7b22a7aa148a1300e9:922c64590222798bb761d5b6d8e72950