WEBVTT

00:00.740 --> 00:02.240
Hello everyone.

00:05.540 --> 00:07.100
Hi at the back.

00:07.360 --> 00:09.620
Alright, I'm going to do that awkward thing.

00:09.620 --> 00:12.340
How quiet does it get in here before I start talking?

00:13.040 --> 00:13.880
Yes.

00:14.300 --> 00:15.500
Do we have to look at people?

00:15.960 --> 00:17.320
Alright, okay.

00:17.600 --> 00:18.420
Hello.

00:18.660 --> 00:23.100
Today we are talking about rogue access point attacks.

00:23.480 --> 00:25.860
Improvements on the Karma toolkit.

00:25.860 --> 00:28.000
We built a toolkit called Mana.

00:30.000 --> 00:33.620
So just a quick disclaimer, I'm sure you've seen a hundred of these today.

00:34.720 --> 00:39.620
It's really difficult to demo this stuff without picking somebody up.

00:39.900 --> 00:42.460
So please turn off your Wi-Fi if you don't want to be part of it.

00:42.460 --> 00:45.480
We've reduced our transmit power, things like that.

00:45.820 --> 00:49.620
We're not trying to be malicious, but we can't demo the research otherwise.

00:50.060 --> 00:56.700
If you leave your Wi-Fi on and you stay here, we're going to take that as your consent that you're okay with stuff to continue.

00:56.700 --> 00:57.460
But it's not our intent.

00:57.460 --> 00:59.720
We're not going to be putting up people's passwords or anything like that.

00:59.720 --> 01:02.060
We're going to be targeting our devices.

01:02.060 --> 01:03.200
So just a quick disclaimer.

01:03.200 --> 01:07.700
If any of you are for law enforcement, please don't arrest us.

01:09.900 --> 01:10.700
Okay.

01:11.200 --> 01:13.180
Hi, I'm Dominic and this is Ian.

01:13.180 --> 01:14.700
We did this work.

01:14.740 --> 01:17.940
We work for a company in South Africa called SensePost.

01:18.880 --> 01:24.060
We're a pen testing firm and those are our contact details if you want them.

01:25.460 --> 01:26.140
Okay.

01:26.140 --> 01:31.220
So why are we looking at Wi-Fi in particular and rogue access point attacks?

01:31.220 --> 01:32.340
Those things are lame.

01:32.340 --> 01:35.120
Every pineapple has got Karma on it.

01:35.120 --> 01:36.760
We can run this stuff.

01:36.760 --> 01:37.380
Yeah, so what?

01:37.380 --> 01:38.080
Nothing new.

01:38.080 --> 01:39.800
Karma attacks 2004.

01:40.160 --> 01:42.260
This is old school.

01:42.600 --> 01:48.000
So Wi-Fi is at a point where it's like your skiddy's first day out.

01:48.000 --> 01:53.480
You want to get into hacking, you either pick up a pair of lockpicks or you pick up a pineapple and you start doing Wi-Fi stuff.

01:53.480 --> 01:56.380
And there's a couple of reasons for that.

01:56.380 --> 01:59.740
So the one is we all recognize that Wi-Fi is ubiquitous.

01:59.740 --> 02:01.560
We've got it just everywhere.

02:02.320 --> 02:04.300
Plus it gives us access to coolness.

02:04.300 --> 02:08.640
We've got all the cloud services that people are going to use.

02:08.940 --> 02:09.800
Should I?

02:09.880 --> 02:11.000
Do I need to like stare up here?

02:11.000 --> 02:11.460
Okay.

02:11.460 --> 02:14.040
We've got all the cloud services that you can get access to.

02:14.040 --> 02:15.380
It gives us lots of goods.

02:15.500 --> 02:18.080
It's not like you're just communicating with some local server.

02:18.080 --> 02:20.580
You're communicating with stuff that runs your life.

02:20.580 --> 02:26.200
And it means we can use 20-year-old Ethernet attacks because we're on the same local network.

02:26.200 --> 02:30.600
So we've got toolkits spanning decades that allow us to bring a taxi.

02:30.600 --> 02:32.660
I mean, ARP spoofing is still a thing.

02:33.320 --> 02:37.100
So Wi-Fi is a pretty exciting thing to go for.

02:37.100 --> 02:46.000
Except the attacks, like we haven't really seen anything new coming out from Rogue AP stuff really since Karma in 2009.

02:46.840 --> 02:51.200
So we've got these vulnerabilities at every layer of the Wi-Fi protocol.

02:51.200 --> 02:57.360
So we can spoof, trick devices into connecting to our malicious networks with Karma attacks.

02:57.360 --> 03:02.420
Dino Daizovi, Sean McCauley, 2009-2004, they presented that stuff.

03:02.800 --> 03:07.080
Once we get something to connect to it, we can crack the crates.

03:07.080 --> 03:10.360
If you can capture a handshake, you can crack WPA.

03:10.360 --> 03:17.860
If you capture MS-CHAP things, you can send that through a sleep or cloud cracker, and you can crack that stuff.

03:17.860 --> 03:20.220
Cool, so those two layers are handled.

03:20.220 --> 03:23.660
Once you're connected to the network, we can sniff everyone's passwords.

03:23.660 --> 03:26.280
Doug Song released DSniff back in 2000.

03:26.740 --> 03:35.560
Since then, we had Robert Graham release, I think it was at DefCon, Hamster and Ferret, does anyone remember Hamster and Ferret?

03:35.840 --> 03:38.700
In 2007, I think it was.

03:38.700 --> 03:42.060
Then we had Fire Sheep in 2010, which got everyone excited.

03:42.060 --> 03:46.260
It's all the same stuff, it's just new implementations of it.

03:47.900 --> 03:50.760
Once you connect to a network, we can capture all these creds.

03:51.720 --> 03:57.360
We've got these vulnerabilities at every layer of the network, and we should have creds falling from the sky.

03:57.660 --> 04:10.320
You should be able to be a pen tester where you can walk into a company and you'll just have passwords showing up, and then you can go home and log in remotely, and you've saved yourself a bunch of on-site work.

04:10.320 --> 04:13.260
But the truth is, that doesn't happen.

04:13.680 --> 04:22.360
You've played with your pineapple, you've done it, and you've got a few people who are still checking mail over pop, but you haven't really got much else.

04:22.560 --> 04:25.420
Because these tools don't work as well as they used to.

04:25.460 --> 04:31.320
So in 2004, when Karma was released, that stuff worked really well, but now Karma doesn't work so well.

04:31.320 --> 04:44.520
If you look at your average Android device, particularly the newer ones, if you look at the list of available networks, the networks that the Karma device is probing, responding from, don't show up.

04:44.520 --> 04:46.400
So it means it doesn't automatically connect to them.

04:46.400 --> 04:49.180
Your home network is not going to get automatically connected to you.

04:49.580 --> 04:54.160
iOS devices have dramatically reduced how much probing they do through a variety of things.

04:54.160 --> 04:55.880
I'll go into more detail on this stuff.

04:55.880 --> 04:58.740
But we end up in a state where the Karma attacks don't work so well.

04:58.900 --> 05:03.940
When it comes to the network-sniffing stuff, the stuff is old.

05:03.940 --> 05:06.380
Doug Song released that stuff in 2000.

05:06.380 --> 05:12.920
If any of you have run message-snarf recently, it's still looking for MSN messenger messages.

05:12.920 --> 05:16.000
You're not going to see that stuff going over your average network anymore.

05:16.840 --> 05:18.480
FireSheep was a flash in the pan.

05:18.480 --> 05:20.240
That stuff doesn't work anymore.

05:21.260 --> 05:23.500
Over the years, these tools have been written.

05:23.620 --> 05:24.940
They stopped working.

05:24.960 --> 05:36.060
So right now, the current state, we've got this promise of vulnerabilities at every level, where we should have creds falling from the sky, but actually we're crawling through the desert with a little bite to eat every now and again.

