1

The background of our issue is as follows:
We want to add some security-identification code to an application before its security-sensitive operations (for example, payment through internet and so on) are executed. We neither have the source code of the application, nor want to reverse the application to modify it.
What we know is that the payment operation is right after the execution of a specific function/API. So, our plan is to monitor the execution of the specific function/API from the operating system kernel, and then insert our security-identification code immediately once the specific function/API execution is detected.
Our platform is Android, and thus the kernel is Linux.

Therefore, the question is:
Is it possible to monitor the execution of a specific function/API from the operating system kernel level? If possible, how to do? If not possible, what is your alternative suggestions to our above issue?

Thank you very much!

Fan Zhang
  • 11
  • 3
  • It's not clear, but you may be looking for [strace](http://stackoverflow.com/questions/174942/how-should-strace-be-used). – Johan Lundberg Jul 21 '16 at 19:07
  • There are also ltrace (like strace plus tracing of library calls) and kernel-based tools like ftrace, tracepoints/kprobes (perf or trace-cmd), sysdig, stap, lttng. – osgx Jul 21 '16 at 19:34
  • 2
    Sorry, I'm not looking for tools like `strace`. In my opinion, `strace` is a debug tool, which is able to list all the system calls. In fact, I do not care about system calls, but the specific function (or API) that is used to initialize the payment process. For easy explanation, let us assume the specific function name is `PaymentInit`. The real payment process will be initialized after the `PaymentInit` is called. Therefore, we plan to monitor the execution of `PaymentInit` from kernel, and once monitored, we insert our security-enhancement code to protect the following transaction process. – Fan Zhang Jul 22 '16 at 00:11
  • Probably you need application monitoring tool like appdynamics (https://www.appdynamics.com/why-appdynamics/) – Rupsingh Jul 27 '16 at 13:53

0 Answers0