How alfiecg24/trigon works
Main Components
• iOS User Interface Layer:
• Includes AppDelegate, ViewController, Main.storyboard, and LaunchScreen.storyboard.
• This layer is responsible for initializing the application, handling UI events, and managing the control flow.
• Exploit Module:
• Located in the “Exploit” directory (files like exploit.c, patchfinder.c, memory.c, etc.).
• This module implements the CVE-based kernel exploit logic to create arbitrary physical address mapping and read/write primitives, following a non-standard code path in the kernel.
• iOS System Environment:
• Boundary between userland and the kernel. Although not part of the project code, this external environment is critical since the exploit interacts with the iOS kernel.
• Xcode Project & Configuration Files:
• Includes project files (Trigon.xcodeproj) and configuration files (Info.plist, Assets.xcassets, LICENSE, etc.), which help in the build and deployment process.
Relationships and Interactions
• The UI layer calls into the exploit module (likely via bridged Objective-C to C function calls) when a user action or internal trigger initiates exploitation.
• The exploit module, in turn, interfaces with the iOS kernel, executing specific code paths to utilize the vulnerability to gain read/write access.
• Configuration files and project settings govern how the app is built and deployed, ensuring the proper security credentials and runtime behaviors are configured.
• The overarching flow involves user-level triggers resulting in the execution of low-level exploit code that interacts with hardware or the kernel, encapsulated in the exploit primitives.
Architectural Patterns and Design Principles
• Separation of Concerns is visible:
– UI and high-level application logic are kept separate from low-level exploitation code.
– The exploit module is self-contained in its own directory.
• Layered Architecture:
– User Interface Layer (presentation) → Exploit Layer (business/logic) → iOS Kernel (system level).
• Use of mixed languages (C and Objective-C) emphasizes bridging and interfacing between higher-level management and lower-level hardware interaction.
Final Assembly
– Start with “User Trigger (UI Layer)” at one end, pointing to the “Exploit Module.”