Slashdot Mirror


D-Link Firmware Abuses Open NTP Servers

DES writes "FreeBSD developer and NTP buff Poul-Henning Kamp runs a stratum-1 NTP server specifically for the benefit of networks directly connected to the Danish Internet Exchange (DIX). Some time last fall, however, D-Link started including his server in a hardcoded list in their router firmware. Poul-Henning now estimates that between 75% and 90% of NTP traffic at his server originates from D-Link gear. After five months of fruitless negotiation with a D-Link lawyer (who alternately tried to threaten and bribe him), he has written an open letter to D-Link, hoping the resulting publicity will force D-Link to acknowledge the issue. There are obvious parallels to a previous story, though Netgear behaved far more responsibly at the time than D-Link seem to be."

32 of 567 comments (clear)

  1. List of Affected Products: by SuperficialRhyme · · Score: 5, Informative

    From TFA: "A number of D-Link products, so far I have at least identified DI-604, DI-614+, DI-624, DI-754, DI-764, DI-774, DI-784, VDI604 and VDI624, contain a list of NTP servers in their firmware and using some sort of algorithm, they pick one and send packets to it."

    1. Re:List of Affected Products: by SuperficialRhyme · · Score: 4, Informative

      I asked for details and this is what he provided to me. I haven't gotten to do this yet:

      "If you download the firmware from DLink and run unarj on it
      you get a file called something like nml.mem.

      Run strings on that and grep for GPS.dix.dk to make sure it is not
      listed in there."

    2. Re:List of Affected Products: by Anonymous Coward · · Score: 4, Informative

      From the RFC website: http://www.rfc-archive.org/getrfc.php?rfc=4330

      10. Best Practices

            NTP and SNTP clients can consume considerable network and server
            resources if they are not good network citizens. There are now
            consumer Internet commodity devices numbering in the millions that
            are potential customers of public and private NTP and SNTP servers.
            Recent experience strongly suggests that device designers pay
            particular attention to minimizing resource impacts, especially if
            large numbers of these devices are deployed. The most important
            design consideration is the interval between client requests, called
            the poll interval. It is extremely important that the design use the
            maximum poll interval consistent with acceptable accuracy.

            1. A client MUST NOT under any conditions use a poll interval less
                    than 15 seconds.

            2. A client SHOULD increase the poll interval using exponential
                    backoff as performance permits and especially if the server does
                    not respond within a reasonable time.

            3. A client SHOULD use local servers whenever available to avoid
                    unnecessary traffic on backbone networks.

            4. A client MUST allow the operator to configure the primary and/or
                    alternate server names or addresses in addition to or in place of
                    a firmware default IP address.

            5. If a firmware default server IP address is provided, it MUST be a
                    server operated by the manufacturer or seller of the device or
                    another server, but only with the operator's permission.

            6. A client SHOULD use the Domain Name System (DNS) to resolve the
                    server IP addresses, so the operator can do effective load
                    balancing among a server clique and change IP address binding to
                    canonical names.

            7. A client SHOULD re-resolve the server IP address at periodic
                    intervals, but not at intervals less than the time-to-live field
                    in the DNS response.

            8. A client SHOULD support the NTP access-refusal mechanism so that
                    a server kiss-o'-death reply in response to a client request
                    causes the client to cease sending requests to that server and to
                    switch to an alternate, if available.

      -daedone

  2. Moochers by suso · · Score: 5, Insightful

    Give people an inch and they take a mile. I don't see why D-Link and Netgear couldn't just make their own stratum-1 NTP servers. I mean, if you trust the brandname enough for your routing, don't you trust them enough for your time as well?

    1. Re:Moochers by archen · · Score: 4, Insightful

      I mean why in the hell does cheap dlink crap need to connect to stratum-1 servers? Seriously these things should be running on stratum-3 or lower. I doubt the FBI will come into your home with national security at stake and the whole world ENDS because your $40 dlink router is off by half a second. Why doesn't dlink run their own damn ntp server off of the stratum-1 (making them stratum 2 - stratum 1 is sortof expensive). There is no need for these things to have this level of time precision - they just need ballpark correct time.

    2. Re:Moochers by typical · · Score: 4, Interesting

      It's cheaper for D-Link to freeload off other people.

      That being said, D-Link has acquired quite a bad reputation in my book. The last time they were prominently mentioned on Slashdot was when their routers were randomly silently redirecting a small chunk of HTTP traffic to D-Link advertisements, and causing the obvious mayhem in non-human-readable HTTP traffic.

      I'm also wondering just how much mayhem this guy could cause on various networks by playing with the time he returns. I'm not advocating that...I'm just pointing out that D-Link is rather leaving the owners of their routers open to whatever he chooses to do to them. Adding NTP support to a product is one thing -- hardcoding it to reference an NTP server that you can't guarantee is trustworthy is another thing. Suppose, for instance, this guy drops the name due to the expenses and someone else picks it up...

      To be blunt, buying D-Link hardware at this point means that you're kind of, well, asking for whatever the hardware does to you.

      --
      Any program relying on (nontrivial) preemptive multithreading will be buggy.
    3. Re:Moochers by boneshintai · · Score: 4, Informative

      That was Belkin.

  3. Easy fix by mcgroarty · · Score: 4, Funny

    If he can detect that the majority of connections are from D-Link products, then he can detect which connections are from D-Link products. The easy solution? Whenever a D-Link product connects, report a very very wrong time. :)

    1. Re:Easy fix by holdenholden · · Score: 5, Informative

      He says that such a solution is hard to implement on Cisco, and would be too CPU intensive. FTFA: "Filtering the D-Link packets requires inspection of fields which are not simple to implement in Cisco routers, and in particular such filtering seems to send all packets on the interface through the CPU instead of fast switching, so ingress filtering the packets at the ingress of AS1835 is totally out of the question."

  4. Hasn't anybody at D-Link heard of by bersl2 · · Score: 5, Insightful

    pool.ntp.org?

    1. Re:Hasn't anybody at D-Link heard of by fruity_pebbles · · Score: 4, Informative

      The pool guys have been talking of implementing a $company_name.vendor.ntp.pool.org setup. Having the $company_name specificity would allow them some leeway if an individual vendor does something silly. I don't know if any vendors have bought into this though.

  5. Re:Im confused by Nohea · · Score: 5, Informative

    NTP server use is tiered. So client PCs are not supposed to hit the tier 1s, they should hit 2nd tier or a local ntp server.

    You don't use the root DNS servers for all your DNS requests, right?

  6. Re:Im confused by phil+reed · · Score: 5, Informative

    Yes, you're confused. And, you didn't read the article. The author is pissed because he's running an NTP server intended to be accessed only by Danish networks, and for use by servers, not clients. D-Link products are only marketed to clients, and not just Danish clients.

    --

    ...phil
    "For a list of the ways which technology has failed to improve our quality of life, press 3."
  7. Repost of Digg comment by Bogtha · · Score: 4, Informative

    If there's one thing I hate more than incompetence, it's people who don't care that they are incompetent and carry on churning out crap regardless of the problems it causes others.

    According to this page, D-Link have an office operating in Denmark. This makes them subject to Danish law whether they like it or not. I don't know whether Denmark's computer crime laws cover this, but it wouldn't surprise me.

    --
    Bogtha Bogtha Bogtha
  8. Re:Im confused by Chyeld · · Score: 4, Informative

    He hosts a NTP server with the intention of it being used by a certain audience. He's not pissed people outside of that audience are using the server, he's pissed that D-Link decided to abuse the service he's providing and now the overwhelming majority of the people using his service are outside the intended audience.

    Sorta like how server admins get pissed when an article posted on their site causes them to be Slashdotted.

    And honestly, the fact that D-Link is acting in the way it is while he trys to get them to resolve the issue probably isn't helping matters.

    Then again, as a former owner of a D-Link product which rebooted itself anytime I went over 50 simultaneous connections (think P2P), I don't doubt they'd be too cheap to actually just run their own.

  9. Re:Couldn't they filter by DES · · Score: 4, Informative

    A good idea, but not easily doable, since the allowed networks include most of Denmark. He would have to filter traffic based on the AS of the sender; this would require a full BGP feed and probably also a continuously updated mirror of the RIPE database.

  10. Re:Im confused by 99BottlesOfBeerInMyF · · Score: 4, Insightful

    So let me get this straight... this guy hosts an NTP server and is pissed because... its being used as an NTP server?

    If I set up an NTP server, say for my university, and left it open for others, I also might think it a bit unorthodox if a multinational corporation hardcoded all there gear (which was deployed internationally) to query it. This is for several reasons. First, it generates unneeded bandwidth and violates convention by not using a local NTP server. Second, it means thousands of people are relying on one person for their gear to work properly, a person the company did not even bother to consult. What if he decides to change the time by five hours, just for fun? It is bloody irresponsible of the manufacturer to give him that option. And what happens if the server is deprecated or the hostname and IP changed in a reworking of the network? Tons of wasted traffic as they ping his IP space.

  11. Re:Im confused by honkycat · · Score: 5, Insightful

    He followed standard protocol for NTP servers, which is to list the restrictions on the use of your server with its entry on the NTP server list. System administrators are supposed to check this to make sure they're not making an unauthorized connection. They're also supposed to contact the NTP server administrator to let him know they're using the server, unless the server admin states otherwise.

    You can learn all this and check the list to be sure you comply within 10 minutes thanks to the power of Google. Any responsible company would know this and do so. D-Link made a big mistake (not in terms of the impact on them, sadly) and is evidently refusing to own up.

    As others have pointed out, it's not easy to implement the restrictions that would enforce the access policy. It's also sad, though not surprising, that one would have to. It'd be one thing if the server was the target of script kiddie DOS attacks, but a legitimate company selling network products really ought to know better (and care).

  12. Re:Why didn't he take the "bribe"? by bloodredsun · · Score: 4, Informative

    Sorry to correct your rant, but he does say in TFA that the offer was so low that it didn't even cover his costs. That would be a good enough reason to say no wouldn't it?

  13. wrong easy fix. try this... by swschrad · · Score: 5, Interesting

    send a private communication to the authentic users (not the robot moochers from D-Link) that on date X, the new IP service address will be unhacked.gps.dix.de or whatever suits him.

    on date X, send bogus packets in response... not just wrong time, but seriously wrong time, like a packet with time of 9s in all fields, which would be most seriously wrong.

    hopefully, it would lock up the offending junkpiles, and clear the problem right smartly.

    the general idea in engineering an end to these things is to find a way to blow up the crooked machine by a seriously wrong entry that will screw up the internals. since they took an ugly and cheap shortcut by using firmware tables, they probably don't error-check their inputs from NTP and other services. so there should be a memory jump and a crash in those pirate boxes someplace.

    and that puts the onus back where it belongs, on supercheap designers for obnoxious companies that don't give a shit about network etiquette. the market will punish them. that's how it should be for slap-happy outfits.

    --
    if this is supposed to be a new economy, how come they still want my old fashioned money?
  14. They're clearly wrong here by MikeRT · · Score: 5, Insightful

    So why didn't they just own up to the mistake, update the firmware and cut him a check for his expenses plus a 5% or so to apologize for the inconvenience? Bureaucrats and lawyers who cannot admit that they are wrong only end up creating more public disgust with their behavior. When you find yourself digging a hole, stop digging!

    1. Re:They're clearly wrong here by DES · · Score: 4, Informative

      No, he can't "just firewall the server" and "tell the few people that would affect". There are thousands of legitimate users distributed across thousands of ASes covering thousands of IP ranges which may change from day to day or even hour to hour. His server is directly connected to the core switch at the Danish Internet Exchange, where all major Danish networks exchange BGP routing information and domestic IP traffic, and its purpose is to provide a stratum-1 reference for NTP servers on these networks. To determine which IP ranges may legitimately access his server, he would need a full BGP feed and a continuously updated copy of all as-block and aut-num records in the RIPE database.

  15. D-Link is just a bad net citizen by cdrudge · · Score: 4, Interesting

    It's not the first time that D-Link's crappy programming has affected a service. DynDNS.com last year started blocking all update requests that match a user-agent of client/1.0, beleived primarily to be several D-Link routers. D-Link has been mum on a response last I heard.

  16. Re:Im confused by typical · · Score: 5, Interesting

    There are three conventions being violated:

    * To keep the network working, the NTP system is tiered. Anything other than a time server used to redistribute time to other machines should probably access a Tier 3 system, or a Tier 2 if that is not possible. It should never hammer a Tier 1 -- this can screw up the rest of the NTP network.

    * There are large lists of NTP servers, and they list access restrictions. As pointed out in the letter, this guy explicitly stated in his access rules that this server was not for client use.

    * As pointed out in the letter, this guy explicitly stated in his access rules that this server was not for use outside of Denmark.

    You may not be used to this sort of thing, because no such set of agreements exists for, say, webservers. However, in the NTP world, network administrators respect these, and it is why the time system continues to work.

    What D-Link is doing hurts all Danish NTP users, and freeloads off a volunteer (D-Link is selling the product and profiting from it -- let *them* handle the traffic and factor any bandwidth costs into their product cost). It opens their product to potential abuse if the server becomes malicious (a properly-designed router would allow the user to specify an NTP server, or if the user is unable to configure a router, to do what the letter suggested and use a D-Link-controlled name.). It violates agreements that have been generally respected by the NTP-using administrator community for many years.

    --
    Any program relying on (nontrivial) preemptive multithreading will be buggy.
  17. cname to the rescue by spatenbrau · · Score: 4, Insightful

    I'm surprised phk is screwing around writing long-winded letters. Much faster would have been to just add a dns A-record entry by the name of private-ntp.dix.dk for the legit users and have them use that server. The old gps.dix.dk entry should be made into a CNAME for www.dlink.com. That would put the crushing levels of ntp traffic back where it belonged -- right on Dlink's doorstep.

  18. Poul-Henning clarifies by phkamp · · Score: 5, Informative

    Let me clarify a number of details here.

    1. My server has not replied to the packets sinde the CodeRed virus/worm abused NTP servers to coordinate attacks. That was a couple of years ago. I doubt D-Link ever even tried to test this.

    2. NTP is a timing protocol. You do not want to do expensive and timeconsuming filtering on the packets because that disturbs your timing performance.

    3. If I have to sue D-Link, it will be either in USA or Taiwan. Both their Danish marketing office and the UK european office will be able to deflect a lawsuit to their mothership.

    4. If you download a firmware file from D-Link, it is often a ARJ archive. unpack that and run strings. If you see GPS.dix.dk in there, please use another version. If the firmware you run is older than about a month, please update it.

    5. The list of products in my open letter is unlikely to be complete, those are the only ones I have been able to positively identify (using the method above). If you find out other products are affected, please email me.

    6. We do have a number of very interesting sections of our penal code here in Denmark that are very likely to apply. Only problem is, they havn't been tried in a court yet. So I have to persuade an overworked criminal inspector to raise a criminal case against a foreigner over a, lets face it, quite small monetary amount. Then I have to spend a lot of time making sure that we convince a judge who have never heard of NTP that they are guilty and then if I win, I can see some D-link manager make a checkmark in their pocket book: "Remember to not visit Denmark under true name". I have better things to use my life for.

    I can see a couple of hits from a C-class belonging to "D-Link Irwine": please escalate this guys, your bosses don't read slashdot.

    Thanks for all the supportive email.

    Poul-Henning

    --
    Poul-Henning Kamp -- FreeBSD since before it was called that...
  19. D-Link Business Development by Qbertino · · Score: 4, Interesting


    Ok, let's do some good. Are we slashdot, or what?

    D-Link Business Development and Strategic Partnerships, E-mail: bdm@dlink.com

    >>>
    To whom ever it may concern:

    Hello.
    I just learned of you companies notably persistent inability and unwillingness to deal with a serious design flaw in a growing range of your products. This flaw is severly disrupting internet services for a large amount of internet participants and even though you have been informed in detail of these effects your products are having, you have done nothing of substance to resolve the issue and compensate for the damage done.

    Until I learn that the issue described in the open letter do D-Link, available under http://people.freebsd.org/~phk/dlink/, was resolved in a professional and mutualy satisfying manner I will not purchase any D-Link products and will strongly discourage anybody asking for my expertise as a professional in the IT field from buying D-Link products or from engageing in any sort of business relationship with D-Link.

    Sincerely
    An Internet User

    Mistakes in this one? Please post corrected version below and then add a 'mailto' link to the address.
    Grammar Nazis, it's your turn!


    --
    We suffer more in our imagination than in reality. - Seneca
  20. Re:List of Affected Products: - ERR Wrong Answer by MerlynEmrys67 · · Score: 4, Informative
    Can you please show me where the Source MAC address exists in an IP packet that has been forwarded over the internet from (for example) the United States - to a server in Denmark?

    Now that you look at your ethernet sniffs (I assume you just went running off and ran ethereal) look at the source ethernet address... Hmmmmm - doesn't that look familiar, like maybe it looks kinda like your first hop routers MAC address.

    Nice try -

    Thank you, Come Again

    And please read either Stevens or Comer before posting on networking topics again

    --
    I have mod points and I am not afraid to use them
  21. Path to Justice by doublem · · Score: 5, Interesting

    1. Buy the domain name off this poor guy / arrange for alternate hosting if it can't be sold.

    2. Take a collection from the /. community to set up an alternate server.

    3. Wait a month for all the legitimate users to switch to a new URL.

    4. Fire up a server at the old URL reporting Midnight, Jan 1, 1900

    5. Let D-Link deal with users accusing D-Link of failing to sell a Y2K compliant product in 2006.

    --
    "Live Free or Die." Don't like it? Then keep out of the USA
  22. Re:Splendid admins over there at pool.ntp.org by ajs · · Score: 4, Informative

    Someone else replied, but let me actually EXPLAIN.

    pool.ntp.org is a collection of volunteer NTP servers, served up via DNS. You should not expect to get meaningful results from pointing a Web browser at such a host name, but because it is random, you could end up hitting Amazon.com (assuming they volunteered) or some guy that just set up an Apache server.

    http://www.pool.ntp.org/ is what you meant, as a simple google search for "pool ntp" would have told you.

  23. Re:WTF??? by LurkerXXX · · Score: 5, Interesting
    It doesn't seem like a moral crusade to me.

    He discovered a problem.
    He contacted the company causing the problem.
    He explained the problem, and simply asked them to fix it.
    They didn't.
    They put him off.
    They threw a lawyer at him to threaten him.
    They offered 'compensation' that didn't come close to covering his costs.

    He was trying to do it all quietly and nicely, not crusading, and they wouldn't have it.

    So instead of going through the often extremely troublesome and lengthy legal procedings (which are even worse than normal since this is an international case), he was hoping to publically embarrass the company into fixing the problem they caused. Seems like a reasonable attempt at a speedy solution, not a crusade.

  24. Re:WTF??? by LurkerXXX · · Score: 5, Informative
    I would have contacted a lawyer right after step four

    Right, because lawyers are cheap... right.

    I like how he doesn't mention any numbers.
    He already has dedicated hosting, do they charge him $1 per megabyte or something?

    If you'd bother to RTFA, once again, he answers how much the hosting is costing him. He talks about numbers all over the place.

    " because I offer this service free of charge and NTP is a low bandwidth protocol, the organization behind the DIX has graciously waived the normal DKR 27.000,00 (approx USD 4,400) connection fee."

    " the current theory is that I will have to close the GPS.DIX.dk server or pay a connection-fee of DKR 54.000,00 (approx USD 8,800) a year as long as the traffic is a significant fraction of total traffic to the server."

    " I owe $5000 to an external consultant who helped me track down where these packets came from."

    " I have already spent close to 120 non-billable hours (I'm an independent contractor) negotiating with D-Link's laywers and mitigating the effect of the packets on the services provided to the legitimate users of GPS.dix.dk."

    " Finally I have spent approx DKR 15.000,00 (USD 2,500) on lawyers fees trying to get D-Link to negotiate in good faith."

    " If I closed the GPS.dix.dk server right now, wrote off all the time I have spent myself, then my expenses would amount to between DKR 45.000,00 and DKR 99.000,00 (USD 7,300 to 16,000) and several hundered administrators throughout Denmark would have to spend time reconfiguring their servers.

    If on the other hand we assume I leave the service running and that the unauthorized packets from D-Link products continue for the next five years, the total cost for me will be around DKR 115.000,00 + 54.000,00 per year (approx USD 18,500 + USD 8,800 per year) or DKR 385.000,00 over the next five years (USD 62,000). " block the NTP traffic from anything outside his network if it is sooooo expensive for him. You can do that at the ISP level in most cases.

    He also mentions how blocking traffic is not feasible, and why, IF YOU'D BOTHER TO READ THE FUCKING ARTICLE. Learn how to read or STFU about him being an asshole.