All Projects → MelonWXD → Elfhooker

MelonWXD / Elfhooker

兼容Android 32位和64位。基于EFL文件格式Hook的demo,hook了SurfaceFlinger进程的eglSwapBuffers函数,替换为new_eglSwapBuffers

Projects that are alternatives of or similar to Elfhooker

AndroidGotHook
GOT Hook implemented in Android
Stars: ✭ 63 (-54.35%)
Mutual labels:  hook, elf
Xhook
🔥 A PLT hook library for Android native ELF.
Stars: ✭ 2,996 (+2071.01%)
Mutual labels:  hook, elf
Elfhook
modify PLT to hook api, supported android 5\6.
Stars: ✭ 202 (+46.38%)
Mutual labels:  hook, elf
Fbhookfork
从 fb 的 profilo 项目里提取出来的hook 库,自己用
Stars: ✭ 98 (-28.99%)
Mutual labels:  hook, elf
Git Code Format Maven Plugin
A maven plugin that automatically deploys https://github.com/google/google-java-format code formatter as a pre-commit git hook
Stars: ✭ 121 (-12.32%)
Mutual labels:  hook
Antdfront
using next generation data manager and hook、pure function component 、webpack to build antd design pro microfrontend project without umi, cra,dva or rematch
Stars: ✭ 105 (-23.91%)
Mutual labels:  hook
Icmethoddigger
An easy way to print almost methods including private methods (supported arm64 architecture devices).
Stars: ✭ 103 (-25.36%)
Mutual labels:  hook
Homebase React
The React state management library for write-heavy applications
Stars: ✭ 101 (-26.81%)
Mutual labels:  hook
Git Multimail
Send notification emails for pushes to a git repository (an improved version of post-receive-mail)
Stars: ✭ 135 (-2.17%)
Mutual labels:  hook
Freereflection
A library that lets you use reflection without any restriction above Android P
Stars: ✭ 2,090 (+1414.49%)
Mutual labels:  hook
React Timer Hook
React timer hook
Stars: ✭ 118 (-14.49%)
Mutual labels:  hook
Filebytes
Library to read and edit files in the following formats: Executable and Linking Format (ELF), Portable Executable (PE), MachO and OAT (Android Runtime)
Stars: ✭ 105 (-23.91%)
Mutual labels:  elf
Libebc
C++ Library and Tool for Extracting Embedded Bitcode
Stars: ✭ 122 (-11.59%)
Mutual labels:  elf
Bingrep
like ~~grep~~ UBER, but for binaries
Stars: ✭ 1,395 (+910.87%)
Mutual labels:  elf
Flutter hooks
React hooks for Flutter. Hooks are a new kind of object that manages a Widget life-cycles. They are used to increase code sharing between widgets and as a complete replacement for StatefulWidget.
Stars: ✭ 1,973 (+1329.71%)
Mutual labels:  hook
Easyprotector
一行代码检测XP/调试/多开/模拟器/root
Stars: ✭ 1,732 (+1155.07%)
Mutual labels:  hook
Hooks
Async middleware for JavaScript and TypeScript
Stars: ✭ 117 (-15.22%)
Mutual labels:  hook
Pwninit
pwninit - automate starting binary exploit challenges
Stars: ✭ 127 (-7.97%)
Mutual labels:  elf
Next Sanity
Sanity.io toolkit for Next.js
Stars: ✭ 115 (-16.67%)
Mutual labels:  hook
Fridaandroidtracer
A runnable jar that generate Javascript hook script to hook Android classes.
Stars: ✭ 114 (-17.39%)
Mutual labels:  hook

ELFHooker

基于EFL文件格式Hook的demo,hook了SurfaceFlinger进程的eglSwapBuffers函数,替换为new_eglSwapBuffers。

兼容Android 32位和64位。

注入系列笔记:

ELF格式分析
so文件加载流程
Inject和Hook

使用

准备:

  • 一台root的android设备
  • ndk编译环境

分别开2个终端来查看日志:

  • adb logcat | grep INJECT

  • adb logcat | grep ELFHooker

    如果日志太多了可以用 adb logcat -c来清理一下日志

然后在新的终端中执行:

  • git clone [email protected]:MelonWXD/ELFHooker.git
  • cd ELFHooker/jni
  • ndk-build
  • cd ../libs/arm64-v8a/ (or ../libs/armeabi// if your device is 32-bit)
  • adb push .* /data/local/tmp
  • adb shell
  • su
  • cd /data/local/tmp
  • chmod 755 inject
  • chmod 755 libelfHooker.so

找到/system/bin/surfaceflinger这个进程的pid:

  • ps | grep surfaceflinger (如果要在代码中实现的话,可以遍历/proc/pid/cmdline文件来找到你某个进程名对应的pid)

  • ./inject -p pid -l /data/local/tmp/libelfHooker.so

    查看日志输出:

参考

Lody's elfHook
Android中的so注入(inject)和挂钩(hook) - For both x86 and arm

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].