帧指针 +返回地址
有谁知道函数的返回地址相对于帧指针在哪里? windows和unix有区别吗?
谢谢 :)
Does anybody know where relatively to the frame pointer is the return address of the function?
Is there a difference between windows and unix?
thanks :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
它在很大程度上取决于体系结构、编译器等。
尝试反汇编一些玩具程序并找出答案(请参阅objdump 在 Linux 中)
It strongly depends on the architecture, compiler, etc.
Try dissasembling some toy programs and find out (see objdump in linux)
返回地址位于堆栈帧中的 EBP + 4 处,但您将无法像缓冲区溢出那样使用它,因为您尚未控制执行流程。
您应该寻找的是返回地址与缓冲区的距离。这对于每个漏洞来说都是独一无二的,需要预测介于两者之间的任何情况,否则很可能会导致进程转储。
The return address is at EBP + 4 in your stack frame but you will not be able to use it like that in a buffer overrun since you do not yet control the flow of execution.
What you should be looking for is the distance of return address from the buffer. That is unique to each vulnerability and anything caught in between will need to be predicted or you will most likely just cause the process to dump.