Memory Protection Schemes
Since buffer overflows and heap overflows have come to be, many programmers have developed memory protection schemes to prevent these attacks. As we will see, some work, some don’t.
Compiler Improvements
Several improvements have been made to the gcc compiler.
Libsafe
Libsafe is a dynamic library that allows for the safer implementation of dangerous functions:
strcpy()
strcat()
sprintf(), vsprintf()
getwd()
gets()
realpath()
fscanf(), scanf(), sscanf()
Libsafe overwrites the dangerous libc functions just listed, replacing the bounds and input scrubbing implementations, thereby eliminating most stack-based attacks. However, there is no protection offered to the heap-based exploits described in this chapter.
StackShield, ...
Get Gray Hat Hacking, Second Edition, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.