start	end	text
0	6740	All the way from France. One for all and all for WHD, wireless shenanigans made easy.
6740	10080	Please welcome to the stage Damien and Roman.
13610	14930	Hello DEF CON!
17190	23410	Okay so this is uh last talk for today on this track and we are going to present you uh
23410	30110	something we've been working on uh since more than two years now and this is what?
32470	41210	Oh as usual. Okay so uh let me introduce ourselves. I'm Damien, Damien Coquille from Quarkstab.
41210	46690	I'm the maintainer of a tool called BTE Jack or Beto Jack, call it what you want.
46690	53090	Uh this is a BLE Swiss Army tool and uh I love reversing stuff as well on embedded systems.
53090	59230	And this is Roman, the maintainer of Mirage, another BLE Swiss Army tool. But not only BLE
59230	65150	does ZigBee and some other protocol as well. And uh he loves cross protocol attacks and we are
65150	73310	going to talk a bit uh about this later in the talk. So what is what and why we had to create
73310	79490	this uh framework? So basically wireless tools are a mess. A lot of researchers did a lot of
79490	84670	research on wireless protocols and they create a lot of tools. Different tools with different
84670	89430	protocols and different devices and different firmwares. Uh each firmware communicates with
89430	96190	the host or computer with a specific protocol designed by each person. And basically everyone
96190	104070	revents the wheel because why not? And if you are into, yep, if you are into wireless protocol
104070	110350	hacking, you may have to use a lot of different tools. So for BLE, the classic tools, BTD,
111110	118070	Mirage, uh Gattacurl, SniffID, uh are the best way to to capture information and test some
118070	125410	devices. And in the end, you end up with a lot of devices. So if you want to be able to tackle
125410	132050	with all these protocols, you need to buy at least all of these. And the problem is um that it
132050	138030	takes a lot of space. It costs a lot uh as well. And most of this hardware uh can be
138030	143950	discontinued at any time. So if you want to to hack some wireless protocol, there is this tiny
143950	149650	hardware you didn't buy 2 years ago. And it's the only hardware that is supported for hacking
149650	155130	this specific protocol. So that's uh that's a shame. And basically this is just a waste of
155130	159890	time. And because uh you need to create a different uh each researcher create different
159890	167450	firmware and uh um each researcher or each person trying to hack a wireless protocol uh is
167450	171810	going to face the same issues other people have already had before and uh with the same
171810	177530	solution as well. And uh all of this in fact creates fragmentation. And uh this is uh this is
177530	190560	not good for us uh this kind of fragmentation. So we uh talked a lot together and uh we try to
190560	199080	find a solution to solve this fragmentation issue. So uh it leads us to uh come with a
199080	208680	three main ideas. So uh the first one uh would be to design uh communication protocol for the
208680	214780	communication between the host and uh the other world that would be extensible. And either
214780	219880	these that would support multiple wireless protocols, multiple physical layers uh at the same
219880	228840	time. And of course uh that could be open source and easy to extend. Uh the second uh big idea
229080	237340	uh would be to uh create a set of libraries, a framework, and basically a world ecosystem uh that
237340	245620	will allow uh some use of uh values uh ready to use features for different hardware, different
245620	254780	platforms. And that would be available both for the host and the firmware. And uh the third main
254780	263240	uh idea we came with is uh that for uh these two works uh it must uh from the beginning
263240	270940	encourage the interoperability and the collaboration between the researchers. So uh it motivated us
270940	278860	to build everything as open source software and to uh evenly document both the use uh of the tools
278860	292820	but also uh its design. So uh here comes the main uh part uh of WAD for this project, which is the
292820	300480	WAD protocol. So we have several guidelines that have motivated uh its development. So first uh
300480	307680	it's a standardized protocol so we we properly defined it. Everything uh is uh documented and
307680	317400	explained. It's uh generic so it covers uh a set of wireless capabilities that are uh already uh in
317400	325480	the ecosystem. It's modular so you can support multiple uh wireless protocols. Uh and uh if you
325480	331700	want to add more and put your own, it's a protocol which is evolutive. So the protocol has been
331700	341200	designed to be easily extended and improved over time. And finally uh we also tried to make it as user
341200	349040	friendly as possible. So uh we developed a set of C, C++, and Python parsing libraries uh allowing to
349040	360380	facilitate uh its integration into uh your framework uh and so on. So another uh key uh idea behind WAD
360380	369420	is uh to offload most of the complexity from the firmware side to the uh outside. So of course on the
369420	377520	firmware side we have some CPU uh some memory limitations. And so the idea was uh to keep only uh
377520	386260	what is uh needed. So some atomic uh wireless primitives uh as basic as possible. Uh and of
386260	392140	course the operations that are time critical and that could not be offloaded to the host. So for
392140	399120	example the channel opening, this kind of stuff. So we keep uh a minimal logic in the firmware and all
399120	407100	the attack, the protocol stacks, the packet detectors and so on are implemented on the host. So
407100	415440	finally uh WAD has been designed uh not only uh for hackers, if any, if we are in a hacker
415440	423140	conference, but uh also for uh everyone. So if you are a security researcher uh you can use it. If you
423140	432300	are just a wireless uh enthusiast and you want to control uh your IoT devices uh or if you are just a
432300	438960	curious user and you want to understand how uh your favorite wireless toy works.
442000	448820	Alright so uh what is WAD in fact? Uh Romain introduced the main concept behind this uh this
448820	454820	framework but in fact uh technically uh first the name because you know when you start a project you
454820	460560	get you got to find a name and it's always a pain in the ass to find something yeah meaningful. Uh
460560	466100	so WAD stands originally for Wireless Hacking Devices because it was uh supposed to support a lot
466100	472960	of wireless uh so a lot of devices to hack into wireless protocols and after having used this
472960	480440	projects uh during more than a year uh yeah wireless hacking for them is also a great name because
480440	487020	it's uh makes things easier and we are going to show that in multiple demos. Uh like Romain said
487020	491900	it's more than a protocol uh because designing a protocol, a communication protocol between a host
491900	498020	and a device that's a thing and this is something uh we we already did uh two of us uh for our
498020	504900	respective tools but in fact providing uh uh an ecosystem with uh the protocol all libraries in Python
504900	510800	and in C and C++ that you can embed in your firmware and use to communicate with the host without
510800	518120	having uh you know uh without worrying about how the data is encoded and so on. This is uh this is a
518120	525420	lifesaver. Uh you when you develop a firmware compatible with this uh ecosystem you the only thing
525420	530920	you need to worry about is the specific code that runs and that handles all the radio frequency
530920	537800	stuff. And uh also we provide a lot of tools uh command line interface tools and uh maybe some are
537800	545400	more evolved and provide more features. But if you want to create your own applications based on a web
545400	551660	on this ecosystem you can do uh as do it as well. And you can just use the Python client library and
551660	558060	use it uh yeah. It's very simple to to develop something. From the protocol perspective it's based
558060	565080	on protocol buffers so yeah no surprise here. And um the protocol has been thought uh in a way that
565080	573740	the uh host can query the device uh about what uh the devices or capabilities are. So basically each
573740	580060	device compatible device can announce itself to the uh wild ecosystem and especially to the host
580060	586340	telling okay I I support this protocol uh I can do this with this protocol packet injection or just
586340	594200	sniffing scanning anything. And the host adapts uh the the tools based on the uh capabilities
594200	599340	announced by the device. And this is a discovery protocol that has been included in wild and uh
599340	604720	this one is mandatory for any device. Uh you can have uh uh some hardware on the ZigBee protocol
604720	613220	and the BLE or or even just modulation modulation and demodulation as well. Uh but in fact you can
613220	618400	have some you can have multiple protocols supported by a single device with using this uh this
618400	627360	system. Um we created a lot of firmware uh a lot of firmware. We actually we support uh if you have a
627360	635100	look at the top uh top half of the screen, we support basically and natively 4 devices. Um some of
635100	642540	them are based on Nordic Semiconductor NRF52 uh system and chips. Uh so basically the there is the
643560	652760	ESP32WROOM from Espressif. The Nucleo WL55 which is uh uh Lora and the Sigfox uh transceiver from
652760	658840	STMicro uh that's supported and uh also yeah I told you about the NRF52. But the most
658840	665660	interesting part is that we uh managed to create some uh adaptation layer between WAD and the old
665660	672780	tools such as the uh Yardstick one or the Herbatools. And in fact we we we can use all these old
672780	678580	devices if you can say with WAD. And this is totally transparent for you. So it's uh just it appears
678580	682540	like a classic WAD tool or WAD device and you can use it to do whatever you want.
684940	691300	The WAD protocol supports a lot of uh modulations uh file layers and other protocols. So
691300	697480	basically this is the FSK, GFSK, MSK modulation on the physical layer. Uh so you can do
697480	702920	demodulate and modulate signals using a specific device. And uh obviously the BLE protocol,
702920	709960	ZigBee and so on also support it. Uh based on some previous research we made, Romain and I, we
709960	716800	also added into WAD the result of this research. So Romain published in uh 2021 uh the Wasabi
716800	724460	uh attack. So basically this is an attack on uh well not an attack. This is uh just a uh a way to
724460	732360	divert the uh radio transceiver from an NRF50 to a system and chip to to make it able to sniff and
732360	739840	inject ZigBee packets. And uh last year we presented also uh some uh research at WOOD uh
741000	748960	which is basically how to turn an ESP32 into a uh a device uh that can sniff and inject raw
748960	754260	PDUs in Bluetooth low energy uh communication. So yeah this uh this is also supported in the
754260	760480	firmware and uh in the WAD protocol. Not WAD protocol but WAD ecosystem. Uh if you want to
760480	766460	add new protocols to this uh like Romain said it's extensible. So you can uh just modify the
766460	773220	protocol and add what you need to to implement it. All the uh uh all the translation between
773220	777800	these messages and so on is performed by the framework. And uh the protocol is versioned as
777800	782460	well so it is Blackboard compatible. If you have a device with version 1 protocol version 1 it
782460	789200	will be supported uh as well as a device with a protocol version 2 and so on. And uh obviously
789200	796380	we hope that uh many hackers may want to contribute to to WAD and add new protocols we didn't
796460	806340	think about because we maybe don't know this protocol or so on. Um we also design our own
806340	812140	flexible stack model. So speaking of wireless protocol we provide a specific flexible stack
812140	820260	model sorry uh that is easy to modify. So basically take a BLE stack. You can just swap uh a
820260	824420	specific layer and replace it with your one with your own. You can develop your own stack layer
824980	830240	and replace it in a in the stack. So basically you can implement some very specific behavior if
830240	837760	you want to test some uh unexpected uh behavior this is a way to to do. Uh there is a complete
837760	842400	stack snapshot that is implemented from scratch uh in the in this model. So for each every
842400	848420	protocol supported every protocol stack we got in WAD you can do at any time a snapshot of the
848420	853380	old stack. Uh save this snapshot on the on your disk and reload this snapshot later if you want
853380	859980	to test uh something on this uh this framework. And also this uh older flexible stack model uh
859980	866160	makes uh writing unique tests very easy because you can just isolate a layer. Send inputs and
866160	874380	check what outputs uh came and if it uh what you are expected from this layer. And um in WAD
874380	881940	actually we provide uh multiple protocol stack. Uh BLE for version 4, version 5 is on its way. Uh
881940	888820	Logitech Unifying, uh NShark Burst from Nordic, ZigBee, RF um RFOC, and LoRaWAN. So all these
888820	893840	stacks have been uh implemented from scratch and are flexible in a way that you can make the
893840	899700	stack behave the way it's not really expected by the specifications. So this uh allows uh
899700	905080	security research uh if you want to try uh unexpected ways to to go through the stack. And
905080	909120	uh if you want just want to use the protocol as well you can just use them and it works as
909120	914540	expected. So this is uh this is why Romain said it was made for uh secure cyber security
914540	920440	specialists, researchers, and also uh just uh enthusiast, wireless protocol enthusiast, or just
920440	928280	user. Um and uh we also love KISS uh not the uh rug band uh obviously but the keep it simple
928280	934600	stupid uh principle. And WAD provides a set of simple common tools and um a mean to combine
934600	942100	them uh to combine all these tools into uh in order to create more complex tools. Uh and we
942100	946560	also provide some full feature tools for those who want to just to experiment with uh a
946560	951940	protocol. And um yeah if you're a newcomer in wireless protocol exploitation or or just if you
951940	958240	want to play with some protocol you we got you covered. Uh just to give you an an idea of
958240	962820	what's going on with WAD and this uh KISS principle. Um I don't know if it's really
962820	969200	readable in the screen but uh basically we are using uh a first program called WBD connect to
969200	974980	initiate a WBD connection into a device. Then there is a pipe with a W-shark which is a uh
974980	980900	wrapper for Wireshark. And then another pipe with WBD central profile and basically what this
980900	987360	command does is just tells what to first initiate a connection to the device. Then to ask uh
987360	992300	the the device it's a BAD services and characteristics. So it's basically an enumeration
992300	999420	performed by the uh WBD central. And every packet sent between the connection and the uh
999420	1007060	central which is a GATT client is monitored by Wireshark in real time. And you can compose all
1007060	1013400	the tools this way. You create a processing packet chain. Uh yeah that's it. I don't know.
1013400	1019360	Maybe I I get it wrong. But um you create a chain of uh of packet processing and you can do
1019360	1024480	whatever you want. We are going to show you some other tool we developed. And it allows some
1024480	1031460	yeah some a lot of flexibility you know in the um what can be done with this uh this uh these
1031460	1038040	things. And obviously we also created in the framework a lot of uh um wrappers for creating
1038040	1042880	uh command line applications. So if you need to create some command line tools or do your own
1042880	1049480	tools, you you got everything you need to um wrap the connection to the hardware and so on.
1051240	1059000	Yep. Uh the clicker. Yeah. So uh I'm going to start with the first demo. This is uh we we got
1059000	1065780	uh 13 demos to to show you what what is capable of. Uh so the first one is the BLE exploring
1065780	1072860	demo. So basically we are I'm going to to show you the WBD central tool. So this is the WBD
1072880	1079160	central. This is basically uh a GATT client and uh and what I'm going to do here is to scan
1079160	1083760	devices, connect to the device, a specific device, in a way so this is BLE services and
1083760	1091340	characteristics and return what's on data from this. So I guess nope. Okay so the setup is just
1093560	1105480	should be this one. So basically we launch a scan using WBD central. We are using uh an HCI
1105480	1112120	adapter for BLE. We can get all the information, all the advertising records sent by the uh the
1112120	1117720	device. Once you found your your device or target device you can connect to it through the
1117720	1122400	connect command. So this is an interactive shell provided by WBD central. Then the connection
1122400	1128800	is made and we uh launch a profile command to start enumerating services and characteristics.
1128800	1135120	We can find uh we have found a device name characteristic uh and a manufacturer name
1135120	1139160	characteristics in two different services and we're going to read the content of this
1139160	1144480	characteristics using a read command. And we get everything and uh we can also write into
1144480	1152080	characteristics and subscribe for notification. The basics a GATT client can do. Oh this is for
1152080	1158660	the next demo. So basically this is just an example of a full feature tool uh in WAD and this
1158660	1182610	is a very basic one. So uh second uh full feature tool we developed uh is a tool named uh ZigBee
1182610	1190230	and device uh that will allow us to interact with uh ZigBee networks uh and uh emulate
1190230	1196870	basically a ZigBee and device. So thanks to this tool you will be able to detect uh the
1196870	1203050	surrounding ZigBee networks uh to join a specific network uh perform all the cryptographic
1203050	1209910	operation this kind of stuff and get the network key uh associated with the network enumerate the
1209910	1218850	devices on the network and interact uh with the various ZigBee devices. So uh here you have a
1218850	1227730	small demo showing a small ZigBee network uh on the camera and you have an example of the use of
1227730	1237050	this tool. So first we perform a scan operation to discover the surrounding networks. So it takes
1237050	1246290	some time but uh finally uh we can see that we have one uh ZigBee network. So let's join uh this
1246290	1253350	network and perform the association procedure so we are able to see the network key and now we are
1253350	1261010	associated and we can uh interact and discover the nodes in the networks and the endpoints for every
1261010	1273130	nodes. So then uh we have a list of clusters that allows us to uh interact with uh the nodes and we
1273130	1315240	can use the cluster command to toggle uh a light bulb for example uh to get it off and so on. So sorry uh we
1315240	1323220	have also uh another tool named what sniff which is a generic tool so it's a multi-protocol sniffing
1323220	1334200	tool. Uh so what sniff uh works with all uh the protocols that are supported uh by WAD so ZigBee, BLE, RFC, you can
1334200	1345220	even uh directly sniff uh PHY uh so uh physical layer um configured as you want. Uh it provide different uh
1345220	1350920	output formats so you can directly display the SCAPI packets uh with the different fields uh correctly
1350920	1360740	dissected uh or directly a next dump uh version of the packet. Uh and it allow to uh when it was a traffic and do value
1360740	1374140	stuff like exporting data to a PCAP uh when it's a ring uh with Wireshark. So here you have uh some uh basic uh use cases of uh
1374140	1390300	what sniff. So here we are going uh to uh display uh some BLE advertisements. So here you can see the SCAPI uh representation. Then we can
1390300	1403360	switch the formats to xdump and so here we have the xdump version of our packets. We can uh also uh collect these uh packets
1403360	1412440	using uh uh directly the physical uh layer of Bluetooth energy. So we provide the modulation, Gaussian frequency shift scaling, then the
1412440	1428200	deviation. Uh we provide the frequency uh and uh uh finally the size uh of the packets. And here we get a raw dump uh straight out the
1428200	1447300	demodulator output. So uh it can be useful for specific analysis. And uh uh finally we can also uh for with this what sniff tool uh directly
1447300	1457500	export the traffic to uh PCAP for further analysis. So here all the traffic is simultaneously displayed on the screen and
1457500	1487960	exported to PCAP. So uh an interesting uh feature uh of WAD is that you can combine uh several tools uh with pipes. So what sniff can be
1487960	1498540	chained with uh several tools. So for example you can uh use what filter that uh may allow to apply some filtering uh on the received
1498540	1510900	packets. Uh you can transform uh the packets on the fly uh if it matches a specific filter. Or you can also use some tools like uh WAD
1510900	1525600	extract uh that may allow to extract uh a specific uh field uh from the packets. So let's go uh for an example of that. So here it's uh the
1525600	1537100	same example with what sniff. And uh we are going to pipe uh what sniff with uh what filter. And in what filter we are going to provide a
1537100	1548080	filter to keep only a specific kind of other types of packets. So the add and packets. And finally if we want uh to extract a specific field we
1548080	1560240	can use uh WAD extract. We provide the field we want to extract. So here is the bid address. And we also export a part of the metadata so the
1560240	1577160	RSSI. And of course you can then grab this output and provide it uh to classical Unix tool. So uh what sniff uh has a lot of uh usage and it may even
1577160	1589480	allow to perform uh some uh complex uh attacks. So typically uh in this demo we are going to attack an RF4C communication between a remote uh
1589480	1603620	controller and a setup box. So uh typically RF4C is a lightweight variant uh of ZigBee for remote controller. So here you have a setup uh with the remote
1603620	1615340	controller on one side and what sniff on the other side. So here we are performing a pairing with the remote controller. And uh what sniff has been
1615340	1631560	configured to automatically perform a brute force uh attack. And so in the input you can notice that the key uh has been uh automatically uh derived and
1631560	1645420	extracted from the communication. And the packet uh which is uh normally encrypted can be uh decrypted uh on the fly. So it allows to sniff the various
1645420	1665160	buttons that are pressed on the remote control. And uh it uh can also sniff the audio stream which can be transmitted uh using the mic of the remote
1665160	1692820	controller. And uh uh we can even export uh the voice command. To a bad uh uh WAV file but yeah it's working. So uh next demonstration is about uh using
1692820	1702860	Wireshark to sniff uh some traffic. So basically uh we showed this uh a bit earlier but uh we're going to go a bit deeper in this uh demo. So uh we can monitor
1702860	1711940	everything with WShark. So this example is about BLE but it's if it could be ZigBee or even your if your if you are trying to demodulate packets through
1711940	1722340	the through the file layer you can get it in Wireshark in real time and you can monitor everything you're working on. If you're uh use WFilter to modify your packet
1722340	1735400	on the fly you can see the result in real time with the DWShark. So uh the demo is the following. I'm going to be very quick about this one. Yeah so basically
1735400	1747080	we are again connecting to a device and so on and performing uh um uh services and characteristics is imminent uh enumeration. And uh everything uh can be
1747080	1757900	monitored uh in Wireshark while the terminal shows you the uh results of this uh of this operation. So this is basically uh what WShark can do. And the most
1757900	1767680	interesting thing is that uh we talked about uh Gatacore and BTDJuice at the beginning of the talk. So basically these tools are based on not on some
1767680	1781160	Node.js uh library uh which are not no more maintained at the moment. So if you want to perform a man-in-the-middle attack on BLE with WAD this is very simple
1781160	1790300	because you can combine tools. You can create for instance if you want to you know set up a man-in-the-middle attack on a device uh like Gatacore. You uh just
1790300	1801060	create a command line starting with WBAD-spawn that will spawn a device with the corresponding parameters that will mimic the target device. And then you can
1801060	1811760	pipe all the packets that will go uh from the this uh fake device or spoof device into Wireshark. You can so you can monitor in real time what's going on. And then uh once
1811760	1822720	the smartphone for instance is uh is connected onto the spoof device uh then you are going to initiate a connection into the target device. And every packet sent by
1822720	1834080	the smartphone uh or the target or the target device will be uh just forwarded as uh uh as it goes. And you can monitor everything in WShark. So this is uh the next
1834080	1847420	demo I'm going to show you. Uh here so we are setting up uh Gatacore-like man-in-the-middle attack using uh WAD. Using simple tools again WBAD-spawn. This is a very small
1847420	1862220	tool like WBAD-connect. And um we first the system is going to spawn a spoof device that just advertise itself like the target device. And the smartphone uh here is
1862220	1871720	going to detect this device. When we initiate the connect when we push the connect button on the on the smartphone then the connection to the our spoof device is uh
1871720	1881280	initiated. We can see on Wireshark what's going on with the BLE PDUs. And if you really try to read the characteristics for instance then all the PDUs are directly
1881280	1889040	forwarded to the target device and back and forth and we can monitor everything. With Wireshark you can see what's going on. You can save it at the as a
1889040	1902520	backup. And what we do here with Wireshark you can do it with any other generic tool we develop such as WFilter or WX well not WX but WFilter. And you can if you want make some
1902520	1912980	changes into the packets using some specific filters. If you want to modify the answer uh the um response uh from a read operation on the characteristics you can do it
1912980	1918420	on the fly. And you can also monitor what's going on because you can pipe WFilter with WShark as well.
1919260	1931360	So this this is powerful even if this demo is not uh really powerful but yeah. Anyway. And if you want to emulate a BLE peripheral you can you can use uh the full
1931360	1942220	feature of WBLE Perif. Uh so basically it goes like this. This is a command line tool you can use to just uh spawn a BLE device and populate the device with
1942220	1950540	whatever you want. So basically you can change the name of the device and say that I'm going to create a device called Defcon32. Uh add a service and a
1950540	1962220	characteristic to the device. Um I'm going to write the value of this characteristic as well. It should be Defcon32 I guess. And then uh I'm going to start a device on
1962220	1971580	the uh right hand side of the screen. You got the uh screen of the smartphone. So let's start this uh spoof device or emulated device to be more precise.
1971580	1985880	Uh yeah come on. Okay so it will pop on uh the um smartphone and we can connect to it. Um it will start the discovery process of services and
1985880	1994820	characteristics. There is a single service with a single characteristic. And we can read the content. Each time we read from the smartphone the content of this
1994820	2005020	characteristic this is caught by the BLE PRF uh tool. And uh if uh the smartphone subscribe to notification then it got nothing notified by the uh the system
2005020	2015340	and so on. So this is a good way to play with uh uh applications and BLE applications to mimic some device if you want to see what happens when you are
2015340	2024800	modifying some uh some properties of this uh of this device. Uh uh in practical situation this is not what we are going to use because it's uh
2024800	2035380	you know just uh uh interesting when you want to play uh with uh a device. But uh a more interesting use is the following. Uh if you want to implement a very
2035380	2042780	specific device with specific services and characteristics with a specific behavior for the characteristics here are a small example. We are going to create a
2042780	2052060	battery device exposing your battery service with a battery level. Except that each time we are going to read the battery level we will decrease the level by 10%.
2052060	2064540	And it goes like this when you emulate this uh peripheral. So basically uh we start the Python script that uh instruments everything. The device appears on the
2064540	2071540	screen so there is a battery device. When the discovery goes with the services and characteristics we get one service with one battery level
2071540	2081240	characteristics. And each time I read the characteristic value getting the percentage of uh battery level percentage then it is decreased. So this is just
2081240	2093840	10 lines of Python to do this. And uh we did the same with other protocols because we are talking a lot about BLE. Uh we got a lower one gateway
2093840	2104480	implemented in WAD. So if you want to create a lower one network and get some device uh to associate with this uh with this uh fake network you can do it
2104480	2116440	and it works pretty well. Uh I guess the demo will be a nightmare on the screens so I will skip it. Um but the media server of DEF CON has this uh has this
2116440	2125460	demo so if you want to have a look at it uh please do. But uh I'm going to still skip this one. Uh and let Romain explain the rest.
2125890	2142880	Yeah. So uh another uh example of what you can do uh with uh WAD is uh the emulation of various uh devices. And for example uh you can take a proprietary protocol like
2142880	2155500	Logitech Unifying and you have a protocol stack which is implemented and various tools that will allow to uh perform uh a keyboard emulation, a mouse emulation uh for
2155500	2169920	Logitech Unifying devices. So typically here we are going to use it to perform a scan uh operation of uh surrounding Unifying devices. Uh spoof uh the address of uh mouse.
2169920	2180430	And then we are going to emulate the keyboard with this address to reproduce a vulnerability uh from mouse jack to inject an encrypted keystrokes to the computer.
2180920	2199640	So here we start by uh using a small command line tool to perform a scan operation. It allows us to get the address of a mouse and we provide it uh in uh
2199640	2211640	as argument of a Python script that will perform the injection. And as you can see uh we have a keystroke injection uh performed and fully emulated by WAD.
2213860	2218440	Yeah. So you can see a lot of code written.
2224230	2233330	So uh we can uh emulate a Logitech Unifying keyboard. We can also emulate a Logitech Unifying uh dongle.
2233590	2261610	Uh and uh on the other uh side on BLE we are able to emulate a peripheral. So here comes a very useless idea which is to uh create a bridge uh which is cross protocol between a Logitech Unifying uh keyboard for example and a smartphone uh that will be connected to an emulated uh BLE keyboard.
2261990	2275970	So uh we have a small script. You can see the screen uh of the smartphone and uh you can see uh a video with the keyboard uh at the bottom.
2275970	2286090	So first we connect uh we emulate the BLE keyboard. We connect and pair the smartphone uh with this uh emulated BLE keyboard.
2290760	2310740	And once the pairing uh is uh successful, now we can just press some key on the Logitech Unifying keyboard and it will be forwarded uh through the uh BLE emulated keyboard to the smartphone.
2310980	2315680	So yeah. Completely useless but funny.
2316640	2340460	And finally, our last demo uh is uh uh based on the idea that it's uh cool that WAD allows to uh access various hardware uh perform uh different operations uh but it would be even cooler if you could access it over internet.
2340460	2348360	So uh we wrote uh a WAD server that will allow uh you to expose a WAD device uh over TCP.
2348780	2361020	And so uh with any tool, any script, you will be able to connect uh to this WAD uh TCP server uh like if it was a local device.
2361400	2367440	And uh for example, it can be useful to build relay attacks and that kind of stuff.
2368000	2377260	So as uh in this next demo, so we are in two different uh cities in France.
2377340	2384620	And I'm exposing uh my uh Bluetooth dongle uh using WAD server.
2385140	2397420	Damien will use uh BLE central to connect to uh this uh remote devices and is able to connect to the light bulb next to me.
2398080	2401240	Perform a profile uh discovery.
2402040	2409260	And uh now he will be able to uh turn the light bulb on,
2410840	2413200	turn the light bulb off,
2414580	2418000	and modify uh the color.
2418240	2424560	So typically uh it's interesting uh for building relay attacks.
2424560	2429160	It can be interesting in various experiment uh setups.
2429380	2430800	So sky is the limit here.
2431240	2436460	Yeah uh and the interesting part here is yeah again we show it with BLE,
2436460	2438580	but it can be done with any protocol as well.
2438580	2446860	You can uh accept the Logitech unifying because you have some keep-alives that are messed up with the network.
2446860	2451780	But in fact, you can once you are connected to a device, you can just discover everything.
2452500	2458120	Yeah just like uh yeah it's the same if you connect the device on your computer.
2458120	2461780	So basically it opens a wide range of possibility.
2466340	2474520	So uh we are developing this project uh since a few years now.
2474520	2484520	And uh it has been used uh internally so in Damien's company and in my research lab.
2484520	2489580	So for example, one intern at Quark's lab,
2489580	2498120	Baptiste Boyer, developed a BLE GAT fuzzer using WAD that leads to a CV
2499420	2505560	linked to the expressive controller expressive BLE stack, sorry.
2505620	2511280	And we also used it in a research project
2511280	2515620	uh to evaluate the screaming channel attacks.
2515620	2524020	So it allowed us to instrument the BLE protocol with custom link layer traffic.
2524020	2531280	It's also a project which is already heavily used in some hardware CTFs.
2531280	2539760	So for example, this year's edition of hardware IO, all the BLE challenges were fully emulated
2539760	2541340	with WAD.
2541340	2548080	And WAD has also been used in a lower one challenge to emulate a lower one gateway.
2549000	2552340	So to conclude this talk,
2553160	2558820	we are releasing today publicly this project.
2558820	2561720	So it's available on pip.
2561720	2566420	The documentation is available on read.docs.
2566420	2572920	So we are going to improve the documentation and the project over time.
2572920	2575660	Feel free to contribute to it.
2575660	2585040	We have also the firmware files that are available on GitHub in some sub repositories.
2585040	2591580	And globally, all the code is available on GitHub under MIT license.
2591580	2600700	So of course, we also are making a call for contributors.
2600700	2607680	So feel free to create compatible firmwares for your preferred hardware
2608080	2613260	to report any bugs, any issues you would encounter on GitHub.
2613260	2618360	And if you want to help us by writing some documentation,
2618360	2622180	by adding support for other protocols or other devices,
2622540	2625120	we would be happy to have contributors.
2625880	2630660	And if you like it, spread the word and tell your friends.
2631400	2633860	So two last words.
2633860	2638600	So this is a work we initiated two years ago.
2638680	2643040	And here it was a very high-level presentation.
2643040	2648060	So we only scratched the surface of what WAD is capable of.
2648060	2652840	And we also want to warmly thank the many researchers
2652840	2656240	that have beta access to this project
2656240	2662680	and that helped us and provided some feedback on it.
2662680	2666120	So I won't name them all, but they know.
2666520	2668560	Thank you very much.
2668720	2672680	And sorry for the small technical issues.
2672680	2674500	We are ready if you have any questions.
