GithubHelp home page GithubHelp logo

mikevoronov / libp2p-dissector Goto Github PK

View Code? Open in Web Editor NEW
16.0 1.0 1.0 2.55 MB

Project for ETHBerlin hackaton bounty: https://github.com/ethberlinzwei/Bounties/issues/20

Lua 100.00%
libp2p secio lua wireshark wireshark-dissector

libp2p-dissector's Introduction

Libp2p dissector

A Wireshark Lua plugin to dissect several libp2p protocols with support of SECIO decryption. This plugin indended to run with go-libp2p-secio fork since it supports dumping secret symmetric keys.

Usage:

Copy the whole directory into your Wireshark Personal Plugins folder. To find out where it is located, open Wireshark and go to Help->About Wireshark and it will be listed in the Folders tab. You may need to create the folder the first time.

Another prerequisite is to define environment variable LIBP2P_SECIO_KEYLOG that should be pointer to the file with secret keys.

To run plugin you need to open Wireshark, sniff (or load from a dump) network traffic and then activate plugin via Help->About Wireshark.

*SECIO dissecting: example 1

*SECIO dissecting: example 2

Prerequisites

You need some lua packets installed:

  • ffi (luarocks install --server=http://luarocks.org/dev luaffi)
  • pb (luarocks install lua-protobuf)
  • protoc (luarocks install protoc)
  • lua (luarocks install csv)
  • base64 (luarocks install lbase64)

Please be sure, that Wireshark has access to these plugins on your setup.

Supported protocols

  • multistream 1.0.0
  • secio 1.0.0
  • mplex 1.0.0
  • yamux
  • spdy
  • ipfs

High-level dissecting algorithm overview

  1. At first, multistream dissector is registred as the heuristic dissector
  2. This dissecctor looks for the "/multistream/1.0.0" string in traffic, then parses multistream handshaked packets and, finally, calls secio dissector.
  3. In its turn, secio dissector waits for Propose and Excahnge packets. And after receiving the last Exchange packet will try to open config file and try to find the last record for corresponding in/out ip:port. It is expected that after the last Exchange packet keys are already dumped.
  4. And, finally, dissect mplex.

libp2p-dissector's People

Contributors

mikevoronov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.