Giter VIP home page Giter VIP logo

bithammer's Introduction

BitHammer

BitHammer, The BanHammer for BitTorrent

NOTE: BitHammer is FOR RESEARCH 
      PURPOSES ONLY.
  Get permission from a network's 
      owner before using it.  
  You assume all responsibility 
      for its use.

The BitTorrent BanHammer.

BitTorrent is ok. Using BitTorrent on your own network is your own business. Using BitTorrent on public wifi is not. BitTorrent aggressively soaks up bandwidth and connections, rendering other programs useless, and other users and admins frustrated.

http://askubuntu.com/questions/16680/using-a-bittorrent-client-slows-down-internet-connection

Over a year of traveling, I've consistently struggled with broken wifi spots overloaded with torrent traffic. After talking with the frustrated non-technical people who owned/managed them, I wrote this program to help network users and owners.

This program:

  1. Listens for BitTorrent clients on the network,
  2. Adds their IPs and MACs to a ban list,
  3. Bans them from the network for as long as the program is running.

BitHammer on Linux:l

Install python, scapy, and git :

sudo apt-get install python python-scapy git tcpdump

Run the program:

git clone [email protected]:MichaelJCole/bithammer.git
cd bithammer
sudo python ./bithammer

The scapy network library requires sudo for root priviledges. Built and tested with Python 2.7.6. This is my first Python program :)

BitHammer on Windows or MacOS

In theory, BitHammer should work outside Linux, but I don't care to test it. Code and documentation pull requests are welcome. This may help to install scapy - the networking library used.

How does it work?

The program listens for BitTorrent users advertising themselves via LPD:

http://en.wikipedia.org/wiki/Local_Peer_Discovery

The program then bans those users from the network via ARP Cache poisoning:

http://en.wikipedia.org/wiki/ARP_spoofing

Network Traffic to/from the banned computer is redirected to your computer, which your computer ignores because it's improperly addressed. This effectively bans the target from the network.

ARP cache poisoning continues as long as the program is running. Restarting the program clears the ban list. It may take some time for the ban to clear.

Is this legal?

I am not a lawyer. I recommend the courtesy of getting permission before using it on someone else's network.

BitHammer isn't working

There are a variety of reasons it may not work as you would like.

  • The wifi access point may isolate users from each other, preventing LPD
  • BitTorrent clients may be on another sub-net, preventing LPD
  • BitTorrent clients may not be advertising with LDP
  • Your bandwidth problem may unrelated to BitTorrent
  • Something else

I'm banned! Are you anti-bittorrent, pro-hitler, and anti-puppies?

Climate change, ocean fishery collapse, and crappy wifi are all tragedies of the commons.

http://en.wikipedia.org/wiki/Tragedy_of_the_commons

It's not personal. It's just that your ignorance and selfishness are ruining things for everyone else.

The best workaround to BitHammer is to get a 'private internet VPN' and run your BitTorrent traffic through that. Google it. This will:

  1. Prevent BitHammer from banning you,
  2. Keep your usage to levels home internet routers can handle,
  3. Prevent the WiFi owner from getting file-sharing letters from lawyers.

Thank you! and credit where credit is due:

https://github.com/evilsocket/NetCommander - Python code for ARP cache poisoning and MITM attack. https://github.com/jonls/lpd-monitor - Library for LPD monitoring.

Are there better alternatives to BitHammer?

Yes, alternatives include:

  1. Block BitTorrent on your router
  2. Configuring traffic QOS on the router
  3. Banning users on the router

These are advanced router configurations and may be confusing to the average user and 'home' router equipment:

Login to your router with the admin password:

  1. Get your router's IP address (e.g. 192.168.1.1)
  2. Open http://192.168.1.1 in a web browser
  3. Login with your admin password

Configure your router:

  1. To block BitTorrent, block ports 6881 to 6999 (easy, but not always effective)
  2. To block devices, use the MAC ids from BitHammer: http://blog.dlink.com/how-to-block-devices-from-your-home-network/
  3. To slow down BitTorrent so other traffic takes precedence, configure "Traffic Shaping" or "Quality of Service (QoS)"; this depends on your router.

bithammer's People

Contributors

michaeljcole avatar nazrhyn 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.