ssl-kill-switch2 icon indicating copy to clipboard operation
ssl-kill-switch2 copied to clipboard

Not working with Substitute-based hooking

Open nabla-c0d3 opened this issue 6 years ago • 0 comments

The crash people are seeing is due to Substitute (the library that Chimera uses for hooking C functions) not supporting functions that are very short. I think if there's less than ~60 bytes of stack space available after the function prologue, Substitute will cause a crash.

Alternatives:

  • Wait for Chimera to switch to a better hooking solution.
  • Make Chimera use the hacky version of MobileSubstrate that unc0ver uses.
  • Use an in-house function interposing technique that supports short functions. This technique works on functions as long as they're 5+ bytes: https://github.com/thomasfinch/CRuntimeFunctionHooker/blob/master/inject.c#L52

Originally posted by @EthanArbuckle in https://github.com/nabla-c0d3/ssl-kill-switch2/issues/63#issuecomment-524034473

nabla-c0d3 avatar Nov 19 '19 23:11 nabla-c0d3