// TOM'S HARDWARE US — HARDWARE & GADGET
Developer creates a 100% valid ZIP file that doubles as a BIOS-bootable operating system
The original definition of "hacking" was making hardware and software do something it wasn't supposed to.
When you purchase through links on our site, we may earn an affiliate commission. Here’s how it works.
Hacking stories these days mostly involve someone using an army of AI agents to find vulnerabilities in networks and software that were carefully hidden in plain sight. Today, for a change, we have a story about hacking in its original meaning — twisting computing artifacts into purposes not in their design spec. David Oberhollenzer, aka Goliath, a greybeard in spirit if not in shade, crafted a 100% valid ZIP file that's simultaneously an archive, BIOS-bootable, and a Multiboot-compatible OS image.
You can unpack the ZIP file just like any other, boot it using Linux's GRUB, QEMU, or any other Multiboot-compatible loader (even if imaged to different media), or alternatively, perform the finest party trick: image-write it to a floppy and boot from it directly from BIOS on any compatible PC, without modification.
Much like me, that sequence of words may be triggering a head-tilt reminiscent of a confused puppy, so we'll explain. The first thing you need to know is that unlike most file types, the metadata (in this case, file directory) of a ZIP is actually at the end of the archive. Up to that point, the data is comprised of every compressed file in sequence.
The file packs all have a predictable structure: "PK" followed by bytes 03 04, metadata (including name), some extra/comment fields, and then the file's contents. Notably, any file can be stored uncompressed, and Goliath made use of that for the very first file, called ZIPHEAD.COM — remember, this is the start of the ZIP archive.
Goliath said that it was "easy" to make the ZIP file a valid Multiboot system image. A valid image only needs to contain bytes 0x1BADB002 in the first 8 KiB, followed by some flags and a checksum. It was trivial to place that datum in ZIPHEAD's data, along with the location of where the bootloader lies.
Grub or QEMU don't care about anything else in the image, as once they have the initialization information, from that point it's the bootloader's problem. The actual bootloader, predictably, is in ZIPHEAD's uncompressed data, and the image will happily boot directly, or, say, from a floppy.
Making the same exact archive bootable via a standard PC BIOS took a little more work and some clever shenanigans. Making a disk bootable is simple enough: the BIOS reads the first exact 512 bytes of the disk's contents, and if they end with bytes 0x55AA, then it's bootable, and the BIOS starts executing whatever code is the first byte.
Get Tom's Hardware's best news and in-depth reviews, straight to your inbox.