Format:Ghidra packed file (GZF)
| Vendor | NSA |
|---|---|
| Extensions | .gzf, .gdt, .rep (project directory) |
| License | Apache-2.0 |
| On this wiki | Facts · Code · Notes · Topics |
Ghidra's single-file archive of a database (.gzf for a program, .gdt for a data type archive): a Java-serialized header with magic 0x2e30212634e92c20 at offset 6, the item name, content type and length, followed by one deflated zip entry FOLDER_ITEM holding the database.
Overview
Ghidra stores programs inside a project; Export... Ghidra Zip File or the packed save writes one item as a single file (.gzf for programs, .gdt for data type archives, .gar for archives). The writer is ItemSerializer in NationalSecurityAgency/ghidra (Apache-2.0), Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/local/ItemSerializer.java.
Layout
- A Java ObjectOutputStream header (stream magic AC ED 00 05 and a block-data header, 6 bytes in all) so that the next field is at offset 6: the long magic number
0x2E30212634E92C20(bytes 2E 30 21 26 34 E9 2C 20), then int format version (1), UTF item name, UTF content type (e.g. the program content type; empty if none), int file type, long content length. - A ZIP stream with one entry named
FOLDER_ITEM, deflated, holding the item's own database (Format:ZIP, Format:DEFLATE). The inner data is Ghidra's block-based database (classdb.DBHandle), not SQLite; its record format was not read: Unverified.
Detect a packed file by the 8 bytes at offset 6. Extract the content with any ZIP reader after skipping the serialized header, or let Ghidra import it (File > Import, or analyzeHeadless -import file.gzf, Unverified).
Project directories (.rep)
A project Name.gpr plus the directory Name.rep (GhidraDocs/GhidraFilesystemStorage.html). Inside the .rep: idata (non-versioned files and checked-out files), versioned (private projects only), user (per-user data). The current Indexed Filesystem names each file with an 8-hex-digit id: 00001234.prp is its property file and ~00001234.db the directory of its database; paths are kept in ~index.dat (with ~index.bak, ~index.tmp, ~journal.dat, ~journal.bak and ~index.lock). Deleting the index files while the project is closed makes Ghidra rebuild the index from the .prp files. The legacy Mangled Filesystem (before Ghidra 9.0) encodes names so that each capital letter becomes an underscore plus the lowercase letter and each underscore doubles.
Moving analysis out
See Format:Ghidra XML and SARIF export and Technique:Moving analysis between tools.
Code & repositories
- https://github.com/NationalSecurityAgency/ghidra @
9a723ce99952771b8368329503aa589ae233e916· license: Apache-2.0 (read from LICENSE; GitHub's API was busy)
Ghidra source: ItemSerializer (packed files), ProgramXmlMgr (XML export), Sarif feature, GhidraFilesystemStorage.html.
Tested on: source read, not run: read source only · checked 2026-10-18