Re:Overriding C++ virtual functions at run time
by mehrdada on Sunday August 09, 2020 @06:46AM
(#24098692)
As you might imagine, overwriting vtables in memory is a common technique to hijack control flow and making your program execute attacker's code in an exploit.
[ Parent
| on HN ]
Re:Overriding C++ virtual functions at run time
by saagarjha on Sunday August 09, 2020 @06:53AM
(#24098715)
Patching function pointers in general is very desirable thing to be able to do when writing these kinds of things. vtables are interesting because unlike normal C function pointers they can only be used in a standards-compliant manner in a few very limited ways, so if you’re implementing control flow verification you can really ratchet up the security for these. For normal C function pointers, sadly, the best you can do is usually very little, if anything at all. Especially because the use of non-compliant constructs like forging ordinary function pointers is extremely common in things like language runtimes.