Giter VIP home page Giter VIP logo

dhcp-spoof's Introduction

DHCP Spoof

For an Intro to Networking and Computer I/O class, I worked on a project to explore penetration testing. Rather than setting up our own network in the real world, we decided to make this more repeatable by creating a virtual network with Mininet. My portion of the project focused on DHCP spoofing.

Senario: An evil host near the client in the network triest to respond to DHCP requests faster than the real DHCP server and point hosts to its own DNS server allowing it to point people to phishing sites.

Goal: prevent such an attack. Methods experimented with:

  • Block all but the correct DHCP packets on switches with ebtables

  • On the client use dhclient's anycast-mac option to only send the DHCP packets only to the real DHCP server

  • Setup the network manually (not really a solution)

Running

On Arch Linux, install needed packages:

 sudo pacman -S busybox dhclient dnsmasq ettercap iptables ebtables python2-dnslib python2-ipy bridge-utils
 packer -S mininet

Make sure Mininet is functioning properly by verifying 0% packets dropped:

 sudo mn --switch lxbr --controller none --test pingall

Run DHCP Spoof:

 sudo python2 dhcp_spoof.py wlp2s0 0

If it ever exits without cleaning everything up, just run:

sudo mn -c

Note: If you use this on anything other than Arch Linux, you'll likely have to tweak the code.

Code

References

dhcp-spoof's People

Contributors

floft avatar

Watchers

James Cloos 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.