05:36.920 --> 05:39.620
So we put this toolkit together called M.A.N.N.A.

05:41.220 --> 05:42.880
Truthfully, we liked the idea of M.A.N.N.A.

05:42.880 --> 05:47.380
from heaven for the talk, so we tried to come up with a backronym that would be something cool.

05:47.380 --> 05:48.680
We can't come up with anything cool.

05:48.680 --> 05:49.940
At the moment, we're sitting with M.A.N.N.

05:49.940 --> 05:52.320
in the middle and Network Attack Toolkit.

05:53.160 --> 05:54.160
It's still stupid.

05:54.160 --> 05:56.080
So if you have a better backronym, please share that with us.

05:56.080 --> 05:57.360
We'd be really open to it.

05:57.820 --> 05:58.580
So the M.A.N.N.A.

05:58.580 --> 06:09.640
toolkit, we've built some stuff and we've combined a bunch of things together and it's, at the moment, a horrible mash of lots and lots of things but you can run a single command on Kali and it'll work.

06:09.640 --> 06:11.740
So it's a horrible mash that works.

06:11.740 --> 06:14.460
We hope to get it into a better state.

06:14.720 --> 06:18.300
Alright, I'm going to teach some of you to suck some RF eggs.

06:18.740 --> 06:23.000
Just a quick targeted Wi-Fi primer on stuff you need to understand this.

06:23.220 --> 06:24.640
So we're talking Wi-Fi.

06:24.640 --> 06:29.220
We're not talking 3G, Bluetooth, RFID, anything like that.

06:29.220 --> 06:33.320
We're talking 802.11 a, b, g, n, a, c.

06:34.560 --> 06:38.100
We're specifically, for the beginning part at least, looking at management packets.

06:38.100 --> 06:42.080
So some of you will know, in Wi-Fi, you've got control packets, data packets, and management packets.

06:42.180 --> 06:44.220
So control packets are the things that'll say...

06:45.000 --> 06:49.620
the device will say, hey AP, I want to send some data and AP will say, everyone shut up!

06:49.620 --> 06:50.800
And then it'll send some data.

06:50.800 --> 06:52.980
Those are request to sends and clear to sends.

06:53.200 --> 06:55.200
And then data packets are the actual data.

06:55.200 --> 07:01.780
And management packets have got probe requests, probe responses, and beacons, which are the ones we're most interested in.

07:01.820 --> 07:06.400
So every wireless network has beacons that come out constantly.

07:06.400 --> 07:09.780
It's how you get the timing on the network, know when to communicate.

07:10.000 --> 07:12.820
And they've got a bunch of information in it, like the SSID.

07:12.820 --> 07:17.060
If you hide your SSID, then the beacon won't have the SSID in it.

07:17.060 --> 07:24.880
And then probe requests and responses are how devices talk, figure out how to associate two networks and which networks are nearby.

07:25.380 --> 07:27.800
So this is a really simplistic diagram.

07:27.800 --> 07:42.340
But when you, on your average device, be it a laptop or a mobile device, when you click on the Wi-Fi thing and look at the networks nearby, what'll happen is your client will send out a broadcast probe request, and then all the nearby access points, we've only got one here,

07:42.340 --> 07:45.580
but all the nearby access points will respond with a probe response.

07:45.580 --> 07:48.080
If the network's hidden, then it won't respond.

07:48.080 --> 07:52.460
It'll only respond if you probe directly for that network, so you have to know the name beforehand.

07:52.760 --> 07:56.480
Okay, so I'm sorry if some of you know this, but it's necessary.

07:57.540 --> 08:02.520
Okay, once you decide to associate to a network, then this step happens.

08:02.620 --> 08:06.300
I've actually cut out a bit in the middle because nobody used shared key authentication.

08:07.080 --> 08:14.420
So once I've done my search and I've seen there's a DEFCON network nearby, I'll then click on the DEFCON network.

08:14.420 --> 08:21.780
My device will send another probe request, but now it's directed for the DEFCON network, get a probe response from the access points, and then it associates.

08:21.780 --> 08:23.560
Any of you familiar with the AirCrack suite?

08:23.560 --> 08:26.940
If you use AirReplay fake auth, this is exactly what fake auth does.

08:26.940 --> 08:30.500
When you get that association ID, you've hit this part here.

08:30.980 --> 08:32.480
So this is how stuff associates.

08:32.480 --> 08:34.220
Now, it's important to note that there's two things.

08:34.220 --> 08:37.300
There's finding networks, and there's associating to networks.

08:37.600 --> 08:40.880
Because current Karma attacks deal with this part only.

08:42.600 --> 08:44.560
Okay, so Karma attacks.

08:44.560 --> 08:46.120
Sean McCauley's at IOActive.

08:46.540 --> 08:48.180
I'm not sure what Dino is these days.

08:48.560 --> 08:50.840
He's either fun-employed or something.

08:51.780 --> 08:56.600
2004, I mentioned that they came up with this really cool stuff that if...

08:57.800 --> 08:58.520
I mean...

08:59.060 --> 09:00.840
Yeah, they came up with these Karma attacks.

09:01.280 --> 09:02.980
So I've got a...

09:02.980 --> 09:06.080
Do Americans play Marco Polo when you're kids?

09:06.080 --> 09:07.600
Oh, I don't want to be prescriptive.

09:07.600 --> 09:08.580
Some of you aren't Americans.

09:08.580 --> 09:10.220
So you guys know what Marco Polo is.

09:10.220 --> 09:12.400
Okay, so just in case, because I saw some people doing this.

09:12.400 --> 09:14.620
Marco Polo is a kid's game you play in the pool.

09:14.620 --> 09:15.740
Somebody closes their eyes.

09:15.740 --> 09:16.500
They're it.

09:16.700 --> 09:18.620
And then they have to shout out, Marco.

09:18.620 --> 09:20.160
And everyone around them shouts, Polo.

09:20.160 --> 09:23.680
And they have to acoustically figure out where you are and try and catch you.

09:23.840 --> 09:26.140
So Wi-Fi networks are a bit like this.

09:26.420 --> 09:30.460
My device, when it is looking for a nearby network, shouts out, Marco.

09:30.460 --> 09:33.040
And all the access points nearby say, Polo.

09:33.040 --> 09:35.180
And it knows where the access points are.

09:36.020 --> 09:38.620
And there's no authentication at this level.

09:38.620 --> 09:41.420
Because nobody uses shared-key authentication because it's got ROMs.

09:41.420 --> 09:49.560
So what happens is, if this is a legitimate access point over here, and I shout, Marco, and it goes, Hey, I'm Polo.

09:49.600 --> 09:54.580
Then you can have another access point over here say, Hey, I'm Polo too.

09:54.580 --> 09:57.820
And that's not even a vulnerability because this is how your corporate networks run.

09:57.820 --> 10:10.360
Like if you've got 500 access points spread across your campus, and they're all called Acme Corp Wi-Fi, you need to have lots of things that can respond to the same ESS ID, but they've got different BSS IDs.

10:10.360 --> 10:13.980
So calmer attacks take advantage of this.

10:14.560 --> 10:19.840
And in particular, what they rely on is the fact that devices have something called a PNL, a preferred network list.

10:19.840 --> 10:30.380
So when you add a Wi-Fi network and you click Remember Me or Save This Network, then typically what happened before is those devices will send directed probes out for those networks.

10:30.620 --> 10:31.640
Now, I'm not sure why.

10:31.640 --> 10:35.520
It was the stupidest design decision ever because it's led to a world of hurt since then.

10:35.540 --> 10:49.540
But if I've clicked on Save This Network, my home network, it's called HomeNet, when I come to a new area like DEF CON and I click Open Up My Wi-Fi, my device historically would probe for a network called HomeNet.

10:49.540 --> 10:54.560
It wouldn't send out a broadcast, wait to see if something called HomeNet exists, and then connect to it.

