id: casaos-detection

info:
  name: CasaOS Detection
  author: pdteam
  severity: info
  reference:
    - https://github.com/IceWhaleTech/CasaOS
  classification:
    cpe: cpe:2.3:o:icewhale:casaos:*:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    vendor: icewhale
    product: casaos
    shodan-query: http.html:"/CasaOS-UI/public/index.html"
    fofa-query: body="/CasaOS-UI/public/index.html"
  tags: casaos,tech,oss,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}/v1/sys/debug"

    matchers:
      - type: dsl
        dsl:
          - contains(to_lower(body), 'casaos version')

    extractors:
      - type: regex
        group: 1
        regex:
          - CasaOS Version:\s*([0-9.]+)
# digest: 4a0a0047304502206f4a679aa0d858d483b4424dca9418fb4e4b1f79a14c87f74f549cfbafa2feab0221009eb8994e029930abc6fad7a8325b680f23b86110cf12c4bd1fa1294970afb5db:922c64590222798bb761d5b6d8e72950