id: nethermind-server-detect

info:
  name: Nethermind JSON-RPC HTTP Server - Detect
  author: Nullfuzz
  severity: info
  description: |
    Nethermind is a high-performance, highly configurable full Ethereum protocol execution client built on .NET that runs on Linux, Windows, and macOS, and supports Clique, Aura, and Ethash. By default Nethermind runs a JSON-RPC HTTP server on port 8545/TCP
  reference:
    - https://nethermind.io/
    - https://docs.nethermind.io/nethermind/ethereum-client/json-rpc/web3
    - https://github.com/NethermindEth/nethermind
  metadata:
    verified: true
    max-request: 1
    shodan-query: product:"Nethermind"
  tags: tech,nethermind,ethereum,web3,blockchain,discovery

http:
  - raw:
      - |
        POST / HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json

        {"method":"web3_clientVersion","params":[],"id":1,"jsonrpc":"2.0"}

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(header, "application/json")'
          - 'contains(body, "Nethermind")'
        condition: and

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - '(v[0-9a-z-_.]+)'
# digest: 4b0a0048304602210098f1171e999cc914b490b61ab6c58f5daedd451a9f904da7c80cbba183a132760221009e266fc3d02fa4111e5d2e00153ccdde7424bc50d598a00e7de56945d29a6e4d:922c64590222798bb761d5b6d8e72950