id: sophos-fw-version-detect

info:
  name: Sophos Firewall Login Panel - Detect
  author: organiccrap,daffainfo
  severity: info
  description: Sophos Firewall login panel was detected.
  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:o:sophos:sfos:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: sophos
    product: sfos
    shodan-query:
      - title:"Sophos"
      - http.title:"sophos"
    fofa-query: title="sophos"
    google-query: intitle:"sophos"
  tags: panel,sophos

http:
  - method: GET
    path:
      - "{{BaseURL}}/webconsole/webpages/login.jsp"
      - "{{BaseURL}}/userportal/webpages/myaccount/login.jsp"

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '<title>Sophos</title>'
          - 'uiLangToHTMLLangAttributeValueMapping'
        condition: or

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - 'href="\/themes\/lite1\/css\/typography\.css\?version=(([0-9a-z]+)([0-9.]+))'
# digest: 4a0a0047304502206bfa7f73fa988e85d04f5aaab5f78f7dd6bc72d19ba5a613ca9093199f9b7f7d022100b1e081d52e71b26178cd62b1ebacedd0de26192ddedad36d5675143d134cb6cb:922c64590222798bb761d5b6d8e72950