itunesstored & bookassetd sandbox escape via malicious downl... #1598
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
This post documents a practical sandbox-escape-style arbitrary file-write primitive on iOS by abusing two Apple daemons,
itunesstoredandbookassetd, via their SQLite metadata and EPUB processing logic. By crafting a maliciousdownloads.28.sqlitedb(Stage 1) and a maliciousBLDatabaseManager.sqliteplus an attacker-controlled EPUB (Stage 2), an attacker can cause system services to write arbitrary attacker-controlled files into a wide range ...🔧 Technical Details
Trick 1 – Using
downloads.28.sqlitedbto makeitunesstoredplant an arbitrary SQLite fileAbuse the iOS
downloads.28.sqlitedbdatabase (processed byitunesstored) by inserting a crafted row into theassettable that setsurlto an attacker‑controlled HTTP endpoint andlocal_pathto any path thatitunesstoredis allowed to write, such as/private/var/containers/Shared/SystemGroup/<UUID>/Documents/BLDatabaseManager/BLDatabaseManager.sqlite. On boot,itunesstoredwill fetch the remote file and overwrite the target path with attacker‑provided content. The device‑specific<UUID>is discovered from syslog by usingpymobiledevice3 syslog collect logs.logarchiveand searching in Console.app for lines wherebookassetdlogs the BLDatabase store path. This trick generalizes to any component wher...🤖 Agent Actions
Summary:
itunesstored-bookassetd-sandbox-escape.mdpage under iOS Pentesting describing how to weaponizedownloads.28.sqlitedb,BLDatabaseManager.sqlite, and a crafted EPUB to coerceitunesstored/bookassetdinto arbitrary file writes acrossmobile-owned SystemGroup paths. The page covers prerequisites, SQL payload templates (wrapped in expandable blocks), UUID discovery withpymobiledevice3, EPUB construction, orchestration steps, tooling tips, and detection/mitigation ideas, plus references to the blog and PoC repo.ios-pentesting/README.mdso readers can easily find the sandbox escape technique.Tests: Not run (documentation-only changes).
This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.
📚 Repository Maintenance
All .md files have been checked for proper formatting (headers, includes, etc.).