Few months ago, I applied to a PhD student position at Chalmers. I was lucky enough to be shortlisted, so I went to some in-situ interviews. And, incredibly, I have been accepted! :-)
Chalmers is a TOP 100 university. Most of the papers I read during the last months has been written by Chalmers researchers and for me is a great honor to be part of an academic institution with such prestige.
I’m going to move to the nice Gothenburg city in August. And I’m happy :)
During the last months and have been reading a lot about information flow analysis, with the remarkable Eduardo Bonelli‘s guidance.
Some months ago, as an exercise, I wrote two analyzers for a really short command set of Python (while, if and assign). Before remove that directory, it occurred to me that may exists a remote possibility that someone might find it interesting. So here it is, with a quick and dirty introduction to secure information flow.
The goal, in short words, is to avoid that variables tagged as secret (high confidential level) doesn’t leak to public variables (low confidential level). This may happen in two ways:
Explicit: A high variable is assigned to a low variable
public:=secret
Implicit: A low variable content depends on the content of a high variable
if secret == true
then public:=true
else public:=false
If there is no leak, we said that the code satisfies non-interference (wikipedia link). You can learn more about secure information flow analysis in the web. In my humble opinion, this is a good introduction.
A typical way (certainly not the only one) to detect these leaks is with type systems. This was the approach in both analyzers. The first one is a sort of an implementation of a fundation paper, by Volpano et.al.. I made an algorithm version (probably wrong) of the typing rules exposed in the paper. The code is here. This type of analyzers are called Denning-style, because Denning and Denning introduced those concepts in a 1977 paper.
The second analyzer (the code is here) is based on the formalism presented by Hunt and Sands in this paper. It’s a dynamic analyzer (Denning-style analyzers are static), which means that the non-interference can be broken in subprograms and still be good as a whole. This may be a little tricky. For example, this code is secure (the leak was overwritten with a 0) even when a subprogram (without the last line) is insecure: public:=secret
public:=0
In the context of my recent readings about Information Flow analysis, I wrote a little (tiny) Python module to operate elements of a finite lattice. Here is the code and usage tutorial. Comments are welcome. Patches to my broken English in the main page are very welcome.
Este es un delayed post, dado que DebConf10 New York City terminó hace 3 días. Aunque más tarde de lo esperado, no quería dejar pasar la oportunidad de comentar lo bien que la pasé. Siempre es agradable encontrarse con amigos.
Si bien pude dedicar mucho tiempo al security team (generé 3 nuevos DSA aunque, de momento, se ha publicado uno solo), me quedaron muchísimas cosas pendientes por hacer. Además tengo muchas nuevas ideas que me gustaría concretar durante el próximo año.
Entre los pendientes está el de subir fotos, para variar. Así que stay tunned! Para los ansiosos, hay publicadas fotos de otros asistentes aquí. También están disponibles las versiones preliminares de las charlas, donde se me puede ver dado una Lightning Talk, acerca de un prototipo para documentar workflows que se me ocurrió hace unos meses (minuto 10:40 de este video).
Since I am a housewife (i.e. since I live on my own) my concerns have been extended to foreign horizons, such as taming dust and lint. All my network devices and wires has a particular magnetism for them. To make things worse, the devices cleaning is quiet hard.
So, I decide to boxing them. All you need is a big tupperware and few rubber bands. Here is the process to build it:
Privacy at Facebook is heavy-duty. As a big fan of the Worlds Collide Theory I hate be tagged compulsively. I would like to select in which photos appear in my profile and feed. Since I couldn’t find that option in the setting menu, I looked for the answer in my favorite scripting language: Python.
This 60-lines-long script removes your tag from the latests photos where you has been labelled. You can download it from here. You may run it hourly (or every 15 minutes, or every 5 minutes, depends how paranoid you are) via cron or whatever.
Any improvement is welcome. It probably runs on Windows too. If you managed to do it, leave a comment for the others.
If I say “I got the third place in a scholarship application”, it doesn’t look bad.
But there is money only for the first two persons. Sometimes, close is not enough. So, without money, I won’t be able to study in Europe… damn…
Maybe next year… maybe not.
Note: The application was, as you can see, for a doctoral scholarship in Spain… my broken English has no effect here…
Some days ago, my new camera arrived. I bougth it via Amazon and the parents of a friend brought it to my country.
The selected model was a Canon PowerShot SX110 IS. My last camera was a Canon PowerShot A700. It has been in service since April 2006, until a terrible fall ended with its nice capability of taking good pictures, during the 25C3 in Berlin.
Yes, it’s me again with this DSA-1571 exploitation issue. The discovery, explanation and exploitation of the bug is now part of my final coursework for my postgraduate degree career. So, yes… sorry.
Some weeks ago I started suspecting about the attack to PFS in SSL with EDH. The key point is: the key space is dependent of the PRNG state. The bug affects the initialization of the PRNG, but the random string has not a pattern by it self. If you ask for many random numbers to the PRNG, you gonna get numbers that differ among them, since they are the output of a hash function of them self. So each random number depends on, besides the PID, the state of the PRNG pool in the moment (in other words, amount of bytes that you already pull from the PRNG pool before)
The explained attack was based in a fixed list of private exponents (which are selected randomly during the DHE handshake), presupposing that all the application call RAND_bytes() the same number of times before get it. To make the list of exponent I ran the openssl s_client with all the possible PIDs, hoping that all the applications behaves the same way.
After more tests I notice that that was an overgeneralization. The proof is in the pudding: wget and cURL, two simple CLI file retrievers, gets different exponent between them, even running with the same PID.
I was working on this when I accidentally found a really nice Eric Rescorla’s post which is deeply related with this. The post goes further and analyzes the interaction between how Apache forks off and how it generates SSL handshakes.
for i in $(seq $((2**15)));
do
export MAGICPID=$i;
LD_LIBRARY_PATH="openssl.broken/" LD_PRELOAD="./getpid.so" \
wget --no-check-certificate https://localhost/ -q -O /dev/null ;
echo $i ;
done
As you can see, I used the HD Moore’s GetPID faker shared library and a normal local Apache with mod_ssl. The broken libssl (which is in .openssl.broken/) store up in /tmp/data.key a csv with command name, PID and all the DH components (g, x, y and p).
But this way is farly unconfortable for others SSL deamon servers. Have you got any better idea?
Digamos que este post solo tiene sentido si es visto desde mi antiguo gestor de blog. De todas formas decidí portarlo aquí por razones históricas.
Desde ya hace tiempo que tenía intensiones de irme de LiveJournal. No es que funcione mal. Es que simplemente tiene cosas que no me cuadran. Me la paso adaptándome a lo que puede darme (como el caso de hack para el bloguear en planet.debian.org) y tiene limitaciones de diseño. La publicidad que empezó a surgir a la derecha de la pantalla es la gota que derramó el vaso. No es solo antiestética, sino que si decido tener publicidad es porque espero cobrar por ella.
Dado que RaqLink puede proveerme un hosting gratuito y que otros amigos han ofrecido espacio y ancho de banda, decidí mudarme y tener mi propio Blog que dependa de mi mismo.
Así fue como me decidí por WordPress. Es lindo, sencillo y flexible. Por otro lado, dudo de su seguridad. Y este último punto no es menor. Veremos que tal anda durante los próximos meses. Si da mucho problema… volará por otra opción. Escucho opciones.
Una cosa es segura. No más LiveJournal. Este blog (es decir, lbello.livejournal.com) deja de existir como tal. Puedes acceder al nuevo en www.lucianobello.com.ar. Todos los post antiguos está migrados. Incluso los comentarios. En la pasada se han perdido los tags y el threading de los comentarios. Los primeros irán emergiendo con el correr del tiempo y de mi ratos libros. El segundo está definitivamente perdido. Aunque los nuevos comentarios si pueden anidarse, los viejos han quedado planos.
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.
Let’s put it in plain words (if you know what we are talking about, ignore this and jump to the next heading):
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 primep and a generator g of the fieldZ*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 client makes Yc public by sending it to the server.
The shared 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 shared 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 mathematically secure and nobody can obtain it even having access to one of the parties after the aforementioned handshake.
The “exploit”
If an eavesdropper can explore the complete private key space (the all possible numbers for Xc or Xs), he/she will be able to get access to the shared secret. With it all the communication can be deciphered. That’s what this patch can do.
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.
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 )
We (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 decipher with stop itself.
The brute force attack should run in a background process (and with a progres 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.
Credits
Paolo Abeni <paolo.abeni at email.it>
Luciano Bello <luciano at debian.org>
Maximiliano Bertacchini <mbertacchini at citefa.gov.ar>
This work was partially supported by Si6 Labs at CITEFA, Argentina.
UPDATE Jul. 21st: See more and updated info here, especially this.
Warning: read the last update first. No more contributions are needed :D
The last weeks have been very active. A lot of e-mails from people and magazines, a lot of congratulations and a lot of free beer made me feel like a rock star :) Thanks a lot to everyone. I really appreciated that.
And maybe this petition would sound you like an abuse of this situation. And maybe you are right.
I’ve been accepted to explain the Debian/OpenSSL problem and I’m dying to be there. If you work for a company which is looking for a nice way to say “thank you”, please consider this option :)
update (13 minutes later): I just received confirmation from the Black Hat organization to be an alternative speaker there too! So I will need to fund 5 extra nights… :D
update (Jun. 6th): I already have a sponsor! :D. Thanks a lot to all the contributors/mentors/impeller ppl, especially to physical people for the monetary-small-but-emotionally-significant colaborations: Juan Tula and Alejandra García.
Well, maybe I was a little noisy with my first DSA. I will try to be quieter next time :)
I think that many people are being very unfair with the OpenSSL’s maintainers. They made (and are making) a really good job. Was an accident, that things happens.
What we need is a real auditory process of the Debian specific patches. It’s hard, but it’s necessary.
microluciano: @matiaskatz @rootedcon El proyecto sigue, pero yo ya no estoy involucrado.
Updated Sun, 29 Jan 2012 19:10:53 +0000
microluciano: RT @MarkBaggett: Alternatives to former google codesearch: http://t.co/SdCyEu5G http://t.co/xuY98GyZ http://t.co/GlbfmRR7 http://t.co/MY ...
microluciano: RT @NeckbeardHacker: Almost done with linux.js. Yes, it's my JavaScript implementation of the Linux kernel.
Why are you looking at me ...
Updated Mon, 16 Jan 2012 12:45:48 +0000
microluciano: Back in Gothenburg. The house is gleam and tidy, with new plants and decoration. This place is slowly becoming a home...
Updated Fri, 13 Jan 2012 00:28:54 +0000
microluciano: RT @chriseppstein: Epic. nasa goes open source with projects on github: http://t.co/ryPrNEq2
Updated Thu, 05 Jan 2012 19:09:07 +0000
microluciano: RT @ortegaalfredo: Hackers from the future will crack all your passwords, troll them: aortega:IsleeptWithYourGreatgreatgreatgreatgrandmother
Updated Thu, 05 Jan 2012 02:41:30 +0000
microluciano: Avoid the movie theater this night and watch https://t.co/aZtCIsnB Your welcome.
Updated Tue, 03 Jan 2012 18:00:49 +0000
microluciano: RT @chiri_basilis: Lucía Etxebarría dice que no escribe más porque la gente piratea sus libros. Hernán Casciari la consuela en Orsai. ht ...
Updated Thu, 22 Dec 2011 05:03:47 +0000
microluciano: Recommended travel reading: Logicomix, by Doxiadis and Paradimitriou. It fits perfectly in a AF418 flight length.
Updated Fri, 16 Dec 2011 17:36:04 +0000
microluciano: Buenos Aires, I'm going!
Updated Wed, 14 Dec 2011 11:53:29 +0000
microluciano: Cosas que se aprenden viviendo en Suecia. Capítulo de hoy: Lucia http://t.co/ZFqoHG3R
Updated Mon, 12 Dec 2011 21:41:59 +0000
microluciano: strange Swedish thing #452: For the students, my "check mark" (✓) on the side of the exercises means "wrong" #wtf #swedishproblems
Updated Sat, 10 Dec 2011 20:29:45 +0000
microluciano: first snow in Gothenburg :)
Updated Mon, 05 Dec 2011 23:20:12 +0000
microluciano: Best. research paper abstract. evar. http://t.co/v25oGqjc (via @boingboing)
Updated Thu, 24 Nov 2011 12:00:36 +0000
microluciano: on the subject of the anniversary of the Stanisław Lem's first book, the today's google.ru doodle
Updated Wed, 23 Nov 2011 08:11:22 +0000
microluciano: At London with @gsarasate during the weekend. Don't wait me awake.
Updated Fri, 18 Nov 2011 10:44:30 +0000
microluciano: RT @eklectica: ███████ ███ ██ █████ http://t.co/iSkuyrkA una excelente reseña sobre la estupidez del lobby norteamericano, léanlo
Updated Thu, 17 Nov 2011 12:12:15 +0000
microluciano: I showed to @gsarasate the second hand shops in Gothenburg. I have created a monster!!! muwhahaha...