GithubHelp home page GithubHelp logo

dhcp6dump's Introduction

dhcp6dump

CLI utility for dumping captured DHCPv6 packets in PCAP format (captured by tcpdump or Wireshark).

Usage

PHP 7+ is required.

  1. apt-get install php-cli
  2. Download latest PHAR archive.
  3. chmod 755 dhcp6dump.phar
  4. tcpdump -nn -i eth0 -s 0 -U -w - port 546 or port 547 | ./dhcp6dump.phar

If you don't set execution bit, you can invoke PHAR by php dhcp6dump.phar.

Utility has some CLI options. Run ./dhcp6dump.phar -h to show them.

Speed!

I'm live parsing ~40-50 packets/second (I have no higher traffic), ~1500-2000 packets/second offline.

What TODO means?

There is a many DHCPv6 message types and a lot of options. A TODO in the output means that I didn't implement parsing for it. You will see only plain hex dump. Open an issue for it, ideally with captured packets.

An example output

(some MAC or IP addresses are anonimized)

No.4 (2017-08-07 19:51:30.567414 UTC)

Eth Src: bc:30:5b:da:b1:16
Eth Dst: 3c:8a:b0:85:d3:b3

IPv6 Src: 2002:817:2:0012::129:28
IPv6 Dst: 2002:817:2:2222::1

Message type: 13 (RELAY-REPLY)
Hop count: 0
Link address: 2002:817:2:1111::1
Peer address: fe80::223:5eff:feb7:d6ba
Option: 9 (RELAY_MSG)
        Message type: 7 (REPLY)
        Transaction ID: 0x0072E9
        Option: 3 (IA_NA)
            IAID: 0x00000001
            T1: 0s
            T1: 0s
            Data:
                00 05 00 18 20 01 07 18 00 02 11 11  (............)

        Option: 1 (CLIENTID)
            Type: 3 (DUID-LL)
                HW Type: 1 (ethernet)
                MAC: 00:23:5e:b7:d6:ba

        Option: 2 (SERVERID)
            Type: 1 (DUID-LLT)
                Time: 2016-11-23 14:02:14 GMT
                HW Type: 1 (ethernet)
                MAC: bc:30:5b:da:b1:16

        Option: 7 (PREFERENCE)
            255 (0xFF)

        Option: 23 (DNS_SERVERS)
            2002:817:2:0012::125:18
            2002:817:2:0012::135:16

        Option: 24 (DOMAIN_LIST)
            my.example.com

        Option: 17 (VENDOR_OPTS)
            Enterprise Number: 9 (Cisco Systems)
            Vendor Option: 1 (TFTP)
                2002:915:9:3305::199
                2002:915:9:3305::200

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.