10:54.560 --> 10:55.760
It would just probe.

10:55.840 --> 10:57.340
And there's all sorts of different reasons.

10:57.340 --> 11:00.460
So like historically, that's just how they built it on computers.

11:00.600 --> 11:09.920
Recently we found out in Android that actually the problem is when it gets offloaded for low power mode, there's a separate subsystem which deals with that, which is sending out the probes.

11:10.280 --> 11:12.900
So there's all sorts of different reasons as to why it's doing it.

11:12.900 --> 11:14.400
But the truth is it does it.

11:14.420 --> 11:17.960
If some of you have seen some of our other research, we built something called Snoopy.

11:18.220 --> 11:20.520
The guy is actually presenting just after us.

11:20.860 --> 11:24.360
All this does is it looks at the probes that your devices are sending out.

11:24.360 --> 11:25.820
It geolocates it.

11:25.820 --> 11:28.260
And then it can try and track where you've been.

11:28.260 --> 11:36.540
So if one of your devices is probing for a network that only exists in Saudi Arabia and a network that only exists in the United States, we can start getting an idea.

11:36.540 --> 11:37.620
So it's really lame, right?

11:37.620 --> 11:41.080
The single little probe request was leaking all this stuff out.

11:41.620 --> 11:43.740
And so that's how CalmAttacks worked.

11:43.740 --> 11:50.080
It responded to these directed probes and then you could get somebody to connect to your network.

11:51.640 --> 11:53.700
There was supposed to be an animation there.

11:55.340 --> 11:56.700
Okay, well let's...

11:57.340 --> 12:01.960
Okay, so recently two guys built newer versions of it.

12:01.960 --> 12:06.760
So the pale guy is DigiNinja, or Robin Wood.

12:06.760 --> 12:11.580
And he built the version of HostAPD that implements Canva that's on the Pineapple.

12:11.900 --> 12:15.880
The guy on the right is Thomas, if anyone can pronounce his surname.

12:15.880 --> 12:16.720
Anyone here?

12:17.360 --> 12:18.480
Jotrep.

12:18.640 --> 12:21.280
The guy who built the Aircrack suite.

12:21.280 --> 12:24.200
I'm really sorry for not being able to pronounce his surname.

12:24.200 --> 12:25.940
Awesome, they both did great work.

12:25.940 --> 12:27.960
And they've built modern versions of Canva.

12:27.960 --> 12:31.780
So if you run AirbaseNG, you can have Canva implemented in software.

12:31.860 --> 12:36.180
Or if you're running the Pineapple, you're using HostAPD written by Robin.

12:36.920 --> 12:40.800
Okay, but Canva doesn't work so well anymore, as I mentioned before.

12:41.200 --> 12:42.200
It doesn't...

12:42.200 --> 12:51.260
Your PNL list, when you're looking for networks, those networks don't show up.

12:51.260 --> 12:54.620
Canva is only going to respond when you send a directed probe.

12:55.280 --> 13:00.960
So the most obvious change here is let's get Canva to respond to broadcasts.

13:01.740 --> 13:04.900
And that's one of the first things that we implemented in Mana.

13:04.900 --> 13:12.040
So we took HostAPD and we ported it to HostAPD 2.2 because the Pineapple is still running version 1.

13:12.660 --> 13:18.780
And we've got a hash that we just look at all of the probe requests that we've received.

13:18.780 --> 13:22.400
And we build up a view of the PNL of the individual devices.

13:22.520 --> 13:29.940
So now when one of your devices sends out a broadcast probe request, we can respond with broadcast probe responses.

13:30.640 --> 13:41.420
So you should see when we do our demo just now, if you're up for it, networks that your device is probing for would show up as available networks on your phone or whatever you've got.

13:41.840 --> 13:45.100
Now, that implies some interesting stuff.

13:45.100 --> 13:49.340
For the longest time I thought, well, and actually there was an implementation thing on iOS.

13:49.340 --> 13:59.280
If you ever, with old iOS, I think like iOS 6, ran comma attacks, you would have noticed, you'd see like the network name changing and then the UI would get all screwed up.

13:59.940 --> 14:04.980
So I was convinced that you needed to change the BSSID, like have a different BSSID for things.

14:05.360 --> 14:06.700
It turns out none of that's true.

14:06.700 --> 14:09.500
Ian pointed it out to me.

14:09.500 --> 14:10.580
He figured it out.

14:10.580 --> 14:17.800
We can send multiple probe responses from the same BSSID and all devices respect that.

14:17.800 --> 14:18.240
That's fine.

14:18.240 --> 14:19.940
It will show up as different networks.

14:20.900 --> 14:23.980
So that was the one finding which allowed us to handle Discovery better.

14:23.980 --> 14:24.640
It's implemented.

14:24.640 --> 14:25.820
It's working really well.

14:25.820 --> 14:27.880
I'm going to hand over to Ian now to do a demo.

14:29.280 --> 14:33.200
Unfortunately, we didn't sacrifice enough chickens to the demo gods.

14:33.440 --> 14:36.320
So his thing is not displaying up there.

14:36.320 --> 14:37.480
So we've got an iPhone.

14:37.480 --> 14:38.980
The Android thing I don't think is going to work.

14:38.980 --> 14:41.200
We've got some video backups just in case.

14:42.680 --> 14:43.840
Right, great, everyone.

14:43.840 --> 14:45.740
Before I carry on, I just want to make one thing.

14:45.740 --> 14:49.020
This is a note I've got stuck on my wall in the office.

14:49.220 --> 14:52.940
I've been battling with HostAPD probably for the last couple of months.

14:53.020 --> 14:56.220
I've had sleepless nights about it, including last night.

14:56.320 --> 15:01.760
And so there's probably a lot of very bad code inside that...

15:01.760 --> 15:03.220
Sorry, can you hear me?

15:03.220 --> 15:06.500
Is that better?

15:09.220 --> 15:15.760
Okay, as I was saying, I've been battling with the code in HostAPD for a couple of months.

15:15.760 --> 15:19.700
I've had sleepless nights, including last night.

15:20.680 --> 15:22.800
No, that's not an amplifier, is it not?

15:22.800 --> 15:24.060
Okay, apologies.

15:24.060 --> 15:25.340
I'll speak louder.

15:25.460 --> 15:34.180
But in any case, this was a sticker I had up on my office wall, just to remind myself that I'm rather annoyed with the way things work.

15:34.540 --> 15:38.420
In any case, we had a couple of demo-god things.

15:38.420 --> 15:41.900
As normal, Linux and projectors just don't want to work.

15:41.960 --> 15:46.360
I'm going to have to try and present off an Apple laptop.

15:46.360 --> 15:49.960
The key bindings are all funny, so apologies about this.

15:49.960 --> 15:54.040
We're going to plug in an iPhone now, and I am going to...

16:21.260 --> 16:26.080
Okay, so iPhone, it's looking at nearby Wi-Fi networks.

16:27.240 --> 16:29.080
Somebody's running Pineapple.

16:29.920 --> 16:32.120
Get better offset, whoever you are.

16:32.560 --> 16:41.220
I've now fired up Karma, and what we should see is we should start seeing networks we've connected to before start showing up as open.

16:41.520 --> 16:43.020
Go right to the top, Dominic.

16:43.020 --> 16:44.700
I haven't connected to anything.

16:46.680 --> 16:51.720
There are a hell of a lot of networks currently being shown all over the place here.

16:59.160 --> 17:01.800
There's also a lot of traffic, which is...

17:03.560 --> 17:10.420
There's also a lot of traffic which is interfering with things, so I'm going to just switch to a demo here.

17:10.420 --> 17:12.980
Okay, you've got to switch that way.

17:13.380 --> 17:15.040
We hope for a live demo.

17:15.040 --> 17:16.140
It's not working.

17:16.240 --> 17:18.500
I'll try again a little later.

