Skip to content

V3innn/ctf-offset-finder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

CTF Offset Finder

CTF Offset Finder is a Python script that utilizes pwntools to find the offset for CTF challenges in 32-bit binaries. It helps determine the precise location within a buffer where the program's execution flow can be controlled or redirected.

Features

  • Automatically calculates the offset for a target function in a 32-bit binary.
  • Uses a cyclic pattern to trigger crashes and determine the offset.
  • Supports both local and remote binary execution.

Requirements

  • Python 3.6 or above
  • pwntools library (pip install pwntools)

Usage

  1. Clone the repository:
git clone https://github.com/V3innn/ctf-offset-finder.git
  1. Navigate to the project directory:
cd ctf-offset-finder
  1. Modify the script offset_finder.py to specify the path to your target binary and the name of the vulnerable function.

  2. Run the script:

python3 ctf-offset-finder.py

The offset for the target function will be printed to the console.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.

Releases

No releases published

Packages

No packages published

Languages