Comments (16)
给我个可触发崩溃的二进制可执行文件和源码
from android-inline-hook.
HookDemo是android studio工程
X86_BUG_DEMO目录是native代码
Java层静态代码里加载共享库
native层在JNI_OnLoad函数里hook AAssetManager_open
Java层在activity的onCreate方法里通过jni调用native被hook的函数
from android-inline-hook.
好的,我会尽快测试
from android-inline-hook.
麻烦再提供以下崩溃手机里的libandroid.so
from android-inline-hook.
@ele7enxxh 上传的动态库好像错了,我明天拿设备验证下,抱歉了
from android-inline-hook.
Nexus 5X
Android OS Version:7.1.1 / 7.0都有问题
libandroid.so.zip
libandroid-64.so.zip
from android-inline-hook.
Hi @ele7enxxh, 关于7.0的问题你那边可有进展?是否能够重现呢?
from android-inline-hook.
崩溃不是发生在调用原函数,而是发生在新函数执行结束后。
新函数里不论是否有调用原函数,新函数执行结束就会崩溃
from android-inline-hook.
7.x设备上relocateInstructionInThumb执行和正常设备有差异,正常设备上执行的都是下图的分支2,7.x上执行的有一次不一样。
hook的目标函数是dlopen
,
运行正常的log:
5965-5965/? E/relocate: relocateInstruction,617
5965-5965/? E/relocate: relocateInstructionInThumb,471
5965-5965/? E/relocate: relocateInstructionInThumb,471
5965-5965/? E/relocate: relocateInstructionInThumb,471
5965-5965/? E/relocate: relocateInstructionInThumb,471
5965-5965/? E/relocate: relocateInstructionInThumb,471
5965-5965/? E/inlineHook: doInlineHook,364
5965-5965/? E/inlineHook: doInlineHook,385
崩溃设备输出的log:
E/relocate: relocateInstruction,617
E/relocate: relocateInstructionInThumb,471 (relocateInstructionInThumb16分支)
E/relocate: relocateInstructionInThumb,471 (relocateInstructionInThumb16分支)
E/relocate: relocateInstructionInThumb,464 (relocateInstructionInThumb32分支)
E/relocate: relocateInstructionInThumb,471 (relocateInstructionInThumb16分支)
E/relocate: relocateInstructionInThumb,471 (relocateInstructionInThumb16分支)
E/inlineHook: doInlineHook,364
E/inlineHook: doInlineHook,385
from android-inline-hook.
不好意思,我现在在忙其他工作,不保证后续会处理这个问题。
from android-inline-hook.
@WenhaiLin 问一下android x86模拟器使用inline hook你成功了?是怎么做到的
from android-inline-hook.
@wyhuan 没有成功。我后边改用静态注入方案
from android-inline-hook.
android 7.x上崩溃是因为我hook了另外的函数(dlopen,权限问题)导致,关闭此issue
from android-inline-hook.
@WenhaiLin android x86模拟器静态注入之后hook成功了嘛? 方案能分享一下不
from android-inline-hook.
成功了
基本思路是按ELF格式去解析原动态库,将要hook的函数修改为一个新增依赖库的函数
这个方式仅限于你要hook的函数是动态库外部实现的,例如gettimeofday等
from android-inline-hook.
成功了
基本思路是按ELF格式去解析原动态库,将要hook的函数修改为一个新增依赖库的函数这个方式仅限于你要hook的函数是动态库外部实现的,例如gettimeofday等
同在厦门额,可否留个微信联系方式,我现在公司也有这块需求,想请教一点相关的信息
from android-inline-hook.
Related Issues (20)
- 直接使用本进程PTRACE_ATTACH线程,会出现operation not permitted,即使赋予root权限也是同样的错误,具体原因不得而知 HOT 3
- 在头文件中识别一下c++ HOT 3
- relocate的一个小问题 HOT 8
- 报告一个ELE7EN_ERROR_NOT_EXECUTABLE的小问题 HOT 1
- hook或unhook时会造成ANR异常 HOT 4
- Hook某些函数导致进程崩溃的现象 HOT 1
- Android7.0问题 HOT 1
- 7.0之上thumb指令pc=当前地址+2 ? HOT 1
- LDR_THUMB32 分支生成的 trampoline 寄存器不正确 HOT 1
- 子线程触发hook时引起的父进程与子进程互锁问题 HOT 3
- Android8.0 hook成功但是执行完hook方法之后崩溃
- 可以hook后篡改到其他进程去不 HOT 1
- 判断指令集 HOT 1
- 学习 adbi和您的代码后 有点疑问
- 提供是否做线程处理的选项
- hook libc.so memcmp
- 大哥,搞个支持64位的呗 HOT 1
- Compiling warnings HOT 1
- 是否支持修改同一个地址? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-inline-hook.