Bunker X-Ray
Drop in router firmware, a disk image or any file you can’t identify. X-Ray finds every layer inside — headers, compressed streams, filesystems, archives, programs, pictures and keys — unpacks each one, and shows the shape of the data as a map. Everything runs in your browser.
How to Use
- Drop a firmware image, disk image or unknown file on the box, or press one of the samples. It is read in your browser and never run or uploaded.
- Watch the layer tree fill in: each part X-Ray recognises is unpacked and searched again, so a firmware file opens into its kernel, its filesystem and every file inside.
- Click any layer to see what it is, where it sits, its entropy and the details its header gives away (CPU, load address, checksums, build date).
- Read the two shape maps: the Hilbert map shows the whole layer as a picture, the byte-pair plot shows what kind of data it is. Click a spot on the map to jump to the part there.
- For firmware, read the Security review at the top: built-in passwords and keys, clear-text services started at boot, and the software versions inside, each with where it was found.
- Use Find to search every file name in the tree, and Download to save any layer on its own.
The file’s map appears here.
Worked Example
A TP-Link router image. OpenWrt’s 6,422,853-byte upgrade file for the Archer C7 v2 opens into four parts. A 512-byte TP-Link header names the build (r24106-10cc5fcd00) and says where the rest sits. At byte 512 an LZMA stream of 2,338,109 bytes unpacks to 7,837,801 bytes (3.35×): the kernel, which names itself Linux 5.15.167. At byte 2,338,624 (0x23AF40) a 4,056,152-byte SquashFS compressed with xz holds 1,051 files and 207 links; its busybox is a 327,717-byte MIPS 32-bit big-endian program. The last 28,077 bytes are the upgrade’s metadata.
A disk image. OpenWrt’s 10,485,443-byte x86-64 .img.gz is one gzip stream that unpacks to a 126,353,408-byte disk (12.05×). Its MBR lists two partitions: a 16 MB ext4 boot partition holding the 5,648,704-byte kernel, and a 104 MB partition whose first 4,333,142 bytes are the SquashFS root. The other 104,718,762 bytes are zeros, which is why the image shrinks so well.
The common mistake: reading entropy alone. In the TP-Link image, both the kernel stream and the SquashFS measure 8.000 bits per byte, the maximum, exactly like encrypted data. Neither is encrypted: both decompress. X-Ray only calls a region “compressed or encrypted” when no decoder opens it, and that unopened region is the one to suspect.
Show Work
Formulas
Why Firmware Comes in Layers
An embedded device boots in stages. A small bootloader in flash, very often Das U-Boot, reads a header, checks its CRC32 and copies a compressed kernel into RAM. The kernel then mounts a compressed, read-only filesystem for everything else. Each stage is packed separately because flash is small and expensive, and because each one is written by a different program at build time: the kernel with LZMA or gzip, the filesystem with mksquashfs, the header with the vendor’s own tool.
Taking such an image apart is called firmware extraction. The idea of hunting for signatures at every offset, rather than trusting the file’s extension, is the same one forensic “file carving” uses to recover files from a damaged disk. X-Ray adds two things: every part it finds is opened and searched again, and every layer is drawn as a picture. The Hilbert-curve map comes from visualisation work on binary files, where the curve’s locality turns a run of similar bytes into one visible patch instead of a thin smear.
About Bunker X-Ray
X-Ray reads the whole file in your browser, in a background worker so the page stays responsive. It checks every candidate it finds before trusting it: header checksums for U-Boot, TRX, gzip and xz, structure walks for ZIP, tar, PNG and JPEG, superblock checks for filesystems, and an actual decompression for every compressed stream. Bytes no format claims are still described: zero padding, erased flash (0xFF), text, code or tables, or compressed and encrypted data.
It never runs anything it finds and nothing is uploaded. Limits keep a hostile file from hurting your browser: one stream stops at 256 MB, the whole run at 768 MB unpacked and 20,000 layers. Encrypted firmware cannot be opened without the vendor’s key; X-Ray shows you where that encrypted region is and how random it looks.
When a file turns out to hold a device filesystem, X-Ray adds a Security review. It reads the account files, keys, boot scripts and configs it already unpacked and lists the weak spots: a password hash built into /etc/shadow, a second account with user id 0, a private key or SSH host key shipped in the image, a telnet or FTP server started at boot, a credential written into a config, and the versions of BusyBox, OpenSSL, dnsmasq, dropbear and the kernel. It reports weaknesses in plain words and never explains how to exploit them, never guesses or cracks a password, and never contacts a network. It errs toward saying nothing rather than crying wolf, so a clean review is reassuring but not a guarantee, and it does not match the versions it finds against a vulnerability database — it lists them for you to check.
Related tools: File Inspector, EXE Analyzer, and Hex Editor.
Frequently Asked Questions
What is firmware made of?
Usually a few parts glued together: a small header the device’s bootloader checks, a compressed Linux kernel, and a compressed read-only filesystem with the programs and settings. On a typical OpenWrt router image that is a vendor header, an LZMA-compressed kernel and a SquashFS filesystem compressed with xz, often followed by padding and a signature block.
How does X-Ray find things inside a file it has never seen?
Every format starts with a recognisable signature, such as “hsqs” for SquashFS or 1F 8B for gzip. X-Ray looks for every signature at every offset, then checks each hit properly: header checksums, sizes that fit, a stream that actually decompresses. Only parts that pass become layers, and each one is opened and searched in turn.
Is it safe to open a suspicious file here?
Yes. The file is read as bytes and nothing inside it is ever run: programs are described, not executed. It is not uploaded either; the whole analysis happens in your browser, in a background worker. One compressed stream is stopped at 256 MB of output, so a decompression bomb cannot fill your memory.
What does entropy tell me?
How unpredictable the bytes are, from 0 to 8 bits per byte. Text sits around 4 to 5, program code around 5.5 to 6.5, and compressed or encrypted data close to 8. But high entropy alone proves nothing: compressed data scores just as high. A region near 8 that no decoder can open is the one to suspect of encryption, which is why some vendor images cannot be opened without the device’s key.
Which formats can it unpack?
gzip, xz, LZMA, bzip2, LZ4 and lzop streams; ZIP, tar, cpio and ar archives; SquashFS, CramFS, ISO 9660, FAT and ext2/3/4 filesystems; U-Boot images, FIT images and device trees, TRX firmware, MBR and GPT disk images, and Intel HEX. It also recognises ELF, Windows and Mac programs, pictures, keys and certificates. Zstandard, 7-Zip, RAR, JFFS2, UBI and UBIFS are recognised but not unpacked yet.
How do I use the Bunker X-Ray?
Simply type your numbers and read the result, which refreshes the instant you change something. There is nothing to submit and nothing to wait for.
Do I need to install or sign up for anything?
Not at all — it runs in the browser with nothing to install and no account. After it loads once, it even works without an internet connection.
Is my information private?
Yes. Everything happens in your browser. Nothing you type is sent to a server or saved anywhere.
Common Use Cases
What’s inside my router?
Open the vendor’s firmware download and see its kernel version, BusyBox version and every file in the root filesystem, including the web interface and default settings.
Security review of a device
Find private keys and certificates baked into an image: a PEM private key in /etc that every unit shares is a classic finding.
A file with no extension
The Mystery blob sample (62.9 KB) splits into program code, 2 KB of zero padding, a 32×32 PNG, random bytes and a gzip stream that unpacks to a 5.83 KB log file.
Checking a disk image
A 10.0 MB x86 OpenWrt .img.gz unpacks to a 120.5 MB disk: an MBR, a 16 MB ext4 boot partition with the kernel, and a SquashFS root, each one browsable.
Learning how firmware is built
Compare a U-Boot image (a 64-byte header with two CRC32s) with the Banana Pi BPI-R3’s FIT image, a device tree that carries one kernel, five board device trees and the root filesystem.
Last updated: