Ret2libc意外输出

时间:2018-05-18 23:40:25

标签: stack exploit

我无法理解为什么当我尝试利用ret2libc时,我总是得到这个输出

double grandTotal = 0.0;
for (int i = 0; i < ROW; i++) 
{
    double totalArray = 0.0;

    for (int j = 0; j < COL; j++)
    {
        totalArray += dimenArray[i][j];
    }
    cout <<"The total of dimenArray is " << totalArray << "." << endl;
    grandTotal += totalArray;
}
cout << "The total of all rows is " << grandTotal << "." << endl;

return 0;

1 个答案:

答案 0 :(得分:0)

问题是我没有传递包含/ bin / sh \ 0字符串但仅包含/ bin / sh的地址。然后我发现可以在libc return to lib_c buffer overflow exercise issue

中轻松找到/ bin / sh \ 0