id: erigon-server-detect

info:
  name: Erigon JSON-RPC HTTP Server - Detect
  author: Nullfuzz
  severity: info
  description: |
    Erigon is an implementation of Ethereum (execution layer with embeddable consensus layer). By default Erigon runs a JSON-RPC HTTP server on port 8545/TCP
  reference:
    - https://github.com/ledgerwatch/erigon
  metadata:
    verified: true
    max-request: 1
    shodan-query: product:"Erigon"
  tags: tech,erigon,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, "erigon")'
        condition: and

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - '(erigon/[0-9_.]+)'
# digest: 4b0a004830460221009189d63902c0e621c93845ef8acadf38ff6836624f76a89e1cf8a79ed4746a5802210082ed941dd2d1e8f4d15c9548d45b08886299883245d8ec84b61105943f220daf:922c64590222798bb761d5b6d8e72950