程序溢出的基础和原理(The basic principle and procedure of overflow).docVIP

程序溢出的基础和原理(The basic principle and procedure of overflow).doc

  1. 1、本文档共15页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  5. 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  6. 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  7. 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  8. 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
程序溢出的基础和原理(The basic principle and procedure of overflow)

程序溢出的基础和原理(The basic principle and procedure of overflow) A: basic knowledge The memory of the computer running the distribution area is divided into 3 Program section: not allowed to write Data section: static global variables in the data segment and at the beginning of the program is loaded at run time The stack area for the dynamic placement process of local and temporary variables are calculated in the stack allocation inside and in the process of pressing the call back Data access. The stack is a first in a queue. General computer system stack and memory in the opposite direction of the direction. Stack XX push = ESP 4, XX pop=ESP+4. is out of the stack in a function call, the stack will be pushed into the parameter, the return address, EBP. If the function has a local variable, then, in the open space to the corresponding stack structure variables. The function terminates, the contents of these variables will be lost. But is not clear. When the function returns the pop-up EBP, restore the stack to the function call address pops the return address to the EIP to continue program execution. In the C language program, the stack is the reverse of the order parameter. For example, func (a, B, C). When the parameters into the stack is to press C, press B, and finally A. when take parameters, Instruction execution legend: Instruction area Executive area 0123 Zero Four 8 call 100 function parameters of 1 (3), 2 (10) C 100123 100 perform processing One hundred and four One hundred and eight 10C 110 return call stack area 0123 If EBP XX is not the space allocated over the place 200 save before EBP4 (pointer data segment can be used for local dynamic Now the EBP ESP- variable) is equal to the current value of dynamic data, ESP=200 204 0C 000000 Here is the return address of the program 208 parameter 1, filling 1 The 20C parameter 2 filled 2 Two hundred and ten Examples of WIN program DEMO, demo parameters lead to change the return address Clarifying the main 4 bit filling

您可能关注的文档

文档评论(0)

jgx3536 + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

版权声明书
用户编号:6111134150000003

1亿VIP精品文档

相关文档