id: sap-netweaver-detect

info:
  name: SAP NetWeaver ICM - Detect
  author: randomstr1ng,righettod
  severity: info
  description: |
    Detection of SAP NetWeaver ABAP Webserver or Java Application Server (ICM/ICF)
  metadata:
    verified: true
    max-request: 1
    shodan-query: http.favicon.hash:-266008933
    fofa-query:
      - "sap-server:"
      - icon_hash=-266008933
    product: content_server
    vendor: sap
  tags: sap,webserver,tech,detect,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}"

    redirects: true
    max-redirects: 2
    matchers-condition: or
    matchers:
      - type: word
        part: header
        words:
          - "sap-server:"
          - "SAP NetWeaver Application Server"
        condition: or
        case-insensitive: true

      - type: word
        part: body
        words:
          - "SAP NetWeaver Application Server"
          - "SAP NetWeaver Developer Studio"
          - "SAP Management Console"
        condition: or

    extractors:
      - type: kval
        part: header
        kval:
          - "server"
# digest: 4a0a0047304502205e9567aa2ad828f49629f5f0f24a4fdf602ee98c93657083b50890f523c63378022100de40a9c8165c0ae4fafaf745e8e9be1177ec08ac84193b6a98c7e37354012e6f:922c64590222798bb761d5b6d8e72950