Commit Graph
1747 Commits
Author SHA1 Message Date
blacktop e209828c31 feat(diff): add cacheable task-based reports
Refactor diff jobs into task-owned renderers with persistent cache support, root-confined walkers, and quieter Mach-O/Firmware output.
2026-06-04 12:02:46 -06:00
blacktop 5235c10533 chore(deps): bump deps 2026-06-02 15:46:59 -06:00
blacktopandGitHub b6980ffa53 feat(symbols): add ipsw symbols --json JSONL emitter (#1239) 2026-06-01 21:03:07 -06:00
blacktop f82fd2a3c3 feat(crashlog): support loose-dylib symbolication for modern Xcode DeviceSupport dumps (#1236) 2026-06-01 18:18:01 -06:00
blacktop ac147706e5 feat(symbolicate): fall back to Xcode DeviceSupport DSC when no IPSW is supplied (#1236) 2026-05-31 21:51:58 -06:00
blacktop 7eff1d9e5f feat(kernel/symbolicate): support JSON map input for --lookup and add nearest-symbol fallback 2026-05-31 11:10:22 -06:00
blacktop 5d2ebd0e86 Update diff.go 2026-05-27 16:41:11 -06:00
blacktop d0935380cf chore(diff): add --loc to the ipsw diff cmd 2026-05-26 21:51:49 -06:00
blacktop 14457b7d96 feat: address sandbox research feedback
Add dyld softlink/import/disassembly helpers, sandbox reach and diff support, richer WebKit IPC metadata, and expanded IOKit method recovery.

Fix MOVK softlink address reconstruction and avoid cross-case argument-state poisoning while scanning switch-dispatched user-client methods.
2026-05-24 16:28:00 -06:00
blacktop 1d59db2a51 chore(dl): tune remote zip reads 2026-05-24 16:27:52 -06:00
blacktop 14473fccf2 feat(dyld): add webkit-ipc command 2026-05-22 12:23:37 -06:00
blacktop 041a27a8f8 feat(nsxpc): add --dylib and --service scope filters to scan command 2026-05-22 12:15:24 -06:00
blacktop 8b1ad04559 feat(ent): add --fs mode to search IPSW Mach-Os directly
Adds `--fs` flag to bypass the database and scan entitlements
directly from IPSW filesystem DMGs or input folders. Introduces
`--has`/`--without` for required/excluded entitlement key filtering,
`--pem-db` for AEA-encrypted IPSWs, and `--format` (text, tsv, jsonl)
for structured output.
2026-05-22 12:15:02 -06:00
blacktop 90c61bee28 feat(download/pcc): add --os-build filter and beta channel detection 2026-05-20 11:09:19 -06:00
blacktop 0b2633d91f feat: add kernel kalloc scanner 2026-05-19 16:44:08 -06:00
blacktop 396c7afa70 fix(dyld): store full image path in dscFunc and resolve image by address 2026-05-17 14:37:26 -06:00
blacktop b7c2d3a370 feat(pcc): update ipsw dl pcc and add vphone600 detection to --info 2026-05-15 19:45:12 -06:00
blacktop 73622f5c6e feat: add pkg/xref package for ARM64 cross-reference scanning 2026-05-10 19:02:53 -06:00
blacktop fbdf22d513 Update pl.go 2026-05-10 15:47:58 -06:00
Signum21andGitHub 91324c2cfd fix: plist command for array data (#1208) 2026-05-10 15:39:53 -06:00
blacktop 9cf7381228 feat(kern): add kernel iokit-methods command to emit IOKit dispatch tables 2026-05-10 12:11:49 -06:00
blacktop 5a9ddf6ec0 docs: fix CLI docs 2026-05-09 18:27:37 -06:00
blacktop b1025ffa38 feat: add nsxpc package and CLI command for DSC analysis 2026-05-09 16:17:20 -06:00
blacktop 0528d00170 fix: add export trie cycle guard, ordinal bounds check, and profiling 2026-05-09 11:37:59 -06:00
blacktop 57a3d27be5 feat(ent): add ipsw ent xrefs command to find entitlement-check callsites 2026-05-09 09:12:35 -06:00
blacktop fe32f0a823 feat: add launchd command to stream plist metadata as JSONL 2026-05-06 19:21:48 -06:00
blacktop fc41188d93 feat(diff): add sandbox profile diffing behind sandbox build tag 2026-05-03 12:44:18 -06:00
blacktop 4f23763438 feat(extract): auto-decrypt remote kernelcaches via wiki keys
`ipsw download ipsw --kernel` now fetches firmware keys from
theapplewiki and decrypts encrypted kernelcaches inline. Unencrypted
members in the same IPSW pass through unchanged.

- pkg/img4: DecryptPayload reuses Payload.GetData for decompression,
  removing the duplicate LZSS/LZFSE branches.
- pkg/kernelcache: ParseImg4Data switches to img4.ParsePayload and
  exports ErrEncryptedKernelCache so callers can detect the missing-key
  case via errors.Is.
- internal/commands/extract: new keyed remote path with all-or-nothing
  preflight; the encryption-status peek lets unencrypted variants
  succeed even when the wiki has no entry for them.

  closes #1193
2026-04-27 15:57:23 -06:00
blacktop 98b7e6c56c feat(dtree): add OTA/AEA support to ipsw dtree (closes #1177) 2026-04-15 22:29:23 -06:00
blacktop 652abdd7af feat: add OTA input mode support to ipsw diff
Introduces direct OTA file diffing without requiring pre-extraction.
Users can now pass `.ota`/`.aea` files directly to `ipsw diff` alongside
existing IPSW and directory input modes.

Key additions:
- `internal/diff/ota_inputs.go`: OTA-specific input handling including
  cryptex mounting, kernelcache extraction, firmware parsing, iBoot
  parsing, and feature flag collection from mounted volumes
- `inputModeOTA` enum variant in `directory_inputs.go`
- `--key-db`, `--key-val`, and `--insecure` flags on `diff` command for
  AEA-encrypted OTA decryption
- AEA key database lookup mirroring the `ota` command's key resolution
- Magic-byte-aware error handling: AEA/AA files propagate decryption
  errors while ambiguous ZIPs fail silently (not-an-OTA)
- Validation rejects partial/delta and RSR OTAs with actionable messages
- Comprehensive unit tests covering all new helpers
2026-04-13 20:32:10 -06:00
blacktop 31371ea651 fix(ota): AEA key lookup and cryptex extraction
- Add `otaFilenameCandidates` to strip all known extensions (.aea,
  .ota, .zip) and generate a fallback candidate from the last
  underscore-delimited segment (e.g. downloaded filenames like
  `iPhone18,1_23F5043k_<hash>.aea` now match DB entries keyed by
  `<hash>`)
- Add test covering the downloaded-filename → archive-stem lookup
- Serialize `GetPayloadFiles` and `PayloadFiles` loops (remove
  `errgroup` concurrency) to fix data races and ensure correct
  error propagation with explicit resource cleanup
- Add `ErrCryptexNotFound` sentinel error for programmatic detection
- Add `system-arm64e` and `system-x86_64h` as explicit cryptex
  selector variants
2026-04-13 20:32:08 -06:00
blacktop bf9d2a4a8d chore(dl-ota): Add build prefix to OTA download destination filenames 2026-04-13 20:32:06 -06:00
blacktop 41f9b7b065 feat: 🎉 Sandbox Decompiler 🎉 2026-04-13 11:31:46 -06:00
blacktop 87995545a4 chore(kdk-diff): filter version metadata from KDK plist diffs
Strip build-specific keys (versions, SDK info, copyright, etc.)
from Info.plist and version.plist before diffing KDKs, so diffs
reflect meaningful structural changes rather than build metadata.
2026-04-12 17:16:08 -06:00
blacktop 5cdbab9f1e chore: remove libheif dependency; use sips for HEIC conversion
Replace the `github.com/strukturag/libheif-go` CGo dependency with
macOS-native `sips` for HEIC/AVIF wallpaper thumbnail conversion.

- Drop `libheif` from go.mod, Makefile, Goreleaser config, and CI
- Remove `cgo` build tag requirement from wallpaper package
- Implement `convertWithSips()` using temp files and the `sips` CLI
- Refactor thumbnail decoding into `extractThumbnailPreview()` helper
- Update tests to cover sips-based HEIC conversion path
2026-04-12 11:14:01 -06:00
blacktop c20f9af712 fix: multiple security vulnerabilities (SSRF, path traversal)
- Remove POST /diff/files endpoint that allowed arbitrary host file reads
  (CWE-22); clients must now read files locally and POST content to
  /diff/blobs instead
- Add validatePublicURL() to /info remote endpoints, rejecting URLs that
  resolve to loopback, private, link-local, or multicast addresses to
  prevent SSRF; also remove attacker-controlled proxy/insecure params
- Add SanitizeArchivePath() helper that verifies extracted archive entry
  paths stay within the destination directory (zip-slip / tar-slip,
  CWE-22); replace bare filepath.Join(dest, filepath.Clean(name)) calls
  in SearchZip, OTA parser, AA payload extractor, and ota_extract
- Fix server listen address to use net.JoinHostPort to respect Host config
2026-04-11 14:37:41 -06:00
blacktop eb3093c826 feat(pcc): Add filtering, progress, and version resolution to download pcc
- Add `--build`, `--train`, `--app`, `--version` flags to filter
  releases before interactive selection
- Show a TTY progress bar while fetching the PCC transparency log
- Resolve OS IPSW versions via partial-zip of BuildManifest.plist,
  caching results in `pcc_versions.json` to avoid redundant fetches
- Display build/train/app metadata in release list and info output
- Preflight HEAD-check all assets before downloading to catch CDN
  propagation delays early
- Sort releases by timestamp (newest first) instead of log index
- Auto-generate output directory name from release index and build
- Promote `go-isatty` from indirect to direct dependency
2026-04-09 22:47:53 -06:00
blacktop d932173948 feat(notif): add hidden cmd to read macOS Notification Center DB
Notifications persist on disk in a SQLite store after dismissal —
  including "disappearing" message previews from Signal/iMessage/etc.
  Inspired by objective-see/AuRevoir.

    ipsw notif --apps               # bundle IDs with record counts
    ipsw notif -a com.apple.mail    # one app's notifications
    ipsw notif --json               # all records as JSON
    ipsw notif --raw                # full bplist dump per record

  Decoder pulls req.{titl,subt,body} via map walk (go-plist silently
  no-ops nested struct fields). DB located at the macOS 26 group
  container with fallback to the legacy DARWIN_USER_DIR path; surfaces
  a clean FDA hint when TCC denies the read. Reuses glebarez/go-sqlite
  already in tree, cgo-free, darwin-only.
2026-04-09 18:25:53 -06:00
blacktop 61f21d9345 fix: improve bxdiff50 full-replacement patching
- Support controlSize=0 (full-replacement) BXDIFF50 patches by
  decompressing XZ/PBZX streams directly instead of raw extraction
- Add decompressStream helper that handles both raw XZ and PBZX formats
- Extract patch from ZIP before base-file lookup so temp file is always
  cleaned up on skip
- Stream patch file instead of loading entirely into memory
2026-04-08 13:51:03 -06:00
blacktop 36ed41a3a7 Update ota_patch_bxdiff.go 2026-04-07 19:30:44 -06:00
blacktop 70b0f60880 chore(appstore): add --keep-key flag to provision generate command
When `--install` succeeds, automatically remove on-disk private key
files (.key and .p12) since the Keychain becomes the canonical store.
The `--keep-key` flag opts out of this cleanup, and clear warnings are
emitted whenever key material remains on disk.
2026-04-07 18:22:19 -06:00
blacktop 434aeb2336 Update appstore_provision_gen.go 2026-04-07 17:57:00 -06:00
blacktop c0359c0f69 fix(appstore): add platform flag to provision generate command
- Add `--platform` flag (ios, macos, tvos, catalyst) to select the
  correct certificate and profile types per platform
- Map each platform/type combination to the appropriate ProfileType
- Extract `profileTypeNeedsDevices` helper to cover all dev/adhoc
  profile types across platforms
- Auto-register the host Mac as a development device when no devices
  are found and platform is macos/catalyst
- Fix `DeviceCreateRequest` to omit `deviceClass` and `model` fields
  rather than hard-coding iPhone values
- Initialize profile relationship slices before appending so
  json.Marshal emits `[]` instead of `null`
2026-04-07 17:49:17 -06:00
blacktop dbbe994d12 feat(appstore): add P12 bundling and WWDR G3 install for code signing
- Bundle cert + generated key into a password-protected .p12 file
  using go-pkcs12 (legacy 3DES for macOS Keychain compatibility)
- Import the .p12 via `security import` so cert and key are properly
  paired as an identity in the login keychain
- Auto-download and install the Apple WWDR G3 intermediate cert to
  ensure a valid codesigning trust chain
- Change `appstore cert rm` ID from a flag to a positional argument
- Fix missing `Content-Type` header on bundle ID registration request
2026-04-07 16:26:59 -06:00
blacktop 2a50c5a251 chore: refine OTA subcommand args, flags, and validation 2026-04-07 12:14:42 -06:00
blacktop 8e10059ccf chore: simplify car cmd: auto-export when output dir is set
Remove the separate `--export` flag; exporting is now implied
whenever `--output` is provided.
2026-04-07 12:00:00 -06:00
blacktop 24bb3aea35 feat(ota): implement bxdiff batch mode with basesystem_patches support
The bxdiff command only had single-file mode. Implement batch mode
  that iterates the OTA ZIP, finding BXDIFF patches in both
  AssetData/payloadv2/patches/ and basesystem_patches/. Each patch
  is extracted to a temp file, matched against a base file from the
  --input folder, and applied via bxdiff50.Patch.

  Closes #1161
2026-04-07 10:43:19 -06:00
blacktop 3f4732091a fix(ota): prevent multi-arch systemOS cryptexes from overwriting each other
macOS full OTAs can contain both arm64e and x86_64h system cryptex
  files. The output path was the same for both, so the second one
  overwrote the first. Extract the architecture from the cryptex
  filename and use arch-specific subdirectories.

  Closes #1162
2026-04-07 10:37:36 -06:00
blacktop 4968749982 feat(car): improve Asset Catalog extraction and fix decode errors
Port feat/car branch to master with targeted fixes:

  - PaletteImage: RE'd 0xcafef00d CoreUI palette format with variable
    palette count (uint16), fixing extraction for gamut variants
  - Deepmap2 EOF: cap KCBC continuation reads to element chunk count
    and fix fragment copy overflow
  - GA8 bounds: prevent panic when pixel data is shorter than dimensions
  - CLI: restore -x/--export flag, fix -o empty-string MkdirAll crash
  - Unknown pixel formats (SVG) log instead of aborting the parse
  - Remove panic in deepmap palette compression path
  - Clean up commented-out debug file writes

  Deepmap2 wide-gamut variants remain unsupported (require Apple's
  proprietary vImageDeepmap2Decode from the Accelerate framework).
  Primary renditions always extract correctly.

  fixes #823
2026-04-06 10:15:02 -06:00
blacktop 0841028aae fix(download): decrypt all device variants in multi-device IPSWs
iBridge IPSWs bundle firmware for 16+ T2 variants behind a single
URL. The URL deduplication kept only one device identifier, so
--decrypt only fetched keys for that device (~6% of files).

Collect all device identifiers per URL during dedup, then fetch
wiki keys for each identifier and merge them before matching.

Closes #1005
2026-04-05 22:37:01 -06:00