-
-
[求助]编译缓冲区溢出的小问题
-
2017-7-29 13:13
4354
-
一个 简单的程序
#include <stdio.h>
#include "string.h"
int main()
{
char password[100];
printf("\nPlease input your Password: ");
scanf("%s", password);
if (!strcmp(password, "stackoverflow"))
{
printf("Welcome to the new world\n");
}
else
{ printf("Login failed\nGoodbye!\n");
}
return 0;
}
限定密码最大个数是100个字节, 输入正确显示 Welcome to the new world ,错误显示Login failed\nGoodbye! 现在我为了让它溢出, 输入大于100个字节的密码,提示 程序崩溃
![](upload/attach/201707/752805_vi7l6suzke9wvyd.png)
然后我用IDA 设置端口1234动态调试,
![](http://bbs.pediy.com/upload/attach/201707/752805_d1q5hokghl58zro.png)
点击GDB调试以后,输入大于100字节的密码
![](upload/attach/201707/752805_jmvsxiya6efjcdr.png)
![](upload/attach/201707/752805_nnix02ywjhepies.png)
我想在IDA调试里面看$fp $ra 运行到哪崩溃的 ,但是IDA就一直显示Running就卡住不动了。
我很焦急啊,谁有知道原因啊 很感谢~~·
[培训]《安卓高级研修班(网课)》月薪三万计划,掌握调试、分析还原ollvm、vmp的方法,定制art虚拟机自动化脱壳的方法