 Okay, my name's Hubert. My work is a pen tester for a bank. I'm here to talk about a little slide. I'm here to talk about a little tool I wrote, which performs a man-in-the-middle attack on iPhones. Slide. So this is about the CVE 2011 0228 vulnerability, which was announced in June or July. And just a very brief intro to what the vulnerability is about. So you have SSL certificates, SSL certificate chains. So here we have an example of a normal certificate for PayPal. It's issued by the Verisign CA. Then there's an intermediate Verisign certificate, which has signed the PayPal certificate. Slide. Okay, ignore that. So here's another example of a certificate for another website. From startcom, which is signed as a cert for another website. Slide. Okay, so here's just looking at a small part of the certificate, which is the basic constraint, which says, is this certificate a CA certificate or not? Which is set to no. So any certificate you normally get from a CA will have that set to no. Slide. So normally, what we've done here is we've used a website certificate to sign a further certificate for PayPal.com, which is, of course, invalid. And any normal browser will reject this. But the bug in the iPhone is the iPhone will accept this. Slide. So yeah, so this is the description of the patch that Apple released. Something about SSL validation. Slide. So I wanted to practically exploit this. And has anyone used Moximal and Spikes SSL SNF? So SSL SNF is a tool written in C++, which does an SSL man in the middle attack. It connects to the target site, gets down on the certificate, generates a fake certificate and presents that. So I tried to use it, but it just didn't actually work with the iPhone. There was something wrong about the certificates that SSL SNF was generating. So I just decided to do it myself in Python. So the set up for that is just a Linux VM, a cheap $8 USB stick and AirbaseNG and DHCPD and IP tables. Slide. So here's the C++ code of SSL SNF. And after a lot of debugging, I found that the thing with the set version three, that's what was making it not work. So I kind of got SSL SNF working, but it's C++ code. It's like thousands of lines. It's a lot of hassle to work with. Slide. So I just decided to do it myself in Python. So I used the N2 Crypto module to generate a new certificate on the fly. Slide. Actually, this is the wrong version of the slide, don't mind. Slide. So basically, this is actually the right slide anyway. So yeah, so you basically have a Python tool, which intercepts traffic. Slide. And actually, if you look at the iPhone 3G, which was sold until 2009, actually until last year, all these are iPhone sales. So the iPhone 3G, which was sold until last year, the last supported software version for that is 421, which is permanently vulnerable to this. So I think there's about 20 million iPhones around, which will be permanently vulnerable to this bug. So yeah, so I think there'll be exploitable phones for this out for a couple of years. Slide. Yeah, so these are the resources. It's a little Python project on GitHub. This is some instructions for how to set up the Wi-Fi connection with IP tables and airbase. And these are the two advisories from the guys that found the original iPhone bug. Okay, thanks very much. Any questions? Yeah, was that an earlier version of the slides? Yeah, that was actually the current version of the slides. Okay, I apologize for that. If we have time at the end, we can maybe find the correct version. But yeah, you've got another 50 seconds for questions. Okay. Any questions? Put up your hand over there. Got to you. So Apple seriously doesn't patch a vulnerability like that even in older iPhones? Yeah, so basically with the iPhone 3G, they just decided it's out of support now, and the last supported software of that is 421. And the vulnerability was patched in 435. So if you have a 3GS or newer, you can patch, but if you have an iPhone 3G or older, there's no patch available. There is actually a patch available if you jailbreak the device. Someone has developed a jailbreak patch for it, but you could argue that makes your phone insecure in other ways. And that's your time. Give them a round of applause.