Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check crc error #62

Open
w296488320 opened this issue Apr 9, 2024 · 1 comment
Open

check crc error #62

w296488320 opened this issue Apr 9, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@w296488320
Copy link

ShadowHook Version

1.0.0

Android OS Version

10

Android ABIs

arm64-v8a

Device Manufacturers and Models

Xiaomi8

Describe the Bug

我在hook 指定apk以后,尝试对内存进行crc 。
2024-04-09 11:37:10.485 Zhenxi com.zhenxi.hunter E detect_elf_checksum item before 2 /apex/com.android.runtime/lib64/libart.so [71cf948000-71cf949000 rwxp 00347000 103:26 319 /apex/com.android.runtime/lib64/libart.so] com.zhenxi.hunter

看到一段内存,这段内存是shadowhook留下的 ,
在内存里面是rwxp 。我在遍历这段内存指令的时候,虽然是rwxp但是发生了崩溃 。
1、hook分配的内存是否应该去掉rw ,每次写入的时候再次开启 。
2、为什么这段内存是rwxp ,但是遍历的时候发生崩溃呢?
3、为什么shadowhook 会初始化以后会hook art呢

@w296488320 w296488320 added the bug Something isn't working label Apr 9, 2024
@caikelun
Copy link
Member

1、hook分配的内存是否应该去掉rw ,每次写入的时候再次开启 。

shadowhook提供的public API可能存在并发调用,而内存权限是全局的状态,如果要保证可靠性,就需要对“内存权限修改 -> 修改指令 -> 内存权限恢复”的过程加锁,会影响执行效率。从实际一些的角度出发,内存权限恢复也没有必要。

2、为什么这段内存是rwxp ,但是遍历的时候发生崩溃呢?

崩溃问题你需要根据coredump或者tombstone具体分析。

3、为什么shadowhook 会初始化以后会hook art呢

shadowhook初始化后不会"自己去hook art"。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants