LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-29-2010, 06:07 AM   #1
stabu
Member
 
Registered: Mar 2004
Location: dublin IRL
Distribution: Slackv12.1, Slamd64v12.1,Xubuntu v8.10_64, FC8_64
Posts: 438
Blog Entries: 5

Rep: Reputation: 32
dodgy executable: ldd any use at all?


If you get told that an intruder may have recompiled, say apache, to run a bunch of extra things, adn you want to check that, how far will ldd get you? You will be able to see if it uses any unusual libraries I expect.

However, if the the extra "things" just use libc well then, it's a very weak check, right? But what other tools are available to check in situations like that?
 
Old 04-29-2010, 08:06 AM   #2
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by stabu View Post
If you get told that an intruder may have recompiled, say apache, to run a bunch of extra things, adn you want to check that, how far will ldd get you? You will be able to see if it uses any unusual libraries I expect.

However, if the the extra "things" just use libc well then, it's a very weak check, right? But what other tools are available to check in situations like that?
lsof -p pid could be a good check.
would show all modules being used as well as ports and all files being used by the given pid.

strace -p pid will trace the system calls of the pid.


and snoopy will also tell you everything the httpd executable might be up to
 
Old 04-29-2010, 06:16 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by centosboy View Post
and snoopy will also tell you everything the httpd executable might be up to
It needs to be installed and ld.preloaded before the application to be investigated is executed.


Quote:
Originally Posted by stabu View Post
how far will ldd get you?
Like you indicated yourself: "it depends". BTW if the investigator runs code outside an isolated environment then also see some old thoughts about doing that in Compromising analysis tools.


Quote:
Originally Posted by stabu View Post
You will be able to see if it uses any unusual libraries I expect.
In investigations expectations and assumptions are (or should be considered) pitfalls as they colour your view. First port of call however should be to log MAC data, hash the binary and compare it to a known good copy so you know it's tampered with. Do note that while examining a root-owned binary is nice it doesn't cover the more important act of somebody replacing root-owned binaries.


Quote:
Originally Posted by stabu View Post
However, if the the extra "things" just use libc well then, it's a very weak check, right? But what other tools are available to check in situations like that?
objdump, nm, readelf, The Examiner, fakebust, strings and whatnot.
 
Old 04-30-2010, 05:48 AM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Don't run ldd on any "dodgy executable" because many known exploits exist if you do this. Well, they're not really exploits, but code can be run.
 
Old 05-10-2010, 08:26 AM   #5
stabu
Member
 
Registered: Mar 2004
Location: dublin IRL
Distribution: Slackv12.1, Slamd64v12.1,Xubuntu v8.10_64, FC8_64
Posts: 438

Original Poster
Blog Entries: 5

Rep: Reputation: 32
I'd like to thank centosboy, unSpawn and H_TeXMeX_H
for the very helpful remarks.
I will read several times over.
Cheers!!!!!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot run an executable, ldd fails too bozox Linux - Newbie 7 12-11-2009 06:20 PM
ldd on cross-compiled executable ranthal Linux - Software 2 10-19-2009 05:03 PM
"list dynamic dependency" of an executable using command other than "ldd" Amrita@3086 Solaris / OpenSolaris 3 04-04-2007 04:56 AM
Ubuntu 5.10 -> 6.06: diversion of /usr/bin/ldd to /usr/bin/ldd.amd64 by ia32-libs HellSpawn Linux - Software 2 06-04-2006 09:18 PM
Dodgy internet Xyem Linux - Newbie 25 06-15-2005 03:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration