SQLite database file repurposed as Linux executable via ELF schema in SQLite tables
A proof-of-concept interpreter extracts and runs ELF components stored in a SQLite database file whose application ID is set to 'SELF'.
2 sources · cross-referenced
- A SQLite database file can be formatted to contain an ELF executable by storing its components in SQLite tables.
- The SQLite file’s 4-byte application ID at byte 68 is set to 'SELF' to signal the custom format.
- An interpreter named self-exec extracts and executes the ELF pieces from the SQLite file.
- Linux’s binfmt_misc can register the pattern so the kernel executes such files directly.
Farid Zakaria describes a Linux-focused technique that turns a SQLite database file into a directly executable binary by encoding the ELF components as rows in SQLite tables. The method sets the SQLite file format’s 4-byte application ID—located 68 bytes into the file—to the string SELF, indicating a Structured Executable & Linkable Format payload.
The custom schema defines tables that map to ELF sections such as headers, program headers, and sections, allowing the SQLite file to mirror the structure of a traditional ELF executable. Zakaria provides a reference schema and a C-based interpreter called self-exec that reads the SQLite file, reconstructs the ELF components, and executes them.
To make the kernel recognize and run such files automatically, the approach leverages Linux’s binfmt_misc mechanism. By writing a registration string to /proc/sys/fs/binfmt_misc/register, the system can be configured to invoke self-exec whenever it encounters a file whose application ID matches SELF, enabling transparent execution of SQLite-based binaries.
- Nov 11, 2026 · Google AI — Blog
Google launches Gemini Decisions API with new Gemini Decision 1 model for fast, calibrated multimodal decisions
Trust78 - Nov 11, 2026 · OpenAI — News
OpenAI offers free ChatGPT Plus to more than 20,000 veterans and servicemembers
Trust75 - Nov 11, 2026 · Latent Space — swyx
Anthropic releases Claude Fable 5.2 and Mythos 5.2, claiming top LLM spot on Anthropic’s IPO roadshow day
Trust76