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