简体   繁体   English

如何使Android本机共享库(.so)无法通过附加进行调试

[英]How to make android native shared library(.so) to be unable to debug by attaching

I am making the native shared library to be running on android. 我正在使本机共享库在android上运行。 Before, I experienced that protecting the shared library from debug(ie set break point and trace) by attaching by IDA, at that time, SIGSTOP signal occurred and process was terminated. 以前,我经历过通过IDA附加保护共享库免于调试(即设置断点和跟踪)的问题,这时,发生SIGSTOP信号并终止了进程。 So I wanna to make my library such that. 所以我想做我的图书馆。 I will be appreciate to tell me how to. 我将很高兴告诉我该怎么做。 Also, if you know another method to protect the native shared library to be running on android device from debug, disassemble or reverse-engineering. 另外,如果您知道另一种保护本地共享库的方法,以防止其在android设备上运行,请进行调试,反汇编或反向工程。 Thanks in advance. 提前致谢。

You can relatively easily detect a JVM debugger but detecting a native debugger is a bit harder. 您可以相对容易地检测到JVM调试器,但是检测本机调试器会有点困难。

You can use the standard ptrace(PTRACE_ME) call to figure out if someone's attached a debugger. 您可以使用标准的ptrace(PTRACE_ME)调用来确定是否有人连接了调试器。 I've not tried this but I believe it should work. 我没有尝试过,但是我相信它应该可以工作。

Personally, I would use my own code-signing to figure out the state of the application, coupled with support from Play Services . 就个人而言,我将使用自己的代码签名来找出应用程序的状态,并获得Play Services的支持

In any case, as with all things software, given enough patience all security measures can be circumvented. 在任何情况下,与万物软件一样,只要有足够的耐心,就可以规避所有安全措施。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM