WEBVTT

00:00.000 --> 00:01.200
Hi everyone.

00:01.620 --> 00:03.060
The sound is okay?

00:03.060 --> 00:03.580
Yes?

00:03.580 --> 00:04.760
Everybody listens?

00:05.120 --> 00:05.840
Okay.

00:06.040 --> 00:07.820
My name is Andres.

00:08.260 --> 00:12.040
And this is a brief introduction of myself.

00:12.160 --> 00:15.300
It's not really interesting so I will skip it.

00:16.080 --> 00:20.960
But the important thing is here we are to talk about Wi-Fi fingerprinting.

00:20.960 --> 00:21.400
Okay?

00:21.400 --> 00:23.220
We want to fingerprint devices.

00:23.560 --> 00:27.600
So this is the first part of a pen test or to seek for a target.

00:27.620 --> 00:29.400
So I think it's really important.

00:29.400 --> 00:35.160
And it's also important as we are defending our network to understand what we are exposing to the air.

00:35.260 --> 00:41.600
Because we used to think that networks or Wi-Fi networks was an access point and some devices connecting to it.

00:41.600 --> 00:44.540
But nowadays the protocol has changed.

00:44.540 --> 00:48.140
And it's quite difficult to know the boundaries of a network.

00:48.240 --> 00:52.840
And also it's an interesting way of how to bypass micro-randomization.

00:52.840 --> 00:57.900
That is something vendors are implementing to protect a user from being tracked.

00:58.100 --> 01:02.180
But in some cases this is not working as expected.

01:02.260 --> 01:05.500
So I will show some of, some example of this.

01:06.360 --> 01:27.760
So also an important thing I want to focus in is explaining that if we are connected to an open network and our traffic is not encrypted, it's quite easy to fingerprint a device because we can see DNS traffic, we can see HTTP traffic and we can see a lot of traffic that is not encrypted.

01:27.760 --> 01:30.820
So it's quite easy to identify and fingerprint a device.

01:30.820 --> 01:37.740
Like if you grab the user agent from HTTP traffic, you can get the OS and other stuff on a computer.

01:37.920 --> 01:39.220
So it's quite easy.

01:39.220 --> 01:43.640
But if you are connected to a secure network, you are almost not leaking any traffic.

01:43.640 --> 01:47.200
Or let's say you have a device that is connected to, is not connected to a network.

01:47.200 --> 01:50.560
How can I fingerprint a device that is not connected?

01:50.880 --> 01:58.380
So we are going to focus on management frames only and in some of those management subtypes in specific.

01:59.580 --> 02:05.260
So I'm going to talk about some specific protocols or extensions on WiFi.

02:05.460 --> 02:09.620
The first one is WPS, that is called WiFi protected setup.

02:09.780 --> 02:15.200
It has some vulnerabilities in the past, but here we are going to focus only on fingerprinting devices.

02:16.240 --> 02:21.500
So I don't know if this is the best screenshot I can get because it's not really clear.

02:21.800 --> 02:31.540
But this is an access point and as we can see here, the access point is leaking the model, the version, the vendor.

02:31.620 --> 02:34.400
It's giving a lot of information in the response frame.

02:34.400 --> 02:54.080
So this is leaked every time an access point is queried with a request frame, it will reply with this and you will get a lot of information on the target and maybe if you get the model or a specific version, you can know that it's vulnerable and then you can target it for an exploit or something else.

02:55.480 --> 03:09.300
I'm going to go really quick because it's only 20 minutes and then if there's questions, please ask me after the talk so I can answer everything you want and I can do also a live demo afterwards also.

03:09.880 --> 03:21.040
This is CCX that if you have worked with Cisco Ironet, this is an extension that was used by default on most Cisco Ironet networks.

03:21.500 --> 03:45.040
And this is a portion of a text in the manual and it's really, it's really, it's really great for us because it says that Cisco Ironet, it sends an information element on the beacon frame that as we all know, the beacon frame is sent every single time in the air and the information element that is a portion of the beacon frame,

03:45.040 --> 04:00.600
the tag that is with the number 85 in hex, contains the access point name that is internal for the network administration, the load of the access point, the number of associating clients and so on.

04:00.600 --> 04:05.100
I'm not sure what so on is but apparently it's also giving more information.

04:05.620 --> 04:32.660
And then it also says that if someone is like doing roaming, moving from one access point to another in the same network and it sends an association request with this tag, the access point is going to reply you with an association response frame with the tag 89 and 85 and 95 and this can contain the controller IP address.

04:32.660 --> 04:40.080
So now your access point is given to anyone that is looking around the IP address of the controller inside the network.

