Git Product home page Git Product logo

ehook's Introduction

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

  1. 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.

  1. Run ndk-build

  2. 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.

  1. On android, type ./stalker [pid].

Notice

  1. For NOX emulator, you should use the Android 5.1.1 instead of the default 4.4.2.
  2. Also see this repo: XEHook.

acknowledgement

Thanks to these 大神s' work. They made my life much easier. https://github.com/zhengmin1989/TheSevenWeapons/tree/master/LiBieGou

https://github.com/ele7enxxh/Android-Inline-Hook

ehook's People

Contributors

nevermoe avatar

Watchers

Mikhail avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.