# hackerhouse-opensource/rebirth architecture

> Architecture diagram of the GitHub repository hackerhouse-opensource/rebirth, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hackerhouse-opensource/rebirth
- Repository: https://github.com/hackerhouse-opensource/rebirth

## Overview

##### Main Components
- Exploit Module – Represent the multipath exploit code (e.g., CVE-2018-4241 directory and associated kernel helpers, kernel_patching, and kernel_helpers files) as a dedicated block. This module is responsible for gaining task-for-pid-zero (tfp0), thereby bypassing AMFI (Apple Mobile File Integrity) and providing root privileges.
- Userland / Lightweight Root Environment – Show the iOS application component (in the “rebirth” directory including the app source files, AppDelegate, and storyboards). This is where the jailbreak payload is installed (non-persistently) to mount the root filesystem writable (on iOS 11.0 – 11.2.6) and to provide a minimal environment for further instrumentation.
- Binpack / System Binaries – Represent the “binpack” directory, which bundles system binaries, libraries, and associated configuration files required to replace or patch system components (including SSH, bash, various shell utilities, etc.). This block supports the modified userland by supplying the necessary executables and native libraries.
- Ancillary Tools – Represent the “tools” directory as several interconnected submodules:
– Debugging and Forensics Utilities (e.g., dumpdecrypted, jtool, and serialsh).
– Networking / Remote Access Utilities (e.g., dropbear SSH integration, netcat).
– Instrumentation and App Hacking Utilities (e.g., Frida support through built libraries and scripts).
– Other helper scripts and binaries (e.g., pincrack, frida-macos-universal).

##### Relationships and Interactions
- A data/control flow between the core jailbreaking payload, the utilities provided (e.g., dropbear for SSH and other forensic tools) and the external interfaces (like Frida) used in app instrumentation.

##### Architectural Patterns & Design Principles
- Separation of concerns by clearly differentiating between:
– The kernel-level exploitation and patching components,
– The userland installation that sets up a temporary root environment,
– The bundled binaries (via binpack) that replace standard system tools, and
– The collection of forensic and application-hacking utilities under “tools.”
- That this solution employs “rootless” designs to avoid permanent changes – a design principle worth noting for mobile security practitioners.

##### Technologies, Frameworks, and Libraries
- iOS/Objective-C for the main jailbreak application (rebirth).
- C (and possibly assembly) for the kernel helpers, multipath exploit (CVE-2018-4241), and various low-level tools.
- QiLin framework components integrated into the jailbreak.
- OS binpack utilities, dropbear (SSH server), Frida (dynamic instrumentation), and dumpdecrypted libraries.
- Xcode environment is used to build the iOS project.

## Diagram (Mermaid)

```mermaid
flowchart TD
    UI["User Interaction - Rebirth App"]:::user
    EM["Exploit Module - Multipath TFP0 & Kernel Patching"]:::exploit
    ES["Environment Setup - Lightweight Root Environment"]:::environment
    BP["Binpack Utilities - System Binaries"]:::binpack
    FT["Forensics & Instrumentation Tools"]:::tools

    UI -->|"triggers"| EM
    EM -->|"gains_tfp0/PatchesKernel_DisablesAMFI"| ES
    ES -->|"mounts_RW_and_deploys"| BP
    ES -->|"activates_SSH_Frida_and_more"| FT

    click UI "https://github.com/hackerhouse-opensource/rebirth/tree/master/rebirth/app"
    click UI "https://github.com/hackerhouse-opensource/rebirth/blob/master/rebirth/Info.plist"
    
    click EM "https://github.com/hackerhouse-opensource/rebirth/tree/master/rebirth/CVE-2018-4241"
    click EM "https://github.com/hackerhouse-opensource/rebirth/blob/master/rebirth/kernel_helpers.c"
    click EM "https://github.com/hackerhouse-opensource/rebirth/blob/master/rebirth/kernel_helpers.h"
    click EM "https://github.com/hackerhouse-opensource/rebirth/blob/master/rebirth/kernel_patching.h"
    click EM "https://github.com/hackerhouse-opensource/rebirth/blob/master/rebirth/kernel_patching.m"
    
    click BP "https://github.com/hackerhouse-opensource/rebirth/tree/master/binpack"
    
    click FT "https://github.com/hackerhouse-opensource/rebirth/tree/master/tools"

    classDef user fill:#f9d8a1,stroke:#e07a5f,stroke-width:2px;
    classDef exploit fill:#ffadad,stroke:#ff4d6d,stroke-width:2px;
    classDef environment fill:#ffd6a5,stroke:#ffbb2d,stroke-width:2px;
    classDef binpack fill:#caffbf,stroke:#2a9d8f,stroke-width:2px;
    classDef tools fill:#9bf6ff,stroke:#00b4d8,stroke-width:2px;
```
