Thanks. This makes a lot of sense, and matches what I saw myself. I never got anything out of nginx, but I found apache quite easy. I never built more than a POC, and left it at that.
I didn't think about it at the time, but it was only on a newly started apache instance.
Coupled with the fact the apache as a frontend tls server is pretty rare on big sites nowadays, I'm feeling pretty good about what did happen, vs what could have happened.
It seems like a "feature" that you'd want your process to store the private key material as low as possible in the address space so that arbitrary read overruns don't run the risk of hitting it. It seems to just accidentally be this way in nginx, but I wonder if it should just be another (tiny) layer in the overall security design.
Didn't Juliano Rizzo already post that he'd been able to extract keys from a server? I'm not clear on the circumstances; for instance, it might have been right after boot, and it might have been Apache, and it might have been FreeBSD.
Errata security modified their original post to say that yes they are extractable. And a moderator properly fixed the title after the article was changed to reflect the retraction:
i suspect the memory accessible by this bug depends a lot on the software, OS and possibly hardware, e.g. on openbsd and bitrig amd64, the amount of memory leaked per exploit is less than 64 KB, closer to 32 KB. if you go much past the 32 KB mark on these OSes, it segfaults.
running an exploit script against one of our own services showed only 1-2 KB of information, most if it being the (public) cert, and the rest zeroed out.
I wonder if Cloudflare is logging all data sent to and from the challenge server, and then searching it for private key fragments. If not, they should be! As it's not guaranteed that a lucky attacker will be aware of receiving key material, if it is exposed.
what i am expecting ppl to see is that you can't actually get to the tls private key itself. we have done some testing with our backup service, cyphertite, and have yet to attack and actually compromise any keying material.
You all are involved in so many great open source projects -- just wanted to give a shout-out to Conformal. People do notice and appreciate your contributions.
It's a good idea but even if nobody successfully exploits this particular website with the heartbleed bug doesn't mean much for the rest of the vulnerable sites.
Since the bug exposes a few kilobytes of uninitialized malloc() memory the kind of data the attacker will retrieve is heavily dependent on the software the server is running.
I read elsewhere that the bug exposes first and foremost memory that OpenSSL itself used before (because OpenSSL has its own allocator running on top of malloc).
Is this really an accurate challenge? I have wondered if the true exposure risk from Heartbleed may be over-stated* due to memory separation between processes, etc. This however is probably a clean server with a fairly static install. There isn't a risk of things like session leakage which I think is the true risk of Heartbleed. Nor would there be the memory fragmentation that would occur in a production system. While intriguing I'm not sure how much it proves?
(* this is still good though as any risk is unacceptable and shouting Fire makes everyone move... and they need to on this issue)
It may be the case that Heartbleed did not practically expose private keys. The risk was not overstated in general, though; a virtually undetectable method that has been proved to do things like leak plaintext username/password credentials is still catastrophic.
Anything OpenSSL decrypts surely has to hit the OpenSSL process's memory, right? That would include requests, which could easily contain sessions, passwords, etc.
I wonder if one could use this server (or, of course, any other vulnerable server, but the hostname on this one is nice) for phishing people. For example, e-mail them the link, then try to snarf the referer header out of the server's memory in the hopes that their webmail URL contains something juicy, or give them a fake form that POSTs interesting data to it. Probably far-fetched, but it's amusing to consider.
I seriously don't expect anyone will find anything (reasons mentioned in the blog post), but that doesn't mean I haven't pointed my exploit that searches for private key material in the return buffer at it on a one second interval. If anything I suppose CloudFlare will be able to produce some pretty pictures of the amount of incoming heartbeats they received!
The bug was discovered by whitehat researchers approximately 12 days ago. It was publicly announced 5 days ago. We got early word of it from the researchers who initially discovered it, allowing us to patch our systems and ensure all sites behind CloudFlare were not vulnerable. However, we have no way of knowing how long blackhats may have had it. It had been present in the OpenSSL software for the last 2+ years. Therefore we're trying to get an informed sense of the security risks. Hence our work attempting to use the vulnerability to recover SSL private keys and, as announced today, the CloudFlare Challenge.
So out of curiosity, I ran the python heartbleed tester against their server. Surprisingly, the first (and every response thereafter) returned a memory dump which contained at least part of what looked like a private key. I immediately became skeptical when each of these apparent private keys ended in LOLJK.
Would a multi-process server engine help protect against this? Think what Chrome does with tabs. If the network request is received by a dedicated IO process which then uses IPC to communicate with other parts of the server, then perhaps sensitive information like keys would not be in the same address space so could not be leaked? I guess if the bug was in a sensitive process then it would still happen. Disclaimer: I have no idea how modern servers are architected, perhaps they already do this :) Would be interested to hear from anyone more knowledgeable.
If what CloudFlare is saying is true (and I think it is), that the only possibility of Nginx/Apache leaking the private key is on start up due to how low of a memory address the private key is given, is there anything in Nginx/Apache to fire a bunch of dummy requests at itself before accepting public connections? This should effectively bury the memory address that the private key is stored in. Would this be useful if it doesn't exist or would it only be useful in hindsight?
[+] [-] eastdakota|12 years ago|reply
http://blog.cloudflare.com/answering-the-critical-question-c...
Matthew Prince Co-founder & CEO, CloudFlare
[+] [-] ominous_prime|12 years ago|reply
I didn't think about it at the time, but it was only on a newly started apache instance.
Coupled with the fact the apache as a frontend tls server is pretty rare on big sites nowadays, I'm feeling pretty good about what did happen, vs what could have happened.
[+] [-] apaprocki|12 years ago|reply
[+] [-] conformal|12 years ago|reply
i've never felt so thankful for a memory allocation pattern.
[+] [-] danielweber|12 years ago|reply
I.e., is it a 8192-bit AES256 key?
[+] [-] dimsumdumdum|12 years ago|reply
[deleted]
[+] [-] unknown|12 years ago|reply
[deleted]
[+] [-] d0ne|12 years ago|reply
Conditions:
1) CloudFlare confirms success.
2) The winner publishes their solution, including source, publicly.
3) Promptly send the link to the publication to [adam | ionicsecurity | com] (for tracking the order of submissions)
Good luck!
[+] [-] indutny|12 years ago|reply
Hello Adam!
My email is public: [email protected] , and here is my proof of identity: https://keybase.io/indutny .
If you wish - you could contact me via it. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1
iQIcBAEBAgAGBQJTSJ7IAAoJEPsOEJWxeXmZYnkP/1r9qVARb89x2bAteh9RPcRI VGUmRZVz/1wLqy/LmvB+XwgkEGRyjQBCa2vHPi8PpwenLEl8IXMMYyzQSqx94tkV y54ZTwABtXXcPIaFOu4O8sG8RM6rDVsF9FpJICVxuYzrkyQPVDMEFa3faBNEgTHo zpgOf5keNq3nCnhTwhkMryBzYVVMLUdQy6JUzhzOXTarmgNH5CtRW0CzFN+9sxM9 6/EH1W4VcJt0lpcvCQK75Kv9syrbavB6qXP85b0gSvKcMHvkX0z5dPphUJcyL/9Q QyXE2vloNj6qwjLQRPoCymSjePeQsodhec47iQxVgil72U5X4YFYJpDHurE5KVOb VIGjmiXhAcL7M8MgywNNtP9iIsi45WiOBmNQVYrBr3/37TSL6FFMfpFVuOxxVrNV fRKRx7VFihTyYxqacwBLAkNPQ6V4QiEdEt74DQFZsokgk1dcchP4GrSypNbrM4SX SJW0RwqF1t44mvuAHmt0U6otgzKy4XyjmDGvki6FNE8ww+OIEQX6tgRPSTD0bURn PyNtZ1EKYZguQt3b4pveVK8JMgWxuCcO9LgKFbPTZJ8YBYOTCU6WtTm4OfCdnTG7 1EtOv6c2k5nlOiK11K8M9ZPEkjq//6C0MZFn1CB7/43+tkWDTr/vSayW/6Yi8pF5 /C1vMZXz3MmpY/gj9z+W =mH1/ -----END PGP SIGNATURE-----
[+] [-] suyash|12 years ago|reply
[+] [-] tptacek|12 years ago|reply
[+] [-] wglb|12 years ago|reply
https://news.ycombinator.com/item?id=7561399
[+] [-] conformal|12 years ago|reply
running an exploit script against one of our own services showed only 1-2 KB of information, most if it being the (public) cert, and the rest zeroed out.
[+] [-] quasque|12 years ago|reply
[+] [-] danielweber|12 years ago|reply
It's like multiplayer microcorruption.com
[+] [-] tptacek|12 years ago|reply
[+] [-] kaivi|12 years ago|reply
Has anyone already made a patch for this bug, where the lib returns random data instead of actual heap chunks?
[+] [-] unknown|12 years ago|reply
[deleted]
[+] [-] aus_|12 years ago|reply
[+] [-] tomvangoethem|12 years ago|reply
[+] [-] webXL|12 years ago|reply
[+] [-] conformal|12 years ago|reply
EDIT: forgot to cite neel mehta https://twitter.com/neelmehta/statuses/453625474879471616
[+] [-] jnbiche|12 years ago|reply
How many full-time people are working there?
[+] [-] wglb|12 years ago|reply
[+] [-] simias|12 years ago|reply
Since the bug exposes a few kilobytes of uninitialized malloc() memory the kind of data the attacker will retrieve is heavily dependent on the software the server is running.
[+] [-] ygra|12 years ago|reply
[+] [-] 51Cards|12 years ago|reply
(* this is still good though as any risk is unacceptable and shouting Fire makes everyone move... and they need to on this issue)
[+] [-] jerf|12 years ago|reply
[+] [-] jgrahamc|12 years ago|reply
[+] [-] thedufer|12 years ago|reply
[+] [-] 51Cards|12 years ago|reply
[+] [-] mikeash|12 years ago|reply
[+] [-] apaprocki|12 years ago|reply
[+] [-] forgotAgain|12 years ago|reply
At CloudFlare, we received early warning of the Heartbleed vulnerability and patched our systems 12 days ago.
I commented on that post that the date of discovery was 7 days ago http://www.vocativ.com/tech/hacking/behind-scenes-crazy-72-h...
For whatever reason that HN post was deleted and resubmitted so it now has no comments on it. https://news.ycombinator.com/item?id=7572796
Was the bug discovered 12 days ago or 7?
[+] [-] eastdakota|12 years ago|reply
[+] [-] dcu|12 years ago|reply
[+] [-] umrashrf|12 years ago|reply
[+] [-] dredge|12 years ago|reply
I do not expect this will make a material difference to the challenge - presumably you used the quoted commands to generate the answer.
[+] [-] pornel|12 years ago|reply
[+] [-] jkrems|12 years ago|reply
[+] [-] koliber|12 years ago|reply
[+] [-] zenojevski|12 years ago|reply
Seems like some experimenting (based on differing offset, and `%20` vs `_`).
[+] [-] haldean|12 years ago|reply
Still going to double-check though.
[+] [-] AshleysBrain|12 years ago|reply
[+] [-] X-Istence|12 years ago|reply
Even communicating over IPC you would still be vulnerable.
[+] [-] rubiquity|12 years ago|reply
[+] [-] kurokikaze|12 years ago|reply
[+] [-] unknown|12 years ago|reply
[deleted]