How jeongjy0317/ghidra-paradise works
1. Project shape
- This is a Ghidra extension written in Java and built with Gradle/Ghidra’s extension build system.
- The repo is centered around a single plugin package, paradise, which adds UI surfaces and analysis helpers on top of Ghidra’s decompiler and program model.
2. Top-level integration boundary
- ParadisePlugin is the main entry point into Ghidra.
- It wires menu actions, hotkeys, settings, exports, and opens the different dockable providers.
- The plugin is the boundary between Ghidra’s Program/Decompiler APIs and the Paradise-specific UI/analysis layer.
3. Decompiler/pseudocode subsystem
- ParadiseDecompilerProvider owns the main pseudocode experience: the decompiled text view, tabs for xrefs/locals/trace/calls/strings/diff/drafts/suggestions/triage/cleanups, and navigation behavior.
- ParadiseDecompilerEngine wraps Ghidra’s decompilation interface and applies the “Clean C” display/export transformation pass.
- This subsystem consumes decompiler output and produces a more review-friendly C-like presentation, but does not mutate Ghidra’s database unless the user explicitly performs an edit action.
4. Clean-up and display transformation flow
- The engine is responsible for deterministic cleanup rules such as type aliasing, wrapper cleanup, stack-canary simplification, cast/literal simplification, and other readability passes.
- The same cleanup path is used for both on-screen pseudocode and export output, so the view and exported code stay consistent.
- ParadiseDecompileResult likely carries the decompiler text plus cleanup metadata used by the UI and the Cleanups tab.
5. Diagram/graph subsystem
- ParadiseGraphProvider implements the IDA-like control-flow diagram experience.
- It is a separate dockable surface for function or binary diagrams, including block/edge annotations and export.
- This subsystem sits beside the decompiler view rather than replacing it; both are alternative renderings of the same underlying program/function data.
6. Inspector / finding scan subsystem
- ParadiseFindProvider is the dockable “Inspector” window for URL/path/registry/shell/executable-launch review.
- ParadiseFindScanner performs the actual scan over a function or whole binary, including decoded-string matching.
- The scanner outputs structured rows such as ParadiseXrefRow, and the provider renders overview/detail tabs, filters, merge/count behavior, and navigation back to the source location.
7. Encoding and string analysis helpers
- ParadiseDecodeUtil handles decoding workflows for things like Base64, hex, URL percent encoding, Base32, UTF-16LE, and UTF-16BE.
- ParadiseStringUtil supports string discovery/rendering and is used by the pseudocode string tabs and Inspector paths.
- ParadiseTokenSpan and related helpers support mapping text ranges/tokens back to source positions for highlighting, search, and navigation.
8. Cross-reference and navigation model
- ParadiseXrefRow represents xref table rows used in the pseudocode analysis tabs and navigation UI.
- The architecture emphasizes jumping between three coordinate systems: listing address, decompiler token/line, and derived analysis row.
- This is how features like “Goto usage,” “Follow token,” and synchronized selection work across views.
9. UI and state model
- The extension is heavily UI-driven: dockable providers, tabbed analysis panels, context menus, local toolbar buttons, and settings pages.
- ParadisePluginPackage groups the plugin for Ghidra’s extension packaging and module metadata.
- Settings control what tabs are visible, how cleanup behaves, how Inspector rows are merged/rendered, and how navigation hotkeys and layout behave.
10. Core data flow
- Source program data starts in Ghidra’s current Program and Function.
- The plugin triggers decompilation, which flows through the engine into pseudocode/diagram providers.
- String and token data are then analyzed by the decode and find subsystems, producing structured findings that are rendered in separate analysis tabs and the Inspector window.
- Navigation loops back into Ghidra’s listing/decompiler through address and token selection.
11. Mutability boundary
- A key design constraint is that Paradise is primarily a read/inspect/review layer.
- Cleanup transforms, decoded views, and exported code are display/export-oriented.
- Actual Ghidra database mutations are kept behind explicit user actions like rename, type change, or comment actions.
12. Packaging/runtime
- The extension targets Ghidra 12.1 and a JDK compatible with that Ghidra installation.
- Build output is a Ghidra extension ZIP, installed through Ghidra’s extension manager.
- There are no separate backend services or external runtime components; everything runs inside the Ghidra desktop application process.
Main entry points: ParadisePlugin.java ParadisePlugin · ParadiseDecompilerProvider.java Decompiler view · ParadiseFindScanner.java Find scanner · ParadiseDecompilerEngine.java Clean engine
Components 13
Ghidra boundary
Plugin entry point and extension packaging that connect Paradise into Ghidra.
- ParadisePlugin · Main Ghidra plugin entry point. Wires actions, hotkeys, settings, exports, and opens the major Paradise views.
src/main/java/paradise/ParadisePlugin.java - Plugin package · Ghidra plugin package metadata and registration hook for the extension.
src/main/java/paradise/ParadisePluginPackage.java
UI surfaces
Dockable providers and interactive review panels.
- Decompiler view · Primary pseudocode surface with tabs for xrefs, locals, trace, calls, strings, diffs, drafts, suggestions, triage, and cleanups.
src/main/java/paradise/ParadiseDecompilerProvider.java - Graph view · IDA-like control-flow diagram surface for function and binary review, with annotations and export.
src/main/java/paradise/ParadiseGraphProvider.java - Inspector · Dockable finding browser for URLs, paths, registry, shell, and executable-launch review.
src/main/java/paradise/ParadiseFindProvider.java
Analysis core
Decompiler cleanup, scanning, decoding, and shared analysis models.
- Clean engine · Wraps Ghidra decompilation and applies deterministic Clean C display/export transformations.
src/main/java/paradise/ParadiseDecompilerEngine.java - Decompile result · Carries decompiler text and cleanup metadata shared by the pseudocode UI and export paths.
src/main/java/paradise/ParadiseDecompileResult.java - Find scanner · Scans a function or whole binary for review targets, including decoded-string matching.
src/main/java/paradise/ParadiseFindScanner.java - Decode util · Decoding workflows such as Base64, hex, URL percent encoding, Base32, and UTF-16 variants.
src/main/java/paradise/ParadiseDecodeUtil.java - String util · String discovery and rendering helpers used by pseudocode string tabs and inspection paths.
src/main/java/paradise/ParadiseStringUtil.java - Token span · Maps text ranges and tokens back to source positions for highlighting and navigation.
src/main/java/paradise/ParadiseTokenSpan.java - Xref row · Structured cross-reference row used by analysis tabs and navigation views.
src/main/java/paradise/ParadiseXrefRow.java
Build
Gradle-based extension build and module metadata.
- Gradle build · Gradle and Ghidra extension build configuration for producing the installable ZIP.
build.gradle
Connections 16
- ParadisePlugin → Decompiler view: opens · Plugin creates and coordinates the main pseudocode surface.
- ParadisePlugin → Graph view: opens · Plugin exposes the diagram surface as an alternative rendering.
- ParadisePlugin → Inspector: opens · Plugin exposes the Inspector window for review workflows.
- ParadisePlugin → Clean engine: wires · Plugin routes program/function context into the decompilation pipeline.
- ParadisePlugin → Plugin package: registers · Package metadata makes the extension visible to Ghidra.
- Decompiler view → Clean engine: requests · Decompiler UI asks the engine for cleaned pseudocode output.
- Clean engine → Decompile result: produces · Engine returns cleaned text plus metadata for display and export.
- Decompiler view → Token span: highlights · UI uses token spans to sync selection, search, and navigation.
- Decompiler view → Xref row: shows · Decompiler tabs render cross-reference and analysis rows.
- Inspector → Find scanner: runs · Inspector delegates function or binary scans to the scanner.
- Find scanner → Decode util: decodes · Scanner uses decoding workflows to resolve encoded indicators.
- Find scanner → String util: matches · Scanner reuses string discovery and rendering helpers.
- Find scanner → Xref row: emits · Scanner outputs structured findings as cross-reference rows.
- Graph view → Clean engine: shares data · Diagram view consumes the same underlying program/function context as decompilation.
- Graph view → Token span: navigates · Graph interactions synchronize with source positions where applicable.
- Gradle build → ParadisePlugin: packages · Build output assembles the plugin and its runtime classes into a Ghidra extension.