id: openethereum-server

info:
  name: OpenEthereum JSON-RPC HTTP Server Detect
  author: Nullfuzz
  severity: info
  description: |
    OpenEthereum is the fastest, lightest, and most "secure" Ethereum client. By default OpenEthereum runs a JSON-RPC HTTP server on port 8545/TCP
  reference:
    - https://github.com/openethereum/openethereum
    - https://openethereum.github.io/
  metadata:
    max-request: 1
    shodan-query: product:OpenEthereum
  tags: tech,openethereum,ethereum,web3,blockchain,discovery

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

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

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

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