Ghidra RE
Use this skill for repeatable, headless-first Ghidra work on macOS or Windows. It assumes:
- Ghidra install:
- macOS:
/Applications/Ghidra - Windows:
/c/Program Files/Ghidra - JDK:
- macOS:
/opt/homebrew/opt/openjdk@21/libexec/openjdk.jdk/Contents/Home - Windows:
/c/Program Files/Eclipse Adoptium/jdk-21 - Workspace root:
~/ghidra-projects - Skill root — resolve this first before running any script (see below)
The skill is host-agnostic. Every script under scripts/ resolves its own root from $BASH_SOURCE, so there is no hardcoded install location. The unified host layer lives in scripts/lib/skill_host.sh and is the single source of truth for Codex vs Claude Code install paths. Use scripts/install_skill --host auto|codex|claude|both to copy the checkout into one or more hosts.
Resolving the Skill Root
Before running any scripts/ command, resolve SKILL_ROOT with this one-liner. It checks the standard install locations first, then searches Claude Code's plugin directory as a fallback — covering every load path automatically:
SKILL_ROOT="$(
for p in \
"${CODEX_HOME:-$HOME/.codex}/skills/ghidra-re" \
"${CLAUDE_HOME:-$HOME/.claude}/skills/ghidra-re"; do
[[ -f "$p/SKILL.md" ]] && printf '%s' "$p" && break
done
)" ; [[ -z "$SKILL_ROOT" ]] && SKILL_ROOT="$(
find "$HOME/Library/Application Support/Claude/local-agent-mode-sessions/skills-plugin" \
-maxdepth 5 -name 'SKILL.md' -path '*/ghidra-re/SKILL.md' 2>/dev/null \
| head -1 | xargs -I{} dirname {}
)"
echo "Skill root: $SKILL_ROOT"
Once set, prefix every scripts/ call with "$SKILL_ROOT/":
"$SKILL_ROOT/scripts/bootstrap"
"$SKILL_ROOT/scripts/ghidra_import_analyze" <binary> [project_name]
Known root paths (for reference — use the discovery snippet above rather than hardcoding):
~/.codex/skills/ghidra-re— OpenAI Codex standard install~/.claude/skills/ghidra-re— Claude Code standard install viainstall_skill~/Library/Application Support/Claude/local-agent-mode-sessions/skills-plugin/.../skills/ghidra-re— Claude Code plugin install (UUID subdirectories vary per machine)
V1 is optimized for Apple Mach-O reversing and dyld-extracted binaries. It now includes a localhost GUI bridge extension for live inspection, annotation, and controlled program surgery inside open Ghidra sessions, plus mission workspaces for multi-target investigation across frameworks, daemons, and helpers.
The custom automation scripts ship as Java Ghidra scripts because that is the most reliable headless path on this machine.
On Windows, the public repo now also ships a native PowerShell wrapper layer in powershell/ for people who want first-class PowerShell commands instead of starting in Git Bash.
Quick Start
All
scripts/paths below are relative to$SKILL_ROOT. Run the discovery snippet in "Resolving the Skill Root" first, then prefix every command with"$SKILL_ROOT/".
- On a fresh machine, run
"$SKILL_ROOT/scripts/bootstrap"once. - If bootstrap cannot find Ghidra or Java 21, run
"$SKILL_ROOT/scripts/doctor". - On Windows, if the targets live in a mounted or extracted macOS image, register that source first:
scripts/ghidra_source_add mac-image root=/d/macos-root platform=macos-image copy=cache
- Start a multi-target mission when the task spans more than one framework, daemon, or helper:
scripts/ghidra_mission_start <mission_name> goal=... target=... [target=...] [seed=...]
- Extend the mission with a seed-driven trace:
scripts/ghidra_mission_trace <mission_name> seed=<kind:value>
- For a more autonomous pass, let the mission keep driving its own next hops:
scripts/ghidra_mission_autopilot <mission_name> [rounds=3]
- Read the mission report:
scripts/ghidra_mission_report <mission_name>scripts/ghidra_mission_report <mission_name> format=casefile
- Finish the mission and close its live Ghidra sessions unless you explicitly keep them open:
scripts/ghidra_mission_finish <mission_name>
- For a single target, import and analyze into a dedicated project:
scripts/ghidra_import_analyze <binary|source:name:/path/in/image> [project_name]
- Export the default Apple-focused bundle:
scripts/ghidra_export_apple_bundle <project_name> <program_name>
- For Swift-heavy Apple targets, resolve
_OUTLINED_FUNCTION_*stubs before exporting or decompiling — this is essential for any dyld-extracted binary (WorkflowKit, BackgroundTaskAgent, etc.) where the Swift compiler outlined ARC/copy/move helpers:
"$SKILL_ROOT/scripts/ghidra_resolve_swift_outlined" <project_name> <program_name> [dry_run=true] [inline=false] [skip_stubs=true] [scan_fun_stubs=true] [second_pass=true] [build_authstub_map=true] [cache_path=<path>]- Pass
build_authstub_map=trueto resolve auth stubs to real symbol names (e.g.outlined$authstub$swift_retain) using the live dyld shared cache. Requires macOS with the system cache at its default location orcache_path=override. Adds ~30 s for the map build step. - Re-export the Apple bundle afterwards to get updated function names in the inventory.
- To build or refresh the map separately (e.g. before a batch run):
scripts/ghidra_build_authstub_map <project_name> <program_name>
- Generate a surface-level report before chasing individual mangled symbols:
scripts/ghidra_swift_surface_report <project_name> <program_name> [query] [format=json|markdown]scripts/ghidra_describe_swift_type <project_name> <program_name> <TypeName>
- Export the bug-hunt bundle only when the task is explicitly bug hunting or boundary triage:
scripts/ghidra_export_bug_hunt_bundle <project_name> <program_name>
- Generate a function dossier for a top candidate:
scripts/ghidra_function_dossier <project_name> <program_name> <function_or_address>
- Apply a finding back into the project when you confirm something interesting:
scripts/ghidra_apply_finding <project_name> <program_name> function=... title=... comment=...
- Run an extra script when needed:
scripts/ghidra_run_script <project_name> <program_name> <script_name> [script args...]
- Record any friction or missing-feature notes through the shared notes flow before you wrap up the session:
scripts/ghidra_notes_add title=... body=... category=workflowscripts/ghidra_notes_statusscripts/ghidra_notes_open_shared
- Open the project in the GUI:
scripts/ghidra_open_gui <project_name> [program_name]
- Arm or reuse the live bridge when you want an interactive RE loop:
scripts/ghidra_bridge_open <project_name> [program_name]
- Use the live bridge wrappers for inspection or edits:
scripts/ghidra_bridge_current_contextscripts/ghidra_bridge_snapshotscripts/ghidra_bridge_analyze_target <query>scripts/ghidra_bridge_decompile_currentscripts/ghidra_bridge_functions_search <query>scripts/ghidra_bridge_selector_trace <selector>scripts/ghidra_bridge_swift_search <type_or_method>scripts/ghidra_bridge_swift_type <TypeName>scripts/ghidra_bridge_xrefsscripts/ghidra_bridge_rename ...scripts/ghidra_bridge_comment ...scripts/ghidra_bridge_patch_bytes ...scripts/ghidra_bridge_patch_instruction ...
- Use the dyld-aware macOS import helper when a framework path comes from a live system image or extracted source root:
scripts/ghidra_import_macos_framework </System/.../Framework.framework/Framework> [project_name] [copy=cache|direct] [source=<name>]
- Build a one-file macOS share bundle when you want to hand the skill and Ghidra to another desktop:
scripts/build_mac_desktop_share_package [output_zip]
- Build a one-file Windows share bundle when you want easy installation on a Windows machine:
scripts/build_windows_desktop_share_package [output_zip] [--ghidra-zip /path/to/ghidra.zip]
- On Windows, optionally import the native module after install:
Import-Module GhidraReGet-GhidraReBridgeSessionsStart-GhidraReMission -Name win_trace -Goal 'Trace a subsystem' -Target 'source:mac-image:/System/.../WorkflowKit'
- Run the explicit polish pass before serious testing or publishing:
scripts/ghidra_polish_release [mode=quick|release]
Default Workflow
1) Import into the dedicated workspace
- First-use bootstrap writes machine-local config to
~/.config/ghidra-re/config.env. - Projects live under
~/ghidra-projects/projects/<project_name>/. - Exports live under
~/ghidra-projects/exports/<project_name>/<program_name>/. - Logs live under
~/ghidra-projects/logs/<project_name>/. - Multi-target investigation workspaces live under
~/ghidra-projects/investigations/<mission_name>/. - Source-backed imports are cached under
~/ghidra-projects/sources/<source_name>/by default when you usesource:name:/path. - Prefer explicit project names for reusable work. If omitted, the import wrapper derives one from the binary basename.
- On Windows, the PowerShell module resolves the installed skill root automatically from
CODEX_HOME,CLAUDE_HOME,~/.codex/skills/ghidra-re, or~/.claude/skills/ghidra-re, then forwards to the same script surface regardless of which host loaded the skill.
2) Use missions for cross-target work
- Prefer
scripts/ghidra_mission_startwhenever the question spans multiple frameworks, daemons, or XPC helpers. - Mission workspaces keep:
mission.jsongraph.sqliteexports/reports/latest.mdreports/latest.json- Mission runs are notes-only by default. They do not rename symbols, comment programs, or patch bytes unless you explicitly call the existing write wrappers outside the mission flow.
scripts/ghidra_mission_traceuses the investigation graph first, then live bridge helpers likefunctions/search,analyze/target, andselector-trace.scripts/ghidra_mission_autopilotextends that loop by choosing the next seed from configured seeds, graph-derived suggestions, and recent analysis notes, then capturing a live bridge snapshot back into the mission artifacts.- Autopilot seed ranking now prefers higher-signal graph functions, configured seeds, current-hypothesis targets, and preferred targets that have not been explored yet.
scripts/ghidra_mission_finishis the default closeout path. It renders the report, records the closeout in the mission metadata, and closes the mission's bridge-managed Ghidra sessions unlesskeep_sessions_open=true.scripts/ghidra_mission_finishcan also forward a discovered workflow-friction note into the shared GitHub-backed notes backlog withshared_note_title=...andshared_note_body=....- Finished missions now also emit
reports/casefile.mdandreports/casefile.jsonas a cleaner analyst closeout bundle.
3) Resolve Swift outlined functions (Swift-heavy binaries only)
- For any dyld-extracted or Swift-heavy binary, run
scripts/ghidra_resolve_swift_outlinedbefore exporting or decompiling. This renames 3,000–4,000 anonymous_OUTLINED_FUNCTION_*stubs to descriptive names (outlined$argshuffle$,outlined$pactail$swift_retain$,outlined$loadglobal$,outlined$authstub$, etc.) and marks pure ARC helpers as inline. Without this, the decompiler output for any Swift method that calls retain/release is dominated by opaque_OUTLINED_FUNCTION_0()calls that hide the real control flow. - Re-run
scripts/ghidra_export_apple_bundleafterwards to regenerate the function inventory with updated names. - The script runs in two passes by default (
second_pass=true): the main pass renames_OUTLINED_FUNCTION_*, anonymousFUN_*auth stubs (scan_fun_stubs=true), and existingoutlined$misc$stubs ≤32 bytes that the expanded classifier can now better categorize. The second pass re-resolves pactail branch-target names using the now-renamed callees. This is important for dyld-extracted binaries where the__stubsregion is namedFUN_*instead of_OUTLINED_FUNCTION_*by Ghidra. - Categories:
argshuffle,pactail(PAC-guarded tail call — callee name embedded when resolved),loadglobal,loadmov,compare,pacsign,authstub(named by GOT slot address in dyld extracts, or by actual symbol name whenauthstub_map.jsonis present — e.g.outlined$authstub$swift_retain),helper(small 1–16 instruction ret/b helper, ≤64 bytes; marked inline),callwrap(single-bl wrapper with callee name embedded, e.g.callwrap$swift_getEnumTagSinglePayload; marked inline), andmisc(>64 bytes or unusual terminal — genuinely complex, left as-is). Only ~12 misc remain in WorkflowKit after a full pass. authstub_map.jsonis built byscripts/ghidra_build_authstub_map(also invoked automatically whenbuild_authstub_map=trueis passed toghidra_resolve_swift_outlined). It parses the live dyld shared cache — including all split sub-cache.dylddatafiles — decodes PAC-tagged GOT slot pointers, looks up target symbols viadyld_info -exports, and batch-demangling withxcrun swift-demangle. Achieves ~99% resolution on WorkflowKit (1899/1920 stubs). The resulting file is auto-discovered byResolveSwiftOutlined.javaon subsequent headless runs.
4) Use the Apple export bundle
- Run
scripts/ghidra_export_apple_bundleafter import unless the user only wants a narrow script run. - The bundle runs
DemangleAllScript.javaand then exports: program_summary.jsonobjc_metadata.jsonswift_metadata.jsonfunction_inventory.jsonsymbols.jsonstrings.jsonobjc_metadata.jsonnow includes interface-quality class buckets, categories, class refs, selector refs, protocol refs, selector strings, and recovered protocol names so ObjC-heavy Apple frameworks can be followed without reopening Ghidra immediately.swift_metadata.jsonnow includes:- demangled/raw Swift symbol pairs
- a stable alias map
- metadata-section summaries for
__swift5_*blocks - async-like entries, metadata accessors, protocol conformance hints, and dispatch-thunk tagging
- Set
GHIDRA_EXPORT_DEMANGLE=0when you want a faster or quieter export pass without the blanket demangle step. - For Swift-heavy frameworks, prefer
scripts/ghidra_swift_surface_reportbefore ad hocfunctions/searchcalls so you start from grouped types/methods instead of raw mangled names.
5) Use targeted scripts for follow-up
- Run
scripts/ghidra_export_bug_hunt_bundlewhen the task is bug hunting, boundary analysis, or userland trust-boundary triage. - Use
scripts/ghidra_function_dossieron the top-ranked candidate paths before decompiling functions ad hoc. - For ObjC-heavy frameworks, start with
scripts/ghidra_objc_surface_report, then drill intoscripts/ghidra_describe_objc_class,scripts/ghidra_describe_objc_protocol,scripts/ghidra_describe_selector,scripts/ghidra_trace_classref, andscripts/ghidra_objc_message_flowwhen you need a more useful selector-level flow view. - Use
scripts/ghidra_apply_findingonly when you want to write comments, bookmarks, or renames back into the project. - Use
scripts/ghidra_notes_addwhenever the workflow exposes missing features, confusing outputs, or repetitive manual steps. The GitHub-backed shared issue is now the canonical community backlog;references/use-case-driven-notes.mdis legacy/reference-only. DecompileFunction.javafor on-demand decompilationExportXrefs.javafor targeted xref tracingExportAppleBundle.javawhen you want the full structured export outside the convenience wrapper
6) Use the live bridge for iterative GUI sessions
- Prefer the live bridge whenever the target is already open or the task will involve repeated
search -> navigate -> decompile -> refsloops. - Prefer headless exports for wide scans, batch bundles, or cold-start project setup; switch to the bridge once you want a tighter interactive loop.
scripts/bootstrapinstalls the bridge extension into the user's Ghidra settings when possible.- If Ghidra was already running before the install, restart it once or run
EnableCodexBridge.javafrom the GUI Script Manager. - The bridge now keeps a real multi-session registry under
~/.config/ghidra-re/bridge-sessions/and a compatibility pointer at~/.config/ghidra-re/bridge-current.json. scripts/ghidra_bridge_openandscripts/ghidra_bridge_armwrite per-request files under~/.config/ghidra-re/bridge-requests/, first give an already-running Ghidra session a chance to consume them, and only then launch a detached GUI session if needed.- Use
scripts/ghidra_bridge_sessionsto list live sessions andscripts/ghidra_bridge_selectto change the default target. - On macOS, detached launches use a hidden
screenkeeper session so Ghidra survives after the launcher command exits and the bridge remains usable across the rest of the Codex session. - Cross-project arms are supported: a running
bsr_smokesession can ignore aworkflowkit_bug_smokerequest while a newly launched WorkflowKit instance consumes the same request file and becomes another live session. scripts/ghidra_bridge_callis the raw HTTP wrapper; prefer the convenience wrappers for common tasks.scripts/ghidra_bridge_opennow waits until both/healthand/sessionsucceed before it returns, so a reported armed bridge is immediately queryable.scripts/ghidra_bridge_snapshotcaptures the current live session, function, decompile, references, and variables in one machine-readable artifact for later ingestion or notes.- Bridge snapshots now try to resolve the containing function from the current address, so mid-function cursor positions still produce a useful decompile/references bundle.
- Most live bridge wrappers accept optional
session=<id>,project=<name>, orprogram=<name>selectors. - Prefer
project=orsession=when duplicate live targets share the sameprogram_name. scripts/ghidra_bridge_swift_searchcombines the live bridge session with the latest export bundle so type or method queries can resolve through stable aliases and thunk/canonical addresses.scripts/ghidra_bridge_swift_typeaggregates grouped Swift type context, related strings, ObjC bridge names, metadata accessors, and the best live-analysis target when one is available.- Mutating bridge calls require
write=true; destructive bridge calls also requiredestructive=true. - The PowerShell module mirrors the most common source, mission, and bridge commands with
Verb-GhidraRe*functions for Windows-first usage.
Command Surface
Run these wrappers from the skill directory:
scripts/ghidra_import_analyze <binary> [project_name]scripts/ghidra_import_macos_framework </System/.../Framework.framework[/Framework]> [project_name] [copy=cache|direct] [source=<name>]scripts/ghidra_run_script <project_name> <program_name> <script_name> [script args...]scripts/ghidra_export_apple_bundle <project_name> <program_name>scripts/ghidra_resolve_swift_outlined <project_name> <program_name> [dry_run=true] [inline=false] [skip_stubs=true] [scan_fun_stubs=true] [second_pass=true] [verbose=true] [build_authstub_map=true] [cache_path=<path>]scripts/ghidra_build_authstub_map <project_name> <program_name>— build/refreshauthstub_map.jsonfrom the live dyld shared cachescripts/ghidra_build_isa_map <project_name> <program_name>— build/refreshisa_map.jsonfor ObjC runtime isa resolution during LLDB tracingscripts/ghidra_lldb_symbols <binary_path> [<project_name> <program_name>]— static symbol inventory via LLDB (ObjC methods, trampolines, etc.)scripts/ghidra_lldb_trace <project_name> <program_name> launch_cmd=<bin> symbols=<syms> [max_hits=100] [timeout=30] [capture_args=true] [capture_backtrace=false] [capture_objc_args=true]— runtime breakpoint trace, captures arg registers and optional ObjC self/selector context
11b. For runtime analysis of binaries you can launch or attach to, use the LLDB integration tools:
scripts/ghidra_lldb_symbols <binary_path> [<project_name> <program_name>]— extract the full symbol table (ObjC methods, trampolines, data symbols) from a Mach-O binary in 0.7 s using LLDB's static module loading. No process needed. Outputslldb_symbols.json.scripts/ghidra_build_isa_map <project_name> <program_name>— extract concrete_OBJC_CLASS_$_...and_OBJC_METACLASS_$_...addresses fromsymbols.jsonand saveisa_map.jsonbeside the export bundle. Use this before isa-aware LLDB traces so capturedobjc_isavalues can be resolved offline.scripts/ghidra_lldb_trace <project_name> <program_name> launch_cmd=<binary> symbols=<sym1,sym2> [max_hits=100] [timeout=30] [capture_args=true] [capture_backtrace=false] [capture_objc_args=true]— run a binary under LLDB with breakpoints, capturing argument registers (x0-x7), optional backtraces, and when enabled,self_ptr,objc_isa, resolvedself_class, and selector cstrings fromx1. Outputslldb_trace_<timestamp>.json.capture_objc_args=trueauto-enables isa capture and tries to build/loadisa_map.jsonfrom the export bundle. If the export bundle is unavailable, tracing still runs and records rawobjc_isa/ selector pointers when possible.- For
attach_name=<process>, LLDB's--waitforattaches only after the process appears, but the wrapper's timeout countdown starts immediately. Use a generous timeout for event-driven targets, start the trace first, then trigger the shortcut or app action right away. - LLDB trace works on any binary you compile or own. For system framework analysis, compile a Swift/ObjC test harness that exercises the code path of interest.
scripts/ghidra_swift_surface_report <project_name> <program_name> [query] [format=json|markdown]scripts/ghidra_describe_swift_type <project_name> <program_name> <type_query>scripts/ghidra_objc_surface_report <project_name> <program_name> [format=json|markdown]scripts/ghidra_describe_objc_class <project_name> <program_name> <class_name>scripts/ghidra_describe_objc_protocol <project_name> <program_name> <protocol_name>scripts/ghidra_describe_selector <project_name> <program_name> <selector>scripts/ghidra_trace_classref <project_name> <program_name> <class_name>scripts/ghidra_objc_message_flow <project_name> <program_name> <selector> [class=<ClassName>]scripts/ghidra_export_bug_hunt_bundle <project_name> <program_name>scripts/ghidra_function_dossier <project_name> <program_name> <function_or_address>scripts/ghidra_apply_finding <project_name> <program_name> <key=value args...>scripts/ghidra_open_gui <project_name> [program_name]scripts/ghidra_bridge_buildscripts/ghidra_bridge_installscripts/ghidra_bridge_arm <project_name> [program_name]scripts/ghidra_bridge_open <project_name> [program_name]scripts/ghidra_bridge_close [session=<id>|project=<name>|program=<name>]scripts/ghidra_bridge_close_all [mission=<name>] [all=true]scripts/ghidra_bridge_disarmscripts/ghidra_bridge_sessionsscripts/ghidra_bridge_select session=<id>|project=<name>|program=<name>scripts/ghidra_bridge_statusscripts/ghidra_bridge_call <endpoint> [json_body]scripts/ghidra_bridge_current_contextscripts/ghidra_bridge_snapshot [key=value ...]scripts/ghidra_bridge_analyze_target <query> [key=value ...]scripts/ghidra_bridge_decompile_current [key=value ...]scripts/ghidra_bridge_functions_search <query> [key=value ...]scripts/ghidra_bridge_swift_search <type_or_method> [key=value ...]scripts/ghidra_bridge_swift_type <TypeName> [key=value ...]scripts/ghidra_bridge_selector_trace <selector> [key=value ...]scripts/ghidra_bridge_xrefs [key=value ...]scripts/ghidra_bridge_rename key=value ...scripts/ghidra_bridge_comment key=value ...scripts/ghidra_bridge_apply_signature key=value ...scripts/ghidra_bridge_apply_type key=value ...scripts/ghidra_bridge_patch_bytes <address> <hex_bytes>scripts/ghidra_bridge_patch_instruction <address> <assembly>scripts/ghidra_bridge_clear_listing <start> [end] [mode]scripts/ghidra_bridge_disassemble <start> [end]scripts/ghidra_bridge_create_function <entry> [name] [end]scripts/ghidra_bridge_delete_function <function_or_address>scripts/ghidra_bridge_create_data <address> <datatype>scripts/ghidra_bridge_delete_data <address> [end]scripts/ghidra_source_add <name> root=<path> [platform=macos-image] [copy=cache|direct]scripts/ghidra_source_listscripts/ghidra_source_resolve <name> </path/in/image> [copy=cache|direct]scripts/ghidra_mission_start <mission_name> goal=... target=... [target=...] [seed=...]scripts/ghidra_mission_status <mission_name>scripts/ghidra_mission_trace <mission_name> seed=<kind:value> [target=project:program]scripts/ghidra_mission_report <mission_name> [format=markdown|json|path]scripts/ghidra_mission_report <mission_name> [format=markdown|json|path|casefile|casefile-path]scripts/ghidra_mission_autopilot <mission_name> [rounds=3] [seed=<kind:value>] [target=project:program]scripts/ghidra_mission_finish <mission_name> [all=true] [keep_sessions_open=true]scripts/ghidra_notes_add title=... body=... [category=workflow] [target=...]scripts/ghidra_notes_syncscripts/ghidra_notes_pullscripts/ghidra_notes_statusscripts/ghidra_notes_remediate fingerprint=... [summary=...]scripts/ghidra_notes_open_shared [browse=true]scripts/bootstrap [--skip-smoke-test]scripts/doctorscripts/ghidra_polish_release [mode=quick|release]scripts/build_share_package [output_zip]scripts/build_mac_desktop_share_package [output_zip] [--without-ghidra-payload]scripts/build_windows_desktop_share_package [output_zip] [--ghidra-zip /path/to/ghidra.zip]powershell/GhidraRe.psd1andpowershell/GhidraRe.psm1for native Windows PowerShell wrappersscripts/ghidra_polish_releasefor the explicit pre-test release/polish pass
Script argument style
- Prefer
key=valuearguments because they are robust underanalyzeHeadless. - The wrapper also accepts
--key valueand rewrites it tokey=value. - Set
GHIDRA_IMPORT_DEMANGLE=0to skip the default import-time demangle pass. - Examples:
scripts/ghidra_run_script bsr_smoke BackgroundShortcutRunner DecompileFunction.java function=-[WFBackgroundShortcutRunner runWorkflowWithDescriptor:request:inEnvironment:runningContext:completion:] output=/tmp/wf_runner.cscripts/ghidra_run_script bsr_smoke BackgroundShortcutRunner ExportXrefs.java --symbol _objc_msgSend --output /tmp/objc_msgsend_xrefs.json
Built-ins Vs Custom Scripts
- Prefer the custom scripts in
scripts/ghidra_scripts/for structured exports and repeatable output. - The main custom scripts are:
ExportAppleBundle.javaExportEntrypoints.javaExportSinks.javaTriageBugPaths.javaExportFunctionDossier.javaApplyFinding.javaDecompileFunction.javaExportXrefs.java- Prefer built-in scripts only when they already solve the job cleanly.
- Safe default built-in:
DemangleAllScript.java- Built-ins that are often useful but context-sensitive:
SwiftDemanglerScript.javaMachO_Script.java- Built-ins that are less suited to headless automation because they prompt or assume a GUI cursor:
ExportFunctionInfoScript.java
Use scripts/ghidra_run_script for both built-ins and custom scripts. It adds the custom script directory and the common built-in Ghidra script directories to -scriptPath.
References
Read only what you need:
- Apple Mach-O notes and common targets:
references/apple-macho-notes.md - Output files and schemas:
references/output-files.md - Bridge session and operation-log notes:
references/output-files.md - Bug-hunt output bundle details:
references/bug-hunt-outputs.md - Bug-hunt heuristics and categories:
references/bug-hunt-patterns.json - Built-in script caveats:
references/builtins.md - Use-case-driven skill improvement notes: shared via the GitHub-backed notes commands above;
references/use-case-driven-notes.mdis legacy/reference history inside the repo