17:18.500 --> 17:22.720
I think you've just gone on to password.

17:59.350 --> 18:08.470
Right, so over here, what we have actually got is actually a... this is my phone.

18:08.470 --> 18:17.370
And I'm starting up Karma over here, and you'll see I've got a bunch of networks which I previously connected to at other places.

18:17.510 --> 18:29.830
And what we'll see happening is as I start Karma, we're literally going to come along and different networks are actually going to start showing as available.

18:29.830 --> 18:35.670
As we sort of see, for every broadcast I send, I'm getting responses here.

18:35.670 --> 18:38.270
I'm getting a response for food.

18:38.270 --> 18:39.830
I'm getting a response for...

18:41.670 --> 18:42.670
one of these.

18:42.670 --> 18:43.490
I can't read it.

18:43.490 --> 18:52.290
It's a little bit... but there's a bunch of different networks which are all of a sudden starting to come up and responding to my specific device.

18:52.290 --> 19:01.090
So what's happened over here right now is the phone is actually just connected to internet, an open network I previously connected to.

19:01.090 --> 19:06.710
Simply from various probes, my phone was actually making.

19:07.510 --> 19:09.150
Sorry, it's connected to Foo.

19:09.150 --> 19:10.530
Apologies about that.

19:10.530 --> 19:11.870
So it's connected to Foo.

19:11.870 --> 19:13.150
No complaints.

19:13.150 --> 19:15.690
Android device didn't complain at all.

19:15.690 --> 19:21.030
And all of a sudden we're now on the... we've connected to that specific network.

19:23.230 --> 19:39.370
Okay, so it's a standard Karma demo, but what's relevant about that stuff is if you look at modern Android, so 4.4, things like that, networks which are on your PNL with current Karma don't show up as available.

19:39.610 --> 19:42.490
Because now we're responding to the broadcast, it shows up as available.

19:42.490 --> 19:46.510
And the big thing there is that you'll get stuff automatically connecting to you.

19:46.510 --> 19:51.370
So if it's sitting in someone's pocket and it's configured to auto pull mail, you now get that stuff connecting.

19:51.370 --> 19:54.890
Whereas before they had to explicitly click on the network.

19:55.210 --> 19:57.930
It makes a big difference in a bunch of different scenarios.

19:57.930 --> 20:00.110
You get a higher connection rate.

20:00.110 --> 20:07.690
So now the problem... the next problem we ran into is that Apple devices have radically reduced the amount of probing they do.

20:07.890 --> 20:16.010
So they've gotten savvy and they don't probe for public networks, or open networks, sorry, not public networks, in their PNL.

20:16.010 --> 20:18.710
They wait to see a broadcast response from it.

20:18.710 --> 20:24.130
But while investigating this stuff we noticed that Apple devices weren't even probing for hidden networks.

20:24.170 --> 20:32.370
Now if you remember the description about hidden networks, you have to probe for that exact network with that network name for the thing to respond and for you to be able to associate.

20:32.570 --> 20:41.230
So what typically happens with other devices is that if you have a hidden network in your PNL, everywhere you go this thing is spamming out directed probes for that.

20:41.270 --> 20:43.390
But with Apple devices they weren't.

20:43.530 --> 20:44.510
So like, well this is impossible.

20:44.510 --> 20:45.790
How does it connect to a network?

20:45.790 --> 20:49.230
We record it connecting to the network, fine, it would send out probes.

20:49.610 --> 20:59.030
After a bunch of time trying to construct ridiculous Faraday cages which didn't work, I managed to figure out that Apple devices need to see at least one hidden network.

20:59.150 --> 21:03.970
Then they will disgorge all of their networks on the PNL which are hidden.

21:04.090 --> 21:08.850
So if you're not seeing probes from Apple devices bring up a hidden network, it doesn't have to be a real network.

21:08.850 --> 21:11.930
It can be on your MiFi device, it can be something here.

21:11.930 --> 21:14.130
We've got an example configuration here that you can use.

21:14.130 --> 21:15.810
Just at least one nearby.

21:15.810 --> 21:17.050
Doesn't matter what it looks like.

21:17.050 --> 21:18.590
It'll start probing for those.

21:21.190 --> 21:28.010
But there's... oh, and interestingly, so the hypothesis is not that Apple did this for privacy reasons, but to try and get everyone to use iBeacon.

21:28.010 --> 21:33.670
They were sick of the fact that retailers and ad trackers are using Wi-Fi probes to start tracking people.

21:33.670 --> 21:35.850
They want them to use iBeacon to track people.

21:35.850 --> 21:38.310
So they started fixing this stuff up, supposedly.

21:38.330 --> 21:42.650
There's also claims that iOS 8 is going to use random MAC addresses for their probing.

21:43.350 --> 21:49.650
I've got iOS 8, I haven't seen it do any randomized MAC probes yet, so I think that's just a threat at this point in time.

21:50.350 --> 21:53.790
So it was then presented an interesting challenge to us.

21:53.790 --> 21:59.450
How do we get iOS devices which aren't probing for open networks to connect to that stuff?

21:59.710 --> 22:01.870
So we implemented something called loud mode.

22:01.870 --> 22:06.930
So right now, when this stuff's running, you'll see networks for your device.

22:06.930 --> 22:14.570
So if your device is probing for foo and your device is probing for bar, you'll each see foo and bar, but you won't see bar and you won't see foo.

22:14.570 --> 22:16.430
It's individual to your device.

22:16.490 --> 22:18.190
Loud mode just takes that away.

22:18.190 --> 22:19.930
You start seeing everyone's device.

22:19.930 --> 22:21.310
But it lives up to its name.

22:21.310 --> 22:25.790
In a busy place like this, you'll start seeing hundreds of networks showing up.

22:25.950 --> 22:30.910
And it also leads to interesting undefined behavior in really busy environments.

22:31.570 --> 22:39.950
My VM spontaneously rebooted at some point while I was testing this stuff last night, because the list gets bigger over time.

22:39.950 --> 22:45.810
And eventually it's just spamming out hundreds of networks, broadcast responses in response to one thing.

22:45.810 --> 22:50.070
But the advantage is the ramp-up in getting things connected is really good.

22:50.310 --> 22:54.650
And what we're relying on there is the fact that laptops have had none of this stuff.

22:54.650 --> 23:01.710
So Windows machines, Apple, OS X devices, Linux devices, all happily probe for their remembered networks.

23:01.710 --> 23:04.570
Mobile devices, they're limiting the stuff, but not these.

23:04.570 --> 23:11.550
So if you've got two devices with you, one your laptop and one your phone, then we're gonna get the probe and it should get to it.

23:11.550 --> 23:18.610
If two of you work at the same company and one of you's got a promiscuous device and the other doesn't, then it's gonna connect.

23:18.610 --> 23:26.350
If two of you have been to the same airport, if two of you are from the same country and have a similar thing, we just rely on the fact there's gonna be some commonality somewhere.

23:26.630 --> 23:27.910
And it works pretty well.

23:27.910 --> 23:31.490
We end up getting a higher rate of connections.

23:31.690 --> 23:35.610
But once it ramps up, you get a lot more connections.

23:45.330 --> 23:47.130
Sorry, Apple, I really...

23:49.310 --> 23:50.970
You've gone into a corner.

23:50.970 --> 23:52.370
Okay, thank you.

23:52.370 --> 23:55.950
Apologies, I used to work on an Apple years ago.

23:55.950 --> 23:59.430
I don't really... gone into a corner again.

23:59.870 --> 24:00.910
Apologies.

24:01.570 --> 24:03.790
It's fine, I think I'll manage.

24:04.130 --> 24:06.710
So, okay, comma two.

24:07.510 --> 24:12.550
Right, so here what we've got is we've got the same thing happening.

24:12.550 --> 24:15.250
You see there's a whole bunch of responses coming in here.

24:15.410 --> 24:20.810
And we've only got a couple of networks open on the right.

