bzip2 Archive Inflating to 1,400,000x its Size aka Decompression Bomb

Поделиться
HTML-код
  • Опубликовано: 12 сен 2018
  • Bombs away! 1.4MB becomes 10TB with this crazy efficient compression algorithm involving repeating null bytes.
    Hope you enjoyed the video!
    Check out this code here:
    github.com/engineer-man/youtu...
    Join my Discord server to chat with me:
    engineerman.org/discord
    Check out some code on my GitHub:
    github.com/ebrian/engineerman
    Tweet me something funny on Twitter:
    / _engineerman
    Say hi over at Facebook:
    / engineermanyt
    Sincerely,
    Engineer Man
  • НаукаНаука

Комментарии • 124

  • @roadtrain_
    @roadtrain_ 5 лет назад +145

    Oooooh. That sounds like a fun thing to do to the school computers.

    • @JoeDaStink
      @JoeDaStink 3 года назад +1

      Also fry it as soon as you extract the files

    • @cleazy3752
      @cleazy3752 3 года назад +2

      @@JoeDaStink lol my school computers are all on server, can fry the whone system, but i need some tricks to get into it

    • @darkmoon556
      @darkmoon556 3 года назад +1

      @@cleazy3752 Did you tried to do it or not? wanna know

    • @Serendipityy.
      @Serendipityy. 3 года назад

      @@darkmoon556 i wanan kniow

    • @cleazy3752
      @cleazy3752 3 года назад +2

      @@darkmoon556 no, im on vacation, i'll try the sooner i can, but with all of those crappy switches idk if it'l work

  • @sanferrera
    @sanferrera 5 лет назад +171

    tar is not a compression algorithm, it's just for gathering together many files in one. That's why the file size didn't shrink.

    • @bool2max
      @bool2max 5 лет назад +17

      Yeah and it's commonly combined with gzip:
      - tar multiple files into one archive file
      - gzip that archive file to compress it

    • @turun_ambartanen
      @turun_ambartanen 4 года назад +1

      @Rex Butt They aren't. Or do you mean .tar.gz, .tgz, .txz files? Those are all a single tar file that is compressed with another algorithm.

    • @user-sw1wq8lh2w
      @user-sw1wq8lh2w Год назад +1

      hey "tarball" vs archive

  • @harrysb3002
    @harrysb3002 4 года назад +100

    my school's IT guy watching me unload a 4000 terabyte zip bomb onto the school's network

    • @r4ptor-g4ming34
      @r4ptor-g4ming34 4 года назад +11

      iHarrySB haha, I saw that meme too 😎 have a great day, king!

    • @maxs7539
      @maxs7539 4 года назад +3

      I just saw this meme as well. i wish you two an nice day!😜

    • @Preinstallable
      @Preinstallable 4 года назад +1

      Normie alert

    • @Preinstallable
      @Preinstallable 4 года назад

      jorgeskatefast _ shut up, i enjoy all types of memes.

  • @ShivamSingh-bx5lg
    @ShivamSingh-bx5lg 5 лет назад +117

    3 pied Piper employees disliked the video

    • @Alexmagno7
      @Alexmagno7 5 лет назад

      Silicon Valley good show

  • @kiwifrogg
    @kiwifrogg 5 лет назад +79

    This very method was used to crash bulletin boards back in pre internet days. As the BBS would auto unzip to virus scan the file, it would full the hard drive and crash the BBS. Back in the day it was called a ascii bomb, they were easy to create because of stacker.

    • @mrbrianc
      @mrbrianc 5 лет назад +1

      I remember running stacker on a hard drive to make it 32 meg vice 16

    • @Programentalist
      @Programentalist 5 лет назад

      @@mrbrianc Same here, but either my 286 CPU or my harddrive really struggled with disk i/o after that so I ended up reformatting without Stacker because it was slowing things down too much.

  • @klbm9999
    @klbm9999 5 лет назад +13

    I just totally love your videos, short, enough detailed and to the point most importantly great content. Thanks!

  • @gegego1337
    @gegego1337 5 лет назад +37

    Thank you so much for pointing out the "watch" command °_°

  • @facu5563
    @facu5563 5 лет назад

    Wow, fantastic really, keep the videos coming engineer man
    Cheers from Argentina

  • @andyoohhh2061
    @andyoohhh2061 5 лет назад

    Great video. Thanks for sharing!

  • @evanosburn718
    @evanosburn718 5 лет назад +3

    This is pretty much the digital version of the Spring Snake in a Can gag. As soon as you open it...

  • @wijaksanapanji
    @wijaksanapanji 5 лет назад +8

    Fortunately it's a kitten, I'll be in danger if its a pupper

  • @ZeeLegend
    @ZeeLegend 5 лет назад +50

    Awesome. the Like button has been inflating to over 200 times its original size.

  • @lagomoof
    @lagomoof 5 лет назад +2

    You could probably pipe through bzip2 _more than once_ since the data is so redundant. That generally doesn't work with more complex data. As someone else says, you could look into the bzip2 file format to see how to create an archive of zeros without having to use /dev/zero (Or use it and then hack the number to be bigger in the bzip2 file). Also, you might interested in lzma / xz and lrzip for heavy compression. (I have a 270 byte file that expands to 2.75GiB from combining these). Finally, look into archives that have been constructed to contain themselves. You read that right. Or two copies of themselves.

    • @paulstelian97
      @paulstelian97 5 лет назад

      Oh, the quine archives are the most genius thing ever.

  • @philjones6278
    @philjones6278 3 года назад +1

    Would decompressing to a separate partition, i.e. /tmp, help prevent the rest of the system crashing?

  • @chedatomasz
    @chedatomasz 5 лет назад +2

    Have you tried editing the bzip2 manually?

  • @jabu1482
    @jabu1482 5 лет назад +11

    You made a large file with the same character. Depending on the algorithm compression and how it recognizes a 'seed' string, all those procedures should compress to a single character. Since it didn't , there must be additional parameters to make these things work. Consider, if a Huffman scheme was properly and scholastically used, all files should have collapsed to a single character. Since it didn't there must be something else going on. Great video! Keep doing it!

    • @klbm9999
      @klbm9999 5 лет назад +7

      The decoding table also takes space in buff man scheme, so I guess most of the compressed file is just those tables.

  • @electricow1
    @electricow1 4 года назад +3

    Please do a playlist on Bash Tutorial for Beginners, because I'm starting to feel like I should be migrating to Linux really soon

  • @hugogomes6471
    @hugogomes6471 5 лет назад

    This is awesome!

  • @r.savage1283
    @r.savage1283 5 лет назад

    Would be great having an ascii kitten. Lots of them. :) great video.

    • @betoian
      @betoian 5 лет назад +1

      /\**/\
      ( o_o )_)
      ,(u u ,),
      {}{}{}{}{}{}

  • @pv6596
    @pv6596 5 лет назад +12

    NULLS are NOT DATA!!!
    Why the surprise?
    If data is all the same, you only need to save one sample of data and how many of them are...

  • @piratevv
    @piratevv 4 года назад +1

    can you give us a practical video on virtual file system and virtual memory in linux..

  • @RuggedRoughneck
    @RuggedRoughneck 5 лет назад +57

    Please send to India, Tech support guys

    • @ShivamSingh-bx5lg
      @ShivamSingh-bx5lg 5 лет назад +14

      Ron White as an Indian I agree ,those scammers deserve to rot in hell

    • @thegreatgatsby8180
      @thegreatgatsby8180 5 лет назад +1

      No need... They are already put I. Jail by the Indian authorities.

    • @VishalSharma-gt1hy
      @VishalSharma-gt1hy 4 года назад +1

      @@ShivamSingh-bx5lg I am an Indian and I couldn't agree more

  • @adamdeane4675
    @adamdeane4675 5 лет назад +10

    never trust internet kittens

    • @EngineerMan
      @EngineerMan  5 лет назад +8

      No matter how cute or innocent they may appear.

  • @JonahsEpicYT
    @JonahsEpicYT 3 года назад

    made a 64KB zip bomb which is 41GB uncompressed. It has 40GB.zip with 10 folders , each with 17 250MB .txt files, each compressed to 232B.

  • @maxsilvester1327
    @maxsilvester1327 5 лет назад +2

    you can shrink 10gb to 400 bytes and 100gb to 924 bytes
    if you use something like this:
    dd if=/dev/zero bs=2G count=5 | zip -q9 | bzip2 -cq9 > 10GB.zip.bz2

  • @matteo-vv1jq
    @matteo-vv1jq 3 года назад

    what do you code with?

  • @JonahsEpicYT
    @JonahsEpicYT 3 года назад

    i made a 232B compressed file that becomes 250MB when uncompressed. I did this by pasting like too many zeroes into notepad and wating too long for it to respond.

  • @tzokke
    @tzokke 5 лет назад +6

    Could you write the "bomb" by hand instead of waiting for the 6 hours to produce it by actually compressing data?

    • @EngineerMan
      @EngineerMan  5 лет назад +8

      I'm thinking you probably could. There must be a way to craft it quicker.

    • @t20kdc
      @t20kdc 5 лет назад +1

      It's probably really simple if you have the specification on-hand and a way to edit the bitstream, but with the modern "layers upon layers" compression techniques...
      (EDIT: I'm specifically talking about the 'Some bit-level compression, and then a byte-level compression within that' combos these tend to use)

    • @BinaryAdventure
      @BinaryAdventure 4 года назад

      yeah just have Engineer-Man send you the file. :D

  • @James-ur3zv
    @James-ur3zv 4 года назад

    I would fall for cute kittens every time

  • @zigaudrey
    @zigaudrey 3 года назад

    It says Zip is the oldest file type. No wonder why misuse of compression exist. Why they didn't tell not to compress when there is a zip file in a file?

  • @SSS-sz8mg
    @SSS-sz8mg 5 лет назад

    what you used distribution ?

    • @SapphFire
      @SapphFire 5 лет назад

      I think it's Xubuntu

  • @turner7777
    @turner7777 5 лет назад

    wow

  • @catlord69
    @catlord69 3 года назад

    avast tagged quite some files on my pc as decompression bombs (even tho many look legit)

  • @Davesoft
    @Davesoft 5 лет назад +1

    Yeah, but why?

  • @FabioManganiello
    @FabioManganiello 5 лет назад +3

    "Apparently this has been a known vulnerability for the last 12 years" what's exactly the vulnerability in this case? The compression algorithm is too efficient? :)

    • @EngineerMan
      @EngineerMan  5 лет назад +4

      Heh. Need less efficient algorithms over here!!!!

    • @gijsleemrijse8122
      @gijsleemrijse8122 5 лет назад +2

      Less modern anti virus software would try to decompress the file to scan it. This would however take up so much time (and the AV didn't do parallel scans) that viruses could be installed without being checked by the AV.

    • @maxsilvester1327
      @maxsilvester1327 5 лет назад +2

      you can shrink 10gb to 400 bytes and 100gb to 924 bytes
      if you use something like this:
      dd if=/dev/zero bs=2G count=5 | zip -q9 | bzip2 -cq9 > 10GB.zip.bz2
      @@EngineerMan

  • @agentNirmites
    @agentNirmites 4 года назад +4

    One more thing.
    Make a python program, that is a while loop. Inside loop make strings of size 100000 (length). Append that to a list. With each iteration of the loop, write that list into a file.
    I mean 10TB is not a small size. But as the above program will generate file of infinity size as time goes.

    • @ME0WMERE
      @ME0WMERE Год назад

      How would the program be run?

  • @thebestnerd4444
    @thebestnerd4444 5 лет назад +6

    I made a bat file that is only 16.0 KB but it can create a text file that is 2 exabytes (2048 petabytes) in size exactly, and any size in between.

    • @nico26061998
      @nico26061998 5 лет назад +1

      wow

    • @burke3gd
      @burke3gd 5 лет назад +9

      So what? You could probably do this with any scripting language in a few lines of code. Engineer man did the same thing with a shell one-liner in the video.

    • @veryfunnyname7060
      @veryfunnyname7060 5 лет назад

      How do you need 2^14 characters for that lol (assuming extended ascii, that is)

  • @aspiechan420
    @aspiechan420 2 года назад

    I made a zip bomb that’s 80 ish mb when compressed and becomes 37 GB when extracted.

  • @AdamPoniatowski
    @AdamPoniatowski 5 лет назад +1

    bzip2 with just null/zero characters would be a nice prank... but to do a real test, is to use /dev/urandom

    • @novaardent4528
      @novaardent4528 5 лет назад +1

      Bzip2 uses what is called the Burrows-Wheeler algorithm. This algorithm compresses trailing 0's and 1's extremely well, while random 1's and 0's might be much less effective.

    • @drtidrow
      @drtidrow 5 лет назад

      A file of random data from /dev/urandom shouldn't compress at all with any algorithm... compression algorithms exploit redundancies in the data that allows (grossly simplified) it to predict what a subsequent series of bits will be from a particular sequence of bits. With purely random data, the state of each bit is completely independent of the state of previous bits, so no bit is redundant - in fact, the compressed file will nearly always be _larger_ than the original, to account for the compression scheme's overhead.

    • @AdamPoniatowski
      @AdamPoniatowski 5 лет назад

      okay... I still don't get your point. As a prank, bzip'ping a zero'ed out file and sending it to someone to fill their pc, or using it to bomb a server (if hard/soft limits were removed, for some stupid reason). But for proper testing, random data would be a good start, as at least it would show how well it can compress, if at all... if you know how long it takes to zip lfs and send it to another site for further development and/or qa, you'd understand my point

    • @novaardent4528
      @novaardent4528 5 лет назад +1

      We were saying there isn't much point in testing it

  • @EightyS3v3n
    @EightyS3v3n 5 лет назад +11

    You can background a running command?! Am I the only one who didn't know that??

    • @EngineerMan
      @EngineerMan  5 лет назад +23

      Ctrl+Z then type bg and hit enter. You can put it back in the foreground with fg.

    • @BobBeatski71
      @BobBeatski71 5 лет назад

      Me neither !

    • @DoorThief
      @DoorThief 4 года назад

      You can also use "screen" to switch between terminal windows essentially. A bit more verbose than backgrounding a job

    • @asdfasdf-vp9up
      @asdfasdf-vp9up 4 года назад +2

      @@DoorThief imma have to say tmux is better if you have a good conf fjle

  • @baumariel2
    @baumariel2 5 лет назад

    i love your shit

  • @0xssff
    @0xssff 3 года назад

  • @neverloggingout
    @neverloggingout 4 года назад +1

    Can you do this on windows with a tutorial?

  • @sgt.lazytuber3144
    @sgt.lazytuber3144 3 года назад

    I installed a bomb file yesterday, that shit installed also malware, 30 other programs and fake antivirus. I am lucky that I am skilled with conputers and stopped the shit, cleaned the malware out the computer in less than an hour

  • @WillplaysFort
    @WillplaysFort 2 года назад

    i have a 10 exobyte zip bomb

  • @nmkh4608
    @nmkh4608 2 года назад +1

    I tryed the same bzip2 command to compress a 826 MB iso file, however it only shark 2 MB , now it is 824 MB , how do I make it work? bzip2 is not working as shown in the video.
    Please help #Engineer_Man
    # Make a video on how to compress any kind of file with bzip2 that will compress any big files into couple of MB or KB, that would be very helpful.

    • @EineNachtImMai
      @EineNachtImMai Год назад +1

      bzip2 is especially good to compress null character, however it's way less powerful on files other than that. Maybe that's your problem.

  • @JoraTheGoat
    @JoraTheGoat 3 года назад

    online school shooters watching this video like

  • @Preinstallable
    @Preinstallable 4 года назад

    Im not really a linux guy so can someone tell me how to do this on windows?
    edit: already found out how

    • @n8style
      @n8style 3 года назад +1

      sure, just need to delete system32 and install a proper OS like debian ;)

    • @Preinstallable
      @Preinstallable 3 года назад

      @@n8style shut up

    • @n8style
      @n8style 3 года назад

      @@Preinstallable lol which OS did you install?

    • @Preinstallable
      @Preinstallable 3 года назад

      @@n8style Windows

    • @n8style
      @n8style 3 года назад

      @@PreinstallableI thought you'd uninstalled that steaming pile for a proper OS?

  • @niklaslevin5026
    @niklaslevin5026 3 года назад

    We like to call it: Depression bomb

  • @kenzostaelens1688
    @kenzostaelens1688 4 года назад

    bruh that's weak, i've made a decompression bomb of 8kB that decompresses to 32768 yB

  • @rjbradlow
    @rjbradlow 3 года назад

    Seriously bad idea to share this or any nefarious how to.
    Shame on the mess.