No, I don't think you are safe. Did you look over your process list and account for everything that is running?
Also that "ev" command is an ELF binary parasite. I don't know if he ran the command on any of your files and I am not exactly sure what it actually does but it does attach some code to an ELF executable (this is possibly the first virus I have ever witnessed first hand in over 10 years in Linux, although it appears to have been manually placed). The code that it attaches is in the source file as binary so the instructions would have to be translated into assembler and interpereted. I can't find this source in Google but if the date stamp on the file is correct it has been around for almost a year (Mar 6 2003). I don't really want to make it available for public download but I believe it needs to be sent in to CERT and SANS, etc. I didn't come up with anything on a search there either. Now, I just wrote a script that should be able to scan your system and detect any files that contain this parasite. I believe it should work. You can grab the script here:
http://voidmain.is-a-geek.net/files/scr ... ndparasite
Download it, set it executable (chmod +x findparasite) and then scan your entire system by:
- Code: Select all
# ./findparasite / > /tmp/infected.lst
I only included a portion of the binary data to search for from the actual source. Let me know if anything ends up in your infected.lst file. Actually before scanning the entire system you might want to do some test runs on all your bin directories (/bin, /usr/bin, /sbin, /usr/sbin, /usr/local/bin, etc). I don't know if certain special files (device files, etc) will screw up the scan, or make it take an unbearably long time. I suppose I could check that myself now.
However, it really doesn't matter what was put on your system, none of that tells us *how* the person got in to your system and gained root privileges in the first place. I would say you definitely need to rebuild your system. All of your web content should be safe, except for possibly any binary executables (any PHP, Perl, HTML, etc should be ok). It would be nice if the drive could be removed and kept in the state it is in now and only accessed in a read-only way to try and figure out how the person got it.
Without finding out "how" the person got in you certainly can't be sure that they can't do it again, even after rebuilding your system. If you expose *any* piece of what is used on your old system then it may contain the vulnerability. It's also possible that they gained a password from sniffing a telnet/ftp session. It would be wise to have *everyone* have different passwords on your new system and to use encrypted protocols if at all possible (no ftp or telnet). And any management you may do though a web interface should be done via SSL (https).
I am going to see what I can do about reporting this to CERT. They may or may not be interested in it. In fact, might I suggest that *you* actually be the one to report it? Here is the CERT reporting page:
https://irf.cc.cert.org/
Feel free to give them the link to this thread so they can see what we have already done and found. You might also mention that the installed kit includes a parasite (ELF virus), including source, that we have not been able to find in any google searches.
EDIT: I have disassembled the included binary data from the source code and am now trying to interpret it. I'm a little rusty on my assembly so we'll see how it goes. :)