Luciano Bello: Exploiting DSA-1571: How to break PFS in SSL with EDH
( I love acronyms :-D )At this point, all of you should know and see how the H D Moore s toys work. Those toys attack SSH public-key authentication using clone keys and online brute force.
Furthermore, many of you know that there are other effects produced by a biased PRNG besides this one.
Strangely, I could not find more of those toys exploiting these aspects. So, I would like to show you a Wireshark patch which attacks Perfect Forward Secrecy (PFS) provided by Ephemeral Diffie Hellman (EDH).
Introduction to EDHLet s put it in plain words (if you know what we are talking about, ignore this and jump to the next tittle):
In an insecure communications channel the parties agree a common key to cipher their dialog. This is what happens in SSL (in most of the cases, depending on the cipher suite):
- The server selects a random prime p and a generator g of the field Z*p (Let s ignore the mathematical properties of these values). So, the components p and g are public.
- The server picks a secret random number Xs and calculates Ys=gXs mod p. Ys is public and is sent to the client (just like p and g).
- The client does something similar, selecting a secret random number Xc and calculating Yc=gXc mod p too. The clients makes Yc public by sending it to the server.
- The share secret s is the public key of the other part to the exponential of the own private number, all in p modulus. That is, for the client s=YsXcmod p and for the server s=YcXsmod p.
- With this share secret the parties can encrypt all the following messages in a secure way.
- In the Ephemeral Diffie Hellman (EDH), the private numbers are ruled out, so s is mathematicaly secure and nobody can obtain it even having access to one of the parties after the aforementioned handshake.
A Wireshark with this patch and a list of possible private keys will try to brute force the share secret. If one of the parties is using the vulnerable OpenSSL package the communication is totally insecure and will be decrypted.

- The patch can be downloaded from here.
- Debian packages with the patch applied can be found here.
- This is a list of all 215 possible 64 and 128 bit DH private keys in systems vulnerable to the predictable OpenSSL PRNG described by DSA-1571.
- An example of a pcap file can be found here (it was built with a vulnerable client and one of the Moore toys, a hacked getpid by running $ MAGICPID=101 LD_PRELOAD= getpid.so ./vulnerable-openssl/apps/openssl s_client -connect db.debian.org:443 )
Issues that can be improvedWe (the other developers and myself) detected few things to be improved. But we will do nothing for them. So, If you want to contribute with some code, start from these items and submit the patches to the Wireshark s bugzilla:
- When the packets are out-of-order the decypher with stop itselft.
- The brute force attack should run in a background process (and with a progression bar)
- Check the length of the keys before trying to brute force them.
- The patch also implements the display of public DH parameters in the packet tree. It s incomplete.
Luciano Bello <luciano at debian.org>
Maximiliano Bertacchini <mbertacchini at citefa.gov.ar>
This work was partially supported by Si6 Labs at CITEFA, Argentina.
I’ve been writing a lot about
One of the reasons that I didn’t post much last week was that I was contacting some of
A little while ago I completely rewrote the
After many years with ion, I've switched to using the
Plans for the month:
Yesterday I was forced to test my backup system in anger, on a large scale, for the first time in months.
A broken package upgrade meant that my
Looking through mail logs.
After 7 days or so of spamassassin churning, I've managed to
process about 20 days of e-mail and caught up to email since
5 days ago.
Looking at some bugs to see if something is urgent.
'churro' is the name of the Debian i18n server (i18n.debian.net),
hosted by the Extremadura region in Merida (IIRC). That server was
setup back in september 2006, during the first Extremadura i18n
meeting.
Since then, a lot of hidden work happened on it, mostly moving all scripts that build statistics pages from Debian localization data, for instance the
Today I was busy porting reportbug-ng to QT4. One really cool thing I noticed is the new QWebView widget, which is the main widget of the QWebKit module. It works surprisingly easy compared to the good old QTextBrowser of QT3 — now you can just throw an URL at it and it will render the page nicely complete with CSS, images, etc.
Here’s the obligatory screenshot:
as you can see, the bugreport looks much better than in the old version of rng. WebKit does a really good job rendering the HTML, I think the fonts look even smoother than under firefox.
To ease the transition to from QT3 to QT4 I’ve extracted all the Debian BTS specific stuff to
While all of Belgium is buzzing over the fact that now the
(occasionally, the poem is one of the better-known poems by
expressionist poet Paul van Ostaijen, my favourite in the Dutch
language)
This is a
After having it for about two days, I must say I'm quite happy with
it. Reading text on this device is way, way more comfortable
than trying to read anything on my laptop, or something similar. Having
said that, there are a few quirks with it, which I hope future
firmware-updates will fix:
I finally got back from Switzerland. Google invited all the Summer of Code students to visit their offices. I chose to go to the Zurich one. It wasn’t the closest (London was) but it was the largest and it had more engineers than MBAs.
So first the bad news is that I'm not coming to DebConf this year. There are a few reasons for this. It's fairly far and expensive. I thought the lineup of talks was pretty similar to the last two years. And perhaps most fundamentally, I don't want to go somewhere cold (well, cool) in the summertime. I think this may be a Canadian thing, but I love summer time and I don't want to squander any of my warm days. So have a good time folks, I'll miss you and I'm certainly going to make the effort to be there next year. And lets hope DebConf 10 is in Montr al :)