-   Linux - Security (
-   -   Is '/usr/bin/find' reliable if '/bin/ls' has been replaced? (

DigaMe 11-12-2004 03:54 PM

Is '/usr/bin/find' reliable if '/bin/ls' has been replaced?
I have a system running RH9 which appears to have been compromised. I believe /bin/ls has been replaced with a "customized" version to confound attempts at inspecting the system. I am using /usr/bin/find (which appears to have been left alone) in order to identify all files which have changed since the time of the compromise (I don't think the intruder was clever enough to hide the footprints he left in the modifcation times of the files). My concern is that, if find relies upon ls, its output may also be unreliable.

Thanks for your help!

btmiller 11-12-2004 05:41 PM

I'm pretty sure that find just calls the stat system call directly, without interpreting ls results. However, if you suspect binaries have been replaced, you really ought to boot of known good media such as a rescue CD and then run a rootkit detector.

Capt_Caveman 11-12-2004 10:42 PM

You can try using rpm -Va to verify the integrity of system files (assuming that the md5sum and rpm binaries haven't been replaced either). Probably the best way to verify is to use a cdrom-based distro like knoppix and mount the potentially compromised drive read-only. Then calculate md5sums and compare to the "normal" versions. If your system has been compromised, then you will need to reformat the drive and re-install completely (don't reinstall from a backup). Simply replacing trojaned versions isn't a safe way to recover from a security compromise.

All times are GMT -5. The time now is 04:24 PM.