The first challenge is to intercept the transfer of control. This has been done before on UNIX operating systems by setting up a handler to replace the application's.