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

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