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: app="JumpServer Bastion Host"
    product: jumpserver
    vendor: fit2cloud
  tags: panel,jumpserver,login,discovery

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: 4a0a00473045022071706543cdf51e5e434421ab71f3e50918effb347087fb4d334ea5f1149ef0f202210091d55a34b03124f567930b4f2dbe088b70c4c0da64c8f07811fe93e970fa0b4f:922c64590222798bb761d5b6d8e72950