Pages

21 February 2009

simple function intercept in Linux

Few days ago, during my spare times, I wrote an article for an ezine named Echo zine. The article describe about how one could intercept a library call toward the usual libc library. For example, instead of calling normal rand() function of glibc, it will end up executing your own defined rand(). The trick is to utilize LD_PRELOAD environment variable so your library has higher priority to be linked into the ELF executable.

Without further ado, here's the link:

http://ezine.echo.or.id/ezine20/e20_0x05.txt

I welcome your feedback and comments...

regards,

Mulyadi.