Comments (7)
同一台手机test_replace的调用时成功的 没崩溃
from android_inlinehook.
同一台手机test_replace的调用时成功的 没崩溃
test_dlopen是Android7.0以下使用的,Android10可以使用test__loader_dlopen试试,详细的原因可以看:https://blog.csdn.net/DaoDivDiFang/article/details/103802431?spm=1001.2014.3001.5501
from android_inlinehook.
ok thx
from android_inlinehook.
同一台手机test_replace的调用时成功的 没崩溃
test_dlopen是Android7.0以下使用的,Android10可以使用test__loader_dlopen试试,详细的原因可以看:https://blog.csdn.net/DaoDivDiFang/article/details/103802431?spm=1001.2014.3001.5501
请教一下replace.s里面
str lr, [sp, #0x108]; //lr当作pc,覆盖栈上的x0
这行代码 为什么要偏移0x108 这个地方是什么 为什么可以直接被覆盖掉?
from android_inlinehook.
同一台手机test_replace的调用时成功的 没崩溃
test_dlopen是Android7.0以下使用的,Android10可以使用test__loader_dlopen试试,详细的原因可以看:https://blog.csdn.net/DaoDivDiFang/article/details/103802431?spm=1001.2014.3001.5501
请教一下replace.s里面 str lr, [sp, #0x108]; //lr当作pc,覆盖栈上的x0 这行代码 为什么要偏移0x108 这个地方是什么 为什么可以直接被覆盖掉?
保存pc寄存器,其实lr就是指向下一条blr指令。如果还是看不懂建议先补充下arm64汇编基础再看。
from android_inlinehook.
同一台手机test_replace的调用时成功的 没崩溃
test_dlopen是Android7.0以下使用的,Android10可以使用test__loader_dlopen试试,详细的原因可以看:https://blog.csdn.net/DaoDivDiFang/article/details/103802431?spm=1001.2014.3001.5501
请教一下replace.s里面 str lr, [sp, #0x108]; //lr当作pc,覆盖栈上的x0 这行代码 为什么要偏移0x108 这个地方是什么 为什么可以直接被覆盖掉?
保存pc寄存器,其实lr就是指向下一条blr指令。如果还是看不懂建议先补充下arm64汇编基础再看。
我看了你的代码
shellcode开始的地方先开辟了 0x20栈空间大小
sub sp, sp, #0x20; //跳板在栈上存储了x0、x1,但是未改变sp的值
接着又会申请0xf0大小的栈空间
sub sp, sp, #0xf0; //分配栈空间
属于shellcode申请的栈大小只有0xf0 + 0x20 但保存pc的时候却保存在[sp, #0x108]的位置上来 这个位置明显是超过了shellcode申请的堆栈空间范围了 这里不会覆盖到别的地方去 造成溢出吗
from android_inlinehook.
同一台手机test_replace的调用时成功的 没崩溃
test_dlopen是Android7.0以下使用的,Android10可以使用test__loader_dlopen试试,详细的原因可以看:https://blog.csdn.net/DaoDivDiFang/article/details/103802431?spm=1001.2014.3001.5501
请教一下replace.s里面 str lr, [sp, #0x108]; //lr当作pc,覆盖栈上的x0 这行代码 为什么要偏移0x108 这个地方是什么 为什么可以直接被覆盖掉?
保存pc寄存器,其实lr就是指向下一条blr指令。如果还是看不懂建议先补充下arm64汇编基础再看。
我看了你的代码 shellcode开始的地方先开辟了 0x20栈空间大小 sub sp, sp, #0x20; //跳板在栈上存储了x0、x1,但是未改变sp的值
接着又会申请0xf0大小的栈空间 sub sp, sp, #0xf0; //分配栈空间
属于shellcode申请的栈大小只有0xf0 + 0x20 但保存pc的时候却保存在[sp, #0x108]的位置上来 这个位置明显是超过了shellcode申请的堆栈空间范围了 这里不会覆盖到别的地方去 造成溢出吗
这样吧,你要是看不懂的话建议你使用ida动态调试吧。。。
这种代码阅读理解、汇编基础不清楚的话,我也不是三言两语说明白的,我也没时间给你录个视频解说。而且并不会溢出,只是覆盖最初跳板保存的x0,因为shellcode重新保存x0了,所以x0不需要了。
from android_inlinehook.
Related Issues (6)
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_inlinehook.