National Cyber Warfare Foundation (NCWF)login

Inside WQFiles: how worse_query crosses iOS sandbox walls without a jailbreak


0 user ratings
2026-11-11 07:29:59
milo
Red Team (CNA)
"Inside

WQFiles is a file browser, app data manager and cache cleaner for iOS 26 and 27 that uses a sandbox technique called worse_query to reach other apps' containers with no jailbreak and no kernel exploit.








Toolkolbicz/WQFiles — file browser, app data manager and cache cleaner for iOS 26/27 built on the worse_query sandbox technique
CategoryiOS sandbox research / file management utility, written in Objective-C
Primary UseInspecting and managing app containers (Containers/Data/Application), app groups, caches, plists, SQLite databases and crash logs on iOS devices you own
Safe UseIntended for authorized use on your own devices: security research, mobile forensics, debugging your own apps, and understanding iOS sandbox boundaries in lab environments
Telemetry NoteThe tool logs its own activity (writes, backups, deletions, restores, errors) in its in-app Log; from a defensive standpoint, its cross-container access via an App Group entitlement is visible to MDM and app-signature auditing

WQFiles, published at kolbicz/WQFiles, is one of the more interesting iOS utilities to surface recently, because it is not merely a file manager — it is a working demonstration of a sandbox-traversal technique the author calls worse_query. The app reaches other applications' and system containers on iOS 26 and 27 with no jailbreak and no kernel exploit, and the README reports testing on iOS 26.7.1, 27.0.1 and 27.2. For security professionals, the value here is twofold: it is a practical app-data inspection and management tool, and it is documented evidence of how App Group entitlements can be leveraged to read beyond an app's normal container boundaries on stock, unjailbroken devices.


The core mechanism deserves attention. The README explains that worse_query asks for access through the app's own group container, which means the signed IPA must carry an App Group entitlement for the technique to work at all. The build script ./build.sh ad-hoc signs with group.cz.kolbi.wqfiles, but the app uses whichever group it actually receives — AltStore, SideStore or Sideloadly with an Apple ID create one automatically, while wildcard provisioning profiles (App ID *) cannot contain one and signing fails or the app reports "No App Group". This dependency on the entitlement is the single most important operational fact: it is the gate through which all of the tool's cross-container reach flows.


What it opens is extensive. App Data covers every app's data container under Containers/Data/Application, displayed with the app's real name and icon rather than the raw UUID. Beyond that it reaches App Groups (shared group containers), Extension Data, Internal Daemons, System Data under /var/containers/Data/System (listing only, since contents are root-owned), System Groups including the MobileGestalt cache and the configuration-profiles Supervision folder, and a Go to Path function for any absolute path. On iOS 27.0.1 the System Groups parent cannot be listed, so known container names are tried one by one — a brute-force-enumeration fallback that reveals the pragmatic, iterative design throughout.


Container discovery is the engineering heart of the app. Because the container parents can't be listed directly, WQFiles consults the LaunchServices database, which lists every installed app's and extension's containers; it is found once among the newest files, usually within seconds, and remembered. When that database can't answer — Internal Daemons, for instance — the app falls back to a full scan of every file id via fsgetpath, which the README notes is the same approach the KAMUI research used. That first inode scan takes minutes on a well-used device (most of an hour on iOS 26), so the app asks before starting and later scans only check new files. App names themselves come from LaunchServices' own database read from lsd's container, since the LaunchServices API refuses the app on 27.x — another telling detail about what the technique circumvents.


The Apps screen functions as a per-application data manager: it shows every app with its data size, can back up an app's Documents and Library, restore the latest backup, clear app data, open the folder, or share a backup as a ZIP over AirDrop, Files or Mail. Filters let you show all apps, only Apple's, only third-party ones, or only backed-up ones, and long-press copies the bundle ID or container path — a convenience that doubles as a quick reconnaissance aid when you are mapping what lives where on a test device. Note that tmp is deliberately ephemeral: clear removes it, but backups exclude it and restores leave the current tmp untouched.


The Cache Cleaner gives cache and temp sizes per app with search, Select All/None, a Large Caches filter for anything over 50 MB, crash-log visibility, and long-press shortcuts to an app's Caches, tmp or data folder. On iOS 26 the crash-log section is absent because the technique doesn't reach System Data or system groups there. From a defensive-research standpoint, the crash-log aggregation is a legitimately useful triage surface for your own apps — seeing exactly what diagnostic debris an app leaves behind is something iOS normally makes awkward without a tethered device.


