mach_star is an open-source code suite for suppressing, replacing and/or extending Mac OS X functionality at a very low level. Its principal components are
mach_override (replace and/or extend existing functions at runtime) and
mach_inject (dynamically load your code into a running process). If you're new to
mach_star, be sure to check out the documentation and project layout to get the lay of the land.