Disabling Stack Smashing Protection in Ubuntu 11.04

前端 未结 2 1221
渐次进展
渐次进展 2021-01-15 03:46

I\'m running 32-bit Ubuntu 11.04 on a 2007 MacBook, and I\'m just starting to learn about buffer overflow exploits. I\'m trying to run the example programs from a book, but

相关标签:
2条回答
  • 2021-01-15 04:17

    Are you sure you're passing -fno-stack-protector to the right gcc invocation? The given code doesn't appear to have a buffer overflow.

    0 讨论(0)
  • 2021-01-15 04:18

    I'm a bit more informed on what's going on now. The given code constructs a buffer and then passes it to a program called notesearch that has a buffer overflow vulnerability. I didn't figure out how to disable the protective measures on the current version of ubuntu, but the methods I tried do work on my Ubuntu 9.10 virtual machine. That is, -fno-stack-protector works as a gcc flag, and when paired with sysctl kernel.randomize_va_space=0, buffer overflows that execute shellcode on the stack are permitted. A bit of a workaround, but running my VM suits me well and allows me to continue through the examples in this book. It's a great book if you're interested in learning exploits. Here it is

    0 讨论(0)
提交回复
热议问题