24:21.630 --> 24:25.850
But as soon as this starts building up, you'll see that list is going to get bigger and bigger.

24:25.850 --> 24:27.850
Apologies, this is just me connecting.

24:27.850 --> 24:33.890
What's nice about this is if you connect to a network that isn't there, it'll connect automatically.

24:34.210 --> 24:35.130
Wrong video.

24:35.130 --> 24:38.310
Sorry, so I mean that network is a brand new network.

24:38.310 --> 24:40.090
It just works perfectly.

24:40.170 --> 24:41.610
It's comma three then.

24:43.810 --> 24:45.130
Comma loud.

24:45.430 --> 24:48.230
Okay, so what we've got over here, we've got the same thing.

24:48.230 --> 24:51.970
We've got a couple of networks open.

24:52.170 --> 24:55.910
What I've done is I've just edited the config file.

24:55.910 --> 24:57.350
I've enabled loud mode.

24:57.350 --> 25:10.890
And what we'll see here when I switch Wi-Fi on is we're going to see that it's connecting to MANA, but at some point we're going to get a couple of networks coming up over here.

25:10.890 --> 25:14.390
So there's someone TGUNJCDM etc etc.

25:14.390 --> 25:17.610
When we scan we're going to see that coming up over there.

25:17.610 --> 25:20.450
That's not a network my device is probing for.

25:20.450 --> 25:23.670
That's a network that some other device has been looking for.

25:23.670 --> 25:30.870
But now because we've enabled loud mode, it's broadcasting it every time it receives any type of request.

25:30.870 --> 25:32.610
So that literally just increases the stuff.

25:32.610 --> 25:42.490
And as we give it a bit more time, you're going to see this list is going to grow and grow and grow as it picks up more and more networks responded to by other devices.

25:42.590 --> 25:43.910
So here we've got Yankees.

25:43.910 --> 25:46.590
Yankees rule was recorded last night.

25:46.590 --> 25:54.710
And it's going to carry on growing and growing until it actually ends up with quite a sizable list of devices.

25:57.450 --> 25:58.010
So...

25:59.810 --> 26:02.230
Ashton Wireless etc etc.

26:02.230 --> 26:03.910
The list just grows and grows.

26:03.910 --> 26:05.510
But in any case, that's loud mode.

26:05.510 --> 26:10.610
It does significantly increase the number of connections you're going to get in.

26:10.610 --> 26:12.170
And I'll hand over to Dominic.

26:12.170 --> 26:12.770
Thanks.

26:15.290 --> 26:18.630
I'm looking at it now and I'm like, oh man, that's really trivial.

26:18.790 --> 26:22.490
But I can't underestimate how much work it was to get this implemented in HostAPD.

26:22.490 --> 26:25.970
It's like this low level C that interacts with drivers and it doesn't have any comments.

26:25.970 --> 26:27.130
There are no comments.

26:27.130 --> 26:29.510
There's one comment every now and again.

26:29.510 --> 26:30.650
I'm not sure why.

26:30.930 --> 26:33.650
You have to put debugging statements everywhere.

26:33.650 --> 26:37.610
At some point Ian was in GDB just trying to figure out what the hell was going on.

26:39.530 --> 26:43.190
Okay, so the next is secure networks.

26:43.250 --> 26:45.370
Karma attacks don't handle secure networks at all.

26:45.370 --> 26:47.330
They need to be open networks.

26:47.330 --> 26:52.210
Now, we confess we haven't come up with any new ways of pwning secure networks.

26:52.210 --> 26:54.950
But we have integrated some stuff in here.

26:55.750 --> 27:03.630
So just to be clear WEP, WPA, EAP networks or Ada2 1x this is what we mean by secure networks.

27:03.670 --> 27:09.110
Right now your options for going over those are to use Freeradius WPE.

27:09.330 --> 27:12.710
I think that was 2008.

27:13.710 --> 27:17.190
So it's Joshua Wright and Brad Antonovich.

27:17.250 --> 27:18.730
I'm sorry if I've ruined his surname.

27:18.730 --> 27:19.990
I think that's the right one.

27:19.990 --> 27:21.750
So they wrote Freeradius WPE.

27:21.750 --> 27:25.630
It's a radius server that would dump the MSChap hashes.

27:25.630 --> 27:29.890
You can then send it to Joshua Wright's asleep or these days hashcat and things.

27:30.510 --> 27:33.110
You crack it and you get crates.

27:34.670 --> 27:40.490
So what's quite nice about HostAPD let me go...

27:41.010 --> 27:44.610
HostAPD has got an EAP server built into it.

27:44.610 --> 27:51.610
So we can modify HostAPD's EAP server and actually Brad Antonovich started doing this a couple of years ago and then he just kind of left it.

27:51.610 --> 27:56.730
So Ian took Brad's patches he brought them up to date for HostAPD 2.2, merged them in.

27:56.730 --> 27:59.030
So now the EAP stuff is integrated.

27:59.030 --> 28:05.710
So this version of HostAPD does all the new comma stuff, plus it gives you an updated version of Freeradius.

28:05.870 --> 28:09.290
So we're not using Freeradius, we're using the HostAPD's radius.

28:09.290 --> 28:10.390
But it's all integrated.

28:10.430 --> 28:17.610
Cool, so now we've got it integrated, why must we send this off to another process and then edit configuration files and bring this stuff up again?

28:17.610 --> 28:19.010
We can do that automatically.

28:19.070 --> 28:25.250
If somebody tries to associate to an EAP network then we can record that hash, try and crack it.

28:25.250 --> 28:31.510
If it's easy enough to crack, we can put it in the config file and if they try and connect again, they'll connect.

28:31.650 --> 28:34.770
So we've got a higher potential of now getting people to connect.

28:34.770 --> 28:40.690
Particularly in corporate environments, because people are more likely to be running 802.1X in corporate environments.

28:41.150 --> 28:45.810
So just to give you an idea of how that works, this was my attempt to draw a simple PEEP diagram.

28:46.050 --> 28:48.730
It's actually a little more... I have to remove some things here.

28:48.870 --> 28:51.490
But there's two things happening.

28:51.490 --> 29:04.970
For PEEP, there's a TLS and SSL exchange, there's a server certificate that comes down so the vulnerability there, not our vulnerability, but the vulnerability that's happened historically, is that people don't validate that service certificate.

29:04.990 --> 29:08.570
And you can say, yeah, you guys, you're stupid, you didn't validate the service certificate.

29:08.570 --> 29:12.830
But actually certificates, you can't set a common name that matches a network.

29:12.830 --> 29:17.410
There is no field in a certificate that is matched on four Wi-Fi networks.

29:17.730 --> 29:19.750
So we get some advantage there.

29:19.750 --> 29:21.990
And then there's like weird ass prompts.

29:21.990 --> 29:25.210
Like OSX, I don't know, it's changing quite a lot.

29:25.210 --> 29:27.210
But different things give you just stupid prompts.

29:27.210 --> 29:29.830
Like if you try and connect to networks with different things.

29:29.830 --> 29:32.370
If you press the wrong thing once, like you're screwed.

29:33.030 --> 29:35.070
And then MSChat is weak.

29:35.070 --> 29:38.170
Moxie Marlinspike did his talk last year, 2013.

29:38.790 --> 29:42.790
They can go through the entire DES space using stuff like Cloudcrack.

29:43.970 --> 29:48.590
And what we've implemented, what Ian's implemented for this, you can plug whatever you want.

29:48.590 --> 29:52.150
At the moment we're using Asleep, but if you wanted to use Hashcat or Cloudcrack, you can.

29:52.970 --> 29:55.090
So essentially we're going to man-in-the-middle it.

29:55.090 --> 29:56.850
We send our own certificate.

29:56.850 --> 30:00.210
We capture the MSChat challenge response.

30:00.210 --> 30:00.950
We crack it.

30:00.950 --> 30:03.950
Once we get it, we add it back in the EAP file.

