id: bookstack-panel

info:
  name: BookStack Login Panel - Detect
  author: cyllective,daffainfo
  severity: info
  description: Bookstack login panel was detected.
  reference:
    - https://github.com/BookStackApp/BookStack
  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:bookstackapp:bookstack:*:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    vendor: bookstackapp
    product: bookstack
    shodan-query:
      - http.title:"BookStack"
      - http.title:"bookstack"
    fofa-query: title="bookstack"
    google-query: intitle:"bookstack"
  tags: panel,bookstack,bookstackapp

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

    matchers-condition: and
    matchers:
      - type: word
        part: body
        condition: or
        words:
          - '<title>BookStack</title>'
          - '<span class="logo-text">BookStack</span>'

      - type: word
        part: header
        words:
          - 'Set-Cookie: bookstack_session'

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - '(?:app\.js|(?:print\-)?styles\.css)\?version=([\w\.\-]+)["'']>'
# digest: 4b0a00483046022100d704770dd867d9e154209b3d08379dee7de218504442912c5edb7550f049955b0221009cfec5c16fb1a1ba008746ee7391ac9e250a27ee088fa9d348b80689dcf127cf:922c64590222798bb761d5b6d8e72950