|
About ::
TODO ::
Blog ::
RSS ::
Old blog ::
Projects ::
GIT ::
Gallery ::
Notes
Thu, 08 Feb 2007
Glibc function pointer encryption. One of the remaining attack vectors in the runtime are function pointers in writable memory. Overwrite the value and you can redirect execution. Of course the pointer must actually be used and randomization must be overcome, but it's theoretically possible.But let's see, what exactly is implemented? Searching for PTR_MANGLE/PTR_DEMANGLE
macros shows, that only some registers in setjmp() code
and atexit() and iconv related pointers, all of them are stored
in private areas already, and hacker will crack his head just to find, for example,
list of exit functions to change. It is much easier to overwrite GOT for example
or implement other 'return-to-glibc' technique, instead of searching for private function pointers
in the glibc...And even that encryption is not that complex - pointer is XORed with value stored in TCB at fixed location from the start, so if attacked can access %gs register, he knows that secret value. It is of course a good step, but it does not provide any real security, which is advertised by RedHat. Likely it was the only reason I started to upgrade FC5 to FC6 - I wanted to check how pointers are encrypted and tried to determine if it is possible to hack that. /devel/other :: Link / Comments () |