start	end	text
0	10140	Hi everyone. The sound is okay? Yes? Everybody listens? Okay. My name is Andres. And this is a
10140	17360	brief introduction of myself. It's not really interesting so I will skip it. But the
17360	22140	important thing is here we are to talk about Wi-Fi fingerprinting. Okay? We want to
22140	27940	fingerprint devices. So this is the first part of a pen test or to seek for a target. So I
27940	32740	think it's really important. And it's also important as we are defending our network to
32740	37780	understand what we are exposing to the air. Because we used to think that networks or
37780	43020	Wi-Fi networks was an access point and some devices connecting to it. But nowadays the
43020	48420	protocol has changed. And it's quite difficult to know the boundaries of a network. And
48420	53500	also it's an interesting way of how to bypass micro-randomization. That is something
53500	60520	vendors are implementing to protect a user from being tracked. But in some cases this is
60520	68300	not working as expected. So I will show some of, some example of this. So also an important
68300	73380	thing I want to focus in is explaining that if we are connected to an open network and our
73380	80020	traffic is not encrypted, it's quite easy to fingerprint a device because we can see
80020	87760	DNS traffic, we can see HTTP traffic and we can see a lot of traffic that is not encrypted.
87760	92520	So it's quite easy to identify and fingerprint a device. Like if you grab the user agent
92520	99220	from HTTP traffic, you can get the OS and other stuff on a computer. So it's quite easy.
99220	103760	But if you are connected to a secure network, you are almost not leaking any traffic. Or
103760	108000	let's say you have a device that is connected to, is not connected to a network. How can I
108000	113060	fingerprint a device that is not connected? So we are going to focus on management frames
113060	121780	only and in some of those management subtypes in specific. So I'm going to talk about some
121780	128200	specific protocols or extensions on WiFi. The first one is WPS, that is called WiFi
128200	133340	protected setup. It has some vulnerabilities in the past, but here we are going to focus
133340	139560	only on fingerprinting devices. So I don't know if this is the best screenshot I can get
139560	146180	because it's not really clear. But this is an access point and as we can see here, the access
146180	153100	point is leaking the model, the version, the vendor. It's giving a lot of information in the
153100	160080	response frame. So this is leaked every time an access point is queried with a request frame,
160080	164780	it will reply with this and you will get a lot of information on the target and maybe if you get
164780	171560	the model or a specific version, you can know that it's vulnerable and then you can target it
172060	178720	for an exploit or something else. I'm going to go really quick because it's only 20 minutes
179220	185980	and then if there's questions, please ask me after the talk so I can answer everything you
185980	192640	want and I can do also a live demo afterwards also. This is CCX that if you have worked with
192640	201680	Cisco Ironet, this is an extension that was used by default on most Cisco Ironet networks. And
201680	210340	this is a portion of a text in the manual and it's really, it's really, it's really great for us
210340	215960	because it says that Cisco Ironet, it sends an information element on the beacon frame that
215980	222000	as we all know, the beacon frame is sent every single time in the air and the information
222000	229280	element that is a portion of the beacon frame, the tag that is with the number 85 in hex,
229280	236840	contains the access point name that is internal for the network administration, the load of the
236840	242700	access point, the number of associating clients and so on. I'm not sure what so on is but
242700	248160	apparently it's also giving more information. And then it also says that if someone is like
248160	254040	doing roaming, moving from one access point to another in the same network and it sends an
254040	261500	association request with this tag, the access point is going to reply you with an association
261500	272660	response frame with the tag 89 and 85 and 95 and this can contain the controller IP address.
272660	278120	So now your access point is given to anyone that is looking around the IP address of the
278120	285720	controller inside the network. So again, sorry about the, I don't know, someone could read
285720	294760	that or, no, sorry, I could show it afterwards. In this case, this is a beacon frame and we see
294760	300060	the information element and we see the name and the number of clients that is, that access
300060	306040	point in particular has connected to him. Again, the name of the access point I think is
306040	310920	really useful because when you're going around and doing world driving, sometimes the
310920	319480	administrators of the network, they find the access point name such as IT access point or
319480	324240	second floor access point and you can get like an idea where the access point is in fact
324240	330040	without GPS also. So it's a really good information to make context of what you're
330040	338020	dealing with. Then Wi-Fi direct, that is another extension. It was designed by Wi-Fi
338020	343320	alliance and it's designed so we can connect directly without needing to have an access
343320	347680	point. So if someone wants to share with my phone something, I can connect phone to phone
347680	355840	without having an access point. This one also gives a lot of information. In this case, most
356360	362460	devices supporting this are Android mobile devices, TVs, printers. There are a lot of
362460	368540	devices that support this. Windows, Windows desktop machines support it. So you get a lot
368540	374140	of information. In this case, we can get the name and the model of a TV that has this
374640	380900	support for this, for this protocol. The important thing here to understand is that Wi-Fi
380900	387660	direct needs an active scan. It doesn't work if you're doing passive recognition. So it
387660	391860	needs you to send some frames to get this information. But again, this information can be
391860	405260	get by anyone. Then we have HP. HP has decided to, besides supporting Wi-Fi direct on most
405260	411720	printers, scanners and office devices that they design, they also added like a custom
411720	417340	information element that they are sending through the air that has like the serial number of
417340	424040	the printer, the IP address that the printer has where it's connected to. Again, Wi-Fi
424040	429440	direct needs, it's a protocol that can be used to connect directly to the printer. But if
429440	433740	your printer is connected to a wireless network and you connect with Wi-Fi direct to the
433740	439580	printer, it could be used as a bridge, okay, to connect to the network it's connected to. And
439580	444280	let's say you're not using Wi-Fi with a printer because you say that it's insecure and you
444280	451000	only use an Ethernet cable. But you don't disable the Wi-Fi direct that again is by default
451000	459340	on the printer, your printer can be a bridge to your wireless network. So again, wireless is
459340	463640	not only about access points, you can have devices that support wireless that could be
463640	471360	act, could be acting as an access point or as a bridge to a network. This information
471360	477940	element is not processed by Wireshark, but I released a tool that you can get all the
477940	483800	information from this information element and I explain how you can reverse it or parse it.
484520	490640	Then we have this one that lately has a lot of people looking into it. It's the Apple wireless
490640	497820	direct link. It's used by AirPlay and AirDrop. So if you have an Apple device and you have Wi-Fi
497820	503800	and Bluetooth on, your device is going to be sending a lot of information into the air, so
503800	511540	if you have a friend nearby and you can share some information. This one has something
511540	518840	really interesting because this hasn't been fixed in a lot of time. I have been speaking
518840	524420	about this, I think a couple of years. And it's like Apple is always saying that it's
524420	529900	protecting the users and they are trying to do macro randomization for example, so you
529900	536300	cannot be tracked in a conference or any place you are. But there you, I don't know if it
536300	540900	can be read because it's a little small, but it says the transmitting address or the
540900	546220	source address is the random MAC, so you cannot be tracked. But in this action frame that
546220	552700	is not encrypted and it's sent for anyone to read, inside the frame it says device ID and
552700	559600	there is the real MAC. So you create macro randomization, you add this feature and you
559600	566560	broke it. Like it doesn't work. And it's not, in this case in particular it's for AirPlay and
566560	575020	it's affecting Apple TVs. But as you can see here, this is an iPhone and iPhone is doing,
575020	582600	with AirDrop it's doing almost the same. So it's sending your device name into the air. So if
582600	588360	you have a particular, it's like your name, like Andres iPhone, it's gonna say Andres iPhone
588360	593620	with all the random MACs so I can continue looking into it and I continue tracking you. And
593620	598820	we know your random MACs that you have leaked into the air. So again, macro randomization
598820	608220	with Apple AirDrop or AirPlay is not working as expected. So let me see how I'm doing with
608220	627810	the time. Okay, I'm good. As far as here, any question? Any brief question I could know? The
627810	635910	Wi-Fi Direct, Wi-Fi Direct is active. These are passive but if you want to force it, maybe you
635910	648310	need to do something active. The Apple protocol requires to send some Bluetooth, BLE, beacons
648310	653610	to be activated. So if you have another device nearby, it's gonna be activated. But if you
653610	661590	don't have a device, you need to force it. But the CCX is passive. You can do something
661590	668730	active but I can tell you afterwards, it's sort of a vulnerability more or less. I will explain
668730	676110	it later. So how you can find this stuff and understand what is going on and look into this
678310	684570	custom protocols. So there's a lot of them. So this is only some of them that I look but I'm
684570	690810	looking to more of them and there's a lot, a lot. Vendors are like extending the protocol and
690810	695770	leaking a lot of information into there. On management frames, they are not encrypted and they
695770	702530	cannot be encrypted because it's the way the protocol works. So there's no fix for this. So we
702530	708670	have three different places where we can look for these protocols. We can look in firmware, for
708670	715390	example printers, embedded devices that they support WiFi. We can see on the kernel, I'm gonna
715390	723990	show two examples of kernels. But usually Linux kernel, a kernel module or a kernel extension on
723990	731150	macos. Also on Windows. I haven't looked into Windows once but I think that they are not so
731150	736190	difficult either. And then you have user applications that I will show one, the HP case
736190	748170	that is the more interesting. Sorry. So this is quite difficult to read again but this case, I'm
748170	757550	looking into the IO80211 family kernel extension. That again, this is a module that displays,
757550	761130	it's, you can be finding on IOS devices or macos. And this is a module that displays, it's, you
761130	765290	can be finding on IOS devices or macos. And it's almost the same on the IOS and on the macos. So
765290	770710	if you want to reverse it, you need a mac and you don't need an iPhone. Let's say you, you are
770710	777330	looking into, into IOS and you want to look into an iPhone but you don't, you don't have a, a
777330	782190	jailbroken device. So you can look into the macos that the kernel extension is there, you can
782190	786630	grab it with root privileges and then you can reverse it and it's almost the same. So if I
786630	792850	wanted to, want to look into this, it's easier to look at macos than iPhone. Unless you have a
792850	803590	jailbroken device. But this is a function on a particular class that is called 802.11 AWDL peer
803590	808970	manager that is doing all the direct link stuff. And all the functions, they are dealing with
808970	814830	the parsing and other stuff. There have been some vulnerabilities also reported here. You can
814830	820570	look in the web, there, there's some stuff there. I think there are more vulnerabilities. I
820570	828910	have some ideas, maybe I, I want to share it in the future. Then this is a host APD, as some of
828910	834950	you could maybe know, the host APD is a user run application that does a lot of parsing on
834950	843930	the, on the 802.11 protocol on WiFi. Mostly on routers, Android, Linux devices. And again,
843930	850250	because we have a specific license on, on the host APD, a lot of vendors extend the protocol,
850250	856910	modifying the host APD and other specific features. It doesn't, it's really, really, really
856910	863690	tiny here. But here it says air ties. Air ties, it looks like a vendor that is giving some
863690	871450	information into the air. I recently started reversing this driver, so I don't have more
871450	876290	information, but this is just to show you that there's a lot of information we can process,
876290	884950	just reversing some drivers or firmware. And this last one is the, let me check my time,
884950	893090	okay. And this last one is the, eh, HP one, that is the, eh, it's, it's, it's weird because I
893090	899890	never find something on, on Java, like to, to on WiFi, like with Java. But in this case,
899890	905890	this, this application for HP only works on Android devices. So if you have an Android device
905890	910190	and you have the HP application to connect to a printer and, and print directly from your
910190	916130	phone, you have this application that will ask Android, the, the OS, the Android OS to give
916130	923030	the, all the beacon and the response frames and the WiFi direct frames that they are
923030	929250	print response but with little modifications. And then it's gonna pass the here on the Java
929250	934570	application. So if you find something wrong in the Java application, I don't say it has
934570	938550	something wrong, but if you find something wrong, you can maybe attack the application
938550	944330	directly with WiFi frames, you are attacking directly the application. In this case I, I, I
944330	951030	decompiled some code and I was able to reverse the protocol, eh, HP printers were, were like
951030	956210	Customizing. They give a lot of information. It's amazing they send this in a
956210	963870	management frame. So, future work. There's a lot of things anyone can grab and look
963870	968690	into it. There's a protocol that, there's WPS has something called vendor and
968690	975230	application extensions that I, when I was driving, I found a lot of devices that
975230	981010	they are leaking information. There's also the Wi-Fi direct service discovery.
981030	984690	That again is something useful because you can ask the device what type of service
984690	988750	they are providing. So again, you can fingerprint based on the service that they
988750	994190	are providing. Remember that this is, everything is without authentication. Okay,
994190	997990	the device is there and you talk through them, you talk to them, no authentication
997990	1005150	needed. Then you have Wi-Fi display. There is something about Aruba network that
1005150	1011370	they are sending some custom frames. It looks like they are used to like manage the
1011370	1017050	network. I haven't looked into that, but they are like pretty big frames. I'm not
1017050	1022350	sure what they have. And again, there are many other information elements that you
1022350	1032850	can look into it. So, I'm gonna show a brief demo of an application I wrote. This
1032850	1042270	application is not a replacement for the other tools you usually use. It's not a
1042270	1048070	replacement for Kismet, for Aircrack or for BetterCup. It's just a complement. You
1048070	1053190	can use it. This application is gonna parse all the frames that it finds with extra
1053510	1057830	information with the protocols and it will give you this information in a way you can
1057830	1064210	later parse it and add it to a report or maybe a plan for when you are doing a Wi-Fi
1064210	1069230	pen test or something like that. So, I will try to do a demo. It's not gonna be a live
1069230	1075490	demo because before starting the talk, I check what devices they are here and they are
1075490	1082910	not so many devices with these protocols. But I give a, I walk around the hotel before
1082910	1087650	the talk and I have some captures that we can use as an example. But if you download
1087650	1091910	the tool and you test it yourself, you will see that there's plenty of devices around us
1091910	1104800	that they are using these protocols and you can get a lot of information from them. So
1104800	1110520	this tool I wrote can receive a pick up file or it can read directly from the Wi-Fi
1110520	1116040	carrying monitor mode. It has only one active mode, that is the Wi-Fi direct mode
1116040	1121400	because again you have to send something to the device to get information. But all the
1121400	1133640	other ones are in passive mode. So here I, I only put a couple of devices so we can see
1133640	1140420	what, what type of information we can get. In this case, the, this printer that maybe you
1140420	1147880	have seen stuff like this, like direct, HP, office, something. They are printers and as
1147880	1153960	Wi-Fi direct requires WPS to work, it's gonna leak in two, in two different information
1153960	1159340	elements. You're gonna get information on the Wi-Fi direct information element and in the
1159340	1163820	Wi-Fi protected setup information element. So in this case we don't, we don't, we don't
1163820	1171520	get so much information. It's like the serial number is zero, the version, this is not
1171520	1175960	model name, it's zero, so we are not getting too much information. We only get a little
1175960	1182780	bit of information from the SSID. But if we go here and we see here the, this is the
1182780	1190400	module of the HP printer, vendor specific one. We can see that they are giving you like a
1190400	1196960	USB, USB connected. So we now know that the printer has the USB connected. We also know
1196960	1202940	the model, the product SKU, the, the serial number and this IP address here is the IP
1202940	1207980	address of the, of the printer that is connected as a Wi-Fi station to an access point. So
1207980	1212500	this printer is connected to a computer by, via USB and it's also an access station
1212500	1216700	connected to an access point. So if you connect to the printer and you, let's say you
1216700	1220680	have, you connect with Wi-Fi direct and you exploit the printer and you get access to the
1220680	1226740	printer as let's say root, it's not root but something more or less, and you get access to
1226740	1231800	this, you will be able to maybe pivot to the USB device that is connected to the printer
1231800	1236380	and maybe attack that or you can get access to the local network. So maybe you have a
1236380	1244860	really secure network, the WPAA3 with a really hard core, hard difficult password, maybe
1244860	1251800	you're using any protection you want, but if your printer is gonna be the entry point, you
1251800	1256080	are in, you, you have some trouble there. So again, all this information, they are sending
1256080	1262620	it every single time to the AR, you, you can do it passively or actively. The HP printer
1262620	1267520	is sending it like passively, it sends it in every beacon, they, they are sending this
1267520	1275100	information. Then we have the CCS, the CCX here, Cisco Client Extension, and this is from a
1275100	1281100	hotel nearby. And it says the access point name, it says how many clients are associated to
1281100	1286460	this particular access point. Again, this information, public, you don't need even to
1286460	1294720	interact with the access point, this is sent through the AR. Then we have, um, this one is
1294720	1303060	an Apple TV. The Apple TV is giving a lot of information. Eh, here, the MAC address here is a
1303060	1316440	random MAC address, and as we can see, this one. Here, it says device ID, and this one is the
1316440	1324840	real MAC address. So, that's, that is not working as expected. Eh, and you also have the model,
1324840	1330440	and here it says that it's an Apple TV, I think that this, this is 5th generation, not really
1330440	1335360	sure, but you can get from this information, you can also know maybe the version they are
1335360	1346420	running. Um, here you have an iPhone, eh, I don't know what country code is this, eh, and
1346440	1354560	because it's also leaking the, the country code of the device, how it's set to, and, and here it
1354560	1359720	has a MAC address. I'm not really sure what this MAC address is, but I'm gonna research into it.
1359740	1365800	Maybe the iPhone is also, is leaking the, the, the real MAC address of the device, so if this
1365800	1375620	is true, eh, iOS, eh, has MAC address randomization broken. Eh, on iOS 9, that it was, this was
1375620	1379720	broken, because they were giving the, the real MAC address inside the frame, but then after
1379720	1387280	iOS, I think 10, they fix it, and I think this is a new, so I think they, they, like, put the
1387280	1393100	bug inside again. I'm, I'm not really sure, but I have to look into it. So this was a, a, it's
1393100	1397940	not a live demo, but if you want a live demo, now after doc, I can show you, I have another
1397940	1406500	computer, this one doesn't work really good with my Wi-Fi, eh, Wi-Fi card, but, this is it.
1406500	1445180	So, any questions? No questions? One last thing I forget to say is, remember that every
1445180	1450920	single custom protocol that is in there, is extending the tag surface of the device. If you
1450920	1456780	have AirDrop, AirPlay or any other protocol, and there's a vulnerability for that protocol, you
1456780	1461680	can get down. So it's not about only leaking information, it's also about extending the tag
1461680	1468060	surface and being able to find new vulnerabilities on the parsing code, so it's, it's, it's
1468060	1474580	getting chaotic, the, the protocol. So again, we should look into it more, more, more deeply.
