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.

4 comments:

ganda said...

ni saya mas
your post is ok

lazzybear said...

nice one...

simple and right to the point

thanks for sharing

lazzybear said...

nice post

ada tempat lain gak yang mirip2 ini postingan nya

thanks

Mulyadi Santosa said...

@ ganda: thanks for reading....

@ lazzybear : sorry lama approve. Teknik ini sebenarnya diambil dari dokumentasi linker di Linux. Trik trik lain mungkin bisa dibaca di blog Ulrich Drepper. Maaf lupa URL nya