David is going to talk to us about drones and anti-drone countermeasures beyond just simply handing me a drone remote because I got a drone and the only thing I can do apparently is fly the thing into my face. And I've done that a number of times. So let's give David a big round of applause. Good luck. Thank you. Have a good time. Thank you. Thank you. I can say that I am pretty idyllic. So let's get started. Well, welcome to my talk. Glad to see you here. And I'm going to present the project Interceptor. It's about owning anti-drone system with nano drones. So that's me. Well, I'm David Melendez. I'm an R&D and development and software engineer in a company in Spain. And I'm the creator, the author of the several robots. And I'm going to explain later. And the author of the book, Hacking con Drones. It's in Spanish. And a resident speaker, but not here. And a trainiac. Why am I saying that I'm a trainiac? This is the Alta Velocidad Español. It's a pretty cool train. It's fast. And it's... It's cool and you go fast. But I'm pretty fan of your trains. Because they are pretty badass. They stack containers. And big fan. Big fan of you guys. Big fan of you folks. Absolutely. So if you meet later with me, be careful. Because maybe I start talking with trains and I can stop. Okay. So be careful. So I would like to start with this. Yeah. You're laughing. Good job, folks. I'm thinking about this guy arriving at home. And honey, I'm doing a pretty good job today. So that's one point. The second point, previously in DEF CON, I want to start with drones in DEF CON. And I think that what is the first drone seen in DEF CON, with pretty cool stuff. And, well, we're hacking capabilities. You can take the drone along the city, taking a lot of networks, and make some cool stuff. Right? And the second one. Yeah. What's the year ago for the danger drone. And it is pretty cool stuff, because they were reduced 3G and 4G communication and telemetry. So that's because several anti-drone systems works indeed with 3G and 4G systems. And if you use the same systems, you can take the drone. system, the anti-drones, they can be trolled you, there's no way to jam your drone. But only because it's illegal to jam 3G, 4G frequencies, it has some kind of problems. So, I want to explain drones as a threat. I like that picture because it's pretty cool. Well, we can start talking about drones as flying computers. It's like Internet of Things over your head. IoT... We can call IoT as... Before we turn to assholes, because there were named quadcopters, okay? They can use custom pilots, sniffers, jammers, network analyzers, 3D mapping cameras, and so on. Some kind of cool stuff you can put in your drone. So any kind of thing you can imagine, you can put in your drone. A drone is a vehicle, it's not a weapon, it's a tool, alright? So, how we can detect drones? Well, the first one is, okay, I'm seeing a drone, okay? I detected it. So there are thermal and standard cameras. Well, nowadays there are a lot of systems. They are able to detect drones by its shape, and with artificial intelligence, and so on. And with thermal cameras, with electronics and motor heat detection. Okay, you see four dots on the sky that are pretty hot. It's not a pigeon, I think. Also, the other detection method is a characterization of drone noise. A pigeon doesn't sound... Okay, we got it. Detecting radio frequency and waveform. This is the most important method to detect drones, because every drone has a signature of radio communication. And it's pretty easy to detect those drones. Because, for example... Ah, okay, and Wi-Fi with the access point name, put here a manufactured drone. It must be a drone, okay? Well, other methods to detect drones, I'm a pretty fan of these. Voluntary measures. Well, if you install in your drone an application that reports to cops, that you are flying a drone in a certain area, at a certain time, okay, no problem at all. Everything will be all right, right? So, this application gives to cops the ability to take down your drone. Imagine if you install this application on your car, okay? Everything will be all right. So, perfect plan. So, how about the counter-counter measures? Well, we can use several methods that are already on the stage, like split-spectrum. You can transmit in a very wide area of radio frequency, with the hope that nobody can jam on all the area. Frequent hopping. You can hop to many channels, and use in-spective frequencies, like the jammer. The jammer expects that the drone works in a certain frequency, and robust protocols, that we are talking about this. Well, I'm going to explain my first round of this stuff, that it is called Atropos. It's a quadcopter. That I built, like, six years ago, you can google it, it's in Hackaday, and so on, and I decided to build with a Wi-Fi router. It's a Wi-Fi router, and Lafonera router, and, well, some cool stuff, like, we remote, of Nintendo, as inertial sensors. So, six years ago, there's no Chinese. So, six years ago, there's no Chinese. No Chinese manufacturers that you can buy, and they take it to your home. So it was easier to take the sensors from the Weいうn charco. And I decided to put the sensors to the router directly, by attaching the bus to the lights, okay? And control it by controlled by by a web server installed on the router. The stabilisation program is programmed in C inside the router and it has an embedded system and also has another capability with Bully that is able to attack other Wi-Fi's. So you can see the La Fonera router and some pretty cool and professional soldering skills and that's perfect! So, no what else? I like to see this movie because, well, all the other Star Wars movies made me cry, so I like this one. And I like it particularly... and I see it in the movie so, I like it particularly... and I see that we count 50 rebel ships, Lord Vader but there is a small that is providing our turbolasers that gives me an idea why not make a small drone with chopsticks because people ask me why are you using chopsticks? don't you have a 3D printer or something? are you poor? or what? well if I print the drone nobody believes me it's mine so this is mine I'm going to check that actually the drone is draining its battery so maybe I have to to fly before the the the battery drains ok alright so the Boreal Interceptor is based on low budget seriously, low you take a cheap sensor a cheap board and a cheap everything minimum size and weight hard to detect and with all the stuff that this is on this thing hacking capabilities and resilient control well this is the drone and the chopsticks we can see a Linux board inside that is indeed a router with OpenWrt Linux distribution inside and some cool stuff like reset motors why reset? because they are cheap ridiculously cheap ok and small so we have transistors and SDR and a camera so on so you can you can compare with one euro coin ok and this is the V-Core 2 I think this is more this is the smallest board on the market and this is the V-Core 2 that is run Linux and we have Wi-Fi and yeah this is specifications and we have one core of CPU and three serial ports and the most important thing is PWM port there is four there are four ports of pools with modulation ok this those ports are used to control the motors without any other integrated circuit just because it has to be small it has to be cheap and we have to take advantage on all the all the hardware stuff ok so we need four PWM signals to control the motors one for each one and they are have real time constraint ok so we can not emulate and or is very difficult and uncomfortable to emulate those signals with the quality required to to make the drone works so we have four channels available we but we only two enable by the manufacturer we have to enable the other one but what what happens when the serial debug console good job right ok so we have to disable the the serial port for debugging and enable all the four pins i went to the forum and the guy that designed the EVICORE is answering questions and one guy ask asked to enable these pins, and the guy answered, it's a hard way, you have to download the Linux source from Vucor, second find the DTS, try to understand the pin control, you have to understand some kind of stuff, and then you make magic, and you will be a good Linux hacker, what the fuck, thank you for nothing, so you have all the stuff that you need to enable and disable, all the stuff, you have the UART pins, you have the pin max, this is a maxer, an interconnected. Set it inside of the system on chip, you have to wire functions with outputs, because chip has more functions than outputs, and you assign a function to an output, so you have to reassign, disable the UART, and enable the power button. We have to redefine those pins, we call, I call PWM pins, we have the first one, the zero, the one, done, they are already defined, but I'm going to define the other two, that is called UART2 PWM. The group is UART, but the function is PWM. Additionally, in the IDC bus, I attach a sensor to take into account the battery. We disable UART, and we enable the four channels, well, this is only for your information from the data sheet, where I found the information to change that. The power stage is a MOSFET, that means my work is pretending to know what I'm doing with an oscilloscope, and there is my personal version of electronic speed controller. This is the oscilloscope. With brass motors, we have to deal with counter-electronics. electromotive force, because when the motor is spinning, I have to power it, but the motor acts also as a generator and puts current in the circuit, a reverse current, so I have to cancel it with a capacitor and a diode, a Schottky diode. This is the PED tanning, this is the worst part of building a drone, you have to tune it from 0-0-0, ok. I'm going to explain the Wi-Fi architecture of this drone, that is not a Wi-Fi regular drone, because it works as a beacon frame based communication. That's because if you are not authenticated to any network, you are not authenticated to anything. If you are not authenticated to any network, you cannot be deauthenticated, ok. Nobody comes here to add the authentication attack and deauthenticate my drone, because it's not authenticated to anything. We have a joystick, the joystick is not a fancy RSC drone remote. That one. That one. That one. That one. That one. That one. And we have a pilot site, that this is my laptop, with an additional Wi-Fi adapter. So my communication protocol is based on beacons, beacon frames, so in the payload, those beacon frames travel all the data from my remote, from my joystick, and to the pilot. And reverse. And reverse. If you turn on your laptop or mobile, you will see two networks, one called interceptor and the other one called piloto . There are fake networks, ok? One network is generated by my laptop and the other network is generated by the drone. Both sides are designed to listen to each other for control and telemetry, as you can see on that slide. Protected with an encryption algorithm, because if not, we are not doing nothing. So, this is the packet format, and you can see all the stuff of an encryption algorithm. We have an initialization vector, we have a command, a sequence number, and an integrity check. So they travel inside the beacon frame. So... I would like... We can turn on the drone. I will put on the ground for my safety, not for yours. Okay. So, as you can see, all the things are automatically integrated. So, we go to that side of the screen. I carry this. I carry this. This is the first time that I've ever done this. Maybe I'm going to change the battery later. I have to change the battery. I will try here. I bring down the battery. Well, it starts again. I'm going to explain to you a particular... I'm going to explain to you a particular... I'm going to explain to you a particular... characteristic of this protocol, but because it's allowed me to change the channels of the Wi-Fi, of both Wi-Fis, the drone and the pilot, while I'm flying it without losing control. That's because the Wi-Fi adapters, they are not perfect. So, if you are... If you are on channel 1, you are listening packets from channel 2, for example. This protocol takes advantage of this, because if I want to change the channel of the drone from channel 1 to channel 5, I tell the drone, change to channel 2, okay? The drone acknowledges that, okay? And channel 2, change your... Your change to channel 2. So... both pilots... The pilot and drone are in the channel 2. So, they are in a loop, changing channels, each other, until they reach all the... To the channel 5, or the target channel that I set. This is the interface. Well, there's some common stuff of this protocol. The web interface, the interfacing is created on the laptop. The laptop receives the Vicon frames, they turn into web socket packets, and they see on the web page. So... I want to show you a video. This is the interface and the drone, and there are the networks on my house. The drone keeps auditing the networks, but I can control the drone while the drone is attacking the networks with bully, okay? So... There is so many networks on the air, and I am changing the channel of the drone while... You see? They... Each other are negotiating the change of the other channel. You don't see... You can see that here. Here. Channel 8, both. Okay? And they change... And they change... And they change... Okay. So you see the new networks of the drone. But I don't want to so much control. But I don't want to lose the control. That because I don't want to put an extra adapter... An extra Wi-Fi adapter on the drone. Okay? Because it's very expensive. So... It's an extra weight to the drone. Especially. Okay. Next is the controlled. Thank you. Are you safe? Well, it's almost okay. Okay. So, I'm not a very professional pilot, indeed. But... But... Well, the other investigation that I'm doing with this is to prove that anybody who is able to build a drone with a custom flight controller, like mine, this is all programmed on C, both the stabilization program inside the V-Core and the protocol of communication. It has a... I'm working right now on an extra fallback communication system based on SDR, okay? Just in case, every... Just in case, a drone jammer detects my network because my network, you can see as a pilot or as an interceptor, but they can change to be the same as the NRB networks, okay? That is to hide the presence of the drone. So... Another protocol is a fallback protocol based on FM that it selects an arbitrary frequency inside that range and start transmitting if the pilot detects that no more telemetry comes from the drone, that the link is broken. So... So... So... So... It transmits with an arbitrary frequency and the leitmotif of this project is that transmitting in legal frequencies are the less problem for bad guys. If you are to do bad things, the less of your problem is to transmit on FM, okay? So this is a warning to drone manufacturers because I still... I still... I still keep sending commands to the drone even without Wi-Fi using a Raspberry Pi radio transmission with an RP-TX project, okay? As a proof of concept. So I'm selecting the frequency dynamically, so we survey the spectrum, and I detect the peaks, and I detect the peaks, and I detect the peaks, and I detect the peaks, and I detect the peaks, and I detect the peaks, and I detect the peaks, and I detect the peaks. and I detect the peaks, and I detect the peaks, and I detect the peaks, and I detect the peaks, and I detect the peaks, and I detect the peaks, and I select the best suitable frequency. So... So... the Fallback FM-based communication. We have the joystick. They are limited to a 4 bytes Ok Caesar 2-bit, And they are transmitted And they are transmitted to FSK modulation using the mini modem project . and they turn into RF format, they are FM modulated transmission and they are on air by Raspberry Pi. So an SDR dongle on drone captures that frequency and makes the reverse path. We have an audio capture and we have to demodulate that package with the same mini-modem but compiled for the architecture of the drone, this MIPS. And we have the 4-byte format for flight control. That was the demo. You can see the ... . I would like to explain... I would like to explain a little bit more ... what method I follow to numbing glauben to pitch tuning because it's the hardest part to make a drone. I attached to a 6 bench, professional grade, with also chopsticks, ok? And other home parts, you can see. So you have to tune the pitch, that is the proportional gain. We stay here. If the drone stays here, and I want to stay straight, the error is zero. If it moves, the error changes. So we have to multiply the error by the proportional gain, ok? We have one force. Ok? We have one force. The second force is the integral term. So I have to take into account how much time is the drone in an error stage, ok? And the derivative term is, it takes into account the speed that I'm reaching the desired position, ok? That those values multiply with a gain, we have a real control of the drone. Ok. So. Ok. Ok. Ok. Ok. This is my paper, ok, I would like to see you. So, as conclusions... I will show you... I will show you... So, as conclusions... like to show you the conclusions. We have a ridiculous small size, weight and cost. This brings us to the next point. Hardware hacking from scratch. Even if you can't track if you buy a router, you can't track that you are building a drone for bad or for good. We have hidden channels communication as a central philosophy. No vendor or 3G or 4G communications. We keep the cost low because we are using Wi-Fi also. But we have professional capabilities to keep the communication safe. Or as safe as we can. If an unexpected attack is performed or all the Wi-Fi spectrum is jammed, we have a file back system to keep the drone control and people can still ask. We also have a hacking capabilities to hack another Wi-Fi networks, pen testing and so on, keeping only one adapter on the drone. With the same adapter we have a travel throughout all the Wi-Fi channels. And the follower control based on SDR protocol. I would like to thank you to stay here and if you have any questions, so thank you very much.