Custom Code/Setting up Ghidra: Difference between revisions

From Zenith
Jump to navigation Jump to search
Content added Content deleted
mNo edit summary
m (→‎Requirements: java version)
Line 5: Line 5:
=== Requirements ===
=== Requirements ===


* Java
* Java 11+


=== Steps ===
=== Steps ===

Revision as of 03:54, 28 September 2021

Ghidra is an open source reverse-engineering tool developed by the NSA. It is extremely useful for studying the code of New Super Mario Bros. U to help with creating custom code for it.

Installation

Requirements

  • Java 11+

Steps

  1. Download Ghidra v9.1-BETA_DEV from here.
  2. Extract it to a new folder of your choice. The directory that contains ghidraRun.bat will now be called "GhidraDir" from now on.
  3. Download the Gekko Broadway language definitions from here and copy all the files from data/languages to GhidraDir/Ghidra/Processors/PowerPC/data/languages/.
  4. Download GhidraRPXLoader from here and extract the zip to GhidraDir/Ghidra/Extensions/.

Importing the RPX

Requirements

  • New Super Mario Bros. U RPX (USv1.3.0 recommended)

Steps

  1. Run ghidraRun.bat and go to File->New Project.
  2. Select Non-Shared and give your project a name and a directory.
  3. Go to File->Import File and select your RPX. Make sure that the settings are as follows:
  4. Click ok and wait for the file to finish importing. Double click on the RPX in the Ghdira project and it should open the CodeBrowser
  5. It will ask you if you would like to analyze the file. Click yes and in the menu that shows up, disable Non-Returning Functions - Discovered, and click on the Demangle option and check the box on the right that says Only Demangle Known Mangled Symbols.
  6. Click analyze and wait for it to finish. This may take a while. Once it finishes, you are done! You may now start reverse-engineering the code.