- 7
- 0
- 约1.67万字
- 约 33页
- 2018-06-15 发布于江西
- 举报
缓冲区溢出光速入门(Introduction to the speed of light in buffer overflow).doc
缓冲区溢出光速入门(Introduction to the speed of light in buffer overflow)
Buffer overflow
Application: buffer overflow in interest but the masses always miss the point.
Author: watercloud@
Date: written in 2006-2, revised in 2007-9
Buffer overflow base
When buffer overflows are typically written to an array, the length of data written exceeds the size of the original array definition.
For example, before you defined int buff[10], then the only buff[0] - buff[9] space is when we define buff
The legal space of the application, but when the data is written, the buff[12]=0x10 is out of bounds. C language commonly used
Strcpy, sprintf, strcat, and other functions are very easy to cause buffer overflow problems.
When you look at books written in C language, you usually tell you that unexpected results can occur after the program overflows. In the network security
The art of using buffer overflow in the whole field is to make this unexpected outcome change to our desired result.
See the demo below: buf.c
Buffer overflow example by watercloud@ * / / *
#includestdio.h
Void why_here (void) / * this function does not call any place.
{
Printf (why, u, here, \n);
_exit (0);
}
Int main (int, argc, char * argv[])
{
Int buff[1];
Buff[2]= (int) why_here;
Return 0;
}
On the command line, compiled by the VC command line compiler (compiled and run in Linux under GCC) is the same result:
C:\Tempcl buf.c
Running program:
C:\Tempbuf.exe
Why, u, here?!
By carefully analyzing the program and printing the information, you can see that we have not called the why_here function in the program, but the function has not
Is called at run time!!
The only explanation here is buff[2]=why_here; the operation leads to changes in the program execution flow.
To explain this phenomenon, you need to understand some of the underlying C language (and computer architecture related) and some compilation knowledge, especially
Stack and the compilation of CALL/RET knowledge, if you still have a lack of this, it is recomm
您可能关注的文档
最近下载
- GB 50205-2020 钢结构工程施工质量验收标准.docx VIP
- 专业入职offer通知书模板及使用指南.pdf VIP
- 2024年衢州职业技术学院单招职业适应性考试必刷测试卷最新.docx VIP
- 八篇党支部党员在学习贯彻党的创新理论、加强党性锤炼、联系服务群众、发挥先锋模范作用、改作风树新风五个方面202年度个人对照检查.docx VIP
- 水利施工组织设计资料.doc VIP
- 2026中国水溶性肥料市场运营态势与未来发展新动向趋势建议报告.docx
- 2025年化工工程师固定床反应器反应器设计中的商业化专题试卷及解析.pdf VIP
- 2025年互联网营销师区块链营销合作伙伴的选择与生态构建专题试卷及解析.pdf VIP
- 2025年房地产经纪人抵押物灭失、毁损后的处理与登记专题试卷及解析.pdf VIP
- 统编版六年级语文下册课件《文言文二则-两小儿辩日》.pptx VIP
原创力文档

文档评论(0)