Overview
Version Tracking enables you to compare two versions of a program and automatically or manually propagate analysis from a previously analyzed “source” program to a newer “destination” program. This is essential when tracking software updates, patches, or different builds.Version Tracking helps preserve your reverse engineering work when analyzing updated versions of software by transferring function names, comments, data types, and other markup.
Core Concepts
Version Tracking Session
A Version Tracking session contains:- Source Program: Previously analyzed version with existing markup
- Destination Program: New version to receive analysis
- Matches: Corresponding code/data between programs
- Markup Items: Individual pieces of analysis to transfer
Sessions are saved to the Ghidra Project and can be shared via Ghidra Server with exclusive checkout (merge conflicts are not supported).
Workflow Components
Version Tracking Tool
The Version Tracking Tool consists of:Primary Components
Matches Table
Primary view showing all correlation matches with scores and status
Markup Items Table
Details of individual markup items for selected matches
Source Tool
CodeBrowser for the source program
Destination Tool
CodeBrowser for the destination program with apply capabilities
Toolbar Actions
Create Session
Create Session
Launch the Version Tracking Wizard to create a new session with two programs.
Add to Session
Add to Session
Run additional correlators on an existing session to find more matches.
Automatic Version Tracking
Automatic Version Tracking
Automatically create and accept the most likely matches based on confidence scores.
Creating a Session
Version Tracking Wizard
Specify Programs
Select source (analyzed) and destination (new) programs. Use swap button if reversed.
Run Preconditions
Execute validators to check for potential problems:
- Large differences in function counts
- Missing analysis in source program
- Architecture mismatches
Correlation Algorithms
Correlators find matches between source and destination programs:Exact Match Correlators
- Exact Function Bytes
- Exact Function Instructions
- Exact Function Mnemonics
Matches functions with identical bytes. Very high confidence.Use: First correlator to run—provides definitive matches
Symbol-Based Correlators
- Exact Symbol Name
- Symbol Name
Matches functions/data with identical symbol names.Use: Works well with non-stripped binaries
Structure-Based Correlators
- Combined Function and Data
- Data Reference
- Function Reference
Considers multiple factors: structure, references, and code patterns.Use: Comprehensive matching for moderate changes
Advanced Correlators
Duplicate Function Instructions
Duplicate Function Instructions
Handles multiple functions with same instruction patterns.
Manual Match
Manual Match
Create matches manually by selecting functions in both programs.
Working with Matches
Matches Table Columns
| Column | Description |
|---|---|
| Score | Correlation confidence (0.0 - 1.0) |
| Source | Address/name in source program |
| Destination | Address/name in destination program |
| Length | Function/data size |
| Type | Match type (Function, Data, Label) |
| Status | Available, Accepted, Rejected, Blocked |
| Algorithm | Correlator that found the match |
Match Actions
Accept Match
Confirm the match is correct, enabling markup transfer
Reject Match
Mark match as incorrect, preventing it from being used
Clear Match
Reset match status back to Available
Apply Markup
Transfer selected markup items to destination
Filtering Matches
Filter matches by:- Score threshold: Hide low-confidence matches
- Status: Show only accepted, available, or rejected
- Algorithm: View matches from specific correlators
- Match type: Filter by function, data, or label matches
Markup Items
Markup items represent individual pieces of analysis to transfer:Markup Types
- Function Names
- Labels
- Comments
- Data Types
- Function Signatures
- References
User-defined and imported function names
Applying Markup
Review Markup Items
Examine individual items in the Markup Items Table:
- Green checkmark: Can be applied
- Red X: Conflict exists
- Gray: Already applied or not applicable
Markup Items are only available after a match has been accepted. Available matches cannot transfer markup until accepted.
Auto Version Tracking
Automatic Version Tracking attempts to automatically create and accept matches:How It Works
- Runs a predetermined sequence of correlators
- Accepts matches above confidence threshold
- Applies markup for accepted matches
- Iterates until convergence or limits reached
Configuration
Minimum score to auto-accept matches
Minimum confidence score for acceptance
Maximum correlator iterations
Manual Matching
Create matches manually when correlators don’t find them:From Sub-Tools
Position Cursors
Place cursor on function in Source Tool and corresponding function in Destination Tool.
Session Management
Opening Sessions
- From Project
- Drag and Drop
Double-click session file (start-here icon) in Project Window.
Version Control
Sessions can be versioned using Ghidra Server repositories:Address Ranges and Filtering
Limiting Correlation Scope
When adding correlators to a session:Exclude Accepted Matches
Exclude Accepted Matches
Skip functions/data already matched to speed up correlation.Benefit: Greatly improves performance on large programs
Limit Address Ranges
Limit Address Ranges
Restrict correlation to specific memory regions:
- Use entire program
- Use current tool selection
- Specify custom address ranges
Advanced Features
Precondition Validators
Validators check for potential issues before correlation:- Function Count Validator: Warns if function counts differ significantly
- Data Type Validator: Checks for missing data type analysis
- Reference Validator: Verifies reference analysis quality
- Memory Validator: Compares memory layouts
Diff Details
View detailed differences for specific matches:- Select match in Matches Table
- View side-by-side comparison in Source/Destination Tools
- Examine byte-level differences
- Review decompiler output comparison
Undo/Redo
Version Tracking supports full undo/redo:- Accepting matches
- Applying markup
- Creating manual matches
- Rejecting matches
Best Practices
Analyze Source First
Ensure source program is fully analyzed before creating session
Run Correlators Incrementally
Start with exact matches, gradually add fuzzy correlators
Review Before Applying
Always review markup items before bulk application
Use Preconditions
Run validators to catch issues early
Save Frequently
Save session regularly during analysis
Exclude Accepted
Enable exclude option for faster subsequent correlations
Troubleshooting
Few Matches Found
Few Matches Found
Solutions:
- Verify both programs are analyzed
- Try additional correlator algorithms
- Check for code obfuscation or heavy refactoring
- Use manual matching for key functions
Markup Won't Apply
Markup Won't Apply
Causes:
- Match not accepted
- Conflicts with existing destination markup
- Incompatible data types
Session Won't Open
Session Won't Open
Checks:
- Verify exclusive checkout
- Ensure session is in active project
- Check that source/destination programs are available
- Confirm project repository access
Slow Correlation
Slow Correlation
Optimizations:
- Enable “Exclude accepted matches”
- Limit address ranges to relevant sections
- Run correlators incrementally
- Close unnecessary tools/windows
Source Code References
Menu Reference
File Menu
- New Session: Create new version tracking session
- Add to Session: Run additional correlators
- Auto Version Track: Run automatic matching
- Open Session: Open existing session
- Close Session: Close current session
- Save Session: Save changes to session
Edit Menu
- Undo/Redo: Revert or reapply actions
- Tool Options: Configure tool settings
- Reset Source and Destination Tools: Restore default tool layouts
Window Menu
Show/hide component windows:- Matches Table
- Markup Items Table
- Function Associations
- And other available views
Next Steps
Program Diff
Compare programs side-by-side without version tracking
Ghidra Server
Share sessions with team via collaborative server
