我看到了一个帖子,它通过使用frida服务器绕过android应用程序的根检测。当我遵循这些步骤时,根检测不起作用。任何一个人都有一个想法来保护根检测不被绕过使用Frida服务器/任何其他。
发布于 2019-12-24 10:50:39
检查表示共享库中的根,启动表示一个活动,即共享库本身中的the device is rooted清除后台堆栈。本机二进制文件很难反向工程(它们需要函数名来操纵Frida)。
此外,你也可以阻止弗里达从附合到你的应用程序。从frida文档中,我们可以看到frida使用ptrace。
Frida需要在第一步中将代理注入到目标>应用程序中,以便它位于进程的内存空间中。 在Android和Linux上,这样的注入是通过附加或生成一个进程,然后注入代理来完成的。一旦注入代理,它就通过管道与其服务器进行通信。
当使用ptrace调用附加到进程时,调试进程状态文件中的"TracerPid“字段显示附加进程的PID。"TracerPid“的默认值是0(没有附加进程)。因此,在该字段中找到除0之外的任何内容都是调试或其他ptrace的标志。以下实现来自Tim Strazzere的反仿真项目:
#include <jni.h>
#include <unistd.h>
#include <sys/ptrace.h>
#include <sys/wait.h>
#include <pthread.h>
static int child_pid;
void *monitor_pid() {
int status;
waitpid(child_pid, &status, 0);
/* Child status should never change. */
_exit(0); // Commit seppuku
}
void anti_debug() {
child_pid = fork();
if (child_pid == 0)
{
int ppid = getppid();
int status;
if (ptrace(PTRACE_ATTACH, ppid, NULL, NULL) == 0)
{
waitpid(ppid, &status, 0);
ptrace(PTRACE_CONT, ppid, NULL, NULL);
while (waitpid(ppid, &status, 0)) {
if (WIFSTOPPED(status)) {
ptrace(PTRACE_CONT, ppid, NULL, NULL);
} else {
// Process has exited
_exit(0);
}
}
}
} else {
pthread_t t;
/* Start the monitoring thread */
pthread_create(&t, NULL, monitor_pid, (void *)NULL);
}
}
JNIEXPORT void JNICALL
Java_sg_vantagepoint_antidebug_MainActivity_antidebug(JNIEnv *env, jobject instance) {
anti_debug();
}请参考此指南的反调试技巧,由vantagepoint.在本指南中有一个特定的部分,它是针对frida的。
也是https://github.com/b-mueller/frida-detection-demo
否则,您可以将Appdome (IPaaS)的服务从附加到应用程序到区块 frida。
https://stackoverflow.com/questions/59465880
复制相似问题