30:03.950 --> 30:05.310
And then people can connect.

30:13.960 --> 30:16.340
Right, so here's the same thing.

30:16.340 --> 30:19.020
I've got a couple of screens open over here.

30:19.020 --> 30:21.900
I've got my Android device, the actual device.

30:22.060 --> 30:22.560
I've got two.

30:22.560 --> 30:25.660
This one I'm actually just going to look at the EAP users file.

30:25.660 --> 30:29.380
This defines what users are allowed to connect to the EAP network.

30:29.540 --> 30:32.900
And this is just going to be the output from MANA.

30:32.900 --> 30:35.020
And I'm going to pause in various locations.

30:35.220 --> 30:38.440
So first what I go through, I just have a look at my WiFi networks.

30:38.440 --> 30:40.300
I've got that always on secure.

30:40.580 --> 30:44.140
If I have a look at the config, it's basically peep MSChat.

30:44.260 --> 30:45.980
Username is user.

30:46.380 --> 30:48.020
Password is password.

30:48.020 --> 30:50.060
It's unchanged, et cetera, et cetera.

30:50.100 --> 30:54.100
Just turning off WiFi so it will scan immediately to save some time.

30:54.660 --> 31:05.970
And now I am going to just tail the host APD EAP user.

31:05.970 --> 31:08.470
So these are just the default ones that come through.

31:08.470 --> 31:12.450
So those are the last couple of entries in that specific file.

31:12.510 --> 31:14.430
Just so that we can go through the stuff.

31:14.430 --> 31:21.830
So you can't really see it, but just to be clear, so that's a user of T and a password of 1234 test.

31:23.010 --> 31:25.750
Sorry, I don't know why it looks like that on the projector.

31:26.410 --> 31:27.610
How do I zoom out?

31:27.610 --> 31:30.270
So I'm going to let Dominic handle the zooming.

31:30.270 --> 31:31.610
I've got no idea.

31:32.770 --> 31:35.670
Okay, something started again over there.

31:35.670 --> 31:37.170
Let's just go here.

31:47.030 --> 31:50.530
Okay, and now I'm going to fire up a new config.

31:50.530 --> 31:53.190
I'm going to switch on my network.

31:54.550 --> 31:58.070
And it's starting up and I'm going to switch on my WiFi now.

32:00.090 --> 32:04.970
And what you should see is... okay, it's not on yet.

32:07.010 --> 32:08.770
It's turning on.

32:10.210 --> 32:13.990
So it's fairly difficult to read over here.

32:14.170 --> 32:25.570
But literally we've got each app, so username, user, challenge, the challenge and the response, which is actually just being added to a queue, we use a PyFo queue, with an external Python script.

32:25.570 --> 32:29.010
And the reason why I do this is just so that if you want to...

32:29.010 --> 32:32.730
I mean, I've got ideas at some point for building other stuff in terms of the thing.

32:32.730 --> 32:38.770
But if you want to go along and replace that with some cloud-based cracking service, it'll be ridiculously easy.

32:38.770 --> 32:42.750
You just read from the PyFo, you push it out, and you push the user's back.

32:42.770 --> 32:55.530
But literally adding the item to the PyFo, the Python script passes off to, in this case, a sleep buzz, using the second roughly wordless, obviously it's a ridiculous password, so it's cracked virtually immediately.

32:56.210 --> 32:59.210
And here we've already got credentials cracked.

32:59.210 --> 33:01.770
User is user, and password is password.

33:01.930 --> 33:10.510
And when we go along and carry on over here, it says save secured, and now it's actually going to come along and obtain an IP address and actually connect.

33:10.510 --> 33:19.610
So once again we've now got a hidden , protected network to actually go along and connect to our access point.

33:22.270 --> 33:25.390
Okay, so the promise here is creds from the sky.

33:25.470 --> 33:31.550
So at the very least you'll get a challenge that you can go chew on somewhere or send to Moxie's Cloud Crack or something like that.

33:31.590 --> 33:41.350
But if it's simple or you've got things set up nicely, you've got a nice targeted word list or something, then it'll crack and you get the advantage that you can then man in the middle of the people and hopefully get some other creds.

33:43.830 --> 33:44.630
Alright.

33:44.630 --> 33:51.670
So the point of all of this stuff is to get people to connect to us so that we can then man in the middle of them.

33:51.850 --> 33:56.070
Now, truthfully most of our work was in everything coming up to this point.

33:56.070 --> 34:01.350
The changes to the Karma stuff and integrating the EAP stuff.

34:01.350 --> 34:03.570
But it's kind of pointless if we stop there.

34:03.570 --> 34:08.250
It's like, okay, technically we get it, but we want to see some creds falling from the sky.

34:08.650 --> 34:15.690
So I'm going to half give you that promise, because we built a ton of things that just make kind of make the man-in-the-middle stuff work a little better.

34:16.110 --> 34:22.030
But we don't have particularly good demos of it, because it's really hard So we'd like to do a live demo of that.

34:22.030 --> 34:23.570
It's really hard to do that here.

34:23.610 --> 34:28.670
Naturally we're going to pick up something from someone and then we end up in legal trouble.

34:29.710 --> 34:30.330
So I apologize.

34:30.330 --> 34:32.330
So first off, we didn't do this.

34:33.210 --> 34:35.250
SSLSplit is an awesome tool.

34:35.290 --> 34:39.930
It's much... like if you're going to be man-in-the-middling lots of different protocols, use it.

34:39.930 --> 34:40.990
It's fantastic.

34:40.990 --> 34:45.590
There's a guy, his name also scares me, Daniel Rothlisberger.

34:46.050 --> 34:47.410
That's why there's a burger.

34:48.230 --> 34:49.590
I was very proud of that.

34:49.590 --> 34:50.490
You guys know.

34:52.310 --> 34:57.530
But that's, I mean really, we've just got a bunch of scripts which integrate intelligently so you get creds.

34:57.530 --> 34:59.450
And this actually leads to tons of creds.

34:59.450 --> 35:11.490
People, lots of well, the muggles, they leave their mail connecting over they're not validating certs, they're connecting to POP and IMAP without stuff, so you just get their passwords all the time.

35:11.510 --> 35:19.890
But not so muggly Microsoft and Apple, if you use ActiveSync with Apple's mail.app, that thing doesn't validate certs.

35:19.890 --> 35:21.450
I have no idea why.

35:21.690 --> 35:24.170
So that thing, you get tons of corporate creds.

35:24.170 --> 35:28.150
It's basic authorization so you've just got to pay 60 for it.

35:28.210 --> 35:29.870
So we haven't actually done anything.

35:29.870 --> 35:32.130
We're just using his tool once they're connected to us.

35:32.130 --> 35:33.390
We get that stuff.

35:33.390 --> 35:34.430
So it's cool.

35:34.430 --> 35:35.730
We start getting creds from the sky.

35:35.730 --> 35:37.090
This is fun.

35:37.790 --> 35:42.850
One of the things I really like doing is running this in places where there shouldn't be Wi-Fi networks.

35:45.010 --> 35:46.310
We'll leave it at that.

35:46.310 --> 35:47.970
Let's pretend we're down a mine, right?

35:47.970 --> 35:50.790
You're not necessarily going to have a network connection back up.

35:50.790 --> 35:52.550
But people leave their Wi-Fi on.

35:53.990 --> 36:02.970
So there's a version in the Mana toolkit called no upstream and that tries to fake part enough of the internet so that you can get some credentials from people.

36:03.230 --> 36:07.330
To do that, we have to trick devices into thinking that they're online.

36:07.330 --> 36:10.030
So particularly mobile devices they all do some check.

36:10.030 --> 36:12.950
They try and fetch a file on the internet and if they can get it, then they're online.

36:13.170 --> 36:15.670
Apple's the one that got a little tricksy with it.

36:15.830 --> 36:22.270
So as part of their captive network portal detection thing, they make typically two requests.

