Rootkit infects Linux web servers
h-online.com
h-online.com
CrowdStrike: http://blog.crowdstrike.com/2012/11/http-iframe-injecting-li...
Kaspersky: https://www.securelist.com/en/blog/208193935/New_64_bit_Linu...
Both links were submitted to HN but didn't make the front page; I guess the third time's the charm?
CrowdStrike in particular concludes, "Based on the Tools, Techniques, and Procedures employed and some background information we cannot publicly disclose, a Russia-based attacker is likely. It remains an open question regarding how the attackers have gained the root privileges to install the rootkit. However, considering the code quality, a custom privilege escalation exploit seems very unlikely."
'The malware module was specially designed for the kernel version 2.6.32-5-amd64, which happens to be the latest kernel used in 64-bit Debian Squeezy. The binary is more than 500k, but its size is due to the fact that it hasn't been stripped (i.e. it was compiled with the debugging information). Perhaps it's still in the development stage, because some of the functions don’t seem to be fully working or they are not fully implemented yet.'
1. https://www.securelist.com/en/blog/208193935/New_64_bit_Linu...
No idea on how it gets there though, no details from any source I've seen.
My guess is you could detect the rootkit by booting to a known-clean system -- for example a distro install CD -- and checking the contents of rc.local by mounting the questionable system's fs.
This examination could probably be performed without downtime by taking an LVM snapshot and downloading it to a known-clean machine. The rootkit could fake the contents of the LVM snapshot as well, but it seems like this would be much harder for the rootkit authors and they probably didn't bother.
You might also be able to disable it by modifying your startup scripts to ignore rc.local (perhaps you could put a replacement in a non-standard location if you need the functionality).
This means you could just read the file byte-by-byte (I guess runnin dd a couple of times would work), though I haven't tried myself.
http://blog.crowdstrike.com/2012/11/http-iframe-injecting-li...
So its rc.local functionality is actually totally ineffectual.
> "Oh, this will never happen to me!" -everyone, long after they were hacked
this is the part of your statement I don't get (the other part, I'm not sure if it is well-grounded). Do you mean the guy wants to prove otherwise? Also, if the guy is a ;Windows guy' wouldn't he be much better at writing Windows targets?
I suggest you do not claim that your removal tool works until you have tested it successfully. this is true for all software, but is even more critical for something like this, since a false sense of security is actually far worse than just being infected.
- rootkit re-adds itself to the /etc/rc.local
- it patches the filesystem functions to hide itself when you read the file, so I am not convined grep will pick it up anyway
- you do not unload the actual kernel module if it is running, nor destroy the rootkit kernel module
- did you test it by installing the rootkit in a vm, and confirm that your code will detect and remove it? if not, i do not think you should publish such code just to give people a false sense of security when they run it and says "rootkit not present"
http://blog.crowdstrike.com/2012/11/http-iframe-injecting-li...
if ls -l /etc/rc.local | awk '{print $5}' != \ cat /etc/rc.local | wc -c
Also looks like you might be able to see it running with a ps also.