Skip to content

GhidraPluginProject/ghidra-scripts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ghidra Scripts

My personal collection of Ghidra scripts, mostly written in Python (also known as Jython, as referred to by Ghidra).

The scripts are free to use and are licensed under the GNU General Public License (GPL) v3.0, unless otherwise stated within the individual script.

Installation

Add these scripts to your Ghidra scripts directory:

  • Open any file in Ghidra for analysis
  • Select the Window / Script Manager menu
  • Click the "Script Directories" icon in the upper right toolbar
  • Add the directory where your scripts are located via the green plus sign
  • All scripts will show up under the R0rt1z2 folder

This script helps you analyze MediaTek's bootloader images (LK).

Given a valid Ghidra project with the correct load address, it will automatically attempt to locate and rename the most basic and/or used functions, such as printf, video_printf, fastboot_register, start_apps, platform_init, and others.

Load the bootloader image in Ghidra:

  1. Open Ghidra and create a new project if you don't already have one.
  2. Extract the actual lk code from your LK image: python3 -m lkpatcher lk.bin -d lk
  3. Import the generated partition image (e.g., lk.part) into your Ghidra project.
  4. Set the correct load address (e.g., 0xFFFF000050F00000) and select the processor as ARM:LE:64:v8.
  5. Run Ghidra's auto-analysis, but make sure to disable the Non-Returning Functions - Discovered option.
  6. After the analysis completes, run the script by selecting it in the Script Manager and clicking the Run Script button.

Warning

This script currently supports only ARMv8 bootloader images. A version for ARMv7 may be released in the future.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.8%
  • Shell 0.2%