# lauriewired/ios_reverse_engineering architecture

> Architecture diagram of the GitHub repository lauriewired/ios_reverse_engineering, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-02-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lauriewired/ios_reverse_engineering
- Repository: https://github.com/lauriewired/ios_reverse_engineering

## Overview

##### Project Type and Purpose
- This repository is an open-source toolkit and learning resource for iOS reverse engineering.
- It bundles:
- Example IPA binaries demonstrating obfuscation techniques.
- Ghidra helper scripts (Python) to automate common tasks (Swift name demangling, swizzling detection).
- Documentation and image assets for the wiki/README.

##### File-Structure Analysis
- Top-level
- ObfuscatedAppExamples/  ← sample IPA files
- SwiftNameDemangler.py   ← Ghidra script
- SwizzlingDetector.py     ← Ghidra script
- images/                 ← logos/screenshots
- README.md               ← high-level overview, linking to wiki
- No “frontend” or “backend” directories – it’s a CLI/desktop-tool integration with Ghidra.
- No build scripts or deployment manifests; main interaction is via Git operations and Ghidra’s scripting API.

##### README Insights
- Emphasizes the “Comprehensive iOS RE Wiki” for guides.
- Showcases example IPAs and Ghidra scripts.
- No runtime services – focus is on local analysis workflows.

a. Main Components
1. User (Reverse Engineer)
2. GitHub Repository
– Source code: Python scripts
– Example IPA files
– Documentation (README, images)
3. Ghidra (External Analysis Platform)
4. Wiki/Documentation Website
b. Relationships & Data Flows
1. User clones Repo from GitHub.
2. User launches Ghidra; loads an IPA from ObfuscatedAppExamples.
3. User imports the Python scripts into Ghidra’s scripting console.
4. Scripts process the IPA in Ghidra, producing:
– Demangled symbols
– Swizzling reports
5. User refers to the Wiki/README for guidance.
c. Architectural Patterns & Principles
- Plugin/Extension architecture for Ghidra: Python scripts act as lightweight plugins.
- Data-centric flow: binary → Ghidra → scripts → annotated analysis.
- Separation of concerns: sample binaries, scripts, and docs stored independently.
d. Key Technologies & Libraries
- Ghidra (Java-based reverse-engineering suite)
- Python (Jython) for Ghidra scripting
- Git/GitHub for version control and distribution

##### Essential Detail
- Scripts as plugins in Ghidra.
- Dual nature of the repo as both sample-binary storage and script library.
- Flow from sample binary ingestion to analysis output.

## Diagram (Mermaid)

```mermaid
flowchart TB
    User["User (Reverse Engineer)"]:::actor
    GitHubRepo["GitHub Repository"]:::external
    subgraph "Repository Contents"
        ObfuscatedAppExamples["ObfuscatedAppExamples/"]:::data
        ControlFlowFlatteningIPA["ControlFlowFlattening.ipa"]:::data
        NoTamperingIPA["NoTampering.ipa"]:::data
        ObjectiveSwizzlingIPA["ObjectiveSwizzling.ipa"]:::data
        SwiftNameDemangler["SwiftNameDemangler.py"]:::code
        SwizzlingDetector["SwizzlingDetector.py"]:::code
        README["README.md"]:::doc
        images["images/"]:::data
    end
    Ghidra["Ghidra"]:::external
    Wiki[(Wiki/Documentation)]:::docdb

    User -->|"clones repository"| GitHubRepo
    GitHubRepo -->|"contains"| ObfuscatedAppExamples
    GitHubRepo -->|"contains"| SwiftNameDemangler
    GitHubRepo -->|"contains"| SwizzlingDetector
    GitHubRepo -->|"contains"| README
    GitHubRepo -->|"contains"| images

    ObfuscatedAppExamples -->|"load IPA"| Ghidra
    SwiftNameDemangler -->|"import script"| Ghidra
    SwizzlingDetector -->|"import script"| Ghidra
    Ghidra -->|"produce analysis output"| User

    User -->|"refers to docs"| README
    User -->|"refers to wiki"| Wiki

    click ObfuscatedAppExamples "https://github.com/lauriewired/ios_reverse_engineering/tree/main/ObfuscatedAppExamples/"
    click ControlFlowFlatteningIPA "https://github.com/lauriewired/ios_reverse_engineering/blob/main/ObfuscatedAppExamples/ControlFlowFlattening.ipa"
    click NoTamperingIPA "https://github.com/lauriewired/ios_reverse_engineering/blob/main/ObfuscatedAppExamples/NoTampering.ipa"
    click ObjectiveSwizzlingIPA "https://github.com/lauriewired/ios_reverse_engineering/blob/main/ObfuscatedAppExamples/ObjectiveSwizzling.ipa"
    click SwiftNameDemangler "https://github.com/lauriewired/ios_reverse_engineering/blob/main/SwiftNameDemangler.py"
    click SwizzlingDetector "https://github.com/lauriewired/ios_reverse_engineering/blob/main/SwizzlingDetector.py"
    click README "https://github.com/lauriewired/ios_reverse_engineering/blob/main/README.md"
    click images "https://github.com/lauriewired/ios_reverse_engineering/tree/main/images/"

    classDef code fill:#e0f7fa,stroke:#006064,color:#006064
    classDef data fill:#e8f5e9,stroke:#1b5e20,color:#1b5e20
    classDef external fill:#fff3e0,stroke:#e65100,color:#e65100
    classDef doc fill:#eceff1,stroke:#455a64,color:#455a64
    classDef docdb fill:#eceff1,stroke:#455a64,color:#455a64
    classDef actor fill:#f3e5f5,stroke:#6a1b9a,color:#6a1b9a
```
