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

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