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

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: 490a00463044022021ddd1514c9b15d7407d2b1dfd08ce1b329d861caef607ef9083e5bbffe2d78102204f56b3dd96d99cc179e020b737c526cfb904855c8d24054e69ac23d0c112c95f:922c64590222798bb761d5b6d8e72950