My client's Linux server recently got compromised by unknown means (highly likely because of a weak password). When I first logged into the compromised server I discovered the following:
The Log files were wiped
SSH last login IP still had my IP and date and not the intruder's
Following malicious code in a cron was found:
#!/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/X11R6/bin
for i in `cat /proc/net/dev|grep:|awk -F {'print $1'}`; do ifconfig $i up& done
cp /lib/libudev.so /lib/libudev.so.6
/lib/libudev.so.6
I am doing a forensic investigation to find out what exploit was used and how the server was hacked. Current presumption is SSH password Bruteforce, but I have no evidence to prove it.
My questions would be:
- Where is the SSH last login stored? Was it tampered with?
- Why does the DDoS Virus maliciously deal with the libudev library?
- Do you know exactly which virus this is? I've seen a couple of other questions containing this kind of code, but no answer which kind of DDoS virus exactly it is.
- What does this code line do?
for i in `cat /proc/net/dev|grep:|awk -F {'print $1'}`; do ifconfig $i up& done
Thank you for your time.