title: Detection of function hooking in iOS
body: <p>So far as I know, in iOS there are three techniques of function hooking:</p>
  
  <ol>
  <li>preload library using DYLD_INSERT_LIBRARIES</li>
  <li>imported symbol table redirection using <a href="https://github.com/facebook/fishhook" rel="nofollow">fishhook</a></li>
  <li>patch the functions when they are already loaded - i.e. already in memory using <a href="http://www.cydiasubstrate.com/api/c/MSHookFunction/" rel="nofollow">substrate MSHookFunction</a></li>
  </ol>
  
  <p>These expose security issues so I wanna be able to detect when such things happen. For point number 1, I can apply function pointer verification to detect. However for 2 and 3, I haven't had any idea. I am very thankful for ideas that can be done to address the issue.</p>