id: jumpserver-panel

info:
  name: JumpServer Login Panel - Detect
  author: lu4nx,righettod
  severity: info
  description: |
    JumpServer Open Source Bastion Host login panel was detected.
  reference:
    - https://www.jumpserver.org/
    - https://github.com/jumpserver/jumpserver
  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:fit2cloud:jumpserver:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 2
    shodan-query: http.title:'JumpServer'
    zoomeye-query: title:'JumpServer'
    product: jumpserver
    vendor: fit2cloud
  tags: panel,jumpserver,login

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

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: regex
        part: body
        regex:
          - "(?i)<title>(\n.*)JumpServer Open Source Bastion Host(\n.*)</title>"
          - "(?i)<title>(\n.*)JumpServer 开源堡垒机(\n.*)</title>"
          - "(?i)<title>\n*Jumpserver.*?\n*</title>"
          - "(?i)>Welcome to the Jumpserver.*?</h2>"
        condition: or

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - '(?i)&copy;\s+([0-9-]+)'
# digest: 4a0a0047304502203062debc1187c6b935ff51d57f3ddac79c4720d2d4993a2e376e2d8760dfd01302210091b227d5774805857cd2712b7dd4aa19cefc129be824866b5931297b4b7b4db6:922c64590222798bb761d5b6d8e72950