id: blazor-webassembly-detect

info:
  name: Blazor WebAssembly - Detect
  author: righettod
  severity: info
  description: |
    Blazor WebAssembly application was detected.
  reference:
    - https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blazor
    - https://github.com/righettod/burp-piper-custom-scripts/issues/1
  metadata:
    verified: true
    max-request: 1
    shodan-query: html:"blazor.boot.json"
  tags: blazor,webassembly,detect

http:
  - method: GET
    path:
      - '{{BaseURL}}/_framework/blazor.boot.json'

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - 'dotnet.wasm'
          - '"entryAssembly"'
          - '"Microsoft.JSInterop.WebAssembly.dll"'
        condition: and
        case-insensitive: true

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - 'dotnet.([0-9.]+).[a-z0-9]+.js'
# digest: 4b0a00483046022100858acd328790086a89a12598df0da3b5d349707d04cc3c23e84e27e8edc58a09022100baad106582cacf6423a8a2bdc6779d9a2ca670bfc2bec027915c36f63cc3b371:922c64590222798bb761d5b6d8e72950