Slashdot Mirror


Denial of Service via Algorithmic Complexity

dss902 writes "We (Department of Computer Science, Rice University) present a new class of low-bandwidth denial of service attacks that exploit algorithmic deficiencies in many common applications' data structures... Using bandwidth less than a typical dialup modem, we can bring a dedicated Bro server to its knees; after six minutes of carefully chosen packets, our Bro server was dropping as much as 71% of its traffic and consuming all of its CPU. We show how modern universal hashing techniques can yield performance comparable to commonplace hash functions while being provably secure against these attacks."

257 comments

  1. Same Content / Two Links by Zach+Garner · · Score: 5, Informative

    I hate to ruin it for everyone, but the second link has the same content as the first, only in PDF format.

    1. Re:Same Content / Two Links by Anonymous Coward · · Score: 1, Funny

      You bastard.

      Oh yeah, well at the end of "The Sixth Sense" .....

      *gets maimed by millions of angry slashdotters*

    2. Re:Same Content / Two Links by hazem · · Score: 5, Funny

      You must be theonly slashdot reader who actually reads the articles. The submitter must have figured he would get away with it!

    3. Re:Same Content / Two Links by Derg · · Score: 0, Offtopic

      Trinity is the agent

      --
      I'm a little tea pot.
    4. Re:Same Content / Two Links by tarzan353 · · Score: 1

      ssshhh! You can't post that! Somebody might notice that the editors don't read the articles!

    5. Re:Same Content / Two Links by Anonymous Coward · · Score: 0

      i think we've all seen 6th sense by now

      and if you havent, then i dont care if i spoil it for you by telling you that at the end you find out Bruce Willis's character is DEAD. he's a GHOST

      HAHAHAHA

    6. Re:Same Content / Two Links by sirdude · · Score: 1
      if you scroll right to the bottom of the project's main page here,you may find a rather poignant plea :P

      "Changes: Sat May 31 19:37:25 CDT 2003. Slashdotting. Make attack files gzipped. Also made the destionation points of the slashdot links point to holder pages. (Why oh why didn't they link to this page directly, which has the info people want, instead of the actual paper?)"

    7. Re:Same Content / Two Links by Anonymous Coward · · Score: 0

      What is the matter with you Drunken Monkeys? Score of 5? Informative?

    8. Re:Same Content / Two Links by Carnivorous+Carrot · · Score: 1

      > Denial of Service via Algorithmic Complexity

      This issue is very similar to the denial of productivity in a software shop due to the introduction of QUake CTF or broadband pr0n access.

      --
      "Has [being a kidnapped teenage girl, raped repeatedly for months] changed you?" - Katie Couric to Elizabeth Smart
    9. Re:Same Content / Two Links by Anonymous Coward · · Score: 0

      And after Neo finds out about that, he's going to leave her and have an affair with Morpheus.

  2. Denial of service? by cperciva · · Score: 4, Funny

    They claim to present a new method of low-bandwidth denial of service attack, but it looks like they're demonstrating quite an old, high-bandwidth, denial of service.

    1. Re:Denial of service? by phocuz · · Score: 3, Insightful

      Compared to many DoS attacks, these guys do something that actually requires some matter of knowing, whereas others (read scriptkiddies) use things they've downloaded themselves. Most DoS attacks invlolve less sophisticated means, which is why this could be interesting for someone who does not know much about them.

      Please excuse any bad grammar/spelling, I am quite drunk atm.

    2. Re:Denial of service? by SiMac · · Score: 5, Funny

      I think he means with the slashdotting.

    3. Re:Denial of service? by Anonymous Coward · · Score: 0

      *whoosh*

      Thats the sound of the joke flying right over your yead...

  3. I've seen this before by jeffy124 · · Score: 5, Interesting

    Several years ago Apache had a function that ran in O(n^2) time, and a HTTP GET request was capable of throwing that function into taking a very long time to process, making it easy to DoS an Apache httpd. The interesting part is that the same function could have been done in O(n) time, but wasnt. The Apache team fixed this by substituting the O(n) algorithm.

    --
    The One Rule Of Chess You'll Ever Need: Don't play someone who carries a kit in their bookbag.
    1. Re:I've seen this before by weezel · · Score: 5, Informative

      I also remember that problem with Apache. Here's the report and the code change involved for that particular bug.

      --
      EOF
    2. Re:I've seen this before by Old+Wolf · · Score: 1

      It's scary to me to think that people who write code in the first style get to submit code to important projects like Apache. It looks like a Basic programmer writing in C syntax. Even for a string with no double slashes it is far less efficient than the second style.

      Regarding the second function, it's unaesthetic (to me) to have the ++s twice, how about this:

      no2slash.html

      PS. "Lameness filter encountered. Reason: Please use fewer 'junk' characters." I suspect I wouldn't have got that message if the code were in VB instead of C :(

    3. Re:I've seen this before by Anonymous Coward · · Score: 0

      i'm looking at both versions of the code and they BOTH look crappy.

    4. Re:I've seen this before by kazad · · Score: 5, Interesting

      For those too lazy to click:

      Problem: remove excess slashes from a URL, so /d1///d2////d3/test.html becomes /d1/d2/d3/test.html

      Original Algorithm:

      If an additional slash is found, copy the remainder of the string over. So

      a///b => a//b => a/b

      This copying, an inner loop, makes the algorithm O(n^2).

      New algorithm:

      Have 2 pointers, and copy from one to the other. One pointer skips additional slashes. At the end, throw on a "\0" to terminate the string.

      a///b => a/b

      The second pointer has a loop to skip over additional slashes, and each slash is only visited once. Thus, the algorithm is O(n).

      Cool stuff ... imagine an input like

      a///...{500 slashes later}...///b

      It could really do some damage to the first algorithm.

    5. Re:I've seen this before by stoops · · Score: 1

      but even with the inner loop, that's still O(number of slashes)... unless you're copying the string one character at a time... which is what they must have been doing before... which is just bad programming...

    6. Re:I've seen this before by rulethirty · · Score: 0

      Cool stuff ... imagine an input like
      a///...{500 slashes later}...///b
      It could really do some damage to the first algorithm.


      Makes me want to bring up a legacy linux system with the first apache package installed and run some tests and analyze the results in comparison to the patched version.. but alas I am too lazy and its 2 in the morning...

    7. Re:I've seen this before by Henry+Stern · · Score: 3, Interesting

      In fact, you can do it with even less memory. All that you need to do is keep an offset stored in a variable.

      The algorithm looks something like:

      offset = 0
      for i = 2 to n do
      if a[i-1] = '/' and a[i] = '/' then
      offset = offset + 1
      else
      a[i-offset] = a[i]
      end if
      end for

      It saves you the trouble of having to manage the memory containing the cleaned-up string.

    8. Re:I've seen this before by Master+of+Transhuman · · Score: 1

      Yeah, and I get flamed for pointing out that geeks write lousy error messages...

      And for those talking about bean counters, Apache isn't even a commercial app.... Whose bean counters are working in open source?

      No, these are pure geeks who can't code either...

      Sloppyness is a geek attribute along with cleverness and obtuseness...

      --
      Richard Steven Hack - This sig is TOO GODDAMN SHORT TO DO ANYTHING USEFUL WITH! MORONS!
    9. Re:I've seen this before by dolmen.fr · · Score: 1

      You are thinking too much with arrays. Two pointers is not two arrays. You can have two pointers that points to the same memory block (the same array).

      One pointer will contain the address of a[i]. The other will contain the address of a[i-offset].
      Using pointer is more efficient as you avoid one substraction at every step of the algorithm.

    10. Re:I've seen this before by Anonymous Coward · · Score: 0

      It's pseudocode to describe an algorithm, not an implementation. One might even say that you are thinking too much in C as many (most?) languages do not allow you to directly access memory.

  4. duh... by Anonymous Coward · · Score: 5, Funny

    you can use a modem to post a slashdot article with a link to the target computer...

  5. impressive... by ajuda · · Score: 3, Funny

    ...But in terms of raw power, nothing can match a slashdoting. Can anyone else read the link?

    1. Re:impressive... by bsharitt · · Score: 3, Funny

      With this technology we could slashdot big sites like news.com

    2. Re:impressive... by The+Master+Control+P · · Score: 1

      The creepy thing about a /.ing is that it's not malicious traffic, it's just to MUCH of it...

    3. Re:impressive... by ketamine-bp · · Score: 2, Funny

      the even more creepy thing is that slashdot is full of malicious crowd.... umm... nevermind.

  6. Uh oh! by seizer · · Score: 3, Funny

    Speaking of, uh, denial of service...the site's quickly turning into a smoking ruin from where I'm standing. If it had been text only, it might have survived, but all the mathematical symbols are done using images (is that big O or big uh-O ;-) so the server is choking...

    Bring on the MathML.

    1. Re:Uh oh! by corsec67 · · Score: 1

      Yes, but this would be a distributed DOS attack, and very high bandwidth.

      It still is just about as funny as an article about how to DOS someone being shown here...

      --
      If I have nothing to hide, don't search me
  7. sham report! by larry+bagina · · Score: 3, Funny

    they don't list slahsdotting!

    --
    Do you even lift?

    These aren't the 'roids you're looking for.

  8. The project page (the one with the details) by Convergence · · Score: 5, Informative

    The project page is http://www.cs.rice.edu/~scrosby/hash/ and actually has details about individual vulnerable applications and test files for several systems. (And is kinder on the server for those who don't want to download the whole paper.)

  9. DOS attack by IO+ERROR · · Score: 4, Funny
    And by posting our links on /. we can bring our departmental WWW server to its knees with a single HTTP POST request.

    Anyone got mirrors yet?

    --
    How am I supposed to fit a pithy, relevant quote into 120 characters?
    1. Re:DOS attack by Alomex · · Score: 2, Interesting


      I have often wondered if the /. effect is not magnified by inefficiencies in the TCP/IP stack. I mean, a lot of people read /. but say, a server should have enough bandwidth to serve twenty users per second, 1200 per minute, 72,000 per hour... I doubt there is more than that many /. actives at any given time...

    2. Re:DOS attack by Old+Wolf · · Score: 1

      I think it's more about CPU power than bandwidth. Can it serve 50 users per second ( that would be my estimate.. ) If it were only a bandwidth problem, we wouldn't have all these reports of servers crashing from being slashdotted

    3. Re:DOS attack by Nogami_Saeko · · Score: 1

      Just a thought:

      How about using apache's mod_rewrite capability to redirect slashdot users to something a little more interesting rather than flooding the site?

      RewriteCond %{HTTP_REFERER} ^slashdot.*
      RewriteRule ^/$ /www.mpaa.org [L]

      (don't jump on me if I got the syntax wrong, I only discovered mod_rewrite a day or two ago) ;P

      N.

      --
      "Nothing strengthens authority so much as silence." - Charles de Gaulle
    4. Re:DOS attack by http · · Score: 1

      I don't know about you, but i have HTTP_REFERER set to FALSE in my browser.
      Those marketing drones get nothing from me, nothing.
      Plus, I get to see who still has 'fatalsToBrowser' code left in production web pages.
      Assuming that all browsers send that data is unwarranted.

      --
      If opportunity came disguised as temptation, one knock would be enough.
      3^2 * 67^1 * 977^1
  10. Is it just me..? by fadeaway · · Score: 4, Funny

    This doesn't sit well with me. Should students at a University be studying, developing, and releasing improved methods with which to launch DOS attacks..?

    1. Re:Is it just me..? by MisterFancypants · · Score: 4, Insightful
      How about if they are researching computer security?

      If you RTFA you'd see they also present ways in which to AVOID this problem, and that's the real goal.

    2. Re:Is it just me..? by utexaspunk · · Score: 3, Insightful

      yes, they should, because they're also researching how to protect against them. better we find out now from a university that also mentions how to prevent these attacks than on some random day when al queda or some random hacker collective decide to take down the internet and bring a growing part of the world economy to a screeching halt.

    3. Re:Is it just me..? by Anonymous Coward · · Score: 5, Insightful

      well, maybe they're figuring out how to fix them. Would you rather a University figuring out how to do it, or some random black hat/chinese hacker?

      With this information it shouldn't be too big of a deal to redesign the software to not be vulnerable anymore.

      What they did is little more than algorithm analysis. They looked at all the different links in the chain then merely decided which algorithms were the weakest links and exploited them.

      This is good because we can now fix those. Robustness abound.

    4. Re:Is it just me..? by fadeaway · · Score: 0, Flamebait

      How about if they are researching computer security?

      Fine. Identify the problem, come up with a solution, then release THAT to the public.. at the very least to render yourself immune from any future legal reprocussions, however misguided they may be.

      If I discovered a new poison that could be easily replicated with over the counter products, do I protect the public by releasing the recipie for it, or for the antidote?

    5. Re:Is it just me..? by Baumi · · Score: 1

      I hope it's just you - it's better if they figure it out than your neighborhood script kiddy, because this way, the hole might get plugged before the damage is done.

      Unfortunately, those who've been drafting the DMCA would probably disagree with me here...

      Ignorance is power, I guess... :-(

    6. Re:Is it just me..? by debrain · · Score: 2, Insightful

      This doesn't sit well with me. Should students at a University be studying, developing, and releasing improved methods with which to launch DOS attacks..?

      Most certainly yes. Others are studying it with purely malevolent intentions. The incentive of the University is benevolent. Carefully consider the consequences of not having public knowledge reflecting the capabilities of those with malicious intentions.

      The onus is now upon the vendors to adhere to adequate standards, rather than resting upon public conformity and goodwill (which we both know is non-existent).

    7. Re:Is it just me..? by GMontag · · Score: 1

      This doesn't sit well with me. Should students at a University be studying, developing, and releasing improved methods with which to launch DOS attacks..?

      Because Uiversities are where this sort of research shoud go on and solutions found.

      I find it quite refreshing that this happened in a house of learning rather than "on the street".

    8. Re:Is it just me..? by Anonymous Coward · · Score: 0

      Ok, not reading the article I can undertand

      errr ... I meant to type "understand".

    9. Re:Is it just me..? by intelligent+poster · · Score: 1

      I dont know if you noticed that the people concerned are faculty members working in network security....

    10. Re:Is it just me..? by EvilBuu · · Score: 1

      I think the question that immediately popped into my cynical mind was: "When will the follow-up Slashdot article telling of the DMCA lawsuit against those students hit the front page?" Though I suppose maybe if they don't mention any specific software issue they might be O.K.

      --

      Green-voting, republican-registered, socialist-libertarian.
    11. Re:Is it just me..? by Anonymous Coward · · Score: 0

      heheh - "I undertand ... YAAYYY"

    12. Re:Is it just me..? by greenrd · · Score: 1
      Fine. Identify the problem, come up with a solution, then release THAT to the public.. at the very least to render yourself immune from any future legal reprocussions, however misguided they may be.

      Actually, I don't think the Perl or Python developersare going to be suing over these bug advisories anytime soon.

      If any corporate user of Python wants to sue the Python developers for taking an open source attitude towards security bugfixing (i.e. discussing the problem on public mailing lists)... well, that would be, um, interesting - and rather unprecented AFAIK.

    13. Re:Is it just me..? by abirdman · · Score: 1

      Please, please, after your third post, RTFA! These students (nope, faculty) aren't publishing how to exploit some "security hole"--they're pointing out flaws that are built into existing systems. Letting people know that their built-in RegExp processor can cause huge problems under certain circumstances, and that the data structures (hashes, b-trees, etc.) used in some common programming languages (perl, python, gcc, etc.) can cause grief when they face inputs that are malicious is ALL GOOD!

      These aren't problems that can be "fixed" by quickly plugging some overlooked "hole" in the code, Pointing them out does not open up an otherwise closed opportunity for some idiot to fuck with some servers (well, it could, but the problem's been there all along). Instead they're providing a way to help everyone to "know their tools" better, including their weaknesses.

      Read. Learn. Think. Post.

      --
      Everything I've ever learned the hard way was based on a statistically invalid sample.
    14. Re:Is it just me..? by GlassUser · · Score: 2, Insightful

      Fine. Identify the problem

      Step one complete. Now they're soliciting interaction on developing a solution.

    15. Re:Is it just me..? by Jucius+Maximus · · Score: 1
      "This doesn't sit well with me. Should students at a University be studying, developing, and releasing improved methods with which to launch DOS attacks..?"

      What, would you have preferred that it appeared on an obscure malicious cracker's board? It's better that academia finds it before irreponsible people who would only use it to take down web sites.

      And speaking of DDOS, it looks like the RIAA's site is down again.

    16. Re:Is it just me..? by muonzoo · · Score: 2

      Students? I suppose technically, but the paper's principle author is a PhD candidate at this institution.
      This is a far cry from the implied 'student' moniker everyone has been going on about 'round here. :-/
      These are exactly the sort of people that should be looking at security problems. Especially when their findings include ways to avoid the problem, as their paper did.

    17. Re:Is it just me..? by Anonymous Coward · · Score: 0

      Yep, it's just you moaning, pad're. Cause folks who understand the antidote all ready understand the (CS) poison. That's good, unless you believe only blackshoes ought to understand either. For the rest of us ... hash? Make mine bacon & eggs ........ while I stick to contour integration on the complex plane -- eh pad're??

    18. Re:Is it just me..? by 10am-bedtime · · Score: 1

      yes, students should learn all the facts of life, including the dangerous ones. ideally, they should also learn some ethics to discern the proper time to apply what they learned. any teacher operating otherwise is basically irresponsible (and should go back to school for remedial pedagogy classes!).

    19. Re:Is it just me..? by FrozedSolid · · Score: 1

      If I discovered a new poison that could be easily replicated with over the counter products, do I protect the public by releasing the recipie for it, or for the antidote?

      Who would buy an antidote without knowing the problem it cures? To solve a problem, don't you have to KNOW what the problem is in advance? What kind of CS monkey is going to start reimplementing all of their hash table stuff because someone invents a new and potentially slower method of doing it? Obviously, you need to have a reason to begin making changes in software.

      --
      When all freedom is outlawed only the outlaws have freedom
    20. Re:Is it just me..? by Anonymous Coward · · Score: 0

      Only fagghorx use the word pad're so I must assume that you like to gag on cocks and feel the cum shooting down your throat??

    21. Re:Is it just me..? by Anonymous Coward · · Score: 0

      al queda al queda al queda !!! AAhhh!! It is the terrorists! They are hiding under every bed and in every closet! Your neighbor! Your coworker! They might all be teerrorriissttsss!!!!!!

      Dude. If you lived in the 1950's I bet that you would be one of those Mcarthyites screaming about communism and the red menace. In otherwords, fuck off you sheeplike chicken-little pansy.

  11. It's not a Bro by St.+Vitus · · Score: 4, Funny

    It's a Mansierre!

    1. Re:It's not a Bro by Anonymous Coward · · Score: 0

      Haha. Seinfeld is the shit.

  12. What is a "Bro server"? by Anonymous Coward · · Score: 0

    What is a "Bro server"?

    1. Re:What is a "Bro server"? by Anonymous Coward · · Score: 3, Informative
  13. These people... by swsnyder · · Score: 0, Offtopic

    ...at Rice university have way too much free time.

    1. Re:These people... by Anonymous Coward · · Score: 0
      +1, Fucking Hilarious!

      Now where are my mod points!

  14. Site is DoSed -- Abstract & Intro by Anonymous Coward · · Score: 4, Informative

    Denial of Service via Algorithmic Complexity Attacks

    Scott A. Crosby Dan S. Wallach
    scrosby_at_cs.rice.edu dwallach*cs.rice.edu

    Department of Computer Science, Rice University

    Abstract:
    We present a new class of low-bandwidth denial of service attacks that exploit algorithmic deficiencies in many common applications' data structures. Frequently used data structures have ``average-case'' expected running time that's far more efficient than the worst case. For example, both binary trees and hash tables can degenerate to linked lists with carefully chosen input. We show how an attacker can effectively compute such input, and we demonstrate attacks against the hash table implementations in two versions of Perl, the Squid web proxy, and the Bro intrusion detection system. Using bandwidth less than a typical dialup modem, we can bring a dedicated Bro server to its knees; after six minutes of carefully chosen packets, our Bro server was dropping as much as 71% of its traffic and consuming all of its CPU. We show how modern universal hashing techniques can yield performance comparable to commonplace hash functions while being provably secure against these attacks.

    Introduction
    When analyzing the running time of algorithms, a common technique is to differentiate best-case, common-case, and worst-cast performance. For example, an unbalanced binary tree will be expected to consume O(n log n) time to insert n elements, but if the elements happen to be sorted beforehand, then the tree would degenerate to a linked list, and it would take O(n^2) time to insert all n elements. Similarly, a hash table would be expected to consume O(n) time to insert n elements. However, if each element hashes to the same bucket, the hash table will also degenerate to a linked list, and it will take O(n^2) time to insert n elements.

    While balanced tree algorithms, such as red-black trees [11], AVL trees [1], and treaps [17] can avoid predictable input which causes worst-case behavior, and universal hash functions [5] can be used to make hash functions that are not predictable by an attacker, many common applications use simpler algorithms. If an attacker can control and predict the inputs being used by these algorithms, then the attacker may be able to induce the worst-case execution time, effectively causing a denial-of-service (DoS) attack.

    Such algorithmic DoS attacks have much in common with other low-bandwidth DoS attacks, such as stack smashing [2] or the ping-of-death 1, wherein a relatively short message causes an Internet server to crash or misbehave. While a variety of techniques can be used to address these DoS attacks, common industrial practice still allows bugs like these to appear in commercial products. However, unlike stack smashing, attacks that target poorly chosen algorithms can function even against code written in safe languages. One early example was discovered by Garfinkel [10], who described nested HTML tables that induced the browser to perform super-linear work to derive the table's on-screen layout. More recently, Stubblefield and Dean [8] described attacks against SSL servers, where a malicious web client can coerce a web server into performing expensive RSA decryption operations. They suggested the use of crypto puzzles [9] to force clients to perform more work before the server does its work. Provably requiring the client to consume CPU time may make sense for fundamentally expensive operations like RSA decryption, but it seems out of place when the expensive operation (e.g., HTML table layout) is only expensive because a poor algorithm was used in the system. Another recent paper [16] is a toolkit that allows programmers to inject sensors and actuators into a program. When a resource abuse is detected an appropriate action is taken.

    This paper focuses on DoS attacks that may be mounted from across a network, targeting servers with the data that they might observe and store in a hash table as part of their normal operation. Section 2 details how hash table

    1. Re:Site is DoSed -- Abstract & Intro by Anonymous Coward · · Score: 0

      ... and the Bro intrusion detection system
      (snip)

      Using bandwidth less than a typical dialup modem, we can bring a dedicated Bro server to its knees;


      So they can DOS an IDS server using itself? How brilliant is that?

  15. I hope this isn't news to anyone... by cperciva · · Score: 5, Informative

    Basically, the paper says this: If you have a hash table into which attackers can insert arbitrary keys, you'd better be using a hash function for which they cannot easily generate collisions.

    I don't know if anyone has *published* this before, but it's certainly not new.

    1. Re:I hope this isn't news to anyone... by MonkeyBoyo · · Score: 1

      it's certainly not new

      yeah, but they then go on to show that using a decent hash function doesn't cause such a big performance hit.

      I think that crashing the Bro server was just meant to demonstrate that some and maybe a lot of code out there in the real world has vunerable hash functions.

    2. Re:I hope this isn't news to anyone... by Shackleford · · Score: 4, Insightful
      Basically, the paper says this: If you have a hash table into which attackers can insert arbitrary keys, you'd better be using a hash function for which they cannot easily generate collisions.

      That is something that the paper said, but they also gave specific examples of software that was vulnerable to that kind of attack. They determined that the Bro intrusion detection was highly vulnerable to this kind of attack, and mentioned different versions of Perl and Python that also experienced a significant perfrormance decrease given their input specifically made to bring down systems that use hash tables.

      I don't know if anyone has *published* this before, but it's certainly not new.

      It has been done. They mentioned similar related work where it was found that input to quicksort makes it take O(n^2) time instead of O(n lg n) and a that there was a vulnerability in the hash tables of the Linux route-table cache. The concept isn't new, it's just that different software has been found to have this sort of vulnerability.

      And I just couldn't help but laugh at the irony of their PDF file on DOS attack prevention being the victim of the /. effect.

    3. Re:I hope this isn't news to anyone... by Alomex · · Score: 1


      The paper goes beyond that. It gives specific examples of such hash tables in linux systems.

    4. Re:I hope this isn't news to anyone... by KrispyKringle · · Score: 5, Interesting
      It's obvious that there is already plenty of incentive to use a good hash function simply to improve performance, even if people didn't worry about intentional DOS attacks. And of course, using a better hash function is not a solution to the attack per se, any more than getting a fatter pipe is a solution to a traditional DDOS.

      The issue is that even the best hash functions perform worse under very specific circumstances, i.e. high numbers of hash collisions. An earlier poster mentioned quicksort; the quicksort algorithm, while being the most (or one of the most) efficient sorting algorithms, is extremely inefficient if given an ordered set already. Obviously, a check can be added to make sure you are not sorting an already sorted algorithm.

      Presumably, the same could be done for hash functions, in which, by having a bunch of different hash functions available, the software could revert to an alternate if the primary function appeared to be generating way too many collisions. Just because people hadn't thought about this much or designed software to cope doesn't mean it would be very hard to prevent against.

    5. Re:I hope this isn't news to anyone... by Fulcrum+of+Evil · · Score: 1

      Arithmetic according to C: float x = 3.14159; float y = 1/2 * x; Value of y? zero.

      New to integer-based arithmetic, are we? You show know better than to expect user-friendliness from assembly.

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
    6. Re:I hope this isn't news to anyone... by Old+Wolf · · Score: 1

      Does this still work on hashtables where each node consists of a linked list? (as opposed to ones where if the node is full, it does on to check the next node)

    7. Re:I hope this isn't news to anyone... by asdfghjklqwertyuiop · · Score: 1

      Arithmetic according to C: float x = 3.14159; float y = 1/2 * x; Value of y? zero.

      Like a sibling comment said, that isn't exactly news to anyone who knows C... you need to either change 1/2 to 1.0/2.0 or cast them to floats.

    8. Re:I hope this isn't news to anyone... by brsmith4 · · Score: 1

      Arithmetic according to C: float x = 3.14159; float y = 1/2 * x; Value of y? zero.

      Easy fix:

      float x = 3.14159;
      float y = (float)1/2 * (float)x;
      printf("y = %lf\n", y);


      y = 1.570795

    9. Re:I hope this isn't news to anyone... by Jucius+Maximus · · Score: 3, Funny
      "Basically, the paper says this: If you have a hash table into which attackers can insert arbitrary keys, you'd better be using a hash function for which they cannot easily generate collisions."

      It's publicised. I was warned about stuff like this in a 2nd year CS class I took several months ago. But I did *not* imagine that it could be used to take down web servers.

    10. Re:I hope this isn't news to anyone... by miu · · Score: 2, Informative
      Does this still work on hashtables where each node consists of a linked list? (as opposed to ones where if the node is full, it does on to check the next node)

      Yep, both chained and open-addressed hash can degenerate to a linked list. A chained hash (what you describe as a node consisting of a linked list) is actually a much more common hash type than open-addressing (where the values are stored in the table). There are a couple reasons, a chained hash can overflow, and an open ended hash always has to check the value, not just during collision resolution (many implementations of chained hashes do the same).

      --

      [Set Cain on fire and steal his lute.]
    11. Re:I hope this isn't news to anyone... by miu · · Score: 1
      a chained hash can overflow

      I meant a chained hash can avoid overflow. In practice plenty of people make the collision list a fixed length, moving the overflow problem one step up.

      --

      [Set Cain on fire and steal his lute.]
    12. Re:I hope this isn't news to anyone... by Sanity · · Score: 1
      They mentioned similar related work where it was found that input to quicksort makes it take O(n^2) time instead of O(n lg n)
      Oh come on - any 1st year Computer Science student that stayed awake during their lecture on QuickSort knows that O(n^2) is its worst case behavior.
    13. Re:I hope this isn't news to anyone... by rabidcow · · Score: 2

      the quicksort algorithm, while being the most (or one of the most) efficient sorting algorithms, is extremely inefficient if given an ordered set already.

      That depends on how you pick your pivots. If you choose them randomly it's a lot harder to get the worst case, so long as an attacker can't duplicate your random number sequence.

      Still, there are sort algos that are O(nlogn) regardless of the input, but they've got a slower multiplier. So do you pick the one that's fastest in the average case, or fastest on the worst case? How likely is it that someone will exploit that worst case?

      the software could revert to an alternate if the primary function appeared to be generating way too many collisions.

      That's probably not as helpful as you might imagine. If the alternate hash function is just as likely (or more likely) to produce collisions than the original, someone could just exploit *both* of them (alternating at whatever rate your code switches at). You really want to just pick a very good hash function to begin with.

    14. Re:I hope this isn't news to anyone... by dlakelan · · Score: 1

      That's the point. For some programs, you can choose client input to the server to intentionally create the worst case and cause the server to bog down.

      --
      ((lambda (x) (x x)) (lambda (x) (x x))) http://www.endpointcomputing.com a scientific approach to custom computing.
    15. Re:I hope this isn't news to anyone... by Ed+Avis · · Score: 1

      I always had a slight feeling of unease about hash tables. Like in C++, the standard library provides std::map which has guaranteed O(log N) time for insertion and lookup, where N is the number of elements in the map. But std::map is too slow for many people, who use instead a non-standard hash_map class. Such a hash table can only guarantee O(N) time, but 'usually' insertion and extraction take constant time.

      I mean, you'd have to be really unlucky to get a large number of hash collisions, wouldn't you? Apparently more than just luck is involved, if the person generating input knows the hash function you're using. So maybe the standards committee had the right idea after all in choosing the container with the best worst-case performance rather than the best average-case.

      I'm interested by what the authors say about 'modern universal hash functions' and how they are immune from attack. Does this mean you pick a random string and XOR against it before computing each hash value, or something like that? It would seem there could still be some way to discover the exact hash function being used by means of timing attacks (you can tell when an input has caused a hash collision because the response time might be slightly slower). But I need to read the paper referred to.

      --
      -- Ed Avis ed@membled.com
    16. Re:I hope this isn't news to anyone... by cperciva · · Score: 2, Informative

      I'm interested by what the authors say about 'modern universal hash functions' and how they are immune from attack. Does this mean you pick a random string and XOR against it before computing each hash value, or something like that? It would seem there could still be some way to discover the exact hash function being used by means of timing attacks (you can tell when an input has caused a hash collision because the response time might be slightly slower).

      If you use a strong keyed hash function (eg, keyed MD5) then there is no known method to recover the hash key with a chosen plaintext attack. In other words, even if you know exactly what each of your inputs hashes to, you still won't be able to predict the hash of anything else (or, consequently, create collisions).

      Incidentally, hash functions are only O(1) average case under bogus assumptions. Random access to an n-bit address space takes O(log n) time.

    17. Re:I hope this isn't news to anyone... by cperciva · · Score: 2, Informative

      And any 2nd year Computer Science student who stayed awake during his lectures knows that, given a source of random bits, the probability of quicksort taking more than O(n log n) time is zero for any input.

    18. Re:I hope this isn't news to anyone... by Ed+Avis · · Score: 1
      Random access to an n-bit address space takes O(log n) time.

      Doesn't this depend on your particular hardware? On a machine with L1 cache, L2 cache, maybe some kind of NUMA, and swap space your statement may be a good approximation of the truth, but a machine with no processor cache and no swap file (they did exist, not so long ago) would have constant time access to any part of memory. Or is this not what you meant?

      --
      -- Ed Avis ed@membled.com
    19. Re:I hope this isn't news to anyone... by cperciva · · Score: 1

      oops. I need some sleep. I meant "Random access to an n-bit address space takes O(n) time", of course.

      Your uniform-access-time machine will have memory which is the same speed as the equally sized memory of a nonuniform-access-time machine. Accessing one word out of 2^n requires O(n) gate delays; this is why Intel uses small L1 caches.

      (Technically, it also requires O(2^(n/2)) propagation time, provided that we assume a two dimensional layout; but that usually turns out to be unimportant.)

    20. Re:I hope this isn't news to anyone... by Ed+Avis · · Score: 1
      Random access to an n-bit address space takes O(n) time
      This is not relevant when deciding what algorithm to use, since you already know that your code will be running on 32-bit or 64-bit hardware with 32 or 40 or whatever number of address lines. On such a machine, memory access takes constant time whether your program uses a one kilobyte array or one gigabyte. I don't know of any modern computer which is able to do faster memory access if the program restricts itself to a smaller address space, so for all practical purposes you can say that a memory lookup takes constant time. This is not a bogus assumption, at least not for a programmer.
      --
      -- Ed Avis ed@membled.com
    21. Re:I hope this isn't news to anyone... by cperciva · · Score: 1

      If you've already got the hardware you're going to use, and it doesn't have any caches, then you're absolutely right.

      But if you have the option of choosing your hardware, you can buy memory which is smaller and faster; and if your hardware has a caching subsystem, you certainly gain from using a smaller address space.

    22. Re:I hope this isn't news to anyone... by a_n_d_e_r_s · · Score: 1

      Actually, what they basically say are that one should never use hash tables where one want good performance.

      Wish people would stop using hash tables altoghether.

      I've never used one in a real program.

      --
      Just saying it like it are.
    23. Re:I hope this isn't news to anyone... by Anonymous Coward · · Score: 0

      And any 2nd year CS student who stayed awake during his lectures and actually comprehended what he was hearing knows that a source of random bits only decreases the likelihood of worst-case performance of qsort for pre-ordered sets such that the probability of worst-case performance is 1 / n!, where n = the size of the input set.

    24. Re:I hope this isn't news to anyone... by Ed+Avis · · Score: 1

      If your hardware has caching you do not 'gain from using a smaller address space' because that is nonsensical. Code running on most processors doesn't have a choice of what address space to use, and even processors that have a choice of modes (eg 32 bit / 64 bit) don't make memory access any faster if you choose the smaller address space.

      But I accept that memory accesses may on average be faster if you use a smaller amount of memory, since it will fit better in the various caches.

      --
      -- Ed Avis ed@membled.com
    25. Re:I hope this isn't news to anyone... by Anonymous Coward · · Score: 0

      > And any 2nd year Computer Science student who stayed awake
      > during his lectures knows that, given a source of random bits,
      > the probability of quicksort taking more than O(n log n) time is
      > zero for any input.

      Yes, but the point of the paper is that by choosing a non-random source, you can exploit the algorithm becoming O(n^2).

    26. Re:I hope this isn't news to anyone... by ceswiedler · · Score: 1

      Huh? Perhaps there's a signifigantly more complex algorithm which yields better performance (redblack trees compared to standard btrees) but on the whole, hash tables are extremely efficient and are used everywhere.

      That's like saying, "I wish people would stop using [lists|arrays|trees] where one want good performance."

    27. Re:I hope this isn't news to anyone... by aminorex · · Score: 1

      Your use of "n" (which carries the cachet of an
      operational parameter) rather than "k" (which
      makes clear that the value in question is a
      constant, and therefore O(k) ~ O(1)) is misleading.
      Unless, of course, you are using a machine with
      a variable address length.

      --
      -I like my women like I like my tea: green-
  16. Re:This just proves that a little finesse still be by bobthemonkey13 · · Score: 5, Insightful

    I agree that DoS attacks are really lame, but at least this is fairly complex and has some interesting technological implications. Most DoS attacks are just floods of packets, and can't really be defended against. This attack can be prevented, and maybe will help improve security in other ways. I'd rather see 10 people who can pull off a preventable algorithmic complexity attack than 10,000 who just packet a server to death. People will write tools, but they'll still remain too hard for moron DDoSer script kiddies to pull off.

  17. Humanity by DreadSpoon · · Score: 1, Insightful

    So this is like humans - you don't need a lot of information, just something seemingly complex/intricate, and their brains shutdown for a while?

    (Or maybe this only happens to me? ;-)

    1. Re:Humanity by Anonymous Coward · · Score: 0

      Yes, and common troubles go down the drain. Thank you, Slashdot for giving all of us something worthwhile to think about so we can spend some time away from it all. They say, All work and no play makes Jack a dull boy. Well, all troubles and no Slashdot makes all of us dull boys.

    2. Re:Humanity by chundo · · Score: 1

      It's also how you destroy the Borg.

      -j

  18. Mirror mirror on the wall by Adam9 · · Score: 5, Informative

    Since you asked nicely..

    This is the HTML version (with lots of images not mirrored, sorry) and this is the PDF version.

    If the PDF starts hogging the pipe, don't be surprised if it gets symlinked to the HTML version.

    1. Re:Mirror mirror on the wall by KrispyKringle · · Score: 1
      mirror here

      please mirror if you can.

  19. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

  20. Say what? by Znonymous+Coward · · Score: 4, Funny

    ...we can bring a dedicated _Bro_ server to its knees...

    Why they always trin' to bring the black man down?

    --

    Karma: The shiznight, mostly because I am the Drizzle.

    1. Re:Say what? by Anonymous Coward · · Score: 0

      Shizzle my nizzle, yo!

      Shout out to Vanilla Ice.

      Easy-E is a punk.

    2. Re:Say what? by JDWTopGuy · · Score: 1

      Dey gonna git you suckahs!

      --
      Ron Paul 2012
    3. Re:Say what? by Anonymous Coward · · Score: 0

      Propably they want him to give a blowjob or something..

  21. Yes, It's Just you by Hal+The+Computer · · Score: 1

    ... Or, this information can be used to inform people of the possibility of DOS attacks and possibly prevent them. If function X can be used to DOS a server, rewrite the code for function X or eliminate function X.
    Are people who work at Ford allowed to test whether your car can be hotwired?
    If not well, the price of used Fords just fell by 75% ;-).

    --

    int main(void){int x=01232;while(malloc(x));return x;}
  22. YES. by Eric_Cartman_South_P · · Score: 2, Insightful
    Because it forces the fat pigopolists (www.theregister.co.uk terminology?) into making fixes.

    I understand your question, but it, IMO, is like asking if "the people" should be free to speak about the bad things their King does, and wouldn't that just be bad for the Kingdom?

    1. Re:YES. by Anonymous Coward · · Score: 0

      Well speaking out against imperial conquest of oil producing nations is bad for the kingdom and you should definatly not do it! We're at war after all!

  23. 'Bro' server by Anonymous Coward · · Score: 2, Funny

    The only 'bro' server I can think of is buddyhead.com ... Not much of an attack if you ask me ...

  24. Credits by alain1234 · · Score: 5, Informative

    Reading the paper which begins with "We present a new class of ..." it sounds like these students discovered a new concept from nowhere.
    Maybe their genius has been triggered by the recent advisory about a DOS exploiting hash collisions in netfilter.
    They analyzed some softwares but no word about this known vulnerability. Still a good summary but not a discovery.

    1. Re:Credits by Anonymous Coward · · Score: 5, Informative

      We cite Florian's attack in the paper, predate it by several months. And, had you read the actual advisory, you'd already have seen our paper, we're on his highly reccomended reading list on his advisory for the last 2 weeks.

      Scott

    2. Re:Credits by The+Madpostal+Worker · · Score: 5, Informative
      If you scroll down to the bottom of the advisory you'll see a link to orginal advisory. Here's the begining of the message:
      List: linux-kernel
      Subject: Route cache performance under stress
      From: Florian Weimer <fw () deneb ! enyo ! de>
      Date: 2003-04-05 16:37:43
      Please read the following paper:

      <http://www.cs.rice.edu/~scrosby/tr/HashAttack.pdf >

      Then look at the 2.4 route cache implementation.

      Short summary: It is possible to freeze machines with 1 GB of RAM and more with a stream of 400 packets per second with carefully chosen source addresses. Not good.
      It seems the advisory stems from the paper, not the other way around.
      --

      /*
      *Not a Sermon, Just a Thought
      */
  25. Bugtraq Post by Anonymous Coward · · Score: 5, Informative
    Hello. This is to announce a new class of attack which we have named 'Algorithmic Complexity Attack'. These attacks can perform denial of service and/or cause the victim to consume more CPU time than expected. We have a website for our research paper and project and tentative source code illustrating the solution, universal hashing, available at http://www.cs.rice.edu/~scrosby/hash/

    They exploit the difference between 'typical case' behavior versus worst-case behavior. For instance, in a hash table, the performance is usually O(1) for all operations. However in an adversarial environment, the attacker constructs carefully chosen input such that large number of 'hash collisions' occur. Suitable collisions can be computed even when the attacker is limited to as little as 48 or 32 bits.

    These attacks can occur over a very wide gamut of software, with impacts ranging from devestating to innocious.

    We have studied and found the following applications possibly vulnerable to a greater or lesser degree:
    • Mozilla 1.3.1
    • DJBDNS 1.05
    • TCL 8.4.3
    • GLIB 2.2.1
    • Python 2.3b1

    For the last two, we have a tentative attack file, but have not constructed a test program to confirm the attack.

    We have constructed attacks and confirmed the degradation on these:

    • Perl 5.6.1
    • Perl 5.8.0
    • Linux 2.4.20 directory cache (dcache)
    • Squid 2.5STABLE1
    • Bro IDS 0.8a20

    Also related is the recent linux 2.4.20 route cache attack by Florian Weimer. David Miller is working on a patch that fixes other similar issues in other places of the networking stack.

    Our paper discusses a new class of denial of service attacks that work by exploiting the difference between average case performance and worst-case performance. In an adversarial environment, the data structures used by an application may be forced to experience their worst case performance. For instance, hash tables are usually thought of as being constant time operations, but with large numbers of collisions will degrade to a linked list and may lead to a 100-10,000 times performance degradation. Because of the widespread use of hash tables, the potential for attack is extremely widespread. Fortunately, in many cases, other limits on the system limit the impact of these attacks.

    To be attackable, an application must have a deterministic or predictable hash function and accept untrusted input. In general, for the attack to be signifigant, the applications must be willing and able to accept hundreds to tens of thousands of 'attack inputs'. Because of that requirement, it is difficult to judge the impact of these attack without knowing the source code extremely well, and knowing all ways in which a program is used.

    The solution for these attacks on hash tables is to make the hash function unpredictable via a technique known as universal hashing. Universal hashing is a keyed hash function where, based on the key, one of a large set hash functions is chosen. When benchmarking, we observe that for short or medium length inputs, it is comparable in performance to simple predictable hash functions such as the ones in Python or Perl.

    I highly advise using a universal hashing library, either our own or someone elses. As is historically seen, it is very easy to make silly mistakes when attempting to implement your own 'secure' algorithm.

    The abstract, paper, and a library implementing universal hashing is available at http://www.cs.rice.edu/~scrosby/hash/.

    Scott

    ** Affected Products: Extremely widespread. Confirmed vulnerable applications include Perl, the Linux kernel, the Bro IDS, and the Squid HTTP proxy cache. Although unconfirmed, vulnerablities appear to be in the GLIB utility library, the OpenBSD kernel, DJBDNS cache, TCL, Python, and Mozilla.

    We conjecture that many implementations of hash tables in both closed source and open source software, unless specifically designed to be immune, may be subject to attack. It is likely

    1. Re:Bugtraq Post by Old+Wolf · · Score: 1
      Hello.

      How are you gentlemen.

      These attacks can occur over a very wide gamut of software, with impacts ranging from devestating to innocious.

      An attack which makes the server owner take off his top? That's bad enough (especially if it's CowboyNeal).. I don't even want to find out what "innocious" means now.

      We have studied and found the following applications possibly vulnerable to a greater or lesser degree: DJBDNS 1.05

      Of course, the chance that DJB will admit something is wrong with his software is less than the chance of CowboyNeal's vest being removed by this post.

      Finally, what is a Bro server anyway? {insert obligatory black joke}

    2. Re:Bugtraq Post by grammar+fascist · · Score: 1

      Because of that requirement, it is difficult to judge the impact of these attack without knowing the source code extremely well, and knowing all ways in which a program is used.

      So...can you also say that an attack such as this is nearly impossible to successfully mount against a closed-source system?

      I'm not trolling, just wondering. (And yes, I do know that you can make your program virtually immune by using a more secure hash function, so we don't need to bring that up.)

      --
      I got my Linux laptop at System76.
    3. Re:Bugtraq Post by Anonymous Coward · · Score: 0

      Yeah, and I'm sure DJB loves to see this:

      I highly advise using a universal hashing library, either our own or
      someone elses. As is historically seen, it is very easy to make silly
      mistakes when attempting to implement your own 'secure' algorithm.


      (from the paper written about djbdns, addressed to DJB)

    4. Re:Bugtraq Post by Paul+Komarek · · Score: 1

      Scott, one of the authors, has stated that it is reasonable to attack without access to the source code. See the post 6088358 and Scott's reply at 6088426.

      I'm not a security researcher, but I'd guess that disassembling any binary would provide plenty of information to reconstruct any hashing functions used. After all, people have proven themselves pretty clever at modifying closed-source games and finding (other) security problems in closed-source software, having only the binary to work from.

      -Paul Komarek

      -Paul Komarek

    5. Re:Bugtraq Post by Anonymous Coward · · Score: 0

      Is anyone aware of a universal hashing lib that already exists? I'm more than a little nervous about this and quite interested in replacing the hashing algorithm in some of my favourite services.

      At least their attack against glibc means a great many programs can be fixed at once with a glibc update.

  26. DOS Attack..... by Tsali · · Score: 2, Funny

    Wasn't that some command-line prompt game in 1983 somewhere?

    --
    This space for rent.
  27. YOU GOT HIM THERE by Anonymous Coward · · Score: 0

    TOO BAD YOU CANT GET LAID ON A SATURDAY NIGHT!

    Now it's time to pass the lameness filter.

    Reason: Don't use so many caps. It's like YELLING.

  28. glib example by spoonist · · Score: 5, Funny

    I skimmed the Project Page and aren't a couple of the examples awefully obvious?

    The following one line of code brings every UNIX system I've run it on TO ITS KNEES WITHIN MINUTES!! This is a major vulnerability in EVERY UNIX system! Something must be done!

    main() { while (1) if (fork() == 0) while(1); }
    1. Re:glib example by msgmonkey · · Score: 4, Informative

      Any half decent UNIX system (or should I say admin) would have process accounting enabled that would stop this kind of attack.

    2. Re:glib example by Anonymous Coward · · Score: 0

      stfu k thx ta bye

    3. Re:glib example by Anonymous Coward · · Score: 0
      the line is actually _much_ faster and doesnt regard whether it's a child or parent process:
      main() { while (1) fork(); }
    4. Re:glib example by Anonymous Coward · · Score: 0

      dont forget - there's also the power switch. every machine (UNIX, Windows, Linix, *BSD, whatever) is vulnerable to denial of service via the power switch.

    5. Re:glib example by WetCat · · Score: 1

      why not
      main() { for(;;) fork(); }
      ?

    6. Re:glib example by Old+Wolf · · Score: 1

      Yeah, like this:

      >cat security.sh

      #!/bin/bash

      ln /bin/false /usr/bin/vi
      ln /bin/false /usr/bin/pico
      ln /bin/false /usr/bin/joe
      ln /bin/false /usr/bin/ae
      # note - don't need to disable emacs use, by the time the program actually loads, security will have advanced enough to render dos attacks useless

    7. Re:glib example by JCMay · · Score: 1, Interesting

      because in most C implmentations the for keyword is actually done as a macro:

      #define for(a;b;c){d} {a;while(b){d;c;}}

      or

      #define for(a;b;c){d} {a;do{d;c}while(b);}

      or some such... :)

      I suppose that some people would think that a while() or do{} loop is "purer"
      than for() in C.

    8. Re:glib example by Anonymous Coward · · Score: 0

      Or just:

      main() { while(fork()) ; }

    9. Re:glib example by Hanji · · Score: 1


      echo 'main() { while (1) if (fork() == 0) while(1); }' > dos.c
      gcc -o dos dos.c && ./dos

      --
      A Minesweeper clone that doesn't suck
    10. Re:glib example by Anonymous Coward · · Score: 0

      inelegant.

      the real code should be:

      main(){fork();main();}

      much better with the exponential behaviour.

      learn C and come back later for more...

    11. Re:glib example by kazad · · Score: 1

      I think the compiler might do the for -> while translation...

    12. Re:glib example by wirelessbuzzers · · Score: 1
      Nah. You should definitely do
      main() { while (1) {fork(); malloc(1<<20);}}
      Most systems have process limits to stop a simple forkbomb, but a fork/malloc bomb can be much more effective.
      --
      I hereby place the above post in the public domain.
    13. Re:glib example by Anonymous Coward · · Score: 0
      Which would be fantastic except for this little bit of technology we've come across called "copy-on-write", i.e. memory is not allocated until it's written to. Try:

      int main(void) { while (1) { fork(); ((char *)malloc(1 << 20))[(1 << 20) - 1] = 1; } return 0;

      It invokes undefined behaviour (not checking malloc() for null), but it doesn't make much difference. Plus on most virtual memory systems it only dirties up one page (probably only 4k of memory will be allocated), but what the hell do you want?

    14. Re:glib example by Anonymous Coward · · Score: 0

      That's the lamest fork bomb I've ever seen. The child IMMEDIATELY exits, never getting a chance to fork itself! Zombie processes won't bring a system down, yo!

    15. Re:glib example by Anonymous Coward · · Score: 0

      try calloc instead of malloc - touches all the pages!! *wicked grin*

    16. Re:glib example by Anonymous Coward · · Score: 0

      Now we know how (former) Agent Smith did it. Thanks for clearing that up.

    17. Re:glib example by wtarreau · · Score: 1

      First, you don't even need any compiler to do this, the simplest shell script is :

      #!/bin/sh
      $0&$0&

      Second, it not only affect Unix, but any multitasking system without per-user process limitation. I used to play with this 5 years ago on NT4. I wrote the equivalent of the above script as a .bat file which did something like "start /b a.bat" if my memory serves me right. The result was even better because I could progressively see the status bar fill in hundreds of icons, and growing to several lines, until the machine completely froze. It couldn't even reboot !

      Willy

    18. Re:glib example by Anonymous Coward · · Score: 0
      I think you mean
      main() { while(1) fork(); }
      which is much more exciting.
    19. Re:glib example by Donald+Knuth · · Score: 1

      Or transfer an executable over the network. Or even type the machine code directly into `echo -e`. Disabling editors for "security" has got to be one of the stupidest things I've heard in a while.

    20. Re:glib example by haruchai · · Score: 1

      I tried this and it locked up my Redhat 9 box promptly, running as a normal user. What does this script do and how do you prevent this from happening.

      --
      Pain is merely failure leaving the body
    21. Re:glib example by Anonymous Coward · · Score: 0

      hahahahaha Yu0 f0rg0t nano n0w I 0wn yu0r b0x!!!!!!!!111111

    22. Re:glib example by treat · · Score: 1
      Any half decent UNIX system (or should I say admin) would have process accounting enabled that would stop this kind of attack.

      Process accounting adds overheard for minimal value (since critical information is left out, like the device/inode of the binary that was exec'd, the full command line, parent process ID, etc).

      It will identify the culprit of a forkbomb, but if deliberate it will not be the individual's own account and if accidenhtal it won't allow you to take any real action against the user. It sure won't prevent a future one.

    23. Re:glib example by mosschops · · Score: 1

      $0& launches the same script again as a background process, using the original command-line. So the example script launches two copies of itself, which each launch two copies, which each launch two copies, ...

      It doesn't take long for the system to become completely overwhelmed, unless process accounting limits the number of processes for each user (which is always a good idea on most shell systems).

    24. Re:glib example by mosschops · · Score: 1

      how do you prevent this from happening.

      I forgot to cover this question...

      'ulimit' allows you to control various limits, including the number of user processes. ulimit -a will display the current limits. On my RedHat box it defaulted to 512 processes, which is rather a lot (I'm not sure about the kernel process table limit though).

      ulimit -u 20 will limit the user to 20 processes, which can be added to /etc/profile to cover all users. Users can further limit their own settings, but can't relax them.

      I'd be interested to hear if that fixes it for you - I'd rather not test it out on my server box at the moment!

    25. Re:glib example by haruchai · · Score: 1
      Thanks for the info - I didn't remember ulimit. The default on Redhat 9 is 2047. I still had control of the system with user processes set to 50 but, of course, the script kept trying to run, giving a perpetual error of "fork, resource temporarily unavailable". I was able to kill off all invocations of the script by running killall a few times.
      --
      Pain is merely failure leaving the body
    26. Re:glib example by Anonymous Coward · · Score: 0

      Why don't you actually try it before flaming? Stupid flamer.

  29. ob. SouthParkReference by Anonymous Coward · · Score: 0

    We'll drizzle the shizzle all over the hizzle, my nizzle.

  30. I don't know which is worse... by RedLeg · · Score: 0, Troll
    These dipshits (yes, I said dipshits) publishing a paper like this without taking positive steps to make sure that maintainers of vulnerable packages were aware of the issues and had the chance to implement and publish fixes, and most importantly, get them deployed into the field, prior to publication

    OR

    Some random Slashdot Editor posting links to it, thereby calling the attention of the whole damn world to the fact that this class of vulnerability exists, apparently without fixes.

    Yes, I know, "Security through Obscurity is no Security at All." On the other hand, in a multi-layered security environment (think defense in depth), obscurity, or secrecy IS a valid (albeit thin) layer. This just eliminated that layer.

    Thanks, dipshits, and Slashdot, for making the world a WORSE place.

    1. Re:I don't know which is worse... by Anonymous Coward · · Score: 0

      Yes, I know, "Security through Obscurity is no Security at All."

      What about security through stupidity? Does that work?

    2. Re:I don't know which is worse... by abirdman · · Score: 1

      I'm trying to figure out if you didn't read the article, or just didn't understand it. Just which vendor do you think is going to fix the vulnerability in my slapped-together quicksort? Or how about if I put the choices my online customer has made into a hash, and it goes all O(n^2) on me--which maintainer will fix that? This isn't like posting an exploit, it's like saying "the handle of this hammer can only take XX.XX lbs/foot of impact before breaking", and people who build software are safer and better equipped for their job for knowing that. Take your knee-jerk reaction. and filthy mouth, and get a life. Jeeze.

      --
      Everything I've ever learned the hard way was based on a statistically invalid sample.
    3. Re:I don't know which is worse... by RedLeg · · Score: 1
      I read it, a couple of days ago. I work for a security company and we track this schtuff.

      There are LOTs of problems that are widespread and need to be fixed. Telling the world BEFORE you give folks with software in the field a CHANCE to effect a repair does NOT make things better.

    4. Re:I don't know which is worse... by Anonymous Coward · · Score: 0

      If you would, please post the name of the security company so we know not to hire them. I am pretty sure most of us are already adept at sweeping problems under the rug ourselves.

    5. Re:I don't know which is worse... by Nogami_Saeko · · Score: 1

      It certainly does motivate them though, doesn't it...

      N.

      --
      "Nothing strengthens authority so much as silence." - Charles de Gaulle
  31. Minor problem by Anonymous Coward · · Score: 0

    Given that this is a class of attacks, not a specific attack. How does one inform all of the maintainers of every possible vulnerable application, without it becoming known everywhere? The site discusses a half dozen different applications, by dozens of authors.

    And I can think of another dozen applications and languages that may also be vulnerable, such as the C++ STL, Java, Ruby, and others.

    How does one manage to inform only those, maintainers too?

    1. Re:Minor problem by RedLeg · · Score: 1
      Given that this is a class of attacks, not a specific attack. How does one inform all of the maintainers of every possible vulnerable application, without it becoming known everywhere? The site discusses a half dozen different applications, by dozens of authors.


      Easy, The CERT Coordination Center. This is exactly why they exist. Yes, (and I know from prior experience), the are a PAIN to deal with, and they WILL take longer than seems reasonable to coordinate disclosure and release, but they WILL do it an a responsible manner.

  32. Timing of Release? by Launch · · Score: 1

    What are Rice students still doing in school? Isn't it summer? Strange, very very strange.

    --
    Your mammas flamebait.
    1. Re:Timing of Release? by Anonymous Coward · · Score: 0

      One of the authors was a PhD student.

      Translation:

      <you> Why are you at school, it's summer?
      <phd> What's summer?

  33. Re:This just proves that a little finesse still be by dnoyeb · · Score: 1

    Naa. KISS.

    It is probably easier to get 100 machines to DDOS a server, than to understand and get 1 computer to do a complex attack such as this one. This won't come into play untill they find a way to stop the current brute force attacks.

  34. HTML tables rendering bugs... by reflective+recursion · · Score: 2, Interesting

    should not be considered a Denial of Service. If anything, call it what it truely is: shoddy programming. There is nothing being denied when it is the client that has the problem.

    Another thing.. this is nothing new. A number of DoS attacks require the server to do more than the client requests. The attacker's complexity would be O(n) whereas the server would be O(n^2) or some such, where n is any given method of communication. The only "new" thing would perhaps be looking at individual programs and algorithms, which is probably applying a very liberal definition of "new." They even admit it themselves by claiming ping-of-death and stack smashing have much in common with what they describe in the article.

    --
    Dijkstra Considered Dead
  35. "Bro" server? Say what, nigga? by Anonymous Coward · · Score: 0

    Any attack against a Bro server is obviously a plot perpetrated by The Man, to keep a brother down. Peace to all my dead homies..

  36. Nonsense by jefu · · Score: 1
    Since the authors are calling attention to a type of attack, not just a single attack against a single server type, it is quite appropriate that they publish it. And quite appropriate that slashdot call it to our attention.

    That specific attacks are given doesn't change this as the attacks given cover a variety of platforms and software - indeed, such attacks are not limited to network service software, but might be used against software that might be considered secure (behind firewalls with limited access).

    The attacks given are not likely to be of general use to network script kiddies. They might be of use to the more technically adept. might.

    Its also worth noting that the authors give enough information to build one or more defenses against such attacks. And carrying their hints a bit further would almost certainly enable developers to build a class of such defenses. But for the most part these defenses would still be tailored for the specific application in question and hence a general "one patch fits all" is unlikely to help many.

    And if I might be permitted a specific response. The real dipshits are those who would, for whatever reasons, put a priori constraints on what someone might or might not publish. Let enough of these (evidently Divinely Inspired) idiots have their way and no one will be able to say anything.

    1. Re:Nonsense by RedLeg · · Score: 1
      They publish application specific example exploitation code.

      In my experience, this means that actual attack code will be circulating in short order. The race to implement in N-1 lines of PERL will begin shortly thereafter

      I made no mention whatsoever of any a priori or any other constraints on these folks right to publish the results of their research. I object to their timing, that is, to the fact that they apparently chose to make their research public before they informed the vendor community and get fixes in place.


      I call this irresponsible.

    2. Re:Nonsense by Anonymous Coward · · Score: 0

      RTFA. No exploit code was published. Several simple applications are there, as is a small set of demonstration input that causes the demonstration applications to degrade.

      That isn't quite the same thing as directly supplying software to generate arbitrary amounts of attack input, or pre-built attacks.

      In any case, with just the description of the attacks, someone else, INDEPENDENTLY, wrote a program to find generators, then used them to construct appropriate attack input for python. This took under 30 hours from the first advisory being released.

    3. Re:Nonsense by Anonymous Coward · · Score: 0

      This sort of attack has been known (in general) for at least 15 years. Just how long do you expect them to wait before releasing a paper?

  37. Server is OK now by Anonymous Coward · · Score: 0

    The links have been cut back and the server is now responding.

  38. My 3 tips, please dont patent them by Anonymous Coward · · Score: 0
    1. Heap with GC: to collect the garbage's objects until infinite
    2. Copy-GC: to eliminate the fragmentation
    3. only nodes and AVLs: no lists, no vectors, no arrays, .. because they are O(n^2) inserting N items
    JCPM (c)
  39. How to defeat this DoS. by Proudrooster · · Score: 0, Insightful

    This DoS relies on the server being wide open on all ports. Simply putting the server behind a router that does NAT (Network Address Translation) or stateful packet inspection solves the problem of stray packets wandering in. Also note, this DoS does not crash any of the applications it just degrades performance. I would classify this DoS as "mostly harmless".

    Worst case, this was a good excercise in analyzing algorithmic complexity and "Big O" notation for the CS students. Speaking of "Big O", I can't wait to check out the O(1) scheduler in the 2.5 Linux kernel.

    1. Re:How to defeat this DoS. by reidbold · · Score: 1

      Man, who are you and how do you know so little?
      How would NAT fix this problem? Are the packets not going to make it to the servers or something? If so then there's a problem, since these ARE server programs after all. These aren't just 'stray packets', they are chosen to exploit the worst case run time of algorithms, in this case mostly hash tables I believe.

      Worst case is not just an excersize, if you find input that will make an algorithm run in it's worst form then the algorithm will run slower. The obvious example of vanilla qsort pops up.

      Sorry but your post is stupid.

      --
      -Reid
    2. Re:How to defeat this DoS. by Proudrooster · · Score: 1

      Reidbold, Did you even read the paper?
      Do you know what a SYN packet is?
      Do you know what a SYN-ACK packet it?
      Do you know what NAT is and how it works?

      No argument that their algorithm and packet generator will degrade performance, but NOT IF THE PACKETS DON'T MAKE IT TO THE SERVER.

      Since you are obviously more knowledgable and refer to me as "stupid", please explain how this DoS attack can effect servers behind a NAT'ed router. Explain to me how a UPD packet (as in the case of the Squid DoS) or a SYN packet (as in the case of the Bro DoS) is going to satisfy a NAT translation table and get passed through.

      Hint: You can't, unless you can somehow convince your ISP and backbone to route packets with forged source addresses.

      I look forward to your explanation.

    3. Re:How to defeat this DoS. by reidbold · · Score: 1

      Sorry about the ad hom. attacks.. I was fairly drunk when I wrote that.

      Upon closer inspection and soberness, you have a good point. I didn't really read the entire article last night.

      --
      -Reid
  40. Re:intersting... by Anonymous Coward · · Score: 0

    Very easy. Next time you get /.'d just:
    META HTTP-EQUIV="REFRESH" CONTENT="0; URL=http://slashdot.org"

    The End

  41. What C implementation do you use??? by MongooseCN · · Score: 1

    I've never heard of for() being a macro. What C implementation uses a macro? I would love to know.

  42. And this is new? by thesupraman · · Score: 3, Interesting

    Well, back in 1990 when I started in university computer science, this *was* one of the main things that a denial of service attack was considered to be.

    DoS attacks were mainly either removal of a service (by crashing it and/or stoping it's reload) or resource starvation, being any of CPU, disk, memory, network, etc.

    Good to see these people have bothered to flick through a bit of history probably over 15 years old by now and call it something new, yawn.

    Having had enough background in large computer systems, it can become quite depressing watching the constant flow of 'new innovations' that have been done may many years before on big iron, but are seen as new by people who just don't have the experience to realise.

    Of course it is easier to DoS a machine by using it's own functionality against it rather than just brute force, welcome to computer science 101.

    Just wait six months and someone will be releasing a fantastic new defense against this by limiting the CPU resources of given tasks to defined amounts so they cannot stop the system and only that particular service.

    I mean come on, this was a common undergrad trick on the vaxes we used to get to play with way back then.

    1. Re:And this is new? by Anonymous Coward · · Score: 0

      Let me guess--your CPU had to access cache upstream both ways? Get a life you old man. I'm older than you, and I don't bring up stories about how we used to lock up the community abbacus...

    2. Re:And this is new? by reidbold · · Score: 1
      I'm not going to bother arguing with the first half of this post, since that's been done already. Here's a neat part.

      Just wait six months and someone will be releasing a fantastic new defense against this by limiting the CPU resources of given tasks to defined amounts so they cannot stop the system and only that particular service.
      How do you propose this should be done? How can you tell if input is malicious or not? I think that would be pretty tricky/impossible.
      --
      -Reid
    3. Re:And this is new? by Anonymous Coward · · Score: 0

      How can you tell if input is malicious or not?

      <Obligatory "evil bit" comment.>

    4. Re:And this is new? by Anonymous Coward · · Score: 0

      Of course it is easier to DoS a machine by using it's own functionality against it rather than just brute force, welcome to computer science 101.

      Uhh.. there's still a non-trivial mental leap to get from that idea, to a working implementation.

      I could say that "We should develop medicine that works by taking advantage of the body's auto-immune system", but there's still a lot of work between having that idea and producing a working drug.

    5. Re:And this is new? by aminorex · · Score: 1

      The process itself can setrlimit. In a J2EE server,
      make it an optional ThreadGroup parameter.

      --
      -I like my women like I like my tea: green-
  43. boring... by Anonymous Coward · · Score: 0

    this dude is just testing the waters for a thesis for himself or someone else...it's just old news just changed enough to make it new enough for a thesis.

  44. aggot by Anonymous Coward · · Score: 0

    asdfdsf

  45. Bro IDS info by Fzz · · Score: 2, Informative

    In case you were wondering what Brois.

  46. Thankfully I�m really really stupid by Anonymous Coward · · Score: 5, Funny

    My brain is resistant to attacks using algorithmic complexity

    1. Re:Thankfully I�m really really stupid by The+J+Kid · · Score: 1

      huh?

      --
      Moderation: +4. Modded 70% Funny and 30% Overrated. 100% Saturated.
  47. but I thought Apache didn't use MS code? by tjstork · · Score: 1

    :-)

    --
    This is my sig.
    1. Re:but I thought Apache didn't use MS code? by Anonymous Coward · · Score: 0

      Thought you would get some easy karma, eh?

  48. Discussion on python-dev by thornist · · Score: 4, Informative

    There's been extensive discussion of this over on python-dev. Includes some interesting debunking by Python guru Tim Peters, plus another example of the same type of weakness involving backtracking regular expression engines.

  49. Not new but no such easy fix by SysKoll · · Score: 3, Insightful
    CPU hogging isn't new. I agree that fixing it on a Unix-like system is as easy as capping the CPU time of user processes... providing it's practical.

    But consider a commercial app where customers can send requests to a J2EE app server running within a JVM. That's a very popular, very common setup (JBoss, BEA Weblogic, IBM WebSphere, etc.). The JVM is a single process. It is not CPU-capped because it's designed to stay up and running. When a Java thread handles a request and bumps into a CPU-hogging attack, it is not going to be terminated by the J2EE app server.

    So this is potentially a problem, because you currently do not have a CPU-capping parameter in the most popular J2EE app servers. A response to this kind of attacks would require monitoring the amount of CPU consumed by threads processing incoming requests, which is always delicate.

    CPU-capping shouldn't be done lightly. It can lead to disastrous failures. For instance, I once tried to use a graphical web application rendering some do-it-yourself tee-shirt lettering. The application was running on an older IIS and apparently had a CPU-time cap, because I got a message "sorry, your request took too long to process" when my design became a bit involved. Needless to say, my business went to a competitor. So CPU-capping isn't even a sure-fire solution.

    In summary: Sorry, it is an issue.

    -- SysKoll
    --

    --
    Mad science! Robots! Underwear! Cute girls! Full comic online! http://www.girlgeniusonline.com/

    1. Re:Not new but no such easy fix by curious.corn · · Score: 1

      Your examples only demonstrate that those who architected J2EE platforms didn't do enough homework... I still haven't read the article neither do I know these servlet applications but rather than bashing the UNIX capping strategy as "old-hat" I'm more inclined to condemn the newcomers for developing new flashy gizmos without guaranteeing against known problems. Of course if you based your business on IIS it's likely that you went after the flashy fluff; let the lesson sink in and keep away from 'tv commercial' grade software. BTW, in your setup you probably hit a timeout rather than a cpu cap wich could have been racing @ 100% trying to fulfill your requests (self DOSing itself) but failing within the time constraint of your HTTP server

      --
      Mi domando chi à il mandante di tutte le cazzate che faccio - Altan
    2. Re:Not new but no such easy fix by SysKoll · · Score: 1
      Your examples only demonstrate that those who architected J2EE platforms didn't do enough homework.

      No contest that there are deficiencies in the J2EE standard and the commercial app servers. Nobody disputes that. One of the shortcoming is lack of CPU capping. And the article describes how to turn this into a DoS attack.

      J2EE-complaint servers are running all kind of web sites and upgrading them against these attack would be a major concern. You daily life could be impacted if, say, you're trading stock on an online broker system that is under attack.

      Hence the problem.

      --

      --
      Mad science! Robots! Underwear! Cute girls! Full comic online! http://www.girlgeniusonline.com/

  50. Isnt this like... by floydman · · Score: 1

    making the computer do a very tedious job over and over and over again, but in plain english?!

    --
    The lunatic is in my head
  51. Re: Is djbdns vulnerable? by D.+J.+Bernstein · · Score: 1
    You think dnscache is vulnerable to this attack? Try it! Fact: You won't be able to consume a noticeable amount of CPU time per hash lookup.

    Exercise: How did Bernstein manage to publish code in 1999 that defends itself against an attack announced in 2003? Choose one of the following answers:

    1. The part of Bernstein's code that mentioned ``hash flooding'' actually had something to do with illegal drugs. It stops this new attack purely by accident.
    2. Bernstein doesn't know anything about computer security, but he's mastered time travel.
    3. This attack isn't new.
    You have five seconds to reply.
  52. Excellent paper by smiff · · Score: 4, Interesting
    Hi,

    I found your paper very interesting. I'd like to address a couple things.

    1. You point out that MD5 is vulnerable to a brute-force search for bucket collisions. Isn't any deterministic hash-function vulnerable to the same attack? I know you solved the problem using a keyed version of MD5. With Carter and Wegman, you alluded to a randomly chosen constant and vector. I didn't notice you addressing this issue with UMAC.

    2. The abstract says, "We show how modern universal hashing techniques can yield performance comparable to commonplace hash functions while being provably secure against these attacks." The abstract is ambiguous, but it insinuates that you'll provide a proof. I didn't see one. Perhaps it was in the references? Even if it was, certainly your 20 bit Carter-Wegman construction merits a new proof.

    3. You said, "When analyzing algorithmic complexity attacks, we must assume the attacker has access to the source code of the application," I disagree. The attacker doesn't need the source code. They can reverse engineer the compiled binary.

    Also, I wonder if an attacker even needs the program. An attacker could reasonably guess that a Perl script will store a certain string in an associative array. Many websites automatically process their Apache logs with Perl. Instead of requesting real pages, a blackhat could request strings that will hash to the same bucket (assuming the site uses Perl). When cron starts processing the logs, the website could slow to a crawl. Granted, the attacker knows the hash function from Perl, but they don't have access to the website's custom-made script.

    4. You have a spelling error. Your paper should read, "due to the ten times larger queues of unprocessed events".

    1. Re:Excellent paper by Anonymous Coward · · Score: 4, Interesting

      Yes, deterministic hash functions are subject to guess&check attacks.

      Second, the universalness of that is from the origional carter&wegman paper. Our only real trick is to try to encode a useful construction without requiring 64-bit multpilication or modulation. There are aspects of the abstract I'm not entirely happy with. The section on solutions with unversal hashing was sorta grafted on later.(And I didn't write that sentence)

      Third, yes, good guessing works too, even without source code.

      Fourth. Damn. Don't you have something better to do? :)

      Scott

    2. Re:Excellent paper by Anonymous Coward · · Score: 0

      I'd like to apologize for the reply to the forth point I was still in a bad mood because my boyfriend said I had to bend over this time.

      Scott

  53. This is all part of the game in academia by lukme · · Score: 0, Troll

    It is publish or perish at most universities and even most colleges.

    They just found a topic to publish a paper on that extends things a little bit. This paper will then be footnoted by other researchers along with hundreds of other footnotes.

    Very little published is new or even remotely creative - creativity is something that I have found is supressed by academia.

    I suggest that if there are any questions, we as the slashdot community should collectively send them our pertinate questions.

  54. this is a good thing by soliaus · · Score: 1
    Yay! I can finaly 0wn ebay(r) on my dialup connection! Good job guys.

    Seriously though, you have to imagine how this will effect the less fortunate evil genuises of the world who are limited to dialup access (yes, there are bandwidth starved geeks out there). You have to wonder if your server wont be taking part in multiple DDoS attacks per week (its microsofts fault), because less bandwidth is required to do the dirty deed. Now, if you look at it this way, the discovery of this method could be a good thing for the poor sysadmins of the world, i.e. less bandwidth required to bring down a server usingf a DoS attack = less compromised servers needed to perform the attack. See my point? If not, ask yourself your your listening to the ramblings of a 15 year old.

    --
    Speaking at Defcon 12 - Credit Card Networks Revisted: Pen
  55. Not really a problem by spRed · · Score: 1
    The author posted to python-dev (the development list for python) asking for feedback, that feedback was:
    • the suggested replacement for the hash function is slower for typical uses
    • the suggested replacement doesn't acutally solve the problem (it just takes longer for the attacker to find DoS-able inputs)
    • the suggested replacement returns different hash values for the same input for different processes (violating a garuntee in python)
    • input sets large enough to do damage are large enough to be considered a DoS-by-flooding themselves
    And of course it is much easier to exploit poorly designed regular expressions. They are common and a 1k string can tie up a server until the heat death of the universe.
    --
    .sig Karma out the wazoo, better to spend points elsewhere if this is above 2 or below 0
  56. Re: Is djbdns vulnerable? by Old+Wolf · · Score: 1

    I have a lower slashdot user ID than DJB :D
    That's made my day

    My reply:

    4. All of the above

    If this guy can lie about observing the vulnerability in your software, it makes you wonder what else was he lying about

  57. Re:This just proves that a little finesse still be by Q+Who · · Score: 1

    People will write tools, but they'll still remain too hard for moron DDoSer script kiddies to pull off.

    History shows otherwise. Do you have a basis for your claim?

  58. One down for open source? by Bish.dk · · Score: 0, Troll

    Such attacks will mostly be possible when you have access to the source-code of a program, and can look through it to find weak algorithmic parts.

    I guess it's harder to do this on a proprietary system. Perhaps this the "Open source is less secure"-argument that MS has been hoping for?

  59. Simpler solutions than usng Universal Hashes by Anonymous Coward · · Score: 0

    I thought up a solution which does not involve the use of universal hashing algorithms. There are probably flaws in it (sounds too simple), so I'd like feedback.
    What about adding a (session-wise) random number (salt) to every key prior to hashing? This way an attacker should first guess the salt. In environments where sessions are not present (like DNS), the salt could be changed every fixed amount of time (re-hashing all the keys). This can be done in a low-priority background process, while the old hash is still in use. When the new hash is ready, they are just flipped, defeating any attempt to brute-force the salt.
    So, what about it, Slashdot crowd? ;-)

  60. A problem with open adressing by rkit · · Score: 1

    Open adressing hashing schemes have one inherent problem, especially if you use "double hashing", i.e. collision resolution makes use of a second hashing function.
    You can not easily delete an item, you have to marked it as "deleted". No big deal, any decent book on algorithms states this very clearly. What is not so obvious, is that this kind of data structure does not easily recover from bad input. Consider the case where the hash table is 80 percent full, and all the remaining entries are marked as deleted. This will severly degrade unsuccessful search, and there is no easy way of "garbage collection". Probably you need to rebuild the whole table. Not a good thing.
    A chained hash does not have this kind of problem, because its state is determined only by its actual content.

    --
    sig intentionally left blank
  61. *BSD is dying by Anonymous Coward · · Score: 0
    It is official; Netcraft now confirms: *BSD is dying

    One more crippling bombshell hit the already beleaguered *BSD community when IDC confirmed that *BSD market share has dropped yet again, now down to less than a mere fraction of 1 percent of all servers. Coming on the heels of a recent Netcraft survey which plainly states that *BSD has lost more market share, this news serves to reinforce what we've known all along. *BSD is collapsing in complete disarray, as fittingly exemplified by failing dead last in the recent Sys Admin comprehensive networking test.

    You don't need to be a Kreskin to predict *BSD's future. The hand writing is on the wall: *BSD faces a bleak future. In fact there won't be any future at all for *BSD because *BSD is dying. Things are looking very bad for *BSD. As many of us are already aware, *BSD continues to lose market share. Red ink flows like a river of blood.

    FreeBSD is the most endangered of them all, having lost 93% of its core developers. The sudden and unpleasant departures of long time FreeBSD developers Jordan Hubbard and Mike Smith only serve to underscore the point more clearly. There can no longer be any doubt: FreeBSD is dying.

    Let's keep to the facts and look at the numbers.

    OpenBSD leader Theo states that there are 7000 users of OpenBSD. How many users of NetBSD are there? Let's see. The number of OpenBSD versus NetBSD posts on Usenet is roughly in ratio of 5 to 1. Therefore there are about 7000/5 = 1400 NetBSD users. BSD/OS posts on Usenet are about half of the volume of NetBSD posts. Therefore there are about 700 users of BSD/OS. A recent article put FreeBSD at about 80 percent of the *BSD market. Therefore there are (7000+1400+700)*4 = 36400 FreeBSD users. This is consistent with the number of FreeBSD Usenet posts.

    Due to the troubles of Walnut Creek, abysmal sales and so on, FreeBSD went out of business and was taken over by BSDI who sell another troubled OS. Now BSDI is also dead, its corpse turned over to yet another charnel house.

    All major surveys show that *BSD has steadily declined in market share. *BSD is very sick and its long term survival prospects are very dim. If *BSD is to survive at all it will be among OS dilettante dabblers. *BSD continues to decay. Nothing short of a miracle could save it at this point in time. For all practical purposes, *BSD is dead.

    Fact: *BSD is dying

  62. Deterministic O(n log n) quick sort by Anonymous Coward · · Score: 0

    Well, you can write a deterministic quick sort that runs worse-case O(n^2). However, There is a completely deterministic Quick Sort that runs in O(n log n) time based on median-of-medians.

    Note that you can take up to O(n) to select your pivot of a set of n elements and not change the analysis of quick sort (since it takes O(n) to divide the elements into greater-than-pivot, equal-to-pivot, and less-than-pivot). Consider the slightly simpler quickselect problem of finding the median in O(n) time. Clearly, if you can find the median in O(n) time, then there is a quicksort algorithm that runs in O(n log n) that uses that median algorithm to select its pivot.

    Eppstein's lecture notes on O(n) quickselect.

    Avrim Blum's lecture notes for cross-check.

    Phil Gibbons has notes split across two days: Day 1 and Day 1

  63. Rabin Fingerprint? by Kieckerjan · · Score: 1

    Can someone shed some light on the relation between Universal Hashing and the Rabin Fingerprint?

    --
    Being well balanced is overrated. -- John Carmack
  64. Repeat with me, a hash is not always a hash by Anonymous Coward · · Score: 0

    Repeat with me, a hash is not always a hash
    Repeat with me, a hash is not always a hash

    "Many websites automatically process their Apache logs with Perl"

    So what?
    You think anyone would actually keep those
    in memory? You're nuts.

    perldoc perltie
    perldoc DB_File

  65. Not news, at least for perl by rish2 · · Score: 1

    Mark Jason Dominus demonstrated this some time ago....When Hashes go wrong. Also interesting that the exploit he posted for perl also uses 10,000 inputs to demonstrate the problem.

  66. Re: referer information by Bisqwit · · Score: 1

    On my site, I use referrer information for development purposes.

    - Search engines:
    When I see what people have tried to search, and I can modify my pages so that they are easier to find (instead of getting lost with pages that have almost nothing to do with the thing being searched for).
    I can also focus on developing pages about most searched topics.
    Mere "hits" don't tell what the user *wanted* to find. Referrer is important.

    - Links:
    It's very interesting to see where in the world are links to my pages. Discussion boards, web diaries and software collections have links to my writings and programs, and it's good to get to review what kind of context my pages are being referred in.

    In my opinion, people, who hide the referrer information, are antisocial in the point of web development.
    I really hope this information hiding behavior doesn't spread.

  67. Acknowledgements by GQuon · · Score: 1
    From the acknowledgements:
    This work is supported by NSF Grant CCR-9985332 and Texas ATP grant #03604-0053-2001 and by gifts from Microsoft and Schlumberger.


    Makes me wonder: Is this Microsoft funding this to help protect people, or to learn how to hit Apple themselves?
    --
    Irene KHAAAAAAN!
    1. Re:Acknowledgements by Anonymous Coward · · Score: 0
      Makes me wonder: Is this Microsoft funding this to help protect people, or to learn how to hit Apple themselves?

      I've got news for you - research funding doesn't work the way you insinuate. Microsoft (or anyone else) doesn't go out & say, "okay student minions, go out & make me an algorithm to do XYZ! muahahahahah!!!" In reality, professors make proposals in more generalized research areas (networking, security, etc), and companies fund the professors based on past performance & abstracts of future work. Sometimes the company may like specific projects, but much more commonly it's about general areas of research and the professor/department's longer term goals. The funding is then used to pay graduate students (which isn't a ton of cash), who come up with all sorts of ideas in the area of said research.

      Since I actually attend Rice, know of these guys and know a little bit about Microsoft grants within our department, I can reassure you that Bill Gates does not, in fact, call up with threats to cancel funding (it's provided up front) if these guys don't come up with a way to 0wn apple. That's absolutely absurd - but admittedly, it is an entertaining thought to consider Gates as an evil PHB enslaving grad students (as long as it's not me, of course.)

  68. Standard Coding Procedures by Glonoinha · · Score: 2, Insightful

    >It's scary to me to think that people who write code in the first style get to submit code to important projects like Apache. It looks like a Basic programmer writing in C syntax. Even for a string with no double slashes it is far less efficient than the second style.

    Actually this is one of the fundamental methodologies used in software development, dating back to the early Slow-Machineazoic period

    In theory it goes like this :
    1. On paper, design the flow of data, what is hoped to be accomplished.
    2. Prototype the functionality as a proof of concept, insure that the tools you are using to program the solution are sufficient to do it. Usually this code is pretty gnarly and uses O(n^2) or worse routines (cut and paste in a bubblesort, anybody?), just quick and dirty, screw memory leaks, etc ...
    3. Test the functionality.
    4. Using the prototype as a blueprint, rewrite the project using your most awesome coding techniques (replace the bubblesort with a quicksort, etc.)
    5. Test the release candidate.
    6. Ship it!

    The (yes, it is documented) problem with this methodology is that it generally devolves to this :

    1. On paper, design the flow of data, what is hoped to be accomplished.
    2. Prototype the functionality as a proof of concept, using routines that suck and are slow and leak memory like a fish net.
    3. Test the functionality.
    4. Somebody watching the calendar sees you are already over schedule.
    5. Some bean counter over-rules your demands to rewrite the entire package, given that he watched it work.
    6. Ship it!

    --
    Glonoinha the MebiByte Slayer
    1. Re:Standard Coding Procedures by Whyrph · · Score: 1

      You're missing a couple steps:

      1. On paper, design the flow of data, what is hoped to be accomplished.
      2. Prototype the functionality as a proof of concept, using routines that suck and are slow and leak memory like a fish net.
      3. Test the functionality.
      4. Somebody watching the calendar sees you are already over schedule.
      5. Some bean counter over-rules your demands to rewrite the entire package, given that he watched it work.
      6. Ship it!
      7. ??????
      8. Profit!

    2. Re:Standard Coding Procedures by Master+of+Transhuman · · Score: 1

      You work for Microsoft, right?

      --
      Richard Steven Hack - This sig is TOO GODDAMN SHORT TO DO ANYTHING USEFUL WITH! MORONS!
    3. Re:Standard Coding Procedures by Old+Wolf · · Score: 1

      Sounds awful. Reality Step 4 seems like the problem to me.

      I note that Apache's development did not have bean-counters though :)

  69. add a random seed to the hash by Anonymous Coward · · Score: 0

    Seems to me that a simple way to avoid attacks on most hash functions would be to simply choose a few bytes of random data when the table is initially created then use slot=(R^H(value))%table_size.

    The slots used by each value generally dont need to be preserved outside of the process where the hash table lives.

  70. Re:This just proves that a little finesse still be by Anonymous Coward · · Score: 0


    People will write tools, but they'll still remain too hard for moron DDoSer script kiddies to pull off.


    Why? If Skript Kiddies could use tools like Trinoo, Stacheldraht, freak88 and mstream then why in the fsck wouldn't they be able to use a simple tool used to take advantage of this new DoS method?

    You look to be one of those people who seriously underestimates his enemies, underestimating your enemies is always a bad thing.

    When some real hacker writes a point and drool tool to take advantage of this attack I bet that it will be like the new WinNuke, all the kids will be using it.

  71. duh. old news. by Anonymous Coward · · Score: 0

    anything that accepts zlib compressed data can be sent 1kb that expands to 1mb. bla bla bla. and many similar O(n^2) or worse algorithms can be triggered. why is this news?

  72. I'd expected better by BigBadBri · · Score: 1
    from the /.ers than this.

    The biggest implication of this is - if you're an open source application, exposing your internals to the outside world, and you are using a weak algorithm, then this sort of attack can be carried out on you.

    Now I'm a fan of open source, but I'm sure that anyone that writes OSS will be taking this on board, so there's no need to worry.

    Just joking, of course - everyone writing an accessible service in OSS needs to read this paper.

    Sorry - rant over, but if you expose your internal workings, then clever bastards like these will find a way to tie your server up, unless you know their preferred attacks to start with.

    --
    oh brave new world, that has such people in it!
  73. Take a trivial idea by Anonymous Coward · · Score: 0

    Take a trivial idea [gotta use secure hashes and balanced trees], throw in some text, a couple of graphs (preferably non-linear), format the article in two columns, save as PDF and voila it becomes "the new class of denial of service attacks".

    Keep it simple, people.

  74. How about DoSing a laser printer? by Pembers · · Score: 1

    ...and not by the obvious method of printing a file containing nothing but 500 form feeds.

    When I was at university, about 10 years ago, one of my fellow students came up with a way to tie up one of our shiny new Apple Laserwriters. They were quite expensive to run, and so the university charged us for each page that we printed. The nice thing about this hack, from the evil point of view, was that it produced only one page of output, so the cost to the hacker was negligible - at least in financial terms.

    What was this hack? Well, the Laserwriters supported PostScript, which is a complete programming language. So this student wrote a little PostScript program that made the printer output a one-page, high-resolution copy of the Mandelbrot set...