Skip to main content
GitHub Stars

Welcome to iOS Reverse Engineering

Dive deep into the heart of iOS with this comprehensive guide to reverse engineering. From beginners to experts, there’s something for everyone. This reference provides practical tools, scripts, and techniques to analyze, understand, and dissect iOS applications.

Fundamentals

Learn the essential knowledge and skills needed before starting your iOS reverse engineering journey

Setup & Tools

Get your environment ready with Ghidra, Swift demanglers, and other essential tools

Ghidra Scripts

Automate your workflow with custom Python scripts for Swift demangling and swizzling detection

Example IPAs

Practice with real-world examples showcasing various obfuscation techniques

What You’ll Learn

This reference covers the complete iOS reverse engineering workflow:
  • Understanding Mach-O file format
  • Analyzing Swift and Objective-C binaries
  • Working with stripped symbols and obfuscated code
  • Identifying key sections in iOS binaries
  • Using Ghidra for iOS app analysis
  • Demangling Swift function names
  • Detecting and analyzing method swizzling
  • Understanding control flow flattening
  • Detecting runtime manipulation techniques
  • Identifying swizzled methods
  • Understanding dynamic code modification
  • Analyzing app behavior at runtime
  • Custom Ghidra scripting with Python
  • Automating symbol restoration
  • Batch processing iOS binaries
  • Creating reusable analysis workflows

Key Features

Custom Ghidra Scripts

Python scripts specifically designed for iOS reverse engineering workflows

Real Examples

Actual IPA files demonstrating common obfuscation techniques

Swift Support

Specialized tools for demangling and analyzing Swift code

Detection Tools

Scripts to identify swizzling and other runtime manipulation

Open Source

All scripts and examples are freely available on GitHub

Community Driven

Continuously updated with new techniques and improvements

Ghidra Scripts

This repository includes powerful Ghidra scripts to accelerate your iOS reverse engineering workflow:

Swift Name Demangler

Automatically demangles Swift class, function, and variable names in your Ghidra project. This script:
  • Renames functions with human-readable Swift names
  • Processes labels and symbols throughout the binary
  • Preserves original mangled names in comments
  • Works on both macOS and Linux
The Swift Name Demangler requires Swift to be installed on your machine and may take some time for larger applications.

Swizzling Detector

Detects whether an iOS app uses method swizzling and prints all references. This script identifies:
  • method_exchangeImplementations calls
  • class_getInstanceMethod usage
  • class_getClassMethod usage
  • method_setImplementation calls
The script will show you exactly where swizzling occurs and all references to these methods, helping you understand how the app modifies its runtime behavior.

Example Applications

Practice your skills with real IPA files showcasing various obfuscation techniques:

No Tampering

Baseline application without obfuscation for comparison

Objective Swizzling

Demonstrates Objective-C method swizzling techniques

Control Flow Flattening

Shows control flow obfuscation to complicate analysis
These example applications are for educational purposes only. Always ensure you have proper authorization before reverse engineering any iOS application.

Get Started

1

Check Prerequisites

Review the prerequisites to ensure you have the necessary background knowledge
2

Setup Your Environment

Follow the setup guide to install Ghidra and configure your tools
3

Start Analyzing

Load an example IPA into Ghidra and run the provided scripts

Community & Contributions

Join the community and help evolve the landscape of iOS Reverse Engineering. This repository is continuously updated with new information, scripts, and techniques.

Explore the Wiki

The comprehensive iOS RE Wiki contains detailed guides and information for kickstarting your iOS reverse engineering journey

About This Project

Created by @lauriewired, this reference aims to make iOS reverse engineering more accessible to security researchers, developers, and enthusiasts. GitHub Stars GitHub Forks GitHub Contributors

Build docs developers (and LLMs) love