Commit Graph
83 Commits
Author SHA1 Message Date
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 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 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 e4a55a9e55 chore: replace inline regex with precompiled variables for improved performance and readability 2026-04-04 17:42:26 -06:00
blacktop 93e7dcf28e fix: missing YAA FLG2 support #1099 2026-03-03 12:30:21 -07:00
blacktop dd58359c26 fix: OTA key resolution priority and refactor extraction logic
Corrects ResolveAEAKey to prioritize explicit symmetric keys over
database lookups as documented. Previously the database was checked
first regardless of whether an explicit key was provided.

Refactors extraction code into testable helper functions and adds
unit tests. Fixes resource leaks in pbzx decompression path.
2026-03-03 12:23:09 -07:00
blacktop 8e6f2c554b chore: modernize to 1.26
Refactor string concatenation to use strings.Builder for improved performance in multiple files
2026-02-12 10:02:01 -07:00
Sam CollinsonandGitHub d35f0ebdff fix: add proxy support for downloading FCS keys 🥝 (#914) 2025-11-09 11:38:09 -07:00
blacktop 77166f344b feat: add auto-aea + fcs-key DB support to all ipsw ota commands 2025-10-01 18:27:33 -06:00
blacktop d4f82962d9 fix: cleanup/refactor ipsw download ota --fcs-key command 2025-10-01 18:26:25 -06:00
blacktop f9e7104aae fix: ipsw ota info not parsing Info.plist properly due to .Name() not being full path 2025-09-10 17:38:39 -06:00
blacktop 29648b6597 fix: ipsw ota ls and ipsw ota extract cmds 2025-09-09 16:52:42 -06:00
blacktop e1ad160d0d feat: added --mount-point|-m flag to ipsw mount cmd to let you pick the mount location + docs update 2025-08-12 15:55:42 -06:00
blacktop 478a569c74 fix: add partial --insecure support to fcs key pem download in AEA commands 2025-07-29 15:11:53 -06:00
blacktop 399d296d02 feat: add support for extracting SimulatorRuntime encrypted .aar files downloaded via ipsw dl ota #700 2025-06-04 23:37:34 -06:00
blacktop 9e8f87dc8b fix: ipsw ota ls for newer YAA/YOP files 2025-06-04 20:42:23 -06:00
blacktop 6a044aafcb feat: add --sim flag to download XCode simulators via ipsw dl ota cmd #700 2025-05-13 20:52:23 -06:00
blacktop 44c939de6d fix: AppleTV ipsw ota extract cmd #674 2025-04-01 16:47:09 -06:00
blacktop 6cca9a980d refactor: replace interface{} with any and simplify loop constructs 2025-03-26 22:53:29 -06:00
blacktop 2f5cdb0b7c fix: yaa to handle compressed PatchTypes 2025-03-25 16:45:56 -06:00
blacktop 9d101bf4ac chore(deps): bump deps 2025-02-24 19:19:02 -07:00
blacktop 97673ca3da feat: add --cryptex flag to ipsw ota extract cmd #566 2025-02-22 22:05:09 -07:00
blacktop 53379710b7 fix: support x86_64 DSC extraction from local/remote OTAs 👶 2025-01-21 00:17:55 -07:00
blacktop e6b3382bd8 fix: ipsw dl ota cmd to be able to grab iOS 18 RC etc 2024-09-09 19:31:30 -06:00
blacktop a1e10bfaab chore: make --force the default when hdiutil detach-ing 🇬🇧 2024-09-03 15:03:10 -06:00
blacktop a4397c6bfe chore: add --dyld to ipsw ota extract cmd 2024-08-02 20:38:16 -06:00
blacktop a7f96837da Update aa.go 2024-08-02 15:01:48 -06:00
blacktop 61ff9dbd86 chore: add ability to get OTA Info from AEA OTAs 2024-08-02 14:35:02 -06:00
blacktop 5d4f094f09 chore: add support for --key-val in ipsw ota extract and ls cmds 2024-08-02 11:56:28 -06:00
blacktop fa87e950de Update yaa.go 2024-08-02 00:15:22 -06:00
blacktop e9c0e80f5e feat: add --range to ipsw ota extract --pattern to greatly speed up the process if you know which payloadv2 files it is normally in 2024-07-29 21:04:39 -06:00
blacktop 8ff9047bfb chore: minor cleanup 2024-07-28 19:27:23 -06:00
blacktop 5c0ff8fa28 chore: add ability to list/extract from payloadv2 files via /usr/bin/aa 😞 2024-07-28 18:44:39 -06:00
blacktop 15ff9e5571 chore: improve ipsw ota ls payload output + minor refactoring 2024-07-28 12:46:35 -06:00
blacktopandGitHub ba79d3c3b0 feat: add support for 🆕 AEA OTA files (#521) 2024-07-27 23:29:26 -06:00
blacktop 3deb2aefb6 chore: add AEA fields to ipsw dl ota --json output 2024-07-25 13:12:27 -06:00
blacktop f4192a2687 chore: show OTA ArchiveDecryptionKey if encrypted when running ipsw dl ota cmd 2024-06-10 19:48:51 -06:00
blacktop a3f8762d6a feat: add --dyld flag to ipsw dl ota --type ota command 2024-05-30 12:08:37 -06:00
blacktop a418fa39d9 Update bxdiff50.go 2024-01-25 10:21:29 -07:00
blacktop 97cb058d0f fix: don't stop ipsw ota patch bxdiff on mismatched sha1s just log error 2024-01-25 01:38:13 -07:00
blacktop 4c357decea feat: add support for BXDIFF50 OTA patching 2024-01-25 00:00:12 -07:00
blacktop 76a0217433 fix: add support for remote OTA --dyld extraction in ipsw extract command (users should use ipsw ota extract though) 2023-09-23 20:22:11 -06:00
blacktop fd24fba428 fix: ipsw ota extract command to search cryptexes as well (darwin only) 🥙 2023-09-23 19:14:42 -06:00
blacktopandGitHub f85daa1ac3 feat: ipsw daemon (API) (#219) 2023-04-12 20:00:05 -06:00
blacktop 9a85c44e01 fix: BOM parsing to output non-ascii filenames (🆕 hidden ipsw lsbom cmd) 2023-03-16 17:43:00 -06:00
blacktop 47ac282f48 fix: many small issues w/ auto-folder name creation #184 2023-02-17 11:17:26 -07:00
blacktop 997608e030 fix: issue when regex matches directories when unzipping 2023-01-29 17:29:03 -07:00
blacktop 1dd2b18a3e Update ridiff_other.go 2022-11-18 18:50:38 -07:00
blacktop b8e9491cd5 feat: allow RSR OTA patching via ipsw ota patch cmd 👀 2022-11-18 18:47:05 -07:00
blacktop 43e346eef0 fix: issue where ipsw download ota was filtering out device's w/ multi models 2022-11-18 17:40:21 -07:00