Re:There’s a rootkit in the closet
by jrockway on Saturday March 13, 2010 @01:53PM
(#1189360)
He was able to find it for this reason; ldd is statically-linked:
But if you audit your /etc files or the list of files in the executable directory of your web app, you also would have noticed this. It's not really undetectable, as it doesn't hide itself or the things it needs to run at all. More people check /etc once in a while than check the md5sums of their binaries.
[ Parent
| on HN ]
It's not a static binary either, it's a script:
$ file `which ldd`
/usr/bin/ldd: Bourne-Again shell script text executable
It's also worth reading up on LD_TRACE_LOADED_OBJECTS and the possible exploits therein, e.g. http://news.ycombinator.com/item?id=902958If the attacker were a little more clever, they could have faked bogus ldd output too.
Running ldd can also invoke arbitrary code: http://www.catonmat.net/blog/ldd-arbitrary-code-execution/