Buffer Overflow - SegFaults in regular user

我的梦境 提交于 2019-12-05 14:15:55

I just ran the code that you provided on a Ubuntu 12.04 VM and it worked fine. My guess is that you didn't turn off ASLR. Try it again with ASLR disabled by either

sudo su    
echo 0 > /proc/sys/kernel/randomize_va_space
exit

or

setarch `uname -i` -R ./stack

of course in order for it to spawn a root shell you will need to first do:

sudo chown root:root stack
sudo chmod u+s stack

Hope this helps ...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!