36:22.270 --> 36:31.770
They'll make one request with a user agent of captive network portal to one of over 200 different CNAMEs on a particular IP and then to a completely random URL on it.

36:31.770 --> 36:33.810
So we just built some simple Apache V hosts.

36:33.810 --> 36:38.210
Generally for this no upstream stuff, it's using Apache V hosts which handle all of that.

36:38.210 --> 36:40.890
So you can tell the device that it's up there.

36:41.070 --> 36:42.990
Plus, you can do really cool stuff.

36:42.990 --> 36:44.310
So I'll get on to the next slide.

36:44.310 --> 36:51.830
You can automatically push rogue CA certs or malicious IOS profiles as part of the captive network portal thing.

36:52.970 --> 37:02.370
Somebody connects to your network and this thing automatically pops up and if they don't know what they're doing and they click the wrong button and they type in their password, you can like fundamentally control their device in different ways.

37:02.370 --> 37:03.930
Or at least just add a rogue CA.

37:04.230 --> 37:06.530
The nice thing about the... okay wait, I'm jumping ahead.

37:06.770 --> 37:09.290
Anyway, so it's a small little thing but it leads to coolness.

37:10.730 --> 37:13.870
The other... this is a bit lame but it also leads to some coolness.

37:13.870 --> 37:16.650
You can have your own captive network portal up there.

37:16.650 --> 37:27.550
So they go to a site that you haven't implemented a thing for on your fake internet it pops up a captive portal thing and it says use OAuth and log in with your Google creds or Facebook or something and they type it in and you get those.

37:27.550 --> 37:32.730
Okay, nothing particularly interesting there but you know, you get some stuff.

37:33.570 --> 37:42.570
But what's interesting is if you can get an evil CA cert in their device because now your man in the middle stuff works much better.

37:43.010 --> 37:47.870
So it's not particularly new research but there's not a lot out there.

37:47.870 --> 37:50.030
It's really easy to do that actually.

37:50.030 --> 38:01.730
If you just serve a .cer file to either an iOS device or an Android device they will offer to add that to their root CA list.

38:02.190 --> 38:03.610
Just like that.

38:04.350 --> 38:14.750
I mean, can you imagine that if you went to a site like in your normal browser on your computer and it served you a .cer file, it would prompt you to add that to your root CAs.

38:14.750 --> 38:16.110
That would just be ridiculous.

38:16.150 --> 38:17.510
Everyone would rail about it.

38:17.510 --> 38:19.510
But mobile devices allow you to do that.

38:19.550 --> 38:23.510
Now granted, the user does have to type in their password.

38:23.510 --> 38:25.590
So on an iOS device you'll type in your password.

38:25.710 --> 38:29.370
On Android, you just have to give it a name and then click save.

38:29.430 --> 38:33.350
So there's some stuff but that's not a huge thing to get over.

38:33.350 --> 38:36.370
And if you get that right, then you've got a root CA in there.

38:36.370 --> 38:38.950
So now you can start man-in-the-middling all sorts of things.

38:39.330 --> 38:47.510
But you don't get to man-in-the-middle everything because HSTS is a real pain in the ass.

38:47.590 --> 38:49.150
So once again not our research.

38:49.150 --> 38:53.070
A guy named Leonardo presented Black Hat Asia this year 2014.

38:53.070 --> 38:57.410
And he came up with a nifty little bypass for HSTS.

38:57.510 --> 39:02.390
So HSTS is HTTP strict transport security.

39:02.490 --> 39:08.790
And what that means is a site can put a header which says, when you speak to me, speak to me via SSL.

39:08.790 --> 39:10.170
Your browser will remember that.

39:10.170 --> 39:15.170
So when you type something like gmail.com, it'll go directly to HTTPS gmail.com.

39:15.170 --> 39:23.650
Even if you type in HTTP gmail.com, it'll still go directly to HTTPS because it's remembered that this is an HSTS site and it should go to it.

39:23.650 --> 39:27.290
Now what that screws is Moxie's SSL strip.

39:27.290 --> 39:34.990
So SSL strip relies on people hitting HTTP sites first and then preventing it from ever upgrading to SSL.

39:34.990 --> 39:37.450
And HSTS is a direct response to that.

39:37.650 --> 39:44.110
So what Leonardo worked out is that some places still have to have HTTP jumps.

39:44.130 --> 39:46.150
So if you look at google.com.

39:46.150 --> 39:51.390
If you typed google.com, it serves it over HTTP and then redirects to HTTPS.

39:51.390 --> 39:55.190
The standard thing that SSL strip can deal with.

39:55.190 --> 39:57.410
Sorry, I always get SSL strip and split confused.

39:58.070 --> 40:07.590
But then within that page, if you click accounts.google and SSL strip will try and rewrite that to HTTP.

40:07.590 --> 40:09.570
When you actually make the request, that gets denied.

40:09.570 --> 40:13.970
It's only going to serve that stuff over HTTPS because it's got HSTS.

40:14.210 --> 40:25.670
So what Leonardo did is he made some mods to SSL strip to... when you go to google.com it actually redirects you to quadw.google.com which is a whole different domain.

40:25.670 --> 40:29.110
So there's no pre-saved HSTS stuff for it.

40:29.110 --> 40:39.850
And there he can do the normal SSL strip rewrites on it and instead of... so when you click sign in, instead of redirecting to accounts.google.com he'll redirect you to like webaccounts.google.com.

40:39.850 --> 40:42.690
Once again another domain, HSTS doesn't apply.

40:42.770 --> 40:47.370
Google seems to have pushed something down or at least came into effect last night, the first time I spotted it.

40:47.370 --> 40:49.390
They've actually now got it going over the domain.

40:49.450 --> 40:52.630
So we've made some mods that it actually appends the stuff on the end.

40:52.630 --> 40:58.930
So it won't take you to accounts.google.com, it'll take you to accounts.google.com.x Hold other domain, the HSTS doesn't apply.

40:59.130 --> 41:01.150
But it's really nifty for certain places.

41:01.150 --> 41:03.430
So it works for Facebook if you go to touch.facebook.

41:03.430 --> 41:06.350
It works for Twitter if you go to m.twitter.com.

41:06.350 --> 41:13.750
The reason you have to go to those is those are sites for which it doesn't have HSTS necessarily saved for that particular site.

41:13.870 --> 41:17.170
So then we start getting cookies and things that we can use there.

41:18.670 --> 41:21.370
Cookies, so creds are really useful.

41:21.370 --> 41:24.190
Cookies are also really useful because it gives us auth to sites.

41:24.370 --> 41:25.790
FireSheep was fantastic for this.

41:25.790 --> 41:27.750
A little Firefox browser extension.

41:27.750 --> 41:31.430
It would sniff stuff and you could then just click and log in on the site.

41:31.970 --> 41:34.570
It doesn't work anymore so we wrote FireLamb.

41:35.930 --> 41:37.890
So that's a lamb rye.

41:37.970 --> 41:48.950
So FireLamb, all it does is it's a Python script that will use a scapy, goes into monitor mode, looks for cookies, sticks into database, and then will generate Firefox profiles.

41:48.950 --> 41:51.210
So you can just say, okay, show me that guy there.

41:51.210 --> 41:54.830
It'll load up Firefox with all that guy's cookies and all the links that he visited.

41:54.830 --> 41:55.910
So you can just click on it.

41:55.910 --> 41:59.810
Much the same as FireSheep and go there.

42:00.310 --> 42:08.090
Okay, so we basically implemented all of this stuff in the Mana toolkit to deal with all of those things.

42:08.090 --> 42:13.150
I think we're pretty short of time so I'm not sure how many demos we can go through.

42:13.150 --> 42:14.190
How much time do we have?

42:14.990 --> 42:17.250
Okay, so we're going to try and go through some of them.

42:17.250 --> 42:19.890
These are a lot more manually demos.

