Babel-USB: USB drive with every file

Hacker News Top Tools

Summary

This project turns an ESP32-S3 development board into a USB drive that appears to contain every possible file, inspired by the Library of Babel. It's a fun hack that generates arbitrary file contents based on path names using MTP protocol.

No content available
Original Article
View Cached Full Text

Cached at: 06/12/26, 02:53 AM

p2r3/babel-usb

Source: https://github.com/p2r3/babel-usb

About

This project turns an ESP32-S3 development board into an infinite filesystem inspired by the digital Library of Babel.

Usage

  1. Buy an ESP32-S3 development board - ideally one shaped as a USB stick for maximum bewilderment. This is the one I got, though you don’t necessarily need this exact variant. That said, make sure you’re getting an ESP32-S3. That’s the only one I’ve tested. Others may not have hardware USB support. S2 might work, but I make no promises.
  2. Get Visual Studio Code and set up PlatformIO. Refer to Google or YouTube if you don’t know how.
  3. Clone this repository with submodules. Again, if you don’t know what that means, look it up.
  4. Open the cloned folder in VScode, wait for it to set up the project.
  5. While holding the “BOOT” button, plug the microcontroller into your PC.
  6. Click the “→” icon in VScode to compile and flash the project. Once that’s done, disconnect and reconnect the microcontroller.
  7. Explore! You might have to copy files off of the MTP share before reading them, as most programs don’t support reading directly from MTP.

Finding specific files

  1. Install Bun.
  2. Navigate to the cloned folder and use the command bun run file-to-path.js <path>, where <path> is a path to the file you wish to find. Note that files larger than a couple hundred bytes will take a very long time to generate.
  3. Copy the path it returns and paste it into your file browser after disk/.
  4. Find the file, copy it off of the drive, and verify that it is in fact the same file.

Credits

The hardware-facing bits of this project are loosely cobbled on top of RigoLigoRLC’s work on esp32s3-tusb-mtp and their fork of espressif-tinyusb-component.

Similar Articles

My USB Drive Has a Hidden Encrypted Vault

Hacker News Top

An open-source hardware project called Phantomdrive creates a USB drive that appears as a small disk while hiding an encrypted AES-256 partition, protecting data from coercion.

usbliter8: An A12/A13 SecureROM exploit

Lobsters Hottest

usbliter8 is a tethered bootrom exploit for Apple A12 and A13 SoCs, using an RP2350-based microcontroller board to exploit a USB controller bug and gain low-level device access.

Comu Fits a 144MHz CH32V203 RISC-V Board Inside a USB-A Port

Lobsters Hottest

Comu is a compact 13×9.4mm development board built on the WCH CH32V203 RISC-V MCU that fits entirely inside a USB-A port, offering capacitive touch, LEDs, GPIO, and USB HID/serial/mass-storage capabilities. It is open-source and supports development via ch32fun, Rust, Arduino, and WCH tools.