Easy, realtime, system-wide Shellshock monitoring
draios.com
draios.com
Though none of the exploits I have seen thus far look very obfuscatible and therefore probably would've been discovered already.
Now that the exploit is public, people don't care anymore, but anyone who knew about this bug and tried to exploit it before it was public would be careful to avoid using a commonly-logged HTTP header.
https://docs.google.com/document/d/1vN2QOG2OZIAHGXDmd5wB8FPi...
What freaks me out though is that these systems were vulnerable. All this time; it was right there. Its like finding out you just drove from LA to NYC with nothing but a single loose lug nut on your left front tire.
With the LD_PRELOAD trick you can definitely secure your system, but you won't be able to see if there's a new service that is being used as an attack vector (for your own curiosity). With sysdig, you can, and if you capture a trace file you can also follow the exact process chain that caused the propagation of the environment variable.
Generally speaking, if you use something like iptables to block abusive hosts, you dive head-first into a very deep rabbit hole. Usually sysadmins don't want hosts blocked forever or iptables with 30k+ lines in them, so now you have to also add some kind of automated ban-clearing feature. Then you want to make sure you don't ban certain networks, so now you have to have some kind of whitelist feature. Then sysadmins will want to be able to tune which networks are trusted and which aren't, so now you have to add some configuration options for it. And so on.
I've written some software for my servers that does this for several different annoyances, and I spend almost as much time tuning the software as I spent dealing with the annoyances in the first place.
If sysadmins really want to auto-ban abusive hosts, you're probably better off letting them do it with something like Fail2Ban, and then all that muckety-muck becomes their problem, and not yours.
This is exactly the case. If bash has a bug. that must be fixed. And it has been done already. Just update bash in major distributions and the bug is gone.
But still you want to have a tool like sysdig to detect if your system has already been compromised previously and it is out of sysadmin control.
If you used the official Ubuntu packages, those are a few versions behind upstream (currently at 0.1.87 while we are at 0.1.89): http://packages.ubuntu.com/trusty-backports/sysdig.
What we recommend is uninstalling those ones (sysdig and sysdig-dkms) and just use the binaries that we, Draios, provide, following this: https://github.com/draios/sysdig/wiki/How-to-Install-Sysdig-...
Should be very easy, and sysdig --version should show 0.1.89
https://github.com/draios/sysdig/wiki/How-to-Install-Sysdig-...
Assuming you have a C/C++ compiler installed (comes via XCode) it really takes like 2 minutes.
Lazy alternative, in a couple days maximum Homebrew should be updated, unfortunately it doesn't depend on us.
Also, notice that sysdig for OSX doesn't (yet) have live capture, so you'll just be able to run the chisel on a trace file that you previously created on a Linux host.
Debian is currently at 0.1.88: https://packages.debian.org/sid/sysdig
And Ubuntu periodically merges all the unstable packages from Debian, so that's why they're lagging one version behind at this moment.
Thus, has somebody thought of exploiting and patching the attackers in response?
Common, but by no means ubiquitous.
http://seclists.org/oss-sec/2014/q3/696 http://seclists.org/oss-sec/2014/q3/734
The authors need a visit to http://contrastrebellion.com/
Now sysdig aint bad per se but id like to see it mainlined or using mainline code
- At this point sysdig is estimated to have tens of thousands of users, and we haven't gotten a kernel bug in a while, with people (us included) regularly using it a lot in production. Of course, I see the irony of mentioning this in a "shellshock" thread
- the dkms packaging should completely hide all the complexities required in maintaining a kernel module
- Part of the kernel code, if you look at the contributors, has been written/reviewed by gregkh, so we like to think the quality is "high enough"
- There might be plans at some point to try and propose a merge of the code to mainline
its not like if grekh code was bug free - theres a lot of bugs being fixed daily in the kernel as well.
additionally, the kernel distribution path has better verifications than sysdig's and sorry, ill trust that more than a few guys. It doesnt make your work any less, its just the way it is.