Slashdot Mirror


BitHammer, the BitTorrent Banhammer

michaelcole writes: Its name is BitHammer. It searches out and bans BitTorrent users on your local sub-net.

I'm a digital nomad. That means I travel and work, often using shared Wi-Fi. Over the last year, I've been plagued by rogue BitTorrent users who've crept onto these public hostpots either with a stolen/cracked password, or who lie right to my face (and the Wi-Fi owners) about it.

These users clog up the residential routers' connection tables, and make it impossible to use tools like SSH, or sometimes even web browsing. Stuck for a day, bullied from the Wi-Fi, I wrote BitHammer as a research project. It worked rather well. It's my first Python program. I hope you find it useful.

30 of 429 comments (clear)

  1. It's okay when I do it... by MetalliQaZ · · Score: 4, Insightful

    but, so help me God, if Comcast blocks bittorrent traffic, I'm going to call for heads to roll!

    --
    "Here Lies Philip J. Fry, named for his uncle, to carry on his spirit"
    1. Re:It's okay when I do it... by Anonymous Coward · · Score: 5, Insightful

      thats not what this is about, it's about people who don't share some bandwith they payed for, it's about people who just use up all the bandwith anywhere they can no matter if they payed for it or if it's gratis or if they're using it illegitimately

    2. Re:It's okay when I do it... by Grishnakh · · Score: 5, Insightful

      Of course it's more efficient. It's the classic centralization vs. decentralization problem. Centralization is always more efficient overall. However, it has disadvantages: single point of failure, inflexibility, etc. In this case, one big disadvantage is cost: cloud distribution requires signing up for and paying for an account somewhere to store all this data. Peer-to-peer tools don't have this (though they do have the problem of how to distribute the .torrent files, which is semi-centralized but doesn't have to be since anyone can send them around to anyone else directly). Cloud distribution puts the data at the mercy of a single provider; peer-to-peer tools let everyone share data willy-nilly, and as long as one person, anywhere, has the data, it can be replicated to everyone else easily.

      Similarly, it would likely be more efficient if we all gave up our PCs and went back to using mainframes of some sort (or some kind of centralized server infrastructure, not an actual zOS mainframe), with our "PCs" just being thin clients, and us all having user accounts on them. The administration would be much easier and more effective, and the power usage would probably be much less than what we're doing now. However, that would put us at the mercy of a few providers, would likely cost more long-term, at least for those of us who manage our own computers and don't have to regularly call the Geek Squad for personal visits like my dumb neighbor, and would massively limit flexibility since we'd only be able to do things that are pre-approved for the most part.

    3. Re:It's okay when I do it... by nabsltd · · Score: 4, Informative

      Don't get me wrong, I think BitTorrent is very cool technological achievement. But transferring data between semi-random hosts around the globe and opening hundreds of TCP connections per computer while doing it, is like the ultimate way to clog the pipes.

      BitTorrent uses UDP when done correctly, and pretty much becomes the absolute best way to get data to many computers very quickly.

      A torrent with few seeders isn't very efficient, but one with many hundreds of well-configured peers is hard to beat on overall transfer speed.

    4. Re:It's okay when I do it... by Half-pint+HAL · · Score: 5, Insightful

      Note that I'm NOT talking about using public wi-fi here, just the idea that bittorrent has no place.

      Then you are discussing on the wrong article.

      --
      Got them moderator blues I blieve I walk out the do', With these mod-points I been gettin', I 'most never post no mo'
    5. Re:It's okay when I do it... by Anarchduke · · Score: 4, Funny

      But they are both scary Internet-thingies. You must be a cyberterrorist if you if it doesn't scare you.

      --
      who prays for Satan? Who in 18 centuries has had the humanity to pray for the 1 sinner that needed it most? ~Mark Twain
    6. Re:It's okay when I do it... by AmiMoJo · · Score: 4, Informative

      Bittorrent tries to transfer data between clients that are close together when possible. That means that often the data can stay within the ISP's internal network, never going out over the clogged pipes connecting to the wider internet. Those pipes are where things get backed up, which is why streaming video providers like Netflix and YouTube offer to give ISPs cache servers to place inside their networks.

      BitTorrent can actually help ISPs, and be more efficient than centralized distribution from that point of view.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
  2. Alternative headline by OzPeter · · Score: 5, Insightful

    Vigilante beats up on people in order to get public wifi access that he believes is rightfully his

    That's what it amounts to. He can't get the access he wants, so he just pushes his way in and takes it.

    If access is so important to your work, why aren't you/they paying for it?

    --
    I am Slashdot. Are you Slashdot as well?
    1. Re:Alternative headline by TubeSteak · · Score: 5, Insightful

      He can't get the access he wants, so he just pushes his way in and takes it.

      As opposed to the bittorrent user(s) who are pushing everyone else out of the way and preventing their access?

      Assuming that both parties are wrong does not logically lead to the conclusion that their wrong acts are equivalent.
      I'm on the side of preserving the common good, not protecting the random data hog.

      --
      [Fuck Beta]
      o0t!
    2. Re:Alternative headline by OzPeter · · Score: 4, Insightful

      As opposed to the bittorrent user(s) who are pushing everyone else out of the way and preventing their access?

      Its one thing to do so with permission from the network owners .. its another thing to wade in and beat up on people just so you can get what you want.

      Two wrongs do not make a right.

      --
      I am Slashdot. Are you Slashdot as well?
    3. Re:Alternative headline by Anonymous Coward · · Score: 5, Insightful

      Assuming that both parties are wrong does not logically lead to the conclusion that their wrong acts are equivalent.
      I'm on the side of preserving the common good, not protecting the random data hog.

      In one case a person can't access Internet as he wants as an unfortunate side effect of the others usage and bad network configuration.
      In the other case the other person can't access Internet as he wants due to actively being suppressed by the first user.
      Yes, clearly the two wrong acts aren't equivalent. The torrent user is just an inconsiderate asshole while this dude is an outright malicious asshole.

    4. Re:Alternative headline by niado · · Score: 5, Informative

      As opposed to the bittorrent user(s) who are pushing everyone else out of the way and preventing their access?

      Its one thing to do so with permission from the network owners .. its another thing to wade in and beat up on people just so you can get what you want.

      Two wrongs do not make a right.

      This is not in the summary, but in his readme on github the submitter states "After talking with the frustrated non-technical people who owned/managed them, I wrote this program to help network users and owners."

      The implication is that this tool is written for use by whomever manages the network. Most networks would have a "no bittorrent" rule, if the network owner was savvy enough to know this. The tool is an interesting enforcement mechanism.

    5. Re:Alternative headline by Solandri · · Score: 5, Interesting

      on github the submitter states "After talking with the frustrated non-technical people who owned/managed them, I wrote this program to help network users and owners."

      While the program can be used with the network owner's permission, the fact that it can more easily be used without permission makes it rather dubious.

      I think he's/we're going about this the wrong way. If this is really a widespread problem afflicting non-technical people trying to run a public wi-fi hotspot, what needs to happen is for router configs to limit the number of connections from a single MAC address by default. If you're a gamer or running bittorrent on your own network, it's easy enough to change those configs. But on a public hotspot, they're the ones who'll be forced to contact the network owners, not the people trying to get legit access.

      I'm also a bit skeptical that the submitter really talked with the owner. If you've got access to the router via the owner, the most obvious thing to try first is QoS. Assign torrent traffic to low priority, default everything else to medium (to catch encrypted bittorrent), and give ports 80 and 443 (http and https) high priority to keep web browsing customers happy. You need to be careful about giving ssh high priority because it's possible to run a tunnel over ssh and do your torrenting that way.

    6. Re:Alternative headline by Penguinisto · · Score: 4, Insightful

      Two wrongs do not make a right.

      As odd as this is going to sound, I disagree. A simple blanket statement that makes no allowance for corner cases? I'm going to need something more than that to be convinced.

      Let me explain...

      In this particular instance, the "wrong" of hogging bandwidth is far, far greater than the "wrong" of blasting the hogs into oblivion. Even though privately-owned and run, one should expect at least some sense of common courtesy when using a resource like wifi. If you want to download pr0n and/or ripped movies, for heaven's sake do it at home and pay for the pipe. There are very few legitimate reasons to run multi-GB BitTorrents at full-bore in a coffee shop, and I promise you that there are simply not that many people who desperately need an emergency .iso download of CentOS or Ubuntu away from home.

      Certainly, the guy could get a hotspot (as suggested), but that's like telling the guy to go buy his own property if they want a quiet park to sit in when a small group in the public park has a constant loud party going on. Also, hotspots don't always work as advertised - I lost count of the times I've had to duck into a rural/small-town MickeyD's or coffee shop because the stupid employer-issued hotspot/3g/4g device didn't have enough bars to get a decent connection.

      Maybe I sound like a dick for cheering this guy on, but think this through for a moment - if coffee shop owners start getting slammed with MPAA/RIAA C&D orders, if their costs skyrocket, and if they generally figure the wifi to be more trouble than it's worth, then eventually the "free" wifi will become metered, will be QoS'd down to practically nothing, or worse. None of us want that. I like knowing that if my normal connectivity goes tits-up, I can duck into a coffee shop, buy a cup of joe, and use their wifi to do what needs done until I can get connected normally again.

      It's abusers of the system that eventually become the reason why we can't have nice things, so this little "wrong" is a pretty nice way to keep bigger "wrong"s to a minimum, no?

      --
      Quo usque tandem abutere, Nimbus, patientia nostra?
    7. Re:Alternative headline by mlts · · Score: 4, Interesting

      Tragedy of the commons.

      I see this during the weeks that there are festivals in Austin. People camping tables at local cafes, not ordering anything, but using the wireless network for Netflix, with an occasional uTorrent downloading a movie to watch later on.

      One coffee shop here in Austin chucked their Wi-Fi because the tables kept occupied with people who didn't even at least buy a drink. As soon as they stopped doing that, their business went up, since they had paying clients again.

      Another place turned off their APs from 11 to 1, and again, their business is booming.

      If I had a shop, I'd have a Wi-Fi system that would use one time passwords (doesn't have to be extremely secure... something like AOL's old system with two words and a hyphen between them is good enough) which grant the user time, as well as a block of bandwidth. These would be free of charge with a purchase. This way, if someone wants to download a 22 gig BD-R rip, they can... but they will be making a lot of purchases. Elaborating on this, there could always be two tiers, one paid for with the one use password, and free... so people who made purchases would have higher precedence than the person who is at work, but whose laptop is in their car in the parking lot with a terabyte torrent chugging away.

      It gets worse when you go RV-ing, to the point where a device with tethering or a personal Mi-Fi-like device is an absolute requirement. There are just too many people who will clog up a RV park's Wi-Fi, making it unusable for everyone else. Plus, for decent Wi-fi, it is expensive... and RV parks don't make that much money per square meter of space relative to a hotel or coffee shop.

  3. Free Wifi by Anonymous Coward · · Score: 5, Insightful

    You're using a free public network and selectively booting the users who don't fit into your specified profile.
    Why not just buy your own connection and stop being such a fucking Nazi?

  4. Wow by ceoyoyo · · Score: 4, Insightful

    Other people are using a *public* wifi connection you're connected to, using some of the bandwidth you feel you're entitled to, so you attack them with a cache poisoning exploit?

    Hopefully you do this to someone who can hit back. Or just get arrested.

  5. Self-entitled much? by Anonymous Coward · · Score: 5, Interesting

    This basically boils down to: "My use is more important than your use, under a flimsy excuse that your use could potentially interfere with my use, I will deliberately abuse the network in order to wilfully interfere with your use."

    The computer abuse act and FCC guidelines about wilful interference comes to mind....

  6. Look Michael Cole... by Anonymous Coward · · Score: 4, Insightful

    I don't like your announcing on WWE programming, and I don't like Bittorrent BanHammer. Please leave Slashdot.

  7. an opinion from the self entitled generation by Fnord666 · · Score: 5, Insightful

    Over the last year, I've been plagued by rogue BitTorrent users who've crept onto these public hostpots either with a stolen/cracked password, or who lie right to my face (and the Wi-Fi owners) about it.

    Huh? They lie right to your face about it? Wait a minute. Who the hell are you anyway and what do you have to say about it? If it bothers you, buy yourself a mobile hotspot and STFU. At least maybe they are actually buying food/coffee/whatever and aren't just using the cafe as their personal office. What's the next complaint? That their conversations are too loud and you can't hear your conference calls?

    --
    'The tyrant will always find pretext for his tyranny.' - Aesop's Fables
    1. Re:an opinion from the self entitled generation by omtinez · · Score: 5, Insightful

      Mod parent up. It's the tragedy of the commons, but taking justice into your own hands makes you just as bad if not worse than the BitTorrent users

  8. Re:It's hard being an editor, sure. by ArcadeMan · · Score: 4, Funny

    Just because is missing words does not mean it a bad article.

  9. bandwidth isn't the problem by Chirs · · Score: 4, Insightful

    The issue is that cheap access points/firewalls run out of resources trying to manage (and possibly do connection-tracking) on all the different connections. If a bittorrent user suddenly opens up a few thousand additional connections (regardless of actual bandwidth) then that ends up knocking everyone else off that firewall.

    The bittorrent users could prevent the problem by limiting how many connections are allowed per torrent, but it sounds like they're not doing that.

    Rather than forcing bittorrent users off the network entirely, it would be better if the access point itself limited the number of connections per MAC address to something reasonable. This would prevent the symptom from occurring.

  10. Re:Traffic Shaper? by Anonymous Coward · · Score: 5, Insightful

    Maybe he should be more angry at the business owners for using cheap routers and/or not implementing traffic shaping, etc.

    Or he could do the correct thing and pay for a portable hotspot of his very own. Once you are paying the bills, you get to dictate the terms.

    If someone else is monopolizing the business owner's bandwidth, that's not your business. You can inform the business owner of the situation, but if they choose to do nothing, that is their choice to make, not yours.

  11. Incredible by ArcadeMan · · Score: 4, Interesting

    I'm shocked by some of the replies so far. Some of you are furious because this guy is trying to limit the people who abuse the system?

    Imagine you are at a buffet. It's all-you-can-eat but with no instructions or limits on the way to do it. Now imagine there's a few people at the front of the line and they're putting all the food available into buckets, leaving nothing but scraps for everyone else. Would you be pissed at those people or at the one who would stand up and yell "Hey, leave some for the others"?

    1. Re:Incredible by Anonymous Coward · · Score: 5, Insightful

      I'd be upset if his solution was to poison the food so the people that took it all started vomiting.

  12. The arms race continues by inhuman_4 · · Score: 5, Interesting

    The BitHammer relies on Local Peer Disocovery which gives priority to peers that are close to the bit torrent client. This is good for ISPs because it tries to keep the bit torrent traffic inside their own network instead of hammering peering connections. This also makes connections faster for the bit torrent client.

    If you want to get around BitHammer you just need to turn off Local Peer Discovery, if BitHammer can't find you it can't block you. But now the ISPs are going to get screwed because Local Peer Discovery is turned off. This will also make the torrents slower for the client.

    Sounds like a loose/loose situation to me.

  13. Re:Traffic Shaper? by spire3661 · · Score: 4, Insightful

    He is supposed to HIRE someone that is. Just like you hire someone to install a water heater, or electrical lines. If you are deploying COMMERCIALLY, you should hire someone who knows what the fuck they are doing, or dont bother.

    --
    Good-bye
  14. Congratulations and fuck you by Just+Some+Guy · · Score: 4, Insightful

    This is not your Internet. If a public hotspot is being overloaded by any client, not just someone's porn torrent, then that's between the user and the network admin. It's not your job or your right to be The Internet Police. Running a BT client on a public net is a dickish thing to do, but I can imagine scenarios when I might need to do it myself: "oh crap, my root drive is horked and I desperately need to download a Debian USB image. Good thing there's a Starbucks around the block!"

    A sane policy would be for the net admins to limit the number of open connections or UDP sessions from a single machine. An insane policy is to think that "my technodick is bigger than yours and I'm going to knock you offline" is less than sociopathic.

    Guess what, OP: I don't like your SSH sessions interfering with my Skype. Check out my new SSHWACK Banhammer that frees open networks from latency-hogging assholes like you. Are you sure you want to start this game?

    --
    Dewey, what part of this looks like authorities should be involved?
  15. Thanks for the comments by michaelcole · · Score: 4, Informative

    Hey everybody, thanks for the comments. Most of you probably won't ever see this comment, but I appreciate your interest and feedback about the program. Believe it or not, I thought about alot each of the ethical issues yall brought up. And well, frankly there isn't a good way for strangers to work together anonymously. That's probably a good definition of a stranger. If you have any questions, I'm happy to answer them here. Anyways thanks again and best wishes! Mike