Well it's finally happened - a friend has some sort of virus or backdoor sniffer on his Linux Redhat 8 server. As of about a month ago, he can no longer modify /bin or /usr/bin, even as root. Furthermore, "ps -fu <username>" no longer works (he gets a usage error), and an obscene message about a signal 11, when he tries to shut down. The obscene message can be found in a string contained in:
/usr/lib/nmh/include/lib/.sniffer
so presumably that's an evil packet sniffer that is getting a signal 11 when he tries to shut down.
The incident almost certainly happened on March 19 at 19:00, since find shows the following set of files modified or created at that time. Note especially the modification of /sbin/init and /etc/rc.d/init.d/functions, and the creation of a file libice.log at that time:
--------------------------------------------------------------------------------
find / -mount -print0 | xargs -0 -n 99 /bin.new/ls -ld | grep 'Mar 19 19:'
drwxr-xr-x 3 root root 32768 Mar 19 19:03 /dev/ida
drwxr-xr-x 2 root root 4096 Mar 19 19:03 /dev/ida/.hpd
-rwxr-xr-x 1 root root 10097 Mar 19 19:02
/etc/rc.d/init.d/functions
drwxr-xr-x 2 root root 61440 Mar 19 19:03 /usr/bin
-rwxr-xr-x 1 root root 15961 Mar 19 19:02 /usr/bin/(swapd)
-rw-r--r-- 1 root root 5 Mar 19 19:02 /usr/bin/x.pid
drwxr-xr-x 135 root root 65536 Mar 19 19:02 /usr/lib
drwxr-xr-x 3 root root 4096 Mar 19 19:00 /usr/lib/nmh
drwxr-xr-x 3 root root 4096 Mar 19 19:00 /usr/lib/nmh/include
drwxr-xr-x 2 root root 4096 Mar 19 19:05 /usr/lib/nmh/include/lib
-rw--w--w- 1 root root 1 Mar 19 19:00
/usr/lib/nmh/include/lib/.sniffer
-rwxr-xr-x 1 root root 28152 Mar 19 19:00
/usr/lib/nmh/include/lib/sk
-rw-r--r-- 1 root root 11 Mar 19 19:03 /usr/lib/libice.log
drwxr-xr-x 2 root root 4096 Mar 19 19:01 /usr/lib/libshtift
drwxr-xr-x 192 root root 12288 Mar 19 19:02 /usr/include
-rw-r--r-- 1 root root 5 Mar 19 19:02 /usr/include/linpid.h
-rw------- 1 root root 512 Mar 19 19:02 /usr/include/linseed.h
drwxr-xr-x 2 root root 4096 Mar 19 19:01 /bin
drwxr-xr-x 2 root root 8192 Mar 19 19:00 /sbin
-rwxr-xr-x 1 root root 28152 Mar 19 19:00 /sbin/init
-rwxr-xr-x 1 root root 33960 Mar 19 19:00 /sbin/initlib
--------------------------------------------------------------------------------
Googling shows that there is a buffer overflow exploit for nmh, but he's not sure he's ever used that to read mail (well maybe once). There are also exploits for imapdand he does run that through the firewall (ssl connection only).
More info, in case it helps anyone else recognize or avoid this. The bad guys modified /bin/ps, /bin/ls and /bin/netstat (he can tell because they have a newer date than everything else in /bin that was installed with Redhat 8).
He got a copy of an unmodified ps, ls and netstat. One thing he immediately found was that the bad copy of ps hides all occurrences of sshd, presumably so you won't know when someone logs into your system. Unfortunately, it's too stupid to hide only the unauthorized sshd's, so it even hides the ones that he knows should be there, because he's logged in from his Windows box. The bad ps also hides all instances of smbd, don't know why.
The bad netstat is currently hiding that fact that something is listening on tcp ports 1028 and 8080. He's got his Apache configured to listen on 8080, so that he can get through RCN's block; again he doesn't know why the hacker wants to hide this. Port 1028 is undoubtedly being listened to so that the hacker can connect from outside, but he doesn't have that port open in his firewall. He *does* have port 8080 open, of course, but Apache is listening on it (or maybe not).
He hasn't figured out what the evil version of ls hides, and maybe it's not working right, because he sure sees a lot of suspicious files with it, as shown above.
Still searching the web for the name of this malware and a cure.
Another friend got curious, Googled around and found these:
http://www.linuxquestions.org/questions/history/309040 http://honeynet.streetchemist.com/sc.../dvaartjes.txt
Apparently those responsible changed a lot of his utility programs. He will probably have to re-install.
Someone is behaving badly, but it is hard to tell who. One URL above suggests the hacker is in the Netherlands, the other suggests Romania. Probably it's neither; the bad guys are likely just hiding behind other machines they have compromised.
The first URL talks about how fast the hacker tried to cut out the machine's owner when the owner tried to protect his machine. Either the machine owner was just unlucky and being watched by a hacker at that precise moment or there is an organization or government doing these things which has the manpower to monitor its "private network". Also, there is obviously a LOT of effort involved on the part of the attackers to create alternate versions of so many programs. If one had to bet it's not a lone hacker....