这个小程序是模拟堆栈溢出攻击的。很多堆栈溢出攻击的程序都是在这个基础上改进,无论是远程还是本地。 如果结合DLL注入,这个程序就可以实际应用了。 #include<iostream.h> #include<string.h> #include<windows.h> void ok() { cout<<"Successful!"<<endl; } void overflow() { char buffer[10]; unsigned char shell[] = "/xE6/x10/x40/x00"; strcpy(buffer,"AAAAAAAAAA"); strcpy(buffer+16,(char*)shell); return; } void main() { int s; overflow(); cout<<"haha!请输入您的密码"<<endl; cin>>s; ok(); } 明天再好好看看有没有什么新方法。