Comments (8)
我记不太清了,加nop的原因好像是为了指令地址的对齐,以避免某些特殊情况的crash,你可以尝试不加nop,看是否会出问题。
from android-inline-hook.
确实考虑到pc预读,要对齐到四字节会带来很多麻烦。。。没有什么好办法吗。。
from android-inline-hook.
可以对it系列指令单独处理,在it块结束后再填充nop指令。不过这需要it块中不包含需要relocate的指令,我印象中it块中本来就不允许出现需要relocate的指令
from android-inline-hook.
把IT系列指令和NOP交换位置?
from android-inline-hook.
@rrrfff 你可以试试,如果测试成功,欢迎提交PR
from android-inline-hook.
@nevermoe 看了手册IT在AArch64被弃用, AArch64是否还有类似的block指令?
from android-inline-hook.
@rrrfff 我试了把IT指令好NOP交换位置,确实可以。但是问题是还有别的ITT,ITTE之类的指令,这时候简单交换位置就行不通了。
cpu指令我也不是很懂。。。
from android-inline-hook.
我也发现了类似的bug, 在hook函数strncmp时候考虑不全,这个函数是thumb指令,hook的时候改写了8个字节,而第7个字节正好是循环跳转的目标地址,执行到后面的跳转指令跳转回来并不是原来的指令,导致出错。
from android-inline-hook.
Related Issues (20)
- 直接使用本进程PTRACE_ATTACH线程,会出现operation not permitted,即使赋予root权限也是同样的错误,具体原因不得而知 HOT 3
- 在头文件中识别一下c++ HOT 3
- 报告一个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
- 在android 7.0上hook AAssetManager_open函数运行崩溃(其他版本运行正常) HOT 16
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.