id: casaos-detection

info:
  name: CasaOS Detection
  author: pdteam
  severity: info
  reference:
    - https://github.com/IceWhaleTech/CasaOS
  metadata:
    max-request: 1
    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: 490a004630440220477bd4b3de6e4497c9e589ce0fe9ee5b0053fd63a04b819d1bed73c6bfb3d93602205b0986e3fab04b5edd5c48b3179839a9aa8f3afa6e345ed2aade3838019a3a6e:922c64590222798bb761d5b6d8e72950
