利用 jmp_buf 结构中的缓冲区溢出
我需要帮助来利用 jmp_buf 结构上的缓冲区溢出。
我在堆栈上有以下值(由 gdb 看到):
0xbffffc40: 0xb7fd8ff4 0x080485a0 0x080483f0 0xbffffcf8
0xbffffc50: 0xebf06081 0x1d0a15ee
第二个是下一个 IP(在 setjmp 之后),但如果我修改它,我不会改变程序的行为。
我注意到,只有修改最后一个的值,我才能更改流程(并获得分段)。
但是,我无法理解最后一个词的含义以及如何更改它以获得所需的行为。
I need help to exploit a buffer overflow on a jmp_buf structure.
I have the following values on the stack (seen by gdb):
0xbffffc40: 0xb7fd8ff4 0x080485a0 0x080483f0 0xbffffcf8
0xbffffc50: 0xebf06081 0x1d0a15ee
The second one is the next IP (after the setjmp) but if i modify it i do not change the behavior of my program.
I noticed that I can change the flow (and obtain a Segmentation) only if i modify the value of the last one.
But, I can not understand the meaning of the last word and how to change it to obtain the desired behavior.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我现在正在尝试做同样的事情 - 我不知道你正在使用什么操作系统,但我找到了以下文档
(@ http://freebsd.active-venture .com/FreeBSD-srctree/newsrc/dev/vinum/vinummemory.c.html)对于 freebsd,它简单地描述了 jmpbuf 结构:
因此0x080485a0 将是存储的 ESP 而不是 EIP,这可以解释您案例中的段错误......
I am trying to do the same at the moment - i do not know what os you are using, but i found the following docu
(@ http://freebsd.active-venture.com/FreeBSD-srctree/newsrc/dev/vinum/vinummemory.c.html) for freebsd which simpy discribes the jmpbuf struct:
Therefore 0x080485a0 would be the stored ESP and not EIP which would explain the segfault in your case...