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 10, 2026 · OpenAI — News
OpenAI unveils Control Room to monitor and halt model workloads in research infrastructure
Trust78 - Nov 10, 2026 · TechCrunch — AI
Anthropic launches Mythos 5.2 and Fable 5.2 with faster inference, lower costs, and improved capabilities
Trust79 - Nov 5, 2026 · Google DeepMind — Blog
Gemini Omni 1.2 Flash launches with 15-second video generation, 30% lower cost, and multi-turn editing
Trust84