04:41.260 --> 04:50.480
So again, sorry about the, I don't know, someone could read that or, no, sorry, I could show it afterwards.

04:51.480 --> 05:03.580
In this case, this is a beacon frame and we see the information element and we see the name and the number of clients that is, that access point in particular has connected to him.

05:03.700 --> 05:25.860
Again, the name of the access point I think is really useful because when you're going around and doing world driving, sometimes the administrators of the network, they find the access point name such as IT access point or second floor access point and you can get like an idea where the access point is in fact without GPS also.

05:25.860 --> 05:31.120
So it's a really good information to make context of what you're dealing with.

05:32.220 --> 05:36.400
Then Wi-Fi direct, that is another extension.

05:36.400 --> 05:43.940
It was designed by Wi-Fi alliance and it's designed so we can connect directly without needing to have an access point.

05:43.940 --> 05:49.620
So if someone wants to share with my phone something, I can connect phone to phone without having an access point.

05:50.760 --> 05:54.260
This one also gives a lot of information.

05:54.640 --> 06:01.900
In this case, most devices supporting this are Android mobile devices, TVs, printers.

06:02.040 --> 06:03.820
There are a lot of devices that support this.

06:03.820 --> 06:07.840
Windows, Windows desktop machines support it.

06:07.840 --> 06:09.380
So you get a lot of information.

06:09.380 --> 06:18.700
In this case, we can get the name and the model of a TV that has this support for this, for this protocol.

06:18.700 --> 06:23.940
The important thing here to understand is that Wi-Fi direct needs an active scan.

06:23.940 --> 06:26.560
It doesn't work if you're doing passive recognition.

06:26.680 --> 06:30.440
So it needs you to send some frames to get this information.

06:30.440 --> 06:33.200
But again, this information can be get by anyone.

06:34.920 --> 06:39.140
Then we have HP.

06:40.340 --> 07:03.120
HP has decided to, besides supporting Wi-Fi direct on most printers, scanners and office devices that they design, they also added like a custom information element that they are sending through the air that has like the serial number of the printer, the IP address that the printer has where it's connected to.

07:03.140 --> 07:08.380
Again, Wi-Fi direct needs, it's a protocol that can be used to connect directly to the printer.

07:08.460 --> 07:19.420
But if your printer is connected to a wireless network and you connect with Wi-Fi direct to the printer, it could be used as a bridge, okay, to connect to the network it's connected to.

07:19.420 --> 07:26.620
And let's say you're not using Wi-Fi with a printer because you say that it's insecure and you only use an Ethernet cable.

07:26.620 --> 07:36.360
But you don't disable the Wi-Fi direct that again is by default on the printer, your printer can be a bridge to your wireless network.

07:36.480 --> 07:47.840
So again, wireless is not only about access points, you can have devices that support wireless that could be act, could be acting as an access point or as a bridge to a network.

07:50.040 --> 08:03.800
This information element is not processed by Wireshark, but I released a tool that you can get all the information from this information element and I explain how you can reverse it or parse it.

08:04.520 --> 08:09.560
Then we have this one that lately has a lot of people looking into it.

08:09.560 --> 08:11.720
It's the Apple wireless direct link.

08:11.720 --> 08:14.300
It's used by AirPlay and AirDrop.

08:14.480 --> 08:27.640
So if you have an Apple device and you have Wi-Fi and Bluetooth on, your device is going to be sending a lot of information into the air, so if you have a friend nearby and you can share some information.

08:30.380 --> 08:38.040
This one has something really interesting because this hasn't been fixed in a lot of time.

08:38.040 --> 08:41.580
I have been speaking about this, I think a couple of years.

08:41.840 --> 08:53.480
And it's like Apple is always saying that it's protecting the users and they are trying to do macro randomization for example, so you cannot be tracked in a conference or any place you are.

08:53.600 --> 09:04.880
But there you, I don't know if it can be read because it's a little small, but it says the transmitting address or the source address is the random MAC, so you cannot be tracked.

09:04.900 --> 09:14.500
But in this action frame that is not encrypted and it's sent for anyone to read, inside the frame it says device ID and there is the real MAC.

09:14.640 --> 09:20.340
So you create macro randomization, you add this feature and you broke it.

09:20.340 --> 09:22.160
Like it doesn't work.

09:22.960 --> 09:28.620
And it's not, in this case in particular it's for AirPlay and it's affecting Apple TVs.

09:29.040 --> 09:37.940
But as you can see here, this is an iPhone and iPhone is doing, with AirDrop it's doing almost the same.

09:37.940 --> 09:41.720
So it's sending your device name into the air.

