Yoz Grahame's Unresolvable Discrepancy

I came here to apologise and eat biscuits, and I'm all out of biscuits

Scary-cool: Decompression bombs

Posted: February 11th, 2004 | 1 Comment »

While looking for good test data for my code, online medications a moment’s idle musing confirmed (with scott/tiger coming up on the outside)

Most
of us are used to relatively consistent ratios for data compression.
The standard ZIP algorithm usually takes ASCII files down by a factor
of ten or so, tuberculosis uncompressed binary data by a factor of three, more both of
those wobbling +/-50%. However, those are averages based on real-world
use; if you aim to create a sample dataset purely for a high ratio, you
can get 100:1 or better quite easily. Why? Well, if you ever played
around with BBSes on a 14.4k modem, you may have seen some quite cool
experiments that let you download a megabyte or so in a mere minute,
taking advantage of v.32’s run-length compression algorithms. (Of
course, you were getting a megabyte of meaningless data, most of which
was the same byte repeated over and over, but who cares? It was a
MEGABYTE! In a MINUTE!)

But what use is there for such tricks now? Decompression bombs, that’s what.

Here’s an example scenario: A mail arrives at your
super-barbed-wire-protected mail gateway. The gzip-compressed
attachment – only 7k big – is grabbed by the anti-virus scanner,
looking for any suspicious signatures. It starts to decompress it and
BANG – the resulting file, over 100 gigabytes, crashes the AV scanner and completely fills the hard drive partition in the process.

Fortunately, a good number of the AV scanners that AERAsec tested
aren’t too vulnerable, but some require patching. Similarly, sending a
gzipped-HTML bomb to a browser will crash a fair few of them. Not so
scary, then, but nifty in an admirably-nasty way.


One Comment on “Scary-cool: Decompression bombs”

  1. 1 becky said at 10:10 am on July 14th, 2005:

    i just wanted to say it sounds great and how do you make small little bombs that cant harm you that bad

Archive

The complete list of posts lives here.

yoz's bookmarks

  • How to win a grant 2013/07/22
    "Skip the long-winded argument on why your idea—your life’s work—deserves institutional support, and instead do this:"
  • Bullies Called Him Pork Chop. He Took That Pain With Him And Then Cooked It Into This. 2013/04/12
    Amazing multi-artist video for Shane Koyczan's poem about being bullied.
  • learnfun and playfun: A general technique for automating NES games 2013/04/11
    Algorithmically analysing recorded gameplay and in-memory value increments to ascertain scoring techniques. The video is fantastic and funny, and the algorithm finds some useful bugs in the games.
  • How we use Redis at Bump - Bump Dev Blog 2011/07/16
    How Redis became Bump's Swiss Army Knife to solve all kinds of data-related problems
  • Heroku | The New Heroku (Part 4 of 4): Erosion-resistance & Explicit Contracts 2011/06/29
    Fascinating description of how Heroku's recent changes are aimed at killing software erosion (or what I think of as "bitrot").
  • What are the most interesting HTML/JS/DOM/CSS hacks that most web developers don't know about? - Quora 2011/06/17
    Marvellous collection of JS, CSS & HTML hacks. Did you know you can get the browser to parse a URL or escape HTML for you, with existing JS functions? (via gnat)
  • Avatars In Motion 2011/05/21
    "This blog is to show all the beauty you can find in Second Life." Gorgeous photography of great SL locations. (via Hamlet)
  • Gabe Newell on Valve | Game development | Features by Develop 2011/05/14
    Great, inspirational interview on how they hire and organise.
  • Design @ Quora (Web2.0 Expo Presentat... by Rebekah Cox - Quora 2011/05/03
    "Great design is all the work you don't ask the people who use your products to do."
  • David Kelley on Designing Curious Employees | Fast Company 2011/04/20
    "In this interview, he explains why leaders should seek understanding rather than blind obedience, why it’s better to be a coach and a taskmaster and why you can’t teach leadership with a PowerPoint presentation."

yoz on twitter

    follow me on Twitter

    Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org

    Content licensed under the Creative Commons (Attribution - Share Alike) | Theme based on Clean Room by Columbia, MO Web Design