Skip to content

Simple program that attempts to find the base address of a mips binary.

Notifications You must be signed in to change notification settings

BluePython339/FindMyMips

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

FindMyMips.py - Binary Base Address Finder

This Python script, named FindMyMips.py, is designed to help you calculate the base address (load address) of a binary file by analyzing its disassembled code and searching for specific patterns in the assembly instructions. It can be particularly useful when reverse engineering binaries and determining where they are meant to be loaded in memory.

The python script is based on a PHP script with similar purpose written by Carlo Meijer from Midnight Blue.

Prerequisites

Before you get started, make sure you have the following prerequisites installed:

  • Python (3.6 or higher)
  • mips-linux-gnu-objdump (for disassembling binary files)

Usage

  1. Clone this repository to your local machine:
git clone https://github.com/yourusername/findmymips.git
  1. Navigate to the project directory:
cd findmymips
  1. Run the script, providing the path to your binary file as a command-line argument:
python FindMyMips.py your_binary_file.bin
  1. The script will output the best guesses for the base address along with their corresponding scores. The top candidates are displayed, making it easier for you to identify the likely base address.

How It Works

  • The script first extracts strings from the binary file that contain the "%d" placeholder, which are often used as references for calculating base addresses.

  • It then disassembles the binary file to obtain references from the assembly instructions. These references are recorded and used for base address calculations. (based on lui and addi pairs)

  • A scoring mechanism is applied to different base addresses relative to the selected pivot point (a randomly chosen string containing "%d"). The score reflects the number of valid references found at each calculated base address.

  • Finally, the script presents the top candidates for the base address based on their scores.

Contributing

If you find any issues or have suggestions for improvements, please feel free to open an issue or pull request in this repository.

About

Simple program that attempts to find the base address of a mips binary.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages