References:
CFI with shadow stack.
Dispatcher function/gadgets:
Any function that contains a “write-what-where” primitive when the arguments are under the attacker’s control can be used as a dispatcher function. Alternatively, a function that can write to only limited addresses can still work as long as the return address is within the limits.
e.g. memcpy()
. Assume we can control all the arguments to memcpy()
:
memcpy()
’s return address will be found;memcpy()
e.g. printf()
: use %n
format specifier, to write an arbitrary value to an arbitrary location –> printf()
to overwrite its own return address.
??? how does printf() work? see Appendix B.
If you could revise
the fundmental principles of
computer system design
to improve security...
... what would you change?