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,discovery

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: 4a0a00473045022100c6bdb86a57c0b1a885994f8c77e5a41dddab8f7effaca4276a579bebdfca41990220695f63b7fcd7c1fbd7517782bb275a075f8caff4ae5126792b1e495d365cce19:922c64590222798bb761d5b6d8e72950