A simple, powerful script to automate the installation of Ghidra as a native macOS application.
EasyGhidraInstaller is a bash script that makes it easy to install Ghidra (NSA's reverse engineering tool) on macOS. It handles everything from downloading the latest version to creating a proper macOS application bundle that integrates seamlessly with your dock.
Features:
- Downloads the latest version of Ghidra directly from the official source
- Extracts and sets up Ghidra in your Applications folder
- Creates a proper macOS application bundle (.app)
- Adds Ghidra to your dock for easy access
- Verifies Java dependencies and offers installation help
- Works on both Intel and Apple Silicon Macs
- macOS 10.15 or later
- Internet connection (if downloading Ghidra)
- Terminal access
- Administrator privileges
- Open Terminal
- Run the following command:
curl -fsSL https://raw.githubusercontent.com/yourusername/EasyGhidraInstaller/main/install.sh | bash- Clone this repository:
git clone https://github.com/yourusername/EasyGhidraInstaller.git- Make the script executable:
chmod +x EasyGhidraInstaller/easy-ghidra-installer.sh- Run the script:
./EasyGhidraInstaller/easy-ghidra-installer.shThe script provides several options:
-d, --download-only: Download Ghidra without installing-f, --force: Force reinstallation even if Ghidra is already installed-p, --path <path>: Specify a custom installation path-h, --help: Display help information-v, --version: Display version information
./easy-ghidra-installer.sh./easy-ghidra-installer.sh -p ~/Applications./easy-ghidra-installer.sh -fGhidra requires Java Development Kit (JDK) 17 or later. The script will check if you have Java installed and offer to install it via Homebrew if needed.
Ghidra runs on Apple Silicon Macs through the Rosetta 2 translation layer. The script automatically handles this for you.
If you encounter Java-related errors:
- Make sure you have JDK 17+ installed:
brew install openjdk@17- Set the JAVA_HOME environment variable in your
.zshrcor.bash_profile:
echo 'export JAVA_HOME=$(/usr/libexec/java_home)' >> ~/.zshrc
source ~/.zshrcIf you encounter permission errors:
sudo ./easy-ghidra-installer.shIf Ghidra won't open due to security settings:
- Go to System Preferences > Security & Privacy > General
- Click "Open Anyway" for Ghidra
- Try launching Ghidra again
To uninstall Ghidra and remove all related files:
./easy-ghidra-installer.sh --uninstallContributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- The National Security Agency (NSA) for creating Ghidra
- All contributors who have helped improve this installer
This project is not affiliated with or endorsed by the NSA or the Ghidra project. Use at your own risk.