Tag: buffer overflow

如何在GCC,Windows XP,x86中编写缓冲区溢出漏洞?

void function(int a, int b, int c) { char buffer1[5]; char buffer2[10]; int *ret; ret = buffer1 + 12; (*ret) += 8;//why is it 8?? } void main() { int x; x = 0; function(1,2,3); x = 1; printf(“%d\n”,x); } 上面的演示来自这里: http://insecure.org/stf/smashstack.html 但它在这里不起作用: D:\test>gcc -Wall -Wextra hw.cpp && a.exe hw.cpp: In function `void function(int, int, […]