帧指针 +返回地址

发布于 2024-09-26 12:30:37 字数 60 浏览 8 评论 0原文

有谁知道函数的返回地址相对于帧指针在哪里? 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

潇烟暮雨 2024-10-03 12:30:37

它在很大程度上取决于体系结构、编译器等。

尝试反汇编一些玩具程序并找出答案(请参阅objdump 在 Linux 中)

It strongly depends on the architecture, compiler, etc.

Try dissasembling some toy programs and find out (see objdump in linux)

末蓝 2024-10-03 12:30:37

返回地址位于堆栈帧中的 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文