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."

57 of 257 comments (clear)

  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 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!

  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. 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 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.

    3. 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.

  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 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.

  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...

  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 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).

    5. 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.

    6. 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.

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

    It's a Mansierre!

  12. 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

  13. 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 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.

    2. 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.

    3. 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.

    4. 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.]
    5. 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.

    6. 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.

    7. 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.

  14. 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.

  15. 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.

  16. 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.

  17. 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?

  18. '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 ...

  19. 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
      */
  20. 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

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

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

    --
    This space for rent.
  22. Re:What is a "Bro server"? by Anonymous Coward · · Score: 3, Informative
  23. 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.

  24. 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
  25. 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.

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

    In case you were wondering what Brois.

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

    My brain is resistant to attacks using algorithmic complexity

  28. 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.

  29. 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/

  30. 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

  31. 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