
Placing 0x55AA precisely at position 510 of the ZIP, already in ZIPHEAD's contents, is once again simple, and won't corrupt the Multiboot image, as if you'll recall, the Multiboot spec is flexible with data locations. But you may wonder: once the BIOS runs code in sequence starting from the ZIP's first byte, then ZIPHEAD's header ("PK" + 0x0304, plus all metadata) surely is garbage for practical purposes, and not proper code? Well, yes, but actually no.
The first four bytes represent CPU instructions that don't write anything to memory, so they're harmless, other than a push-to-stack. The next few belong to ZIPHEAD's metadata, and Goliath massaged those values to represent instructions that would either be innocuous or perform operations he could use, namely using the modification time bytes as instructions to jump further down the data.
Sounds simple, but the actual process of choosing bytes that represent (1) non-crashy CPU instructions, (2) useful code for setting up the boot process, and (3) still represent a valid file header in a ZIP archive is far trickier than the above. Do go and check out the full blog post if you want all the details.
Download the Tom's Hardware app for up-to-the-minute updates on iOS and Android . Also follow Tom's Hardware on Google News , or add us as a preferred source , to get our latest news, analysis, & reviews in your feeds.
Bruno Ferreira Social Links Navigation Contributor Bruno Ferreira is a contributing writer for Tom's Hardware. He has decades of experience with PC hardware and assorted sundries, alongside a career as a developer. He's obsessed with detail and has a tendency to ramble on the topics he loves. When not doing that, he's usually playing games, or at live music shows and festivals.
dmitche31958 Interesting and a bit scary. So now a zip file on a usb drive can be used to hijack your system and most antivirus software will ignore scanning the file Reply
Joomsy dmitche31958 said: Interesting and a bit scary. So now a zip file on a usb drive can be used to hijack your system and most antivirus software will ignore scanning the file Since when are ZIPs ignored? If anything, I believe that's the one archive format that does get its contents scanned. Also, this isn't really anything new. Old Acer Netbooks had you use similar ZIPs for BIOS flashing. You'd just plop them on a USB stick, and the machine would know what to do when booted with one plugged in. Reply
Key considerations
- Investor positioning can change fast
- Volatility remains possible near catalysts
- Macro rates and liquidity can dominate flows
Reference reading
- https://www.tomshardware.com/software/operating-systems/SPONSORED_LINK_URL
- https://www.tomshardware.com/software/operating-systems/developer-creates-a-100-percent-valid-zip-file-that-doubles-as-a-bios-bootable-operating-system-hiding-bios-boot-flags-inside-uncompressed-files-and-turning-file-headers-into-cpu-instructions#main
- https://futureplc.com/terms-conditions/
- Nvidia engineer leaves company over lack of transparency around Jensen Huang’s exit, details decision
- Jensen Huang could be plotting return as Nvidia CEO, report claims
- Grab a beginner-friendly Anycubic 3D printer for under $300, back at its record-low price
- AMD's fastest gaming CPU and the Radeon RX 9070 just hit a massive $550 discount
- China retains fastest supercomputer in the world crown as AI data centers soak up new hardware
Informational only. No financial advice. Do your own research.