GithubHelp home page GithubHelp logo

ethpd's Introduction

ethpd

Ethereum UDP packet dissector for discovery protocol v4.

ethpd decodes a pcap file of captured Ethereum packets into a readable format. The decoded packets will be printed to the standard output. Pipe the output to a text file for larger pcap files.

Usage

ethpd [pcapFile] -- Prints to standard output

ethpd [pcapFile] > file.txt -- Prints to text file file.txt

Install

With a correctly configured Go installation:

go get -u github.com/ymarcus93/ethpd

Version 4 Packet Structure

See RLPx protocol page for more information

  • All packets are signed with ECDSA-secp256k1 keys (represents a node's ID)
    • For authenticity
    • Signature: sign(privkey, sha3(packet-type || packet-data))
      • 65-byte compact ECDSA signature containing the recovery id as the last element.
      • See the code for more information on how NodeID is recovered from the signature.
  • All packets are prepended with SHA3-256 hash of the underlying data of the packet
    • For integrity
    • Hash: sha3(signature || packet-type || packet-data)
    • 32 bytes
  • Packet Type: Single byte < 2**7 // valid values are [1,4]

Full UDP Packet Payload: hash || signature || packet-type || packet-data

Packet Data

RLPx encoded list. Packet properties are serialized in the order in which they're defined.

Ping

  • Version
  • From, To (IP, UDP, TCP)
  • Expiration

Pong

  • To (IP, UDP, TCP)
  • ReplyTok
  • Expiration

Findnode

  • Target
  • Expiration

Neighbors

  • Nodes:
    • IP
    • UDP
    • TCP
    • ID
  • Expiration

ethpd's People

Contributors

ymarcus93 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.