Giter VIP home page Giter VIP logo

Comments (8)

ele7enxxh avatar ele7enxxh commented on July 21, 2024

我记不太清了,加nop的原因好像是为了指令地址的对齐,以避免某些特殊情况的crash,你可以尝试不加nop,看是否会出问题。

from android-inline-hook.

nevermoe avatar nevermoe commented on July 21, 2024

确实考虑到pc预读,要对齐到四字节会带来很多麻烦。。。没有什么好办法吗。。

from android-inline-hook.

ele7enxxh avatar ele7enxxh commented on July 21, 2024

可以对it系列指令单独处理,在it块结束后再填充nop指令。不过这需要it块中不包含需要relocate的指令,我印象中it块中本来就不允许出现需要relocate的指令

from android-inline-hook.

Rprop avatar Rprop commented on July 21, 2024

把IT系列指令和NOP交换位置?

from android-inline-hook.

ele7enxxh avatar ele7enxxh commented on July 21, 2024

@rrrfff 你可以试试,如果测试成功,欢迎提交PR

from android-inline-hook.

Rprop avatar Rprop commented on July 21, 2024

@nevermoe 看了手册IT在AArch64被弃用, AArch64是否还有类似的block指令?

from android-inline-hook.

nevermoe avatar nevermoe commented on July 21, 2024

@rrrfff 我试了把IT指令好NOP交换位置,确实可以。但是问题是还有别的ITT,ITTE之类的指令,这时候简单交换位置就行不通了。

cpu指令我也不是很懂。。。

from android-inline-hook.

cjycjw avatar cjycjw commented on July 21, 2024

我也发现了类似的bug, 在hook函数strncmp时候考虑不全,这个函数是thumb指令,hook的时候改写了8个字节,而第7个字节正好是循环跳转的目标地址,执行到后面的跳转指令跳转回来并不是原来的指令,导致出错。

from android-inline-hook.

Related Issues (20)

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.