首页
社区
课程
招聘
[求助]通过系统调用(syscall)检测frida,在应用层有什么好的方法绕过。
2021-3-10 17:21 5565

[求助]通过系统调用(syscall)检测frida,在应用层有什么好的方法绕过。

2021-3-10 17:21
5565

通过系统调用(syscall)检测frida,在应用层有什么好的方法绕过。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
ENTRY_PRIVATE(wrap_openat)
    mov ip, r7
    .cfi_register r7, ip
    ldr r7, =__NR_openat
    swi #0
    mov r7, ip
    .cfi_restore r7
    cmn r0, #(CARLEEN_MAX_ERRNO + 1)
    bxls lr
    neg r0, r0
    b __carleen_set_errno
END(wrap_openat)
----------------------------------------
    LOGI("start check frida loop");
    while (loop < 10) {
        fd = wrap_openat(AT_FDCWD, "/proc/self/maps", O_RDONLY, 0);
        if (fd > 0) {
            while ((read_line(fd, buffer, BUFFER_LEN)) > 0) {
 
                if (sscanf(buffer, "%x-%lx %4s %lx %*s %*s %s", &base, &end, perm, &offset, path) !=
                    5) {
                    continue;
                }
                if (perm[0] != 'r') continue;
                if (perm[3] != 'p') continue; //do not touch the shared memory
                if (0 != offset) continue;
                if (strlen(path) == 0) continue;
                if ('[' == path[0]) continue;
                if (end - base <= 1000000) continue;
                if (wrap_endsWith(path, ".oat")) continue;
                if (elf_check_header(base) != 1) continue;
                if (find_mem_string(base, end, frida_rpc, length) == 1) {
                    LOGI("frida found in memory!");
#ifndef DEBUG
                    wrap_kill(wrap_getpid(),SIGKILL);
#endif
                    break;
                }
            }
        } else {
            LOGI("open maps error");
        }
        wrap_close(fd);
        loop++;
        sleep(3);

[培训]《安卓高级研修班(网课)》月薪三万计划,掌握调试、分析还原ollvm、vmp的方法,定制art虚拟机自动化脱壳的方法

收藏
点赞0
打赏
分享
最新回复 (6)
雪    币: 7
能力值: ( LV1,RANK:0 )
在线值:
发帖
回帖
粉丝
mb_xxggzthx 2021-3-10 23:41
2
0
Hook syscall,或者改名
雪    币: 281
活跃值: (452)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
wx_安小卓 2021-3-11 00:33
3
0
mb_xxggzthx Hook syscall,或者改名
在应用层没有办法hook syscall
雪    币: 1376
活跃值: (571)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
无敌得我 2021-3-11 11:52
4
0
wx_安小卓 在应用层没有办法hook syscall
ptrace hook
雪    币: 281
活跃值: (452)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
wx_安小卓 2021-3-15 19:29
5
0
无敌得我 ptrace hook
听起来挺屌的 
雪    币: 2631
活跃值: (4813)
能力值: ( LV11,RANK:185 )
在线值:
发帖
回帖
粉丝
Thehepta 3 2021-3-20 11:30
6
0
内核模块劫持
雪    币: 281
活跃值: (452)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
wx_安小卓 2021-3-23 02:32
7
0
ChicWalk 内核模块劫持
想在应用层拦截
游客
登录 | 注册 方可回帖
返回