09:42.020 --> 09:53.480
So if you have a particular, it's like your name, like Andres iPhone, it's gonna say Andres iPhone with all the random MACs so I can continue looking into it and I continue tracking you.

09:53.480 --> 09:56.600
And we know your random MACs that you have leaked into the air.

09:56.700 --> 10:03.500
So again, macro randomization with Apple AirDrop or AirPlay is not working as expected.

10:04.940 --> 10:09.140
So let me see how I'm doing with the time.

10:09.660 --> 10:11.360
Okay, I'm good.

10:12.560 --> 10:15.160
As far as here, any question?

10:15.280 --> 10:18.220
Any brief question I could know?

10:27.250 --> 10:32.050
The Wi-Fi Direct, Wi-Fi Direct is active.

10:32.050 --> 10:38.070
These are passive but if you want to force it, maybe you need to do something active.

10:38.070 --> 10:49.950
The Apple protocol requires to send some Bluetooth, BLE, beacons to be activated.

10:49.950 --> 10:53.090
So if you have another device nearby, it's gonna be activated.

10:53.090 --> 10:55.850
But if you don't have a device, you need to force it.

10:56.110 --> 11:00.590
But the CCX is passive.

11:00.590 --> 11:08.070
You can do something active but I can tell you afterwards, it's sort of a vulnerability more or less.

11:08.070 --> 11:09.590
I will explain it later.

11:10.350 --> 11:19.830
So how you can find this stuff and understand what is going on and look into this custom protocols.

11:19.830 --> 11:21.290
So there's a lot of them.

11:21.290 --> 11:28.310
So this is only some of them that I look but I'm looking to more of them and there's a lot, a lot.

11:28.310 --> 11:32.670
Vendors are like extending the protocol and leaking a lot of information into there.

11:32.670 --> 11:38.950
On management frames, they are not encrypted and they cannot be encrypted because it's the way the protocol works.

11:38.950 --> 11:40.870
So there's no fix for this.

11:41.670 --> 11:47.270
So we have three different places where we can look for these protocols.

11:47.410 --> 11:52.890
We can look in firmware, for example printers, embedded devices that they support WiFi.

11:53.310 --> 11:57.450
We can see on the kernel, I'm gonna show two examples of kernels.

11:57.450 --> 12:04.950
But usually Linux kernel, a kernel module or a kernel extension on macos.

12:05.190 --> 12:06.910
Also on Windows.

12:06.910 --> 12:12.330
I haven't looked into Windows once but I think that they are not so difficult either.

12:12.370 --> 12:18.250
And then you have user applications that I will show one, the HP case that is the more interesting.

12:20.230 --> 12:21.350
Sorry.

12:23.350 --> 12:35.010
So this is quite difficult to read again but this case, I'm looking into the IO80211 family kernel extension.

12:35.210 --> 12:41.130
That again, this is a module that displays, it's, you can be finding on IOS devices or macos.

12:41.130 --> 12:41.170
And this is a module that displays, it's, you can be finding on IOS devices or macos.

12:41.170 --> 12:45.210
And it's almost the same on the IOS and on the macos.

12:45.210 --> 12:49.590
So if you want to reverse it, you need a mac and you don't need an iPhone.

12:49.590 --> 12:58.030
Let's say you, you are looking into, into IOS and you want to look into an iPhone but you don't, you don't have a, a jailbroken device.

12:58.030 --> 13:05.730
So you can look into the macos that the kernel extension is there, you can grab it with root privileges and then you can reverse it and it's almost the same.

13:05.730 --> 13:11.410
So if I wanted to, want to look into this, it's easier to look at macos than iPhone.

13:11.410 --> 13:13.830
Unless you have a jailbroken device.

13:13.970 --> 13:26.290
But this is a function on a particular class that is called 802.11 AWDL peer manager that is doing all the direct link stuff.

13:26.290 --> 13:30.170
And all the functions, they are dealing with the parsing and other stuff.

13:30.170 --> 13:33.990
There have been some vulnerabilities also reported here.

13:34.310 --> 13:37.210
You can look in the web, there, there's some stuff there.

13:37.310 --> 13:39.270
I think there are more vulnerabilities.

13:40.110 --> 13:44.290
I have some ideas, maybe I, I want to share it in the future.

13:45.670 --> 13:57.870
Then this is a host APD, as some of you could maybe know, the host APD is a user run application that does a lot of parsing on the, on the 802.11 protocol on WiFi.

13:57.970 --> 14:01.610
Mostly on routers, Android, Linux devices.

14:02.130 --> 14:13.710
And again, because we have a specific license on, on the host APD, a lot of vendors extend the protocol, modifying the host APD and other specific features.

