#asahi-re · 2021-01-12 19:16
roxfanah#asahi-re · 2021-01-12 19:15
Shiza LZVN-compressed binary plist, to be exact#asahi-re · 2021-01-12 19:15
Shizone of the nvram parameters is LZVN-compressed#asahi-re · 2021-01-12 19:15
roxfanwhat are you unpacking if not kernelcache?#asahi-re · 2021-01-12 19:05
Shiz(that's not LZFSE)#asahi-re · 2021-01-12 19:05
Shizi was like "this definitely is some kind of LZ-variant" and had a bunch of commands mapped out already until it dawned on me to search for "apple compression algorithm"#asahi-re · 2021-01-12 19:05
roxfanat least it wasn't 30 hours#asahi-re · 2021-01-12 19:05
Shizjust raw LZVN#asahi-re · 2021-01-12 19:05
Shizit didn't use the lzfse headers :)#asahi-re · 2021-01-12 19:04
roxfanbvx2 didn't ring a bell?#asahi-re · 2021-01-12 19:02
Shizbleh, spent like 30 mins reversing some compression until I realised it was just LZVN#asahi-re · 2021-01-11 19:22
roxfansome code still relies on valid header being there#asahi-re · 2021-01-11 19:06
Shiztbf, i didn't expect them to throw in all the individual headers :P#asahi-re · 2021-01-11 19:05
Shizyeah my conclusion was stupid, my apologies#asahi-re · 2021-01-11 18:49
roxfanmaybe jtool can extract them, not sure#asahi-re · 2021-01-11 18:48
roxfanalso they're all not contiguous in the cache so you can't just dd#asahi-re · 2021-01-11 18:48
roxfani think com.apple.kernel is mostly standalone but kexts are prelinked to refer to addresses inside it#asahi-re · 2021-01-11 18:39
Shizcurious#asahi-re · 2021-01-11 18:39
Shizokay, so each fileset entry seems to be a mach-O header and the string section#asahi-re · 2021-01-11 18:38
roxfanIIRC in some iOS version they reshuffled segments so that all __TEXT are separate from all __DATA; not sure if that's the case with macOS#asahi-re · 2021-01-11 18:36
Shiz(in the fileset entry list, I mean)#asahi-re · 2021-01-11 18:36
Shizand I guess those kexts are just the headers, checking now#asahi-re · 2021-01-11 18:36
Shizso yeah, the 'kexts' are first, then the big kernel file, each with at least proper mach-O headers#asahi-re · 2021-01-11 18:35
Shizright#asahi-re · 2021-01-11 18:35
marcanbecause CTRR#asahi-re · 2021-01-11 18:35
marcanremember the code *has* to be linked together#asahi-re · 2021-01-11 18:35
Shizstarting to think it may just be the headers#asahi-re · 2021-01-11 18:34
marcanlol#asahi-re · 2021-01-11 18:34
Shizgot too excited because my own parser could parse the etracted stuff again :p#asahi-re · 2021-01-11 18:34
Shizbleh#asahi-re · 2021-01-11 18:33
Shizotool does complain that the stuff I extract is truncated, so there might be something there#asahi-re · 2021-01-11 18:33
marcanbut maybe this is different from iOS#asahi-re · 2021-01-11 18:33
Shizis my guess, but maybe not#asahi-re · 2021-01-11 18:33
marcanall the iOS research says they were prelinked and not quite complete#asahi-re · 2021-01-11 18:33
marcanare they really?#asahi-re · 2021-01-11 18:33
Shizcom.apple.kernel *is* the big blob, and the .kexts are 'inside' but also individually referencable#asahi-re · 2021-01-11 18:32
Shizoh, yeah I think it makes sense now#asahi-re · 2021-01-11 18:32
marcanthen __TEXT_EXEC is just the text of the kernel itself?#asahi-re · 2021-01-11 18:31
Shizthe duality of mach-o#asahi-re · 2021-01-11 18:31
Shizwith adding-ups izes#asahi-re · 2021-01-11 18:31
Shizi guess it is, then? but all the files inside are individual seemingly-proper mach-O files#asahi-re · 2021-01-11 18:31
Shizyeah, i do see that#asahi-re · 2021-01-11 18:30
marcanoutside the filesets#asahi-re · 2021-01-11 18:30
marcan__TEXT_EXEC is like 50MB#asahi-re · 2021-01-11 18:29
Shiz(from the top of my head)#asahi-re · 2021-01-11 18:29
Shizthe kernelcache extracted from the preboot partition at $vuid/boot/$policy/System/Caches/com.apple.kernelcache/kernelcache#asahi-re · 2021-01-11 18:29
marcanwhat file are you looking at?#asahi-re · 2021-01-11 18:28
Shizyeah, this is not prelinked#asahi-re · 2021-01-11 18:27
Shizsure#asahi-re · 2021-01-11 18:27
Shizthe sizes all add up to me, i think it's inside the fileset