

Intercepting functions from statically linked libraries - Halienja
http://securitycafe.ro/2015/01/28/intercepting-functions-from-statically-linked-libraries/

======
Ecco
Smart. I'm not sure how solid this is though: you would have to build the
dynamic lib _exactly_ as the static binary (same arch, subarch, optimizations,
etc...). Now that I think about it I'm even surprised it worked at all in his
example.

~~~
msherry
Maybe. If you're just loading constants onto the stack, it seems like it would
be pretty forgiving of optimizations and such, and even work across
architectures (assuming the same endian-ness, at least).

I'd definitely look for init code for some calculation (as it appears the
author has done here), rather than actual computation code, since, as you
point out, optimizations could have a huge impact on the instructions emitted
for those.

