Ret2win
基本信息
C示例
#include <stdio.h>
#include <string.h>
void win() {
printf("Congratulations! You've called the win function.\n");
}
void vulnerable_function() {
char buf[64];
gets(buf); // This function is dangerous because it does not check the size of the input, leading to buffer overflow.
}
int main() {
vulnerable_function();
return 0;
}使用Pwntools的Python攻击脚本
保护措施
其他示例和参考资料
ARM64示例
Ret2win - arm64最后更新于