-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Improve clarity on payload construction and offsets #960
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
📝 Docs preview for commit 19187b8 at: https://68b924910981afa53f6f65ee--modest-austin-48be4a.netlify.app |
|
📝 Docs preview for commit 19187b8 at: https://68b9249f412e2ac71deb8844--modest-austin-48be4a.netlify.app |
|
这样讲可能更清晰,于是我更新了本页面,添加内存布局来辅助学习 �假设gets读入的数据存入str,这个str的起始地址以esp做偏移来快速确定 那么,既然要计算填充,也就是 [Saved EBP] (4 字节) <--- 需要被覆盖 这部分内容只需要用当前程序没被填充的ebp地址减去esp+0x1c,就能得到中间的地址,最后加上ebp自身的宽度,下一个单位就是返回地址 |
|
Hi n-WN, Thanks for your contribution! Currently we are busily examining your pull request. Once this have been checked and approved, we will notify you at our earliest convenience. This is just a notification message and you don't need to reply to it. If you have any further concerns, please feel free to contact us. Best regards, |
| 在 secure 函数又发现了存在调用 `system("/bin/sh")` 的代码,那么如果我们直接控制程序返回至 `0x0804863A` ,那么就可以得到系统的 shell 了。 | ||
|
|
||
| 下面就是我们如何构造 payload 了,首先需要确定的是我们能够控制的内存的起始地址距离 main 函数的返回地址的字节数。 | ||
| 下面就是我们如何构造 payload 了,首先需要确定的是我们能够控制的内存的起始地址距离 main 函数的返回地址的字节数,有时也被称为计算偏移。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个“计算偏移”的说法有具体出处吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
民间说法?我去改改说辞
| 高地址 | ||
| ... | ||
| [返回地址] (EBP + 4 字节) <--- 我们的最终目标 | ||
| [Saved EBP] (4 字节) <--- 需要被覆盖 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
对 [Saved EBP] 的说明最好与其他几个说明为同一类型,即介绍其是什么, “需要被覆盖” 的说法过于含糊且不太贴切(为什么“需要”?),个人建议这里可以改为先介绍 saved ebp 这个值是什么含义,并补充 “将要被覆盖”
No description provided.