Good afternoon everyone and thank you for coming. I'm going to present the Beetlejuice, Beetlejuice tool I've developed and especially the man-in-the-middle attack it implements. So, just to start, I am Damien Coquille, a French senior researcher at CERTUBIC, which is part of the digital security company, a French digital security company, and this company is owned by Econocom, maybe some of you know about it. Anyway, I started studying Bluetooth low energy security back in 2013, so it's quite a while. I've been testing stuff in the BLE field and this is my main focus since then. So you can find me on Twitter. What we are going to talk about here in this talk is mainly the basic stuff in Bluetooth classic, but very, very shortly, and Bluetooth low energy, also called Bluetooth smart. And I will also discuss the fact that Bluetooth low energy sniffing really sucks. I don't know if some of you perform some kind of sniffing with specific devices, like a Bluetooth or something like this, but it's really difficult in certain conditions to get valid data or something very useful from these tools. And we will go through the man-in-the-middle attack I designed and the tool associated with it, that I call the Beetlejuice. Well, great reference to a movie. And we will end the talk with live demos. So I spent all the morning to pray the demo girls, of course, in order to have all the demo... That went well, but... In fact, since there is a lot of people here, maybe there may be some interferences with your devices. And I will show you with my tool that every device I can identify with this tool. And maybe some problems with it, if there are too much trackers or something like this available on it. So first of all, the Bluetooth Smart 101. So you are all aware of Bluetooth Classic, which has been very, very used in the last years. But defined in the Bluetooth specifications, the Bluetooth Low Energy Protocol, which is not so new protocol, but it has been widely deployed since two years on many devices. So it's a very, very, very common protocol now. And it's implemented in a lot of devices. And the Bluetooth Smart Protocol was designed in order to be implemented in very innovative devices. In fact, in devices that requires low power and with all the capability of Bluetooth. So it's widely used. If you search on the internet about Bluetooth Smart enabled devices, you will find a lot of them. And some of them are very, very freaky. You have the Smart Mattress. It's... Well, it doesn't show very well here, but this is a kind of device you can put under your mattress. And that device monitors the movement of the mattress. So I guess you can... I guess you see what we can do with this kind of stuff. Well, anyway, there is also the Smart Dapers. It's a dapper that tweets when your baby pees. Also very, very cool. I think everyone needs it. And just to conclude, some kind of security stuff like smart alarms or even smart dogs or bad dogs. I have some of them here to demonstrate. So I've heard about another talk at DEF CON about pointing smart dogs. It can be... Maybe the same in a way, but... Anyway. The Bluetooth stack is divided in two, because there is a traditional model called the Bluetooth Smart Ready. But basically, the lower protocols are the same from the physical layer to the L2 cap with some changes, of course, between it. But the upper layers are totally different between Bluetooth Classic and Bluetooth Low Energy. Bluetooth Smart provides a lot of features, or new features. So, not so new, the frequency-hopping spectrum mechanism is still used in Bluetooth Smart to avoid the interferences between devices. It also supports uncompleted communication through bonding. So if you create a bond between your mobile application, your smartphone, and some BLE-enabled device, it secures the communication. This is covered by the SMP, the Security Manager Protocol. So we'll cover this later. One of the most important things about Bluetooth Smart is the fact that we are not creating sockets to communicate with devices, but basically use what they call services and characteristics. So you have basically a device that provides one, two, three, or more services. And for each service, each service provides one or more characteristics. You can see this, like some kind of registers you can write in it and read from to put data on the device and get data from the device. And this communication is covered by the GAP and GAT layer of the protocol, so it's pretty cool. I will not go too deep in the description of this protocol. So if you guys want more information, you can read the Bluetooth specifications. Good luck. But it may be very useful to understand how things work with this kind of stuff. One more thing about Bluetooth Smart. Bluetooth Smart devices, for most of them, accepts only one type of connection at a time. The specifications say that normally a device may be able to accept more than one connection. But in fact, in most of all devices, a single connection is supported. So this is important for the attack. The frequency opening spectrum is a feature you may know, already know. It's basically a way to avoid differences between devices since all devices use the 2.4 GHz bandwidth. So this is quite not new, but it's still present in the Bluetooth Smart protocol. So basically, when you're using some sniffer, it's very difficult to get valid data because you have to sniff the synchronization step that is performed first to be able to follow the same hops and get data from it. So basically, when you're in a laboratory environment, this is perfect. You have everything you need for the cages and so on. But in the wild, this is very difficult to perform. I gave a talk last year at the Chaos Communication Camp in Germany. I planned to make a demo about BLE sniffing right on stage. This year, I had the great idea to provide all the attendees with some kind of HackerRef badge. Maybe some of you got one. But basically, I was in front of thousands of people with an HackerRef. And this badge communicates through the 2.4 GHz band and it was very difficult to perform a valid capture of BLE data, of course. So this is difficult to sniff. To perform I just found this on Twitter. It's Samy Kamkar posting a picture of what he called the new Faraday cache technology from Ikea. It's a way to do this. It works, in a way, but you can also use a microwave oven. So basically, it's much more MacGyver style. Maybe used to get accurate data from BLE sniffing. At Digital Security, we have the professional Faraday cache that looks like this. It costs a lot. Many, many, many thousands of euros or dollars. It's not affordable for a single researcher. Some information about the SMP, I showed you that the Bluetooth smart implements some kind of encryptions. So between mobile smartphone and device we can have we can set up an encryption and have an encrypted communication. So this is performed this way. When you are connecting your smartphone to a device, bounding your smartphone to a device, you send a pairing request, what kind of bounding you support. So if you read the specifications, Bluetooth specifications, there are many of them. The first one is just works. No pin code. It just works. Like its name says. And you can also provide a pin code. And the other one is the OOB bounding, which requires a net of bound communication means to provide both the device and smartphone with a bounding information. Then they agree on what is called a STK, a short term key used to encrypt the following step. And during this following step, the long term key is provided to the device and also some information about identity and revocation. So this can be used to check if the device that uses encryption is a valid one. And of course to encrypt all the communication. Again, this is a problem when we want to sniff some BLE communication. But many security researchers found a way to bypass it. A tool called CrackID. Also BTPin, which is a tool that performs the same attack. So basically you sniff all the traffic between a smartphone and a device and then you break the encryption once you get all the data. So the keys can be recovered this way. So this is basically how we perform Bluetooth smart security assessments since then. By using mainly sniffing to guess all the devices in the smartphone exchange data. And what is the data exchange between them. So many things to tell about it. First of all is that few devices use encryption. So if you buy many BLE enabled devices, few of them use bounding. And this is very interesting because bounding provides a way to encrypt communication but also to perform strong authentication. So almost all devices are not strongly authenticated. This is a problem. Some of them performs authentication but only on the BD address which is basically a MAC address of the Bluetooth device. So sniffing attacks are difficult to perform but there are many many weaknesses, non-weaknesses in the devices we want to test. And here comes the man in the middle attack. It was an attack ummm which was theoretical and it was mentioned by many security researchers. Especially some researchers who presented here at DEF CON in the precedented edition. It's ummm it's not an easy attack to set up but as you're going to see it's we managed to get it working on many devices. Why BD sniffing sucks. First, because of the devices you need to perform sniffing. You are maybe aware of the Ubertus which is a USB adapter you can plug in your computer that provides many many many ways to get information. So it performs the synchronization step and follow every apps to get information from the BD exchange. Many, some of you have used the I've already used the Adafruit Bluefruit Sniffer yeah which is ummm which works. It's a very awesome tool. The only non-limitation is that it creates some non-standard pick up files. So it's ummm quite difficult to analyze the exchange between the two devices. So it's uh cheaper than the Ubertus but uh the drawback as you have to use some some specific plug-ins for Wireshark in order to some of these sectors to be able to analyze what data is exchanged and what operations are made on the GAT stack. BT Proxy well known tool used for Bluetooth classic. Obviously they they do not plan to work on Bluetooth low energy. It works perfectly for Bluetooth classic but it has absolutely nothing to to provide for Bluetooth low energy. I did not modify BT Proxy but So basically when you have when you face encryption the strategy, the attack strategy is to sniff first and then decrypt. So you cannot interact you cannot modify on the fly. The data. You only you can only monitor what is exchanged between two devices. So it's a pain in the ass to get something sniffing and to get information by sniffing between between two BTLE enabled devices. So Magnum Middle is a way to bypass all of these limitations. It's very very simple to to set up on paper but to get it working on my computer it was a lot difficult. So basically how can we perform some kind of Magnum Middle using on Bluetooth smart. First of all we set up what I call a proxy which is the central here. The central is simply a kind of service that will connect to BT or Bluetooth smart device. So using a classic BT4 adapter you can plug in with some kind of USB. It also works with your embedded adapter in your laptop so it's very easy to perform. And this central communicates with the dummy device. This dummy device it's again a service that will create or simulate a real BTLD device with the exact same characteristics that the one you are going to interact with. So first we connect to the device then we create this dummy device which is in fact a clone of the first one with the exact same services and characteristics and so on. And then we wait for a connection to the dummy device from a smart phone, mobile application and so on. And then we forward the information between the smart phone and the target device in a bidirectional way. So it's quite straightforward to set up on paper. It's the basics of man-in-the-middle and proxy. So why not create a tool that allows people to do the same attack very easily. This is very easy to write on paper but to do it it was quite difficult but in fact there are many libraries well known libraries called Noble and Blino and these libraries were developed by Sunday Mystery and put on Github so it's totally open source. Noble is in charge of all the connection operations so when you want to connect to a BTLD device you can use it and perform all the discovery and the interaction with the device. It's very good to create a dummy device. You can create Bluetooth smart peripherals and provide services and characteristics. So you have in one hand Noble which provides all the stuff to connect to a target device and in other hand you have Blino library allowing all the stuff providing all the stuff to create and simulate a device. So we have everything we need to perform to create a dummy device. and this is a manual attack. This manual attack relies on standard BT4 adapters. There is no expensive hardware to buy so it's very interesting. The communication between the dummy device and the proxy is made through web circuits. So this is again some kind of standard that can be used to communicate with a web browser or something like that. This is a Linux kernel configuration so you have to use a version of Linux kernel 4.x, 4.2 and a specific version of BlueZid. So the fact this attack relies on BlueZid version 5 it may cause problems on some distros because BlueZid 5 is not deployed widely on many distros so if you are using Debian for instance BlueZid 4 by default and if you are using Ubuntu it's a BlueZid 5 you can upgrade BlueZid if you want but it's up to you to do it well in order not to put a mess on your system. The architecture is the following so we have the proxy using Noble to connect to the target device and the core CS service which uses Blinu to create a dummy device so we are creating a fake device the core and proxy communicate through a web circuit and the core service also provides a web interface which is basically a burp like interface allowing the user to see what happens in the Bluetooth smart communication and also to interact with the device I will demonstrate it later I also provide bindings for Python and Node.js but I had a surprise I got an email from someone telling me hey I made the same tool and presented it at Blackhat wow he is just here so I told him yeah let's meet let's discuss about it let's see what we did and what we did differently obviously but in fact it was based on the same technologies wow so this is the exact same setup that he designed and this is quite interesting because it means I did the right way what I wanted to do so this tool is called gethack and there is a website gethack.io with a cool logo yeah and obviously this tool implements more tricks about Noble and Brino I mean this guy modified Brino and Noble libraries to get it working better so it improved these libraries to do the attack so when I started my development I didn't want to modify these libraries because I wanted to be easily instable through NPM or something like this well anyway so this other tool exists which have some many differences between between mine and his approach is a bit different from the attack strategy we will see this later so hopefully I thought I had enough time to put it on NPM I was quite busy yesterday stressing with this tool I was not aware before writing this slide so it took me some time I've set up all the Github I will give all the URLs later but all the code is already open source and available and in fact I will publish it on NPM right after this talk with the slides through NPM what? you have to reserve a name on NPM? nope be kind guys well maybe the name will change on NPM so it depends on the availability well that's what we call a fail I see anyway so the idea was to provide an easy setup through NPM also for the bindings through NPM and PIPI the web UI user interface is very basic and provides all the information you need it sadly uses the exe notation designed by Angel Batanis I don't know if you know this guy I think he has already presented to Defcon we presented to Defcon many years ago this is a mix of eggs and ASCII and this is very it was useful in my web interface because I wanted to see the strings pop up on the interface as well as the eggs so it was a compromise I made to get it working to get nice demos later which is not a big deal the features this Betelgeuse tool provides a kind of monitor and navigate operations and data exchange between different devices it is designed like not so full features but it's basically the same idea I mean you you can use this tool on the fly data modification you can put some hooks I will demonstrate it later with the interface but it's quite easy to use and you can also do some replay attacks and replay some operations there are bindings for Python 2 Python 3 and NodeJS intended to be used very easily there's no problem the requirements you need two machines set up to get it working it's better than making Blinu and Noble working on the same machine it's very difficult at this time it's possible but difficult I didn't manage to get it working with the lucky you so as I said it still has some some improvements well the best is by using a virtual machine this is the setup I have here to make all my demos and you only need two bluetooth 4 adapters looks like this if you can find some CSO adapters this is good to go because this adapters provides a way to modify the MAC address or be the address of it so you can spoof the MAC address and of course Node to make it to get it running so let's see all of this this is the web interface running on the machine so to get it working I have to start a proxy on the virtual machine and to start the core service on mine like this I don't know if it's ok sounds good so first of all I start the proxy on this virtual machine then I make sure the bluetooth service is down because I have some problems sometimes it's ok I have a bluetooth adapter up and running so let's go I'm starting the interface and obviously this is not a good IP address so here it is I can sniff for devices as I said there are a lot of them as you can see well this is not a problem I'm going to use this device which is a BLE tracker available in many stores just to see if we can impersonate this well going to be a challenge because should be this one I have many of them right here so picking the good one is always a problem so basically the proxy the proxy connects to the device the target device perform all the discovery and then communicates with my core service and this core service creates a dummy device with the exact same information so if I use my smartphone to discover this this device and communicate with it I will be able to to intercept all the information so if I use my smartphone let's use it so this is my smartphone my real smartphone so I'm going to launch a BLE scanner connect to the the simulated device the dummy device and everything here it is of course you have a notification showing that the dummy device accepted the connection from my smartphone so it's good and here the connection information I'm going to read a characteristic from this device we have two of them here first one should return the version of the firmware as the world 0106 and the second one the a kind of timestamp the date when the firmware was compiled or built so this is quite interesting but if you go back to the web interface everything has been logged and you can use it furthermore we can put hooks on this if I try again to read the date I will be notified on the web interface and I can modify the data that will be sent to the mobile application so just have a look I'm asking for this information so it pops here set modify the year and if you look at the information display here you have 2016 instead of 2015 so it's very easy to modify this if you want to remove the hook just right click, disable hook and that's it there is another button here this button enables global interception so for every operation you will be notified and you can choose to perform the read perform the write or dismiss it so you can easily modify the behavior of the device and you also can tamper with the data exchange between two devices it's also easy to perform fuzzing manual fuzzing with it because we have some kind of replay attacks like this we can perform some read by using this just to prove this is working I removed the previous data but in fact we can get information from the device you can read whenever you want and whatever you want you can write whenever you want and whatever you want you can interact with the device even with mobile applications connected to it so it's quite interesting to try to find vulnerabilities or maybe glitches in this device and we also have some kind of notification I don't know if I have it here but it also supports notification you can decide to forward or dismiss notification to perform an attack say so the benefits of this system is that it works with any Bluetooth 4 adapters you can use any CSR compatible device adapter or even your embedded Broadcom Bluetooth adapter it's working you can intercept every gate operation notification write or read and it also supports bounding encryption on a newer version of Bluetooth and Linux kernel if your mobile application tries to create a bound between the simulated device and the mobile application this is possible you can do it and this is supported by the NodeJS library it's also compatible with tests made with a forwarded cage like we do at digital security because since you need two machines to perform this manual attack you can put a machine say a Raspberry Pi for instance in the forwarded cage and the another Raspberry Pi outside to advertise the same device so it's compatible with this kind of test Bluetooth device address proofing is also possible this because of some features of the Bluetooth smart protocol creating the perfect dummy when we want to clone and make a real clone of a device we want to use the same address the same MAC address for device I want to provide the device with the exact same characteristic and service I will show you some tricks I found to create a perfect clone by abusing some characteristics of the Bluetooth specification so first of all we connect to the target device since the device only supports one active connection there is no more advertisement each Bluetooth smart device advertises specifying some manufacturer data and so on once we are connected to it it doesn't advertise anymore so it's not visible from a smartphone or mobile application and also frequency hopping is active so that means the Bluetooth device hops from channel to channel and it's the frequency hopping system has been designed to avoid interferences that means we can set up another Bluetooth adapter with the exact same address advertising all the information about some kind of device and it won't interfere with the active connection we have with the device so it's possible to create another device with the same configuration, same services, same characteristics and Bluetooth address than the original one while keeping the original one busy so this is possible to create the perfect dummy the bindings in Python provide some classes you can use to perform some operations some modification of data you have many callbacks you can use and it's quite easy to set up an application I will demonstrate many attacks using Python bindings and not JS bindings it's easy the code on GitHub has some documentation inside you can read it read the documentation and explain on GitHub about how to create this kind of applications so this bindings require the core and proxy to be running in order to perform the in the middle we have the same in not JS and of course we can perform on the fly data modification so here is an example of battery service hooked by the un-before read callback we modify the information returned by the proxy if you are with the code for a given service 18.0.f and a given characteristics to 8.19 we modify the battery level and force the response that means the read operation is never forwarded to the target device we answer we provide the answer to this operation so this is pretty interesting and of course the un-before subscribe callback raise hook force response that cause a dismiss so there is no more subscription possible for notification this may be interesting in various attacks anyway there are some limitations with this tool because noble does not support long writes if you try to write more than 22 bytes in a characteristic it hangs all the adapters and all the stuff it's a drawback I found maybe I didn't try yet the Gattaca tool but since this tool performs low level reads and writes maybe it's not impacted by this I don't know this is a problem I noticed while testing my tool there is also an induced latency I mean there is a delay caused by the communication process since we are communicating through BTLE then everything goes through web sockets and then back to BTLE it includes induced some delay and this can be detected by a device to determine if manual attack is in progress and sometimes it may be very tricky to intercept the communication between the device and the smartphone because of the device itself sometimes the device only stays up or advertises itself for a very short amount of time so you have a very short window to communicate with the device and perform your attack so let's demonstrate this framework I will start with this device which is a BTLE enabled robot I don't know if some of you guys have this device it's not very common but a Chinese one widespread I will put it on make some sound it's pretty cool this robot is like a gyro pod you just put it on the floor until it stands I don't know if I can put it right here it doesn't make much noise don't fall yeah sounds good I'm going to create a manual middle proxy with this maybe on the table yeah sounds better alright we'll see so this device advertises itself this is a Huawei MIP and we are going to create to create a proxy with all of this so the proxy is configured and ready to relay so normally I will be able to to communicate with my smartphone so let's see if everything goes well what the ok so I'll start the application sorry because there is a drawback with the previous test but anyway so I try to go to which is in fact a problem we experienced when designing the the device I was there the are not with me this is a problem when you have a lot of devices in the room yeah it should be good um no of course um so here it is and the load of all the devices detected damn let's do it again where it is I knew this demo was on I saw it working half an hour ago I've got it working it is connected on my dummy device um so right now hopefully it will uh perform some gut operations red and white here it is and the fun fact is the designers of this of this robot uh included many sounds in it uh you heard of some one of them uh I'm going to be very quick but uh in fact this is the uh this line that causes the sound to be played on the robot and um I started some kind of replay to see if uh there were if is there were many sounds on it and if I can make some uh nice sounds with it. So first of all I'm going to pick the uh the second sound in the of the bank and uh and let you hear about hear the sound and um yeah uh sounds like a test beep uh put on it. Uh wait wait there's more. Because the developers had a had a great idea. Um let me uh play the uh third sound on the robot. Uh so it disconnected. Uh luckily. I'll do it again. Uh holy crap. So uh. Oh. Time problem. Well breaks everything. It was also not so Ux. So the sound is not so good. So I'm going to do a test beep. So I'm going to do a test beep. So wait there's so many sounds on it. Uh um and it's still really uh uh it's a the sound is still I have some improvements to make to uh Ohhhh. Oh. What a favorite. Alright I'm going to Do the same. This will work. Ah! Hoh! Is it up again? Yeah. Oh. Oh. This is very effective. Oh, shit. Demo, demo, demo. Um, I will spend, uh, one minute, one minute more to see if I can get it, I can get it working. But, uh, anyway. Okay. So, too much, too much devices. Ah, maybe. Good. Yeah. Uh, no, it's not done. Wait a bit. So, here it is. So, third sound is the following. Oh. Well, I forgot, I forgot about it. Uh, there are many sounds that can be played, uh, this way. Uh, sad. It's, uh, was a sound of burp. Anyway. So, uh, I designed another attack on this robot, um, uh, that performs, uh, some kind of modification on the flight, data modification. So, I modified the left and the right in the command just to invert all the, uh, this command. So, if you ask the robot to turn right, it turns left and so on. Oh, it's pretty useless, but, uh, just to show you how it's done. So, I'll set it up. So, it's set up, uh, proxy automatically. And if I take my remote control here on my phone, and I, uh, set it up, uh, it's set up. Uh, it's set up. Uh, ask the robot to go forward or backward. Uh, all the commands are, uh, are inverted. So, if, uh, someone wants to try it and drive the robot without making it, making it fall off the table, of course. Uh, well. Yeah, it works perfectly again. Oh, shit. Uh, let's forget about this robot. This is crap. But, in fact, yeah. But, in fact, you saw it, uh, working with the correct interception. So, the demo here, pretty difficult to perform because of the number of devices. And, uh, this, um, normally the frequency-hopping spectrum system is made to, uh, is designed to avoid interferences. But, uh, with the Bluetooth smart protocol, this sometimes happens. Well, anyway, back to the presentation. So, uh, there are no limitations about it. Uh, I made a lot of tests on my test devices. Uh, which are some kind of Gables, which is a tracker. Uh, Wistikey, another tracker. Uh, MasterLock 4400D, which is, uh, uh, this kind of, uh, smart lock. Uh, last one provided by MasterLock. And, uh, also, uh, another padlock. Uh, I, I shouldn't, uh, give the name because it's very lame and, uh, it's, uh, it's weak. But this kind of padlock has some problems, too. We are going to, to see, uh, what these problems are by using the, the framework. And, uh, last year, I presented, uh, at, uh, various scans, uh, my research about, uh, a specific smart lock. And, uh, I will, uh, just, uh, give, uh, give some feedback about, uh, its security and what can be done with this kind of, uh, of tool. So, first of all, the Gables. Uh, this is the one, uh, I used, uh, for my demonstration. My first demonstration using some kind of, uh, of red. And, uh, this, uh, this, uh, this tracker, uh, has absolutely no bonding. So, you can, uh, uh, create a perfect dummy, uh, with the exact same MAC address and so on. And, uh, it works perfectly, uh, with, uh, with a proxy. There is absolutely no authentication. So, it's very easy to spoof or to, uh, to create, uh, an exact same, uh, Gables. Uh, just to give more information about the Gables. Uh, the Gables is, uh, uh, this is, um, a tracker. So, uh, your phone is normally connected, uh, 24 by 7 on it. So, um, you should need to disconnect the Gables, uh, before performing the mandibular attack. So, this is, uh, not a really critical threat for this, uh, uh, this, uh, tracker. But, uh, anyone may make this Gables, uh, bips, uh, because it's, uh, uh, you only need to write, uh, a specific value in, uh, in the, uh, in the, uh, in the, uh, uh, in the, uh, in the, uh, in the, uh, in the, uh, in the characteristics. But I found a denial-of-service attack on it. So it was a denial-of-service vulnerability that can be used to, uh, render the Gables down. Uh, and I found it by, uh, testing this tool, uh, especially by testing the replay feature. So, this is something that can be done. Uh, yes, um, maybe I'm, uh, I will try to demo the Gableys lite and the denial-of-service. If not, still do not give me the touch for that. Alright. So, by default the Gables Loyalty features demagogues. Since I'm very lucky for this uh, for this talk. Oh yeah. Let's go. So uh, I um, created a uh, fake gablis uh, on my uh, computer. I'm going to connect it with the correct application. Uh, on this and if everything works fine you will see what happens on, on this screen. But uh, sometime a bit messy but uh. So here it is. So uh, to add it to my smartphone. Sound like it was already added. It's uh, my smartphone connected to, or maybe someone connected to this gablis too. I don't know if there are some uh, some of you have this application. Let's start. Uh, where is it? Uh, I don't know. I don't know. Well definitely the demos are completely uh, very difficult to perform here in, in live. So let's continue with uh, the rest. Uh, so gablis line is the bonding. There is uh, the whiskey key. Uh, this one is bonding used so uh, it can provide strong authentication. And it is a tag is declared uh, last when connection is lost. So it's uh, pretty cool. Uh, other devices. Uh, the master lock 4,400. Uh, I made a lot of test with it. Uh, but I wasn't about to forward the uh, read and write operations to it. Uh, there is pretty no vulnerability, no vulnerability, maybe no vulnerability in it. So can be uh, uh. We'll find out. Yeah. But uh, maybe for another talk. Uh, let's see. Uh, uh, yeah. Oh, I'm sorry. Uh, I'm sorry. Uh, uh, uh, short amount of time so it's a, you have to be very quick to interact with this padlock, smart padlock to perform all of these attacks. And also I found another padlock, I won't give the name, this is this one, that can be used to, let's start again, if you set up a manual attack you will find that the pin code used by the application is stored and exchanged in ClioTech so it's no big deal to get the pin code and through Bluetooth MAC address duplicating it's very easy to create a fake, a fake lock and get it working. I will show you with the, I need to pray the demo goes again because still then only one demo works. But if I remember to create a pin code effect device, this will be possible. So, uh, here my smartphone again. So, uh, I'm going to show you how to use it. So, this device, uh, shows up when you push a button so you have to, to, to push a, uh, the, uh, I have to push a push the button on the, the padlock to make it appear. So here it is. I'm going to create a perfect clone, uh, not so perfect because the MAC address, uh, is not, uh, faked. That was proofed. But, uh, here it is. I, uh, I'm launching. I am launching the normal application. So this lock, uh, has already been registered in my application so, uh, my application discovered the, the available devices connects to this smart lock, uh, since we created the perfect, uh, quite perfect dummy and I can ask the application to unlock the lock. And here it is. If you you look at the web interface I intercepted everything exchanged between my smart appli- my uh smartphone and the lock. And the default password on this lock is 1, 2, 3, 4, 5, 6, 7, 8. Uh which is very very complex. But uh in fact if you uh if you look at the uh data captured here you can see this one uh so the exit format uh um is not very perfect to see it here. But uh it's uh 12 and character 4 v x. If you put it in x this gives you the pin code. So basically what an attacker can do with this is set up uh a manual attack. So basically uh wait for the owner of the lock to unlock this uh his lock. But obviously the smartphone will connect to the uh spoofed uh uh here our fake lock our dummy uh device. We intercept the pin code by using this uh this attack. And uh the the beauty of this attack and of this device is that you don't need you need sorry the pin code this pin code to be able to add this lock to your uh to your application. So uh the uh the uh the uh the uh the uh the uh the uh the uh the uh Because there is no bundling and no strong authentication. There was no information put by the mobile application into the lock to say that this lock belongs to this user on to this phone. And this is quite interesting to see. So uh once you have the pin code you can interact live lock and unlock it without any problem. So this is uh not so not so cool in terms of security but uh it shows that many of these locks are very poorly designed. And this case that we've found is kind of через Zone authors had a private crypto So it's just an uh it's can be uh revealed by uh uh Monday Media Attack and Beetlejuice in particular. So for this padlock everything uh was sent in plain text. Authentication is based on the bluetooth address of the device address uh I showed uh that it was possible to fake this uh this bluetooth address so this is not a big deal to get a perfect clone of this uh padlock and it stays active uh once a client is connected and it stays in uh active enabled a very long time. Uh once you get connected to this padlock it can take uh uh four, five, six minutes for the padlock to shut down the bluetooth interface. So uh bluetooth service. So this is a very very very easy to create uh to perform a manual attack. Uh if you compare this padlock to the master lock uh which stays active only for say 10 or 12 seconds max this is very this is easier to to assess. So the master lock is pretty good with a strong authentication but the padlock is not. Uh we can do interception at uh interception and replay attacks on this padlock with absolutely no problem like on the goblets. And the smart lock uh I I'm not sure I'm not sure I'm not sure I'm not sure I'm not allowed to really to to give the name of the bundle but uh this smart lock is was planed to be widespread in Europe and in France in particular. Uh and all the data was uh transmitted uh most some of them are unencrypted. Especially the log the logs uh of uh the smart lock stored in smart lock. And authentication was based uh sometimes on the advertisement data we can End Contacts wake up mid 4 by Framework or check with 5. If you want the experience often you can fake er or you can fake a lock without er adding sort of a date sort of a number uh thought help the ي having to spoof the Bluetooth device address. I mean the mobile application finds the lock by looking at the data advertised on the Bluetooth smart protocol. So it's very easy to create a clone of it without cloning the Bluetooth address. And also no bonding was required so you can just create it and spoof the device without absolutely no problem. The fun, the fun part of it is that the unlock and lock operations were based on the AES 128 bit military grade encryption. Well in fact I found that there were some problems with four more bytes they used to exhaust something and implementations is very important. Implementation of an encryption algorithm is very important. So I found many flaws in it. With this cryptographic approach. So basically uh this smart lock uh was authenticated only on the data advertised at the Bluetooth smart layer. So it was very easy to create a fake one. And of course this smart lock was been able to intercept and replay attacks. So I was able to open it, close it, uh steal some uh some uh authentication tokens and uh some tokens used to uh um uh tool lock or unlock this uh this smart lock. Uh to sum it up uh beta juice can be seen as a security tool to access uh security of various devices. So it's uh maybe useful to determine device behavior through sub 64 Α data sniffing and also manipulation uh as uh I show you the the webinar faces are um is uh a some features for replay attacks and uh and uh for data visualisation. And uh you can do uh we probably cons nov止 Space coffee but pressure check users to uh replay attacks and this tool supports bounding since uh blinus uh the blinu library supports bounding. It can also be seen as an attack tool uh for bad guys uh since it can bypass uh all the authentication based on Bluetooth device address and can be instrumented to automate attacks. Yes I provide bindings for further usages uh for the uh for the tools if uh your guys want to um base an attack or create a new uh uh an exploit based on Beetlejuice this is possible through the bindings and uh it doesn't require uh specific hardware but at least two machines or a virtual machine to to create to have this working. Uh there is also no limitations due to noble and blinu uh implementations and limitations so uh this uh some of these limitations have been uh solved by the Gattaca tool and uh by the it's author it's author and uh uh he found some tricks to uh uh to to um cope with uh the problems I had uh with the these libraries in particular. So future work improve Beetlejuice proxy reliability uh and maybe uh see with the author of uh Gattaca if we can do something. Take the best of our tools. Yeah and take the best of the of these two tools maybe uh because uh the decision is not uh up to me but uh yeah we'll see. And also improve user interface and binding because they are very very uh basics uh at the moment. Uh I did not uh took time to take time to implement the um all the features I wanted to implement on it. So um I had I have more work to do with the interface and uh I will uh implement all the features uh very soon just to provide a uh you with a uh a good tool. And of course, uh we need motives like a testing. More and more testing because uh uh it took us 6 months to develop this tool and uh we tested uh at we tested it at digital security but uh we only we were only 3 persons uh using this tool and we need more and more testers. So if you're interested in this tool uh with uh in this uh in its approach and uh what can be performed as uh what attacks can be performed with it uh feel free to test it and uh to get it. So uh. If you're looking for the code on Gator. It's uh the main code is located uh here so the Gator.com digital security with the capital D capital S and Beetlejuice. Uh uh uh uh uh uh uh uh uh uh uh uh uh uh uh uh uh uh uh uh yeah there's a an introduction on how to set up, how to set it up or install it. You can use the uh basically this uh repository uh until I publish it on uh NPM uh if the name is displayed uh is available of course. But anyway uh this is uh the code is here, the bindings also with uh I will publish all of this uh with the pre-found bindings uh that. I'll show you in all the bindings with a lot of uh example code uh how to use it how to connect to it uh how to set up an attack and so on. So feel free to try it. Is there any questions about uh this tool? Yeah? Uh so I'm sorry if you already used it but how do you uh do the uh uh by using a CSR combat uh CSR uh VT adapter uh this is a uh Cambridge Silicon Radio adapter uh which uh prove um which uh implements a vendor command that can be used to specify the MAC address. Uh it was previously done by uh by some people. So uh there is a tool called BD adder BD ADDR uh yeah uh that can be used to uh spoof the uh Bluetooth device address with it. Hmm? Yeah it's a part of Blues. If you uh install the Blue library it uh it's provided by uh by this uh this is the very way. Uh currently I uh run it on uh Ubuntu but uh I get it working on Debian and I should work on uh most of the recent distribution that use uh Blues Head. Blues library version 5 and more and uh Linux kernel version 4.2. So at least. So, it's very common. I guess if you use some Kali Linux there shouldn't be any problem with it. Some requirements is BlueHydra for instance. So, it's the only problem you can have with the setup is the setup of the Noble and Blino libraries which on some machines are very difficult to install. Depends on the node setup and the NPM tool. Other questions? No? Thank you for listening.