android 雷电模拟器 hook,GitHub - chago/EHook: A hooking framework for commercial Android emulators (雷电模拟器...

EHook

A hooking framework for commercial Android emulators (雷电模拟器, NOX, BlueStacks).

As you may know, these commercail emulators use x86 (kernel) and arm (user land) mixed-mode method to accelerate the emulation and this makes it difficult to hook the native arm libraries. This emulator hooking framework is intented to solve this problem.

Usage

Modify the jni/realinject.c file. You can hook functions both by address or by the function's symbol name:

static struct hook_t eph1;

static struct hook_t eph_sendto;

...

...

/*On BlueStacks*/

//hook_by_addr(&eph1, "arm/libc.so", target_addr, hook_func1);

/*Other emulators*/

hook_by_name(&eph_sendto, "nb/libc.so", "sendto", hook_sendto);

Notice: If you are hooking system libraries like "libc.so", please make sure you are giving the right path of the arm version binary.

Run ndk-build

Push the following 3 binary to android /data/local/tmp directory:

libs/x86/stalker

libs/x86/libinject.so

libs/armeabi/librealinject.so

Or just run push.cmd.

On android, type ./stalker [pid].

Notice

For NOX emulator, you should use the Android 5.1.1 instead of the default 4.4.2.

Also see this repo: XEHook.

acknowledgement

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值