71 Commits

Author SHA1 Message Date
vit9696
fc6fbed67c Fix symbol retrieval logic in injected kext, still needs dysymtab correction 2019-03-23 15:05:13 +03:00
vit9696
43ecade607 Try more harsh kernel injection testing 2019-03-23 15:05:13 +03:00
Download-Fritz
405c4af0be OcAppleKernelLib: Adapt to the new MachoLib changes. 2019-03-23 15:05:13 +03:00
Download-Fritz
13116df3e2 OcAppleKernelLib: Fix relocation location by VTable offset. 2019-03-23 15:05:13 +03:00
Download-Fritz
16028f123f OcAppleKernelLib: Scan own symbol table for C++ symbols too. 2019-03-23 15:05:13 +03:00
vit9696
e063fb9578 Fix kext size calculation during kernel injection 2019-03-23 15:05:13 +03:00
vit9696
fecc396a46 Do not set kmod header size, as it is incompatible with __TEXT permissions 2019-03-23 15:05:13 +03:00
vit9696
e32a7f9835 Remove debug info and hacks 2019-03-23 15:05:13 +03:00
vit9696
8760a7a158 Fix address allocation from source to target during kext injection 2019-03-23 15:05:13 +03:00
Download-Fritz
d98cdf28ff OcAppleKernelLib: Add segment VM protection adaption. 2019-03-23 15:05:12 +03:00
Download-Fritz
854b58d56a OcAppleKernelLib: Free LinkBuffer on Context freeing. 2019-03-23 15:05:12 +03:00
Download-Fritz
96f3bff46c OcAppleKernelLib: Add symbol value sanity checks. 2019-03-23 15:05:12 +03:00
Download-Fritz
7f478c0051 OcAppleKernelLib: Update kmod_info after prelinking. 2019-03-23 15:05:12 +03:00
Download-Fritz
caf798b2c0 OcAppleKernelLib: Zero NumExternalSymbols after prelinking. 2019-03-23 15:05:12 +03:00
Download-Fritz
ae77243fd0 OcAppleKernelLib: Correctly assign symbol count. 2019-03-23 15:05:12 +03:00
Download-Fritz
e4784fdcbe OcAppleKernelLib: Correctly save LINKEDIT offsets relative to file start. 2019-03-23 15:05:12 +03:00
Download-Fritz
a59443f7f9 OcAppleKernelLib: Alignment is a power of 2. 2019-03-23 15:05:12 +03:00
Download-Fritz
3f2d5aeda0 OcAppleKernelLib: Discard undefined and resolve indirect symbols of KPIs. 2019-03-23 15:05:12 +03:00
Download-Fritz
be49076782 OcAppleKernelLib: Always add the kernel as a dependency 2019-03-23 15:05:12 +03:00
Download-Fritz
ceb67d5eae OcAppleKernelLib: Remove an unused VTable function. 2019-03-23 15:05:12 +03:00
Download-Fritz
75d81cce1a OcAppleKernelLib: Bounds-check VTable data. 2019-03-23 15:05:12 +03:00
Download-Fritz
c5b89cd21e OcAppleKernelLib: Fix VTable indices. 2019-03-23 15:05:12 +03:00
vit9696
46eabae39f Link kexts against kernel and KPIs due to indirect symbols 2019-03-23 15:05:12 +03:00
Download-Fritz
212e3fbca8 OcAppleKernelLib: Use CopyMem() for potentially unaligned memory accesses. 2019-03-23 15:05:12 +03:00
Download-Fritz
9d9b96112a OcAppleKernelLib: Tolerate invalid VTable offsets. 2019-03-23 15:05:12 +03:00
Download-Fritz
a0e95fb9fb OcAppleKernelLib: Remove faulty padslot relocation sanity check. 2019-03-23 15:05:12 +03:00
Download-Fritz
dbf90dbd2a OcAppleKernelLib: Treat scattered relocs as normal ones, as done in KXLD. Check relocation skipability earlier. 2019-03-23 15:05:12 +03:00
Download-Fritz
5d434aded5 OcAppleKernelLib: Fix prelinking finalization. 2019-03-23 15:05:12 +03:00
Download-Fritz
160ca68cdc OcAppleKernelLib: Fix VTable count 2019-03-23 15:05:12 +03:00
vit9696
4db96a0161 Set and initialiase number of entries in a vtable 2019-03-23 15:05:12 +03:00
vit9696
978714ae1d Link with the kernel directly for speed reasons
Otherwise we would need to solve KPI symbols first.
2019-03-23 15:05:12 +03:00
vit9696
6b11c5675c Partially fix logic in vtable parsing 2019-03-23 15:05:12 +03:00
vit9696
72797bbc9c Implement ugly hack to prelinked hex value printing 2019-03-23 15:05:12 +03:00
vit9696
014ef59b45 Also fix vtable iteration 2019-03-23 15:05:12 +03:00
vit9696
69024af3bd Fix dependency handling logic 2019-03-23 15:05:12 +03:00
Download-Fritz
46ff4d4c40 OcAppleKernelLib: Fix ASSERT from last commit 2019-03-23 15:05:12 +03:00
Download-Fritz
402ad92363 OcAppleKernelLib: Fix InternalPrepareCreateVtablesPrelinked64 2019-03-23 15:05:12 +03:00
Download-Fritz
253d0b6284 OcAppleKernelLib: Implement VTable logic. 2019-03-23 15:05:12 +03:00
Download-Fritz
d92c167a0f OcAppleKernelLib: Move LinkBuffer allocation to the dependency walk 2019-03-23 15:05:12 +03:00
Download-Fritz
bc3dcc55db OcAppleKernelLib: Fix symbol location recursion 2019-03-23 15:05:12 +03:00
Download-Fritz
0bf7b5ce98 OcAppleKernelLib: Compilation fixes 2019-03-23 15:05:12 +03:00
Download-Fritz
f331523dda OcAppleKernelLib: Small security enhancements and warn instead of ASSERT more often 2019-03-23 15:05:12 +03:00
Download-Fritz
3cec6117ec Do not error when failing to find a resolution symbol 2019-03-23 15:05:12 +03:00
Download-Fritz
4da6a13edd Patch VTables before symbol resolution 2019-03-23 15:05:12 +03:00
vit9696
6ff5a4dfc3 Remove invalid assertions 2019-03-23 15:05:12 +03:00
vit9696
868c064fb1 Get symbol location work 2019-03-23 15:05:12 +03:00
vit9696
9be9d50677 Implement support for linking on injected kext and fix minor issues 2019-03-23 15:05:12 +03:00
Download-Fritz
6ed3156eea Import prelinker trash 2019-03-23 15:05:12 +03:00
Michael Belyaev
eda77537cc Added lost file 2019-03-22 15:08:43 +03:00
Michael Belyaev
43cffc0a49 Move patches into CommonPatches.c 2019-03-22 14:18:32 +03:00