Slashdot Mirror


Remotely Counting Machines Behind A NAT Box

Overtone writes "Steve Bellovin of AT&T Labs Research has published a paper showing how to remotely count the number of machines hiding behind a NAT box (in IMW 2002, the Second Internet Measurement Workshop). Your friendly DSL or cable broadband provider could implement this technique to enforce their single-machine license clause. Bellovin explains how to change the NAT software to defeat the measurement scheme, but the fix is complicated and unlikely to appear in commercial home gateways anytime soon."

40 of 574 comments (clear)

  1. Not where I'm from by pi+radians · · Score: 5, Interesting

    Your friendly DSL or cable broadband provider could implement this technique to enforce their single-machine license clause.

    There are still providers that limit you to only one computer per connection? Wow. I guess the high competition in my area (GTA) has allowed the customers a little bit more freedom. In fact, my provider will give minor tech support for most routers and hubs.

    --

    sin(6cos(r)+5A)
    1. Re:Not where I'm from by Anonymous Coward · · Score: 5, Funny

      Do you live in Liberty City or Vice City?

    2. Re:Not where I'm from by Chasuk · · Score: 4, Insightful

      I work for an ISP where we enforce a single-machine license clause,and we do it for a very good reason: we aren't a charity. If it costs us more, it costs you more.

      We don't conceal this fact, and customers who are not happy with this clause are, almost uniformly, the customers who would cost us money instead of being a source of income.

      We are a small mom-and-pop ISP, and we get charged by the telco per kilobyte of traffic. If we charged everyone more to compensate for the bandwidth hogs, it would certainly be unfair to the low or moderate users, so we instead assign static IP's and charge per IP/computer. In other words, every computer attached to the Internet via our services must have a unique IP. We do make exceptions, but we still charge for one-IP but five-PC's connected/downloading from the Internet at the same rate as one-IP/one-PC.

      The telcos keep our costs so high that we can't afford to do otherwise.

      The customer's cost for five IPs versus one IP is a difference of $12.50, which is quite reasonable.

      We let you run servers on your static IP connection, and will host your DNS for free. We aren't money grubbers, in other words. But we are a business which intends to stay solvent.

      We do kick people off periodically, usually because they lied when they signed up, indicating that they would have one machine connected and actually had three or four, using IP masquerading. It isn't THAT hard to determine who the dishonest are, using the simple question: you are using twice (or three times) the bandwidth that an average customer would use connected with one PC 24/7. Do you have more than one system connected? If they say yes, we give them opportunity to pay at the increased rate. If they decline, we kick them off. If they answer no, we start investigating where our system might be reporting eroneous data. We don't assume that they are being deceitful. More people than not are telling the truth.

      This is also largely why we disallow P2P file sharing applications. After an audit, we discovered that fewer than 5% of our customers were consuming the majority of our bandwidth. It was either raise prices for everyone, or disallow P2P file-sharing. We _do_ allow P2P file-sharing for customers who are sharing their own files; their own songs, etc., as those customers actually consume very little, if any, extra bandwidth.

      Whoops. I appear to have gone off-topic. I think it was relevant, as it helps explain the realities why an ISP would need to enforce a single-machine license clause.

    3. Re:Not where I'm from by Anonymous Coward · · Score: 5, Insightful

      In a properly-functioning economy, you'd be charging for traffic (tiered or metered) since that drives your cost. Your interest in how your customers are processing their traffic internally is inappropriate, and the IPv4 address space you're squandering should be reassigned to someone more ethical.

    4. Re:Not where I'm from by Anonymous Coward · · Score: 5, Insightful

      And why on earth would you have a metered T1 if you were an ISP? Is a flat-rate T1 simply not available in your area?

      I also operate an ISP, and we have a flat-rate T1. We don't care how many computers a customer has connected--we only care how much data is transferred, and we bill accordingly.

      I would not use an ISP that placed restrictions on how many computers I could connect, mom-and-pop ISP or not. Life's too short. I live in a house with four computers, and they all get used a good portion of the evening. Why should I have to put up four antennas just so I can hook up four computers?

    5. Re:Not where I'm from by Sabalon · · Score: 4, Insightful

      This is apples and oranges.

      One machine could suck as much bandwidth as 10 machines doing next to nothing.

      Also, the idea behind NAT is that it only uses one IP address.

      Here at home, I have an army of computers (most junk). My cable modem hooks to a NAT/firewall (Linux). Behind that is my desktop. I also have a wireless access point so when I'm sitting outside in the hammock I can get on from there, or the wired bedroom or living room, or my wireless iPaq.

      And regardless of how many machines I have, I am still capped at 512k for all of them. While it is true I could use all of them to saturate that 512k, I could easily do it with just one machine as well.

      Sounds like you need to get some equipment that can do rate limiting and just sell bandwidth instead of hasseling customers.

  2. what if they are chained? by SHEENmaster · · Score: 5, Interesting

    so that you have two firewalls back2back and the other boxes behind it? It's a bit extreme, but worth it if your cable company is composed of jackasses.

    Most users just want web access, and this technique doesn't work on proxies.

    --
    You can't judge a book by the way it wears its hair.
    1. Re:what if they are chained? by Snork+Asaurus · · Score: 5, Funny
      if your cable company is composed of jackasses

      You mean there are some that aren't?

      --
      Sigs are bad for your health.
    2. Re:what if they are chained? by tjrw · · Score: 5, Informative

      Wouldn't make a jot of difference. The current firewalls aren't rewriting the IPid field anyway, so adding an extra hop would not affect the analysis at all.

      In reading the paper, it is apparent that this is not a particularly cheap thing to attempt. I can't see how it could be easily automated and deployed on a large scale, even assuming someone could be sufficiently bothered to do so.

      If you want protection from this, you're going to need to do some serious work on iptables to add tracking of fragments to the connection tracking code and to rewrite the field on outbound packets to some psuedo-random value. Interestingly this is the "correct" thing to do anyway - otherwise it is theoretically possible to generate two packets with the same id, both fragmented from different internal hosts to the same destination, and screw up the fragmentation reassembly at the receiver.

      Tim

    3. Re:what if they are chained? by stratjakt · · Score: 5, Informative

      "you're going to need to do some serious work on iptables "

      Another user already posted that there's already a patch (or kernel option) for linux to do random ipid's just like BSD does.

      This is more an admin utility than a policing tool. Just kick back, get yourself a beer and watch the knee-jerk reactions and paranoid theories from all the nerds who think the man is out the get 'em.

      --
      I don't need no instructions to know how to rock!!!!
  3. Top 5 ways to count # of machines behind a NAT box by Amsterdam+Vallon · · Score: 4, Funny

    5 -- Via the traditional finger point, coupled with the ever-popular audible counter increment

    4 -- Thermal image detection scan

    3 -- Utilize the same finger pointing mentioned in 5, but avoid the audible count as an enhanced privacy measure

    2 -- Avoid counting and caring about counting altogether; continue browsing Slashdot

    1 -- Call the dude with the NAT box and ask him!

    Free tech news & blogging for life -- *nix.org

    --

    Reply or e-mail; don't vaguely moderate. Ex-O'Reilly/MIT employee, now a full-time Google employee.
  4. What about NAT behind NAT? by Anonymous Coward · · Score: 5, Funny

    What about when I put a NAT machine behind a NAT machine? ;-)

    1. Re:What about NAT behind NAT? by Tumbleweed · · Score: 4, Funny

      Well, then, they'll just use their ANTI-anti-NAT technology!

      "No, no, not 'Anti-NAT," that's my Aunt Natalie!"

  5. Silver Lining? by Anonvmous+Coward · · Score: 4, Insightful

    "Your friendly DSL or cable broadband provider could implement this technique to enforce their single-machine license clause."

    Yeah, that pretty much sucks. There may be a silver lining, though. The more crap these ISP's pull to push their saavier customers away, the more demand there'll be for an uber geek-friendly ISP to come along. Maybe I'm too optimistic, but tell me it wouldn't be cool for a business to start up in order to cater to those of us that really like to play with networking. "Sure, go ahead and set up a wireless lan in your complex. We'll even let you pay to increase your bandwidth to accomodate all those users! Tell them that for $5 a month, they can each get a mail account or some other fairly interesting service."

  6. Like the RIAA... by hndrcks · · Score: 5, Interesting

    the cable / DSL operators will soon find out that trying to wage this battle through technical means will result in an arms race they cannot possibly win...

    ...which will, of course, result in their attempts to find more onerous legal solutions to the problem.

    I say - let the games begin!

    --
    Everyone will start to cheer when you put on your sailin' shoes.
  7. Score another one for Linux by guido1 · · Score: 5, Interesting

    The method described decodes packets from the NAT, using the IP header's ID field (which is normally a simple counter) to determine number of nodes behind the NAT. (Find X distinct ID field chains, that is the number of PCs...)

    However:
    Some hosts take evasive measures. Since the IPid field is used only for fragment reassembly (see below), some Linux kernels use a constant 0 when emitting Path MTU discovery [5] packets, since they cannot be fragmented. Recent versions of OpenBSD and some versions of FreeBSD use a pseudo-random number generator for the IPid field.


    Hurray for Linux... :)

  8. No way! by Arcaeris · · Score: 4, Funny

    "Your friendly DSL or cable broadband provider could implement this technique to enforce their single-machine license clause."

    Crap! Now I have to worry about my internet conn

  9. Re:What about Linux? by Anonymous Coward · · Score: 4, Interesting

    Fron the paper:

    We do not currently attempt to deal with the randomized IPid generator used by OpenBSD and FreeBSD. Crypt-analyzing the generator may be infeasible in any event. It should be possible to detect a random background to other, linear sources; the current version of the code does not do that.

    So take that BSD bashers [ggg]. Of course, a gateway implementation to mask/randomize the IPids would be better - giving you a site-wide fix at once.

    First one to market with one wins ;)

  10. research.att.com Slashdotted? Give me a break. by Snork+Asaurus · · Score: 4, Funny
    Or maybe they think it's another Slapper.

    Maybe someone can fill us in.

    --
    Sigs are bad for your health.
  11. FreeBSD by PunchMonkey · · Score: 5, Funny

    Our technique is based on the observation...that the "id" field in the IP header is generally implemented as a simple counter

    Recent versions of OpenBSD and some versions of FreeBSD use a pseudo-random number generator for the IPid field.

    So my FreeBSD will look like thousands of PCs? LOL, that sure would piss the cable company off.

    --
    I'll have something intelligent to add one of these days...
  12. Multiple Systems != Multiple Boxen by Heghta' · · Score: 5, Interesting

    I can already imagine conversations like this:

    ISP: We'll have to cut your net access! We detected several dozen computers simultaneously accesing the net through our service, while the contract only allows you one!
    Customer: Uh, I only have one box, I just love to have 30 windows of VMWARE open at once. How better to show off system performance!
    ISP: arglllll

    I mean, if the customer says he uses VMware, what's the ISP gonna do? Cut off the line without real evidence? I'd assume there are enough people who'd not mind a lawsuit.

    --

    Ash nazg durbatulûk, ash nazg gimbatul
    ash nazg thrakatulûk, agh burzum-ishi krimpatul.

  13. How this works by szquirrel · · Score: 5, Interesting

    Counting boxes is done using the "id" field in the IP header. The id field is relatively unique to each datagram sent between two hosts and is used to reassemble datagram fragments. This scheme depends on the observation that most IP stacks keep this field unique by just incrementing a counter for each datagram. By examining the id field of each packet coming from a NAT box and finding trends in the values you can tell how many boxes are behind the NAT. Each trend you can identify is another box hiding behind the NAT.

    But as the article states:

    We do not currently attempt to deal with the randomized IPid generator used by OpenBSD and FreeBSD. Cryptanalyzing the generator may be infeasible in any event.

    So there you go. Write a patch for your IP stack to randomize the id field instead of incrementing it. I couldn't do it, but I imagine someone else can (and will).

    --
    Never approach a vast undertaking with a half-vast plan.
    1. Re:How this works by leviramsey · · Score: 4, Informative

      One of the grsecurity patches for the kernel already gives Linux the random IPid field.

    2. Re:How this works by BlueUnderwear · · Score: 5, Informative
      You are confusing the id field with the TCP sequence counter. TCP sequence counter is already not usable for their purpose, because of miscellaneous anti-spoofing techniques.

      The field they are using is the IP id field, which exists in all IP packets (including UDP, ICMP, whatever), and which is used for low-level packet reassembly. On many OS'es, this is a globally increasing counter, i.e. two distinct connections on the same machine share the same counter, but two connections on different machines do not.

      Workarounds:

      • Use a pseudo-random number generator instead of a simple counter, as the various BSD apparently do.
      • Substitute the counter at the NAT box
      --
      Say no to software patents.
  14. It's already here by ptbarnett · · Score: 5, Informative
    The more crap these ISP's pull to push their saavier customers away, the more demand there'll be for an uber geek-friendly ISP to come along. Maybe I'm too optimistic, but tell me it wouldn't be cool for a business to start up in order to cater to those of us that really like to play with networking.

    It's already here: SpeakEasy.

    Their TOS explicitly states:

    "Speakeasy believes in the right of the individual to publish information they feel is important to the world via the Internet. Unlike many ISP's, Speakeasy allows customers to run servers (web, mail, etc.) over their Internet connections, use hubs, and share networks in multiple locations."

  15. Possible fix by entrager · · Score: 4, Interesting

    After reading the document (something that is rarely done among posters), it appears to me that this wouldn't be TERRIBLY hard to fix. The different machines are recognized by the sequences of IPids that are generated for the packets that are sent out. This field must be unique for each packet with the same protocal, destination, and source. This prevents the NAT from simply mangling the number in the field, making it impossible to track the number of machines.

    Someone correct me if I'm wrong, but it seems to me that iptables could be updated to change the IPid of outgoing packets to a single sequence and just keep a table of old ids -> new ids. When necessary, it performs the translation. So basically it acts as a two way filter, packets behind the NAT will all have the correct id, packets beyond it will all appear as a single sequence. Would this work?

  16. Can we make it a DMCA violation? by DoofusOfDeath · · Score: 4, Interesting

    There must be some way to make it so that an ISP doing this kind of analysis becomes a DMCA violation of the customer. Any ideas?

  17. trying to crack down on reselling by a7244270 · · Score: 4, Insightful

    It probably annoys the telcos to no end that a connection can be shared - they are more used to the "telephone" model, where there is one line going into the house and if 2 people want to have separate converations then they need two lines.

    Contrast that with a high speed connection that can been shared with a bazillion users.

    I'm guessing they are not as concerned with people who are running more than one machine at home - the precedent has been set already with telephone extensions, cable TV and satellite TV.

    I know of at least one person that is sharing his connection with 5 houses on his block via 802.11, which is a fair chunk of high speed connections that could be sold, and more than likely these are the people they are trying to find.

    My prediction - they will either give up once netgear, linksys et al. release rom patches to prevent this, or they will try start charging on a "by data" basis.

    This is of course doomed to failure, because the only purpose for a high speed connection is for sharing [censored by the RIAA and MPAA] across the net, and any attempts to change their pricing to this model will be met by massive consumer outcry.

  18. Re:this sucks by arivanov · · Score: 5, Informative

    There are already several simpler ways:

    1. Use proxies instead of NAT and proxy transparently if needed. Yeah, I know, none of the P2P download sucker shit as it does not have proxies but such is life.
    2. Use OSes with better randomisation of IP IDs. This is a tuneable parameter on most OSes and after you have turned it on the graphs are no longer so pretty.

    --
    Baker's Law: Misery no longer loves company. Nowadays it insists on it
    http://www.sigsegv.cx/
  19. Re:Is this really a big deal? by sqlrob · · Score: 4, Informative
    It's not your local ISPs fault that there aren't multiple providers in your area

    With franchise agreements to the cable companies, not necessarily true.

    I don't see anything but a poor rationalization in your arguement suggesting that it's not *YOUR* fault that you NEED to break your contract

    What about the chance that the contract may be illegal? There's the nice little FCC regulation that the cable company/phone company can't say squat about what happens inside your house provided you don't get services you don't pay for (You're paying for one IP, not one computer in reality) and you don't degrade the service of others.

  20. AT&T can't stand slashdotting? by random_nick · · Score: 5, Funny
    Not even an AT&T host can stand slashdotting?

    --
    Even random is random. My nick, too.
  21. Today and tommorow (was Re:Silver Lining?) by MrLint · · Score: 4, Informative

    History does not bode well for the broadband providers on this. If one recalls back in the day, the Telco (MA-Bell/AT&T) user to tack on an additional charge for every actual receiver (that you were forced to rent from them) on the phone line. For those who know POTS (plain old telephone system) an extension can be added but just tapping a wire onto the existing wire in the house. However when MA-bell got broken up in the 70s(?) I believe they did away with this foofah, and you paid for the telephone *service*

    CATV (cable) used to be the same way.. you day to pay extra for each TV. And then they stopped doing that and you paid for *service* of the signal.

    Now here is where it gets tricky, unlike POTS and analog CATV the line is hot or its not (so to speak), broadband you actually have discrete data you are passing around. This should be the *service*. However it could end up being a pay as you go service (bad for the users, good for the money grubbers) or a limited throughput 'unlimited' service (which is mostly how it is now). Currently I don?t see a metered usage model flying right now and this is why:

    Everyone that adopted broadband early wanted it (and could get it) go it. Dialup services are cheap and unlimited. If you start charging for broadband based on usage you aren?t not very attractive to those people you want to take away from dialup who are complacent and will cope with what they have. A metered service is not (in consumers minds) a *NOT* better value than an unmetered service.

    As we know there is a mega glut of fiber, broadband should be getting cheaper rather than more expensive.. but that?s another article. Its going to be hard to justify metering people when there is so much capacity unused. (hopefully supply and demand will work out here).

    Now this is what is going to happen, when a critical mass of people stop using dialup, and then modems stop coming standard in computers, and then the broadband guys think they have a captive audience they will get everyone in the cartel on board and raise rates and meter usage. What?s worse is that they will claim there is a lack of long haul bandwidth, which probably wont be true, because as the broadband market picks up they will still be doing expansion of the network because of the expectation of even larger amounts of growth.

    Conclusion, this are probably good for the short term, *VERY* bad for the long term.

    PS the document was spell checked for those with delicate constitutions.

  22. Attention Customer: by Snork+Asaurus · · Score: 5, Funny
    We are terminating your 28.8kbps dial-up service due to the following violation of the TOS:

    Our expert system has detected that you are sharing a single connection with 4,179 computers.

    --
    Sigs are bad for your health.
  23. Lets be real for a moment... by tkrotchko · · Score: 4, Funny

    The cable company can't tell when my cable modem is visible on the network.

    And now suddenly they're counting machines behind it?

    This is sounding like fantasy and science fiction to me.

    --
    You were mistaken. Which is odd, since memory shouldn't be a problem for you
  24. Re:Is this really a big deal? by alteran · · Score: 4, Informative

    "I dont agree. It's not your local ISPs fault that there aren't multiple providers in your area (assuming we are talking about you) or multiple service options. If there was enough money to be made in an area, there would most likely be more providers."

    I'm not sure what world you're living in. It IS MOST ASSUREDLY my local ISP's fault that there are not multiple provider's in my area.

    Verizon ran every dirty trick in the book to stop me from getting access through DSLi (out of Florida, who had an EXCELLENT TOS) instead of buying Verizon's restricted, overpriced DSL in North Carolina. I fought with them for over 14 months. I called the friggin' Utilities Commission on them. Unfortunately, by the time that bore fruit, every intelligently run provider had read the writing on the wall -- there's no way to make a profit when every single customer has to fight through the SUC for over a year, for God's sake.

    The reason I am stuck with crappy TOS is because of Verizon, straight and simple. Verizon covers something like 20% of the country. Most of the Baby Bells aren't any better.

    I'm not saying everyone who has a NAT fought with a Baby Bell for a year. But most of them have been cheated out of a decent, affordable TOS by one.

    Since virtually none exist because of illegal behavior, you shouldn't be so surprised or indignant that many folks choose to get around them.

    --
    Who is RTFM and when will he help me with Unix?
  25. Like the RIAA... by TheJesusCandle · · Score: 4, Insightful

    the cable / DSL operators will soon find out that trying to wage this battle through technical means will result in an arms race they cannot possibly win...

    ...which will, of course, result in their attempts to find more onerous legal solutions to the problem.

    I say - let the games begin!

  26. "the telephone model" by djeaux · · Score: 5, Insightful
    For about the last 20 years or so, unless one takes out a service contract, the telco is responsible only for the line to the outside of the building. I am responsible for the interior wiring & any extension phones that split off internally from the gray box outside.

    Why would the telco suddenly be able to impose a different standard on data communications? Just because an AT&T engineer has proposed some (time consuming) method to do something doesn't mean it will be done. A similar attitude about POTS is what got mighty Ma Bell busted lo these many years ago...

    Taking this one stumble father, I note that there is only one "computer" attached physically to the Bellsouth DSL line: a little cheap Linksys router, which having a processor & some flash ROM, qualifies as a "computer." Other computers do not connect directly to the DSL line, they connect to that router.

    Any telco/ISP that "cracks down" on home networking this way is just plain stupid & needs to go back to the mandatory customer service training workshops! In fact, that's where our dear AT&T enginner needs to be this very afternoon. It's the corporate equivalent of Chinese water torture!

    --
    "Obviously, I'm not an IBM computer any more than I'm an ashtray" (Bob Dylan)
  27. What do these clauses typically look like? by oliphaunt · · Score: 5, Informative
    OK, play lawyer with me for a little bit. What do these licenses actually say?
    here's one.
    Seems a little arbitrary, but they're small fry. let's go bigger:
    here's another.
    I think this bit applies to the question at hand (emphasis is mine):
    3(b) SBC Yahoo! DSL. Your SBC Yahoo! DSL Member Account allows for one DSL connection and one other simultaneous network connection (such as a dial-up line) for a total of two (2) simultaneous network connections to the Internet. SBC reserves the right to prohibit any additional simultaneous network connections. This policy does not prohibit multiple DSL users from connecting to the Internet over the same DSL network connection using customer premise equipment such as a router or home networking equipment.

    How does this imply that you can't share a DSL connection? OTOH, it explicitly says that sharing a connection is OK.
    however, if we look to AT&T DSL TOS, they are somewhat more restrictive:
    8a. Improper Use. You agree to comply with the "ABC's of AT&T Worldnetiquette," which are described in Section 10. You cannot create a network (whether inside or outside of your residence) with AT&T DSL Service using any type of device, equipment, or multiple computers unless AT&T has granted you permission to do so and you use equipment and standards acceptable to AT&T. AT&T may cancel, restrict, or suspend the Services and this Agreement under Section 11 below for violating these provisions.

    A little tougher, but it doesn't actually rule out connection-sharing entirely- just requires that AT&T grant you permission, right? So they must have a process for granting the approval, and a list of approved equipment.

    Since I'm bored today, I called them up. I pointed the nice lady at their TOS, section 8(a), and asked if she could provide me with a list of AT&T approved equipment, and/or the approval process for home networking. She put me on hold for a bit. When she came back, she told me that AT&T DSL is not the same as AT&T WORLDnet DSL, and i had the wrong phone number- but WORLDnet doesn't allow any kind of connection sharing- and she'd happily transfer me to the REAL AT&T. The second phone monkey had no idea what I was talking about- ditto the 3rd. Neither of them could understand why I would want to ask questions about their TOS if they couldn't even deliver service to my residence. The fourth phone monkey told me that they don't support any kind of multiple connection, and that the "grant you permission" line is in the contract for things like automated security systems that call the police department when someone breaks into your house.

    So. Score: SBC +1 (but -1 for their stupid 'frames' patent), AT&T 0. Interesting article, but since I'm on SBC, i won't be changing my NAT settings...
    --




    Humpty Dumpty was pushed.
  28. 4th amendment violation? by fishbowl · · Score: 4, Insightful

    If someone is routinely monitoring your IP packets like that, how is it different from routinely monitoring your phone calls? Why doesn't this have to be done by a law enforcement agency, with a warrant in hand? Why isn't this covered under the same legal umbrella that affirms our right to have extension telephones? (You might not remember Bell charging monthly for each phone, available only under lease, but I do.)

    We should be allowed to have NAT for the same reason we are allowed to have phones, and if the provider has a problem with that, they need to take a hike. Sniffing for this is unquestionably in bad taste, and it is also a violation of my civil rights.

    --
    -fb Everything not expressly forbidden is now mandatory.
  29. Better Idea by StBello · · Score: 4, Insightful

    It would be better (compared to randomizing) if the sequence of IPids for a single machine were chosen to masquerade as N independent counting values. This would fool them into thinking that you have N machines connected, when in fact you only have one! They'd only have to be fooled by this technique a couple of times before they gave up the technique entirely.