14:13.710 --> 14:17.950
It doesn't, it's really, really, really tiny here.

14:17.950 --> 14:20.310
But here it says air ties.

14:20.310 --> 14:26.310
Air ties, it looks like a vendor that is giving some information into the air.

14:26.430 --> 14:38.870
I recently started reversing this driver, so I don't have more information, but this is just to show you that there's a lot of information we can process, just reversing some drivers or firmware.

14:39.890 --> 14:45.370
And this last one is the, let me check my time, okay .

14:45.370 --> 14:58.390
And this last one is the, eh, HP one, that is the, eh, it's, it's, it's weird because I never find something on, on Java, like to, to on WiFi, like with Java.

14:58.610 --> 15:04.770
But in this case, this, this application for HP only works on Android devices.

15:04.770 --> 15:25.830
So if you have an Android device and you have the HP application to connect to a printer and, and print directly from your phone, you have this application that will ask Android, the, the OS, the Android OS to give the, all the beacon and the response frames and the WiFi direct frames that they are print response but with little modifications.

15:26.050 --> 15:30.670
And then it's gonna pass the here on the Java application.

15:30.870 --> 15:42.270
So if you find something wrong in the Java application, I don't say it has something wrong, but if you find something wrong, you can maybe attack the application directly with WiFi frames, you are attacking directly the application.

15:42.710 --> 15:52.390
In this case I, I, I decompiled some code and I was able to reverse the protocol, eh, HP printers were, were like Customizing.

15:52.810 --> 15:54.510
They give a lot of information.

15:54.510 --> 15:57.090
It's amazing they send this in a management frame.

15:58.430 --> 16:00.730
So, future work.

16:00.730 --> 16:04.630
There's a lot of things anyone can grab and look into it.

16:04.630 --> 16:16.690
There's a protocol that, there's WPS has something called vendor and application extensions that I, when I was driving, I found a lot of devices that they are leaking information.

16:17.210 --> 16:21.010
There's also the Wi-Fi direct service discovery.

16:21.030 --> 16:26.190
That again is something useful because you can ask the device what type of service they are providing.

16:26.190 --> 16:29.690
So again, you can fingerprint based on the service that they are providing.

16:30.630 --> 16:33.870
Remember that this is, everything is without authentication.

16:33.950 --> 16:38.830
Okay, the device is there and you talk through them, you talk to them, no authentication needed.

16:39.170 --> 16:42.510
Then you have Wi-Fi display.

16:43.150 --> 16:47.410
There is something about Aruba network that they are sending some custom frames.

16:47.410 --> 16:52.130
It looks like they are used to like manage the network.

16:52.130 --> 16:56.270
I haven't looked into that, but they are like pretty big frames.

16:56.370 --> 16:58.610
I'm not sure what they have.

16:58.970 --> 17:03.610
And again, there are many other information elements that you can look into it.

17:03.730 --> 17:12.150
So, I'm gonna show a brief demo of an application I wrote.

17:12.610 --> 17:21.650
This application is not a replacement for the other tools you usually use.

17:21.650 --> 17:25.790
It's not a replacement for Kismet, for Aircrack or for BetterCup.

17:25.790 --> 17:27.750
It's just a complement.

17:27.750 --> 17:28.830
You can use it.

17:28.830 --> 17:45.750
This application is gonna parse all the frames that it finds with extra information with the protocols and it will give you this information in a way you can later parse it and add it to a report or maybe a plan for when you are doing a Wi-Fi pen test or something like that.

17:46.270 --> 17:48.110
So, I will try to do a demo.

17:48.110 --> 17:57.810
It's not gonna be a live demo because before starting the talk, I check what devices they are here and they are not so many devices with these protocols.

17:58.070 --> 18:06.770
But I give a, I walk around the hotel before the talk and I have some captures that we can use as an example.

18:06.810 --> 18:15.830
But if you download the tool and you test it yourself, you will see that there's plenty of devices around us that they are using these protocols and you can get a lot of information from them.

18:24.360 --> 18:31.960
So this tool I wrote can receive a pick up file or it can read directly from the Wi-Fi carrying monitor mode.

18:32.920 --> 18:40.760
It has only one active mode, that is the Wi-Fi direct mode because again you have to send something to the device to get information.

18:40.880 --> 18:43.680
But all the other ones are in passive mode.

18:49.180 --> 18:55.960
So here I, I only put a couple of devices so we can see what, what type of information we can get.

18:56.280 --> 19:04.600
In this case, the, this printer that maybe you have seen stuff like this, like direct, HP, office, something.

19:04.840 --> 19:14.440
They are printers and as Wi-Fi direct requires WPS to work, it's gonna leak in two, in two different information elements.