The embedded file tooling is deeper than most dedicated apps. The plist editor browses dictionaries and arrays, edits values by type (switches for booleans, numbers, text, dates, data as hex) and saves in the file's own binary or XML format. The hex viewer and editor handles files of any size in pages, with go-to-offset, byte or text search, and in-place overwrites where changed bytes stay highlighted until saved and the file size never changes. The SQLite viewer is read-only by design — tables, views, row counts, SQL queries and CSV export — and operates on a copy of the database and its -wal file so the app's live files are never touched, with the sensible advice to close the target app first for an up-to-date copy. Entries in extracted ZIPs that would land outside the destination folder, encrypted ZIPs and symbolic links are refused or omitted — thoughtful path-traversal hygiene for the extract function.


The safety architecture is unusually well documented for this genre. Before a regular file is overwritten or deleted, its contents are copied to a Backups folder inside the app, also reachable in the Files app. App copies are verified by a source-stability digest, a destination-shape digest and stored part content hashes, rechecked before restore and rollback; purge postconditions are rechecked; and interrupted safety transactions may be recovered on startup. Locks are honestly described as advisory — another app ignoring them can still write concurrently, and in-place writes are not crash-atomic. Automatic pruning of backups is deliberately omitted so a safety copy is never discarded without an explicit user decision. This is the kind of failure-mode candor you want to see in a tool that edits other processes' data.


The troubleshooting section reads like a field guide to iOS container internals. A NO TOKEN error means the container path was visible but wq_grant could not obtain a sandbox token — common causes include a signer that dropped the App Group, an app-group cache-swap failure, or a container the app-group query refuses. A (no label) result means a token was obtained but the container identifier (the com.apple.containermanager.identifier xattr or metadata plist) could not be read; on iOS 27.2 the attribute can't be read at all, so the app asks the container manager for a path-to-identifier map and cross-references LaunchServices. An empty Apps list may indicate a missing or denied container parent, logged as enumerate: … and app scan: … lines — and notably, a denied parent still returns the scanned subset, so refresh rather than assuming there are no apps.


iOS 26 support is explicitly preliminary. There, worse_query reaches app, extension, daemon and app group containers but not System Data or system groups, which are hidden in the UI. Because a full inode scan would take most of an hour, App Data, Extension Data and App Groups are listed from the LaunchServices database instead. Internal Daemons aren't in that database, so the first scan for them is slow with later scans incremental. App icons don't work on iOS 26 either — the system hands WQFiles only placeholder icons and won't let it read other apps' bundles, so apps render as symbol tiles.


For installation, the practical path for your own research devices is via AltStore or SideStore using the AltDirect source, or by downloading WQFiles.ipa from the project's Releases and signing it yourself — remembering that whatever signs it must include an App Group. Developers building from source get a serious test story: ./tests/run_all_tests.sh runs twelve Foundation fixture executables, Python release fixtures, static browser checks and strict iOS arm64 compilation on macOS with Xcode and Python 3, with WQ_ASAN=1 available for AddressSanitizer builds. The release pipeline itself runs a host regression suite, stages and validates the archive, metadata, signature and App Group before atomically replacing WQFiles.ipa and source.json.


WQFiles matters to the security community less as a weapon — it operates on-device, at the user's direction, against containers the user can already unlock — and more as a documented, maintained proof that App Group-based traversal is a live, per-version cat-and-mouse surface within iOS sandboxing. Every detail in the README, from the fsgetpath enumeration to the lsd container reads to the 27.2 xattr restrictions, is a data point on where Apple is tightening boundaries and where researchers are finding gaps. For defenders, the takeaway is that on-device file access no longer requires jailbreak infrastructure, and app-data-at-rest on a shared or seized-but-unlocked device should be assumed inspectable. The project is licensed GPL-3.0, written in Objective-C, and sits at 568 stars — use it on hardware you own, keep the backups it insists on making, and treat it as both utility and research artifact.



Official project repository for kolbicz/WQFiles.

Download Tool

Educational analysis for authorized security professionals. Use only in controlled, authorized environments.






Source: OffensiveSec
Source Link: https://www.offsecblog.com/2026/11/inside-wqfiles-how-worsequery-crosses.html


Comments
new comment
Nobody has commented yet. Will you be the first?
 
Forum
Red Team (CNA)



Copyright 2012 through 2026 - National Cyber Warfare Foundation - All rights reserved worldwide.