42:20.730 --> 42:22.910
So they might not work as well.

42:32.910 --> 42:34.010
Thank you.

42:34.010 --> 42:36.590
Sorry, I just can't get the hang of this Apple.

42:36.970 --> 42:38.470
Apologies about that.

42:38.470 --> 42:41.930
Right, so if we have a look at a bunch of things.

42:43.710 --> 42:47.310
So this is using a malicious cert.

42:48.490 --> 43:03.790
Basically what we're doing is we're running it with no upstream, just to sort of try and get to a captive portal, which will then allow us to either socially engineer the user or alternatively provide him a link to sort of say automatically configure your stuff.

43:03.790 --> 43:04.950
Please pick here.

43:05.030 --> 43:19.790
You'll see we're connected to internet now and what we'll do is we'll go to foo.com or wherever and we'll end up with a... well, moo.com We'll end up with a captive portal page.

43:21.950 --> 43:23.310
There we go.

43:23.510 --> 43:30.330
If you scroll down right at the back we give him the option of logging in via Google or...

43:34.150 --> 43:42.830
Well, we give him the option of using some overall thing or signing in via Google creds or mail or Twitter or etc etc.

43:42.830 --> 43:49.190
But we also provide this nice little link sort of saying please auto-configure and it'll connect automatically.

43:49.350 --> 43:59.430
And if we auto-configure that then basically what happens we get prompted to install a specific root CA which has now been installed.

44:00.010 --> 44:04.570
There is an icon that comes up which you'll see right at the top left there.

44:05.470 --> 44:15.990
You drag down the bar it'll sort of say your communication may be subject interception which is fine, probably good practice.

44:19.450 --> 44:22.330
So I'm just waiting for the network to come up again.

44:22.690 --> 44:25.570
So yeah, here it says network may be monitored.

44:25.930 --> 44:30.130
But in any case now if I go to accounts.google.com

44:38.180 --> 44:39.680
Let's enter.

44:42.480 --> 44:46.660
We're actually going to get to... but it works one time, sorry.

44:46.660 --> 44:48.880
It's almost as slow as South African internet.

44:48.880 --> 44:52.920
But we're actually getting to Dominic's personal information over there.

44:52.920 --> 44:58.200
So we've actually had access to his Gmail account.

44:58.200 --> 45:05.400
And we're man in the middling so you're getting the full... Got the full clear text from SSL strip, etc, etc, etc.

45:07.240 --> 45:11.360
Right, other one which is... I'm going to skip FireLAM.

45:12.300 --> 45:16.240
So FireLAM is not working so well just yet.

45:16.800 --> 45:25.500
But basically FireLAM will extract the stuff from SCAPI and also from the files that we collect as the program is run.

45:25.500 --> 45:28.000
And you can literally go along and fire it up.

45:28.000 --> 45:32.980
And these are all the sites selected for a specific user.

45:39.060 --> 45:46.840
So this is literally just pulled out of the log files and pulled out of the network captures.

45:46.840 --> 45:59.700
And everyone of... every different device you can sort it by MAC address or IP address will literally build a different Firefox profile which includes the cookies for the specific thing.

45:59.700 --> 46:03.900
Now this was captured live, so I don't want to show the information that I'm doing here.

46:03.900 --> 46:08.380
I'm just changing it to the directory of someone who I've captured.

46:08.380 --> 46:13.440
Now I'm just going to do a count of the cookies SQLite database.

46:13.560 --> 46:16.900
You'll see there's just one cookie in that database.

46:16.920 --> 46:25.240
So that's the schema, that's the actual database schema, and that's the select count star from most cookies.

46:25.280 --> 46:29.560
And you'll see we'll get a result of one, which is just very poorly described over there.

46:29.560 --> 46:31.700
But in any case that's FireLamb.

46:31.700 --> 46:36.360
It's not working perfectly, but it does potentially work.

46:36.380 --> 46:39.100
I did some nasty stuff to Dominic this morning.

46:40.160 --> 46:47.920
Yeah, Ian announced to me that this stuff was working by posting as me on my Facebook wall saying Hey Dominic, this is Ian.

46:47.920 --> 46:50.240
The first person who liked it was his wife.

46:51.260 --> 46:52.440
Right, okay.

46:52.440 --> 47:00.660
So what's happening over here, because one thing we also see quite a bit is that the interception is, believe it or not, mail creds.

47:00.820 --> 47:01.500
Cleartext.

47:01.500 --> 47:04.160
There's so many people running the stuff over cleartext.

47:04.160 --> 47:08.380
Either this is man in the middle using SSL split.

47:08.380 --> 47:09.040
Right.

47:09.240 --> 47:22.400
And basically it's just a demo account of ours thrown away in the meantime, but literally we've got cleartext creds in the log files, etc, etc, etc.

47:22.400 --> 47:24.580
So it's very poor.

47:27.900 --> 47:28.700
Okay.

47:32.200 --> 47:38.320
I'll be around for a bit, so if anybody wants to see a live demo, I can just fire up my Linux machine and you can bother me there.

47:38.320 --> 47:39.400
It'll be a lot easier.

47:39.960 --> 47:47.960
So yeah, you couldn't see that particularly well, but one of the advantages of SSL split is you can get non-HTTP protocols, so you get lots of mail creds.

47:49.860 --> 47:56.980
So the big difference with fire lamb over something like fire sheep is it goes through the SSL interception stuff too.

47:56.980 --> 48:04.720
So the things that you SSL man in the middling, you get those cookies as well, not just cookies that you could passively monitor from stuff in monitor mode.

48:04.720 --> 48:06.120
But you also get that.

48:06.140 --> 48:10.640
And the other nice thing is that all of this man in the middle stuff can be run not in Wi-Fi.

48:10.640 --> 48:16.100
Like if you're trying to man in the middle on physical networks, all of these tools are reusable for there.

48:16.100 --> 48:22.380
So you could point fire lamb at x0 if you happen to be ARP spoofing on a LAN or something like that.

48:22.380 --> 48:27.920
So it's kind of assembling these things into something that's a little more usable.

48:28.680 --> 48:32.640
Alright, so that takes us to, like back to the promise.

48:32.640 --> 48:35.220
We were stuck in the desert.

48:35.940 --> 48:38.320
Karma stuff wasn't working so well.

48:38.320 --> 48:41.400
We didn't have support for secure networks and those credentials.

48:41.640 --> 48:46.720
You had to assemble your own man in the middle assemblage which didn't necessarily work so well.

48:46.720 --> 48:51.320
There's these new changes coming in from mobile devices which lead to things being a bit more complicated.

48:52.120 --> 48:59.980
We've taken all the research that others have done to try and deal with a lot of these problems we've assembled it into a package where you can just run a script and it'll work.

48:59.980 --> 49:04.800
We've done some of our own research to build some tools which deal with some of these problems.

49:04.800 --> 49:07.920
And we've put it together into this thing called the Mana Toolkit.

49:08.800 --> 49:10.940
It's on a GitHub repository at the moment.

49:10.940 --> 49:15.280
We're going to be releasing it tomorrow when we do this talk at DEF CON May.

49:15.280 --> 49:18.920
I'll have the demos working properly from Windows.

49:19.200 --> 49:24.080
But if you're looking for them, it'll be at github.com forward slash sensepost.

49:24.440 --> 49:27.000
We split it up so there's a bunch of repositories.

49:27.000 --> 49:29.440
If you just wanted FileM or something like that.

49:29.440 --> 49:31.440
But there's also a global repository.

49:31.440 --> 49:34.340
We'll put a blog entry up on sensepost.com.

49:34.340 --> 49:46.000
And then if you want a lot more technical detail about this stuff, on the DEF CON CD, the slides we've included there have much more detailed diagrams and technical information that works better if you're reading it.

49:46.300 --> 49:46.960
So that's us.

49:46.960 --> 49:48.620
Thank you very much for your time and patience.

