Git Product home page Git Product logo

exdhcp's Introduction

exdhcp

DHCP lease exhausting test tool

Usage

  1. determine the target interface
$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
13: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 02:42:ac:11:00:02 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 172.17.0.2/16 brd 172.17.255.255 scope global eth0
       valid_lft forever preferred_lft forever
  1. Run
  • 10 times (default)

    $ sudo ./exdhcp -if eth0
    

    CSV result file will be saved.

  • n times

    $ sudo ./exdhcp -if eth0 -num 100
    
  • run until lease exhausts

    $ sudo ./exdhcp -if eth0 -num 0
    

Options

$ ./exdhcp -help
Usage of ./exdhcp:
  -csv
        Export leases to CSV file (default true)
  -if string
        Interface name
  -num int
        Number of tries. Set 0 to do exhaustion attack. (default 10)
  -release
        Release DHCP lease (default true)
  -server string
        DHCP server IP
  -timeout int
        Timeout seconds to wait DHCP offer (default 10)
  -verbose
        Print debug logs

Build

$ go build ./cmd/dhcpcd/dhcpcd.go

v1 milestone

  • support Windows (use pcap)

Reference

https://support.huawei.com/enterprise/en/doc/EDOC1100055047/c8e6549d/dhcp-dos-attack-by-changing-chaddr

exdhcp's People

Contributors

sarisia 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.