19:14.440 --> 19:21.660
You're gonna get information on the Wi-Fi direct information element and in the Wi-Fi protected setup information element.

19:21.840 --> 19:25.460
So in this case we don't, we don't, we don't get so much information.

19:25.740 --> 19:34.660
It's like the serial number is zero, the version, this is not model name, it's zero, so we are not getting too much information.

19:35.000 --> 19:38.000
We only get a little bit of information from the SSID.

19:38.300 --> 19:46.440
But if we go here and we see here the, this is the module of the HP printer, vendor specific one.

19:46.680 --> 19:51.600
We can see that they are giving you like a USB , USB connected.

19:51.600 --> 19:54.640
So we now know that the printer has the USB connected.

19:55.860 --> 20:07.800
We also know the model, the product SKU, the, the serial number and this IP address here is the IP address of the, of the printer that is connected as a Wi-Fi station to an access point.

20:07.800 --> 20:13.640
So this printer is connected to a computer by, via USB and it's also an access station connected to an access point.

20:13.640 --> 20:35.600
So if you connect to the printer and you, let's say you have, you connect with Wi-Fi direct and you exploit the printer and you get access to the printer as let's say root, it's not root but something more or less, and you get access to this, you will be able to maybe pivot to the USB device that is connected to the printer and maybe attack that or you can get access to the local network.

20:35.600 --> 20:53.760
So maybe you have a really secure network, the WPAA3 with a really hard core, hard difficult password, maybe you're using any protection you want, but if your printer is gonna be the entry point, you are in, you, you have some trouble there.

20:53.920 --> 21:02.020
So again, all this information, they are sending it every single time to the AR, you, you can do it passively or actively.

21:02.020 --> 21:08.420
The HP printer is sending it like passively, it sends it in every beacon, they, they are sending this information.

21:08.960 --> 21:16.180
Then we have the CCS, the CCX here, Cisco Client Extension, and this is from a hotel nearby.

21:16.480 --> 21:22.860
And it says the access point name, it says how many clients are associated to this particular access point.

21:23.100 --> 21:29.380
Again, this information, public, you don't need even to interact with the access point, this is sent through the AR.

21:30.460 --> 21:36.000
Then we have, um, this one is an Apple TV.

21:36.700 --> 21:39.840
The Apple TV is giving a lot of information.

21:40.380 --> 21:46.080
Eh, here, the MAC address here is a random MAC address, and as we can see,

21:51.100 --> 21:53.580
this one.

21:53.580 --> 21:57.780
Here, it says device ID, and this one is the real MAC address.

21:58.360 --> 22:02.000
So, that's, that is not working as expected.

22:02.500 --> 22:16.140
Eh, and you also have the model, and here it says that it's an Apple TV, I think that this, this is 5th generation, not really sure, but you can get from this information, you can also know maybe the version they are running.

22:16.540 --> 22:35.480
Um, here you have an iPhone, eh, I don't know what country code is this, eh, and because it's also leaking the, the country code of the device, how it's set to, and, and here it has a MAC address.

22:35.480 --> 22:39.720
I'm not really sure what this MAC address is, but I'm gonna research into it.

22:39.740 --> 22:51.500
Maybe the iPhone is also, is leaking the, the, the real MAC address of the device, so if this is true, eh, iOS, eh, has MAC address randomization broken.

22:51.620 --> 23:08.500
Eh, on iOS 9, that it was, this was broken, because they were giving the, the real MAC address inside the frame, but then after iOS, I think 10, they fix it, and I think this is a new, so I think they, they, like, put the bug inside again.

23:08.500 --> 23:10.740
I'm, I'm not really sure, but I have to look into it.

23:11.520 --> 23:26.500
So this was a, a, it's not a live demo, but if you want a live demo, now after doc, I can show you, I have another computer, this one doesn't work really good with my Wi-Fi, eh, Wi-Fi card, but, this is it.

23:26.500 --> 23:27.960
So, any questions?

23:30.300 --> 23:30.600
No

23:34.560 --> 23:37.620
questions?

24:01.820 --> 24:10.540
One last thing I forget to say is, remember that every single custom protocol that is in there, is extending the tag surface of the device.

24:10.540 --> 24:17.640
If you have AirDrop, AirPlay or any other protocol, and there's a vulnerability for that protocol, you can get down.

24:17.640 --> 24:29.920
So it's not about only leaking information, it's also about extending the tag surface and being able to find new vulnerabilities on the parsing code, so it's, it's, it's getting chaotic, the, the protocol.

24:29.920 --> 24:34.580
So again, we should look into it more, more, more deeply.

