Skip to main content

Project Fundamentals

A Ghidra project serves as a container for organizing reverse engineering work. Projects manage collections of domain files, tool configurations, and optional repository connections for collaboration.

Project Structure

Physical Layout

A Ghidra project consists of several directories:

Domain Files

Domain files are the primary data artifacts in a project:
Common Domain File Types:

Program

Binary executables with analysis data (*.gzf)

Data Type Archive

Shared data type definitions (*.gdt)

Tool

Saved tool configurations (*.tool)

Folder Link

Links to external project folders

Project Types

Ghidra supports different project configurations:

Local Projects

Standalone projects stored on the local file system:
  • No version control
  • No collaboration features
  • Fastest performance
  • Ideal for personal analysis

Shared Projects

Projects connected to a Ghidra Server repository:
  • Version control for all files
  • Multi-user collaboration
  • Check-out/check-in workflow
  • Merge conflict resolution
  • User access control
From ghidra/framework/model/Project.java:76-80

ProjectData Interface

The ProjectData interface provides access to the project’s file system:

Folder Hierarchy

Projects organize files in a folder tree:
Use meaningful folder hierarchies to organize your analysis:

Version Control

Shared projects provide full version control capabilities.

File Versioning

Each save creates a new version:
Version History:

Check-Out Model

Shared projects use an exclusive check-out model:
1

Request Check-Out

User requests exclusive write access to a file
2

Make Changes

User modifies the checked-out file locally
3

Check In

User commits changes back to the repository
Check-Out States:
  • Not Versioned - Local file, no repository
  • Checked In - Latest version in repository
  • Checked Out (Exclusive) - User has write lock
  • Checked Out (Non-Exclusive) - Read-only checkout
  • Hijacked - Local changes on checked-in file

Merging Changes

When checking in files that are out of date:
Ghidra provides automatic and manual merge strategies:
  • Auto-merge - Combines non-conflicting changes
  • Manual merge - User resolves conflicts interactively
  • Keep file - Save pre-merge version as backup
From ghidra/framework/data/CheckinHandler.java

Project Views

Projects can include views of other projects:
Use Cases:
  • Reference shared libraries across projects
  • Access central data type archives
  • Compare related programs
  • Organize large analysis efforts
Project views are read-only. Changes must be made in the owning project.

Tool Management

Projects manage tool instances and configurations:
From ghidra/framework/model/ToolManager.java

Tool Templates

Templates define tool configurations:
Built-in Tools:
  • CodeBrowser - Primary analysis interface
  • VersionTracking - Compare program versions
  • FunctionGraphTool - Visualize control flow

Workspaces

Workspaces organize running tool windows:

Storage Implementation

Understanding the storage layer helps with troubleshooting and administration.

File System Types

Indexed File System (Current):
  • Uses ~index.dat for fast lookups
  • Supports large projects efficiently
  • Required for file count queries
Mangled File System (Legacy):
  • Encodes paths in file names
  • Slower for large projects
  • No file count support
From ghidra/framework/model/ProjectData.java:40-96

Database Files

Domain files are stored as database files:
Never manually modify files in the project directory. Always use Ghidra’s API or UI to manipulate domain files.

Project Lifecycle

Creating Projects

Closing Projects

From ghidra/framework/model/Project.java:108-111

Project Locking

Only one Ghidra instance can open a project at a time:
From ghidra/framework/data/ProjectLock.java

Repository Server

Shared projects connect to a Ghidra Server:

Server Architecture

  • Central Repository - Stores all versioned files
  • User Management - Authentication and access control
  • File Locking - Manages check-out/check-in
  • Event Notification - Notifies clients of changes

Repository Adapter

From ghidra/framework/client/RepositoryAdapter.java

Best Practices

  • Use descriptive project names
  • Create folder hierarchies for related files
  • Separate projects by architecture or product
  • Archive completed analysis projects
  • Check in frequently with meaningful comments
  • Review version history before checking in
  • Resolve conflicts promptly
  • Use keep files for major changes
  • Communicate with team about check-outs
  • Establish naming conventions
  • Share data type archives
  • Document analysis decisions
  • Keep project file counts reasonable
  • Clean up unused files
  • Backup regularly
  • Monitor repository connection status

Troubleshooting

If project won’t open due to lock:
  1. Ensure no other Ghidra instances are running
  2. Check for zombie processes
  3. Manually remove .lock file (use caution)
If repository connection fails:
  • Verify server address and port
  • Check firewall settings
  • Confirm user credentials
  • Test network connectivity
If merge fails:
  • Create a keep file
  • Manually merge in separate project
  • Check in resolved version

Next Steps

Programs

Learn about the program model

Analysis

Understand analysis workflows

Architecture

Explore framework architecture

Overview

Return to framework overview