MIE Deep Dive Part 2 Enabling Apps and Analyzing Memory-Tagg... - #2847
Open
carlospolop wants to merge 1 commit into
Open
carlospolop wants to merge 1 commit into
carlospolop wants to merge 1 commit into
Conversation
Collaborator
Author
🔗 Additional ContextOriginal Blog Post: https://8ksec.io/mie-deep-dive-enabling-apps Content Categories: Based on the analysis, this content was categorized under "Binary Exploitation > Common Binary Exploitation Protections & Bypasses > Memory Tagging Extension (MTE), with cross-references from Mobile Pentesting > iOS Pentesting and iOS Extracting Entitlements From Compiled Application". Repository Maintenance:
Review Notes:
Bot Version: HackTricks News Bot v1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
Overview
This post provides a practical guide to enabling, verifying, testing, and debugging Apple's Memory Integrity Enforcement (MIE) in iOS applications. MIE uses hardware memory tagging to detect spatial memory corruption, such as heap buffer overflows, and temporal memory corruption, such as use-after-free (UAF). The post includes copy-paste C and Swift test code, entitlement-inspection commands, a reusable verification script, crash-log fields, and a case study of CVE-20...
🔧 Technical Details
Discovering MIE-enabled iOS applications: Dump an application's signed entitlements with
codesign -d --entitlements - App.app/Binaryand verify thatcom.apple.security.cs.checked_allocationsexists and is true. The presence ofcom.apple.security.enhanced_security,com.apple.security.hardened_process, orcom.apple.security.hardened_heapalone does not establish that memory tagging is active. This check can be automated by locating the executable in an.appbundle and searching the entitlement output forchecked_allocations.Testing spatial memory-corruption enforcement: Allocate a heap object and access memory beyond its final 16-byte tagged granule, for example
char *a = malloc(16); memset(a, 'A', 2000);orchar *buffer = malloc(64); buffer[80] = 'X';. Protected accesses compare the tag embedded in the pointer with the tag assig...🤖 Agent Actions
Plan:
Repository mapping is complete. An existing dedicated MTE page is the clear primary candidate; I’m now comparing it with the iOS entitlement and exploitation pages to avoid duplication and determine whether a single-file update can capture the new material cleanly.
The main page already covers generic MTE mechanics, collision limits, Linux/Android checks, and speculative tag leakage. The genuinely new material is iOS MIE entitlement verification, reproducible synchronous-fault testing/crash triage, and the device/DMA stale-mapping bypass class. I’ll verify these against Apple’s documentation and the original Mali research before editing that one page.
Source verification uncovered two important corrections to preserve technical accuracy: current Apple documentation uses
com.apple.security.hardened-process.checked-allocations(not only the legacy/research-observedcom.apple.security.cs.checked_allocationsspelling), and CVE-2025-0072’s demonstrated bypass used a stale user-space PFN mapping rather than GPU writes through a stale GPU mapping. The update will document both nuances explicitly.The documentation changes are in place. I’m performing focused validation now: code syntax, reference-number integrity, relative-link resolution, prohibited-source checks, whitespace/diff checks, and an mdBook build if the toolchain is available.
Implemented the HackTricks update.
Updated
.ipscrash-log triage fields.Validation
git diff --checkpassed.mdbookand Clang were unavailable locally.This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.