People here like cleaning their house. No? Wow. This is a weird crowd. Holy cow. So I don't like cleaning my house. I don't like running a vacuum. I recently had a small child which I thought would be effective. He's now started to crawl. I'm like, yes, human Roomba. But I quickly discovered that the problem is you can't just put like a cloth or a towel on the bottom of them and have it be like a dust cloth running around. Because he starts to eat the things. And then it's going to break the human robot vacuum. So maybe I will have one of these vacuums in my future. Or based on what we're about to hear, probably not. Let's give Fabian and Yiska a big round of applause that came all the way from Germany to talk to you about silly little robot vacuums. Let's give them a round of applause. Have a wonderful time. Welcome to our talk about vacuum vacuum. Welcome to our talk about vacuum vacuum. Welcome to our talk about vacuum vacuum. cleaners. And it will be about a lot of IOT components including the cloud and the actual hardware. This is Fabian working at ERNW and I'm from the secure mobile networking lab. So why does it matter? Um, vacuum cleaning robot actually has access to your home Wi-Fi and it knows a lot of your personal habits like um, when are you at home, when are you at work, how many people live in your apartment, how big it is, do you have cats, children, partners. Um, and my question to you is who of you owns a vacuum cleaning robot? Quite a few. And now maybe some hands going down, who of you have like their own, not owning someone's on the internet, but like really owning your own vacuum robot? Ah, less hands, yeah. Okay, um, so we um, chose actually ecosystem to analyze and uh, we are from Germany and in Germany, um, these are just, uh, re-labeled by Forward and um, they are selling vacuum cleaners since 1929 or something. Um, and their top model is actually a reprinted needle and it always wins the test competitions because it has like rainbow colored LEDs. The needle hasn't. And, and a green brush and also a few more sensors, yeah. Um, so we did responsible disclosure and the most um, urgent uh, stuff was really fixed in time and also more fixes coming out. Um, no customer data was leaked, but robots were harmed during our experiments. Sorry for this. So this is how the lab looked in between during those experiments. So the infrastructure. Um, each uh, robot has actually a user interface and also some USB console for some basic debugging. Um, then you have a smartphone app which can run some manual robot commands, but these are not for cleaning your house. So this is just a very basic thing going on there. Um, so you actually need to pair it with a user account and the user account is in the Beehive cloud. Um, and during set up you set up this account and link it to the robot. And then there is a second cloud, a nuclear cloud, because everything is better with two clouds obviously. And so the second cloud is somehow connected to the Beehive cloud. We don't know how exactly, um, because we cannot sniff there. Um, but um, it is, the nuclear cloud is then used for, um, for example starting the cleaning process, getting back a map report, uh, about the cleaning. And there is a lot of stuff going on in the lab. Um, the security going on there. So the robot itself has like secure boot, encrypted logs, sign firmware updates. So we tried flipping big bits and it doesn't work. And then everything else actually has like HTTPS and uh, special RSA keys between the robot and the cloud. And then a secret key between the robot and the user. So really everything is being done there. So you would say like, why did, why do we even give a talk about this? What could go wrong? Um, and I have to say a lot can go wrong. So we managed to bypass the secure boot and extract the, uh, the security image of the robot. And our key findings are key findings. And we also did, um, a QNX side quest. Uh, and we were able to gain unauthenticated remote code executions on the robots over the cloud. So the secure bypass, uh, actually works that you can put the robot in a test mode, reboot it, and then you would get a special boot loader. And that special boot loader only takes QNX IFS, so very proprietary thing. But if you manage to compile this, then you can dump all the RAM to the serial port. And, um, if you load it to a special region, then you can read out the original image. And in this image of Nito, of the robot, um, there is two processes that are very important. The first one is a watchdog called Pinky. And, uh, also Clean & Logic, which is called Brain. So that's why we have this funny subtitle with Pinky and Brain. Alright. So I will now talk about the key findings. So, first of all, I have to explain what the keys do in particular. So we have the secret key. The secret key is, uh, unique for one robot user account connection. And it's, uh, computed by the robot on first linkage to a user account. And it's used to authenticate commands to the robot. So, if you want to start cleaning or anything like that, you have to authenticate this request using the secret key. And the secret key is known by the robots, um, the smartphone application, and also the cloud. And, um, the authentication of the key is very, very important. And, um, the authentication works with an HTTP header, which is just a basic authorization header in HTTP, um, led by the NITO app string and then a signature. The signature just takes in the serial number of the robot and the current date of the request and, um, the message body. So, the command. And this is then, uh, hashed with, uh, HMAC chart 256, um, with, um, the secret key as the key component. The second, uh, key that is used in the infrastructure is the RSA key. Um, so we need a second key because the robots have to at some point, um, exchange the secret key with the cloud for authentication of the commands. So, the robots themselves need to have another set of keys to authenticate against the cloud. And also the secret key is not that secret because several parties know it. We know that the smartphone application has it. Therefore, the user can extract it and everything. Um, so this RSA key is for authenticating robots against the cloud. And this works similar to the. . . through the secret key. We have authorization header and HTTP again, led by the Netobot string and the serial number of the robot, followed by a signature. The signature this time is over a little bit more of data. It's the robot serial again, the current HTTP method, the URI of the request, the current date and the body. And this is then signed with RSA chart 256. Okay. So no. What's going wrong? We have this excerpt of the secret key computation. It's a little bit simplified but I will walk you through. So first of all we have this random value. That is just a random value. And then we have this 16 byte time shift variable. And this is later then used with the SHA-1 hashing. So the secret keys themselves are basically SHA-1 hashes. A little shorter than that but it's the SHA-1 hash. So they look pretty nice and the entropy is really good because it's the hash of the hash. So the hash of the hash is the hash of the hash of the hash. Because we all know SHA-1 is pretty sane. So now it's important to see what the bits in this and the bytes in this time shift variable actually are. So the first 4 bytes are the current time. Well we know that the time is often used in cryptography. It's not that good but we also have seen worse so okay. But then we have some constant values. I don't know why but okay. So 0 is a great number as well as 16. And then we actually use the random numbers. So the byte number 8 of the time shift variable is some computation with a random value. And then we have the next byte which is also some computation with a random value. But this time we do some math where we actually lose some entropy because 6 bit is enough for a byte. So why not. And the last 6 bytes then are the robot's MAC address. And well the robot's MAC address is not exactly secret because the robot's serial number consists of the date of production followed by the robot's MAC address. And this one is printed on the packaging of the robot. And well on eBay you can see people doing photographs of the packaging and then you have the serial number. Also I mean it's a MAC address so it's a network. It's not that secret. And when the robot is first plugged in it also opens a Wi-Fi access point to provision it. And this Wi-Fi access point's name also is the robot's MAC address. So okay the MAC address doesn't provide any security. So the robot's MAC address doesn't provide any security. The constants obviously don't as well. Now the random values. This is not much randomness but it's at least some but there's another problem because the random generator actually looks like this. This is because they forgot to seed the random number generator. This means if you have a robot that's freshly booted or freshly unpacked it always returns the same random number which thereby is not only a number. And the number we printed here is actually the number that the robot, the Niattu, the robot connected D7s take as the first random number. Yeah, so okay. We don't have any entropy left except for the time now. So the current time stamp. Now the question is how much entropy does the Unix time stamp provide. And therefore we have some numbers for you. So if an attacker knows about one year exact when the robot was first linked to the cloud. That's actually 25 bit of entropy. And if an attacker knows this about one hour exact, it's only 12 bit of entropy. And you already see 12 bit of entropy is nothing. You can brute force this against the cloud. And there also are some offline attacks against the secret keys because you can sniff some authorization headers and thereby do an offline attack. And with an offline attack, 25 bit also is nothing. It's like minutes or even seconds. And yeah, so this is not that secure. You also can think of a social engineering scenario where I just call my victim and say, hey, I'm from the need to customer support. Please reconnect your robot to the cloud. And now I know the time stamp exactly. And now I know everything for the secret key computation. And I'm able to actually compute the secret key and send arbitrary commands to the robot. Okay. So much for the secret keys. Now the RSA keys. So we found them on the robots file system in slash var slash keys. And the secret keys are the same as the robot's. There's this nice file called VendoPrivateKeyProduction, so this sounds pretty promising. It is encrypted at least, but in the binary it's just some string obfuscation. And then after some deobfuscation, we have the password. And yeah. So we then figured out that actually the SRK is the same for all robots. Because obviously for a public key infrastructure, you want to have the same key on every robot. Why not? this leads to the scenario where an attacker is just able to talk to the cloud and say, hey, by the way, I'm a robot. And the cloud says, okay, it's fine. And if you recall the authentication that the robots do with the cloud, this was the Netobot string followed by the serial number and the signature. And the only way single robots get identified is this first string, which is the serial number. So if I know the private key, I can just send arbitrary requests with arbitrary serial numbers in the request and I can impersonate arbitrary robots. So I can be any robot I want to be. And this is bad. There are a lot of attacks that we can execute on this, but I will present maybe, yeah, a nice one, I think, because it's actually we are able to leak the victim's smart phone IP address. Because like I mentioned before, we have this manual driving mode where we can directly control the robot, by pressing some buttons on the smart phone and the robot directly drives like that. And what happens here is that the smart phone asks the nuclear cloud what the robot's network location is. And the nuclear cloud then asks us, because we are now the robot, what the robot's network location is. Also the robot itself doesn't get any requests anymore because only the last recent robot that locked into the cloud is getting requests. So we can just kick the other robot and we get the requests. And, well, we then answer with an arbitrary port and IP address combination to the cloud. And the cloud then happily forwards this to the smart phone. And, well, who would have guessed, the smart phone just connects to this IP import. So thereby we obtain the public IP address of the smart phone. We can now do some things like geolocation lookups and know pretty exactly where this person is. Also this opens a channel from the smart phone. So if there's any firewall or something like that, it's an outgoing connection. It's not a network connection. It's a network connection. So it's fine. And, yeah, we have a port open. And maybe we can do some more stuff with a smart phone even. So this could be a nice attack vector against the smart phone. And, yeah, I don't think that this should be possible. Yeah. All right. So the little QNX side quest. As Yiska mentioned, the robot is running on QNX 6.5. And this has some, it's an older system of QNX. So just for those of you who don't know what QNX is, QNX is a system that runs on the same network. It's a real time operating system by Blackberry. And it's actually running in cars. It's running in power plants and some critical applications. But like I mentioned, this version is pretty old. There's meanwhile it's some 7.X version and pretty updated and more secure now. But this old version has some nice default settings. So for example, R and DEP are just turned off by default because whoever needs that. I don't know. But this version has some nice default settings. And, but that's not all. We just stumbled upon something nice when we looked into the robots. Because there's this procfs file system on QNX. It's just like the normal procfs file system you have on almost every UNIX system. It's like the process memory of arbitrary processes is mapped in the file system so that root or anyone can read this memory of the processes and also write to it maybe. And the problem with these robots is that they don't have the ability to read the process memory. So the problem with these older QNX versions is that actually the UMASK that is set for this procfs file system per default allows arbitrary users to read arbitrary process memory. So it doesn't matter if you are just a normal user or if you are root. You can read any process memory. And this is a real problem if we look into privileged processes. Like for example, the SU binary. The SU binary is used, as you might know, to change the currently authorized user with the system. And well, therefore, it's a little bit more complicated than what has to check my authentication. And this is password authentication normally. And to get the password authentication right, it has to read in the ETC shadow file, which is a privileged file and normally isn't readable. And what an attacker can do is he can invoke the SU binary to gain root privileges. And he doesn't know the password, but that's not important because he just reads the process memory of the SU process all the time until that very moment where the ETC shadow file is read in. And he then just has all the information that is sent to the user. So that's written in the ETC shadow file. And then he can try to crack this and obtain the root password. This, of course, isn't limited to the ETC shadow file. You can, or the SU process, you can do this with any privileged process. You can extract SSL keys of processes or just read any data that any privileged process you can execute on the system is able to read. Alright. So we looked a bit more into the connection to the cloud and did some fuzzing in the very beginning. And I discovered a crash lock and decrypted it with one of the local keys of the image. So actually there's an astro binary and this is connected to the nuclear cloud and then passes commands to the robot binary. And within this astro connection, there's a buffer overflow that can be triggered with this URL. And the interesting part here is that, you know, the buffer, we found that the buffer overflow is happening when the authentication header is parsed. Which means there is no authentication because we are exploiting the authentication itself. So we have an unauthenticated remote code execution on the bin astro. And, well, luckily we don't even need this QNX side quest because all services run as root. That's very nice. And the fix for this is that by now Nido is validating the authentication headers in the cloud so that this is no longer happening. Yeah. So, but it was very nice to just, like, control any robot if you have the serial ID. Security implications. So if you have an IOT product at home, try to keep it offline. This is often not possible. So you might use your personal, like, a second Wi-Fi or something and not the one for the other devices. As a customer, you should really update your robot so it's not just because security. They also have some nice new features. But also for the security, of course. And you saw that the most critical part is the serial number. So you need to hide this one. So if you have friends visiting, hide your robot so that they cannot read it. It's printed on the bottom. Or just put on a tinfoil head or something to help yourself. The second part for the security implications here is that for developers, it's really important that security is not just done by hitting all the buzzwords like, oh, yeah, we have RSA, ING, hashing, secure boot, encrypted logs, blah, blah, blah. But the important part here is that you have a good decision for the root of trust so that you think about what is the trusted components in your IOT network. And a very important part here is that dissecting one of your robots should not harm the security of any other component. So you should always consider a student having a lot of time, dissecting one vacuum cleaner for half a year, and then exploiting whatever it is that they have. So, yeah, I think it's really important. And you should put a lot of time into testing this root of trust. So, for example, this random function, if you would have tested it in practice before the hashing, then you could have probably seen this in practice that it does not work and just returns the same time always. So, we still have some time left for Q&A. And thank you for listening. So, I don't, it's hard to see people there. Yeah, really, no questions? No questions? Great. Yeah. Down, down here. Yes. Yes, what is your question? So, the question is if hiding your MAC address versus hiding your serial is a difference. Yes, it is, because the other part of the serial is also the production date. I mean, it can be guessed, but overall it's harder. And for the MAC address, to know the MAC address, you need to be either in the same network, for example, or you need to be, so you have to be physically close, for example, when you start a robot and it's like making this pairing access point and so on, where the serial is in there. So, for getting remote control, the attack vector gets even larger if someone knows your serial address. Yeah, so for addressing the commands, you need to have the full serial number, not only the MAC address. So, you have to get the production date. And, well, you can try to root for this, but it's pretty hard. It's a lot of entropy. So, the serial number itself is more important than the MAC address. Okay. So, I'm going to ask you a question. So, if you have any more questions? Okay, not really. Okay, then. Thank you. Oh, wait, wait, wait. So, one question. Yes? Ah, so the question is if they made a more secure key generation method. So, the thing is, um, we think so, but it's hard to confirm because they also fixed a lot of the secure boot issue. So, we can no longer extract the firmware image and confirm if they do proper security. So, I mean, at least they promised us to do this. So, I think it is done. But, yeah. It's always good to, like, double check. Yeah, in general, they were pretty nice and once we managed to reach them, actually, because this was a quite long process, because we tried to reach them via the customer support, but it seems like the customer support just dropped our requests and they never reached the developers. And just like when, like, half a year later or something, we get a message, like, at 3 a.m. in the morning, U.S. time. Um, and it was like, hey, we just saw that you had some requests and we found your plain text proof of concept codes in our tracker system. So, maybe we should talk. And from then on, they were super nice and everything went well. Okay. So, I'm going to ask you a question. Okay. So, I'm going to ask you a question. Yeah, and I thought, like, yeah, maybe they are in the U.S. and it's 3 a.m., but maybe just call them the same time the next day. Um, and it really was 3 a.m., so the person was, like, not in another time zone or something. Any more questions? Okay, cool. Thank you. There's another one. Yeah, I didn't see that. Where is the other question? Yeah. So, the question was, um, if there is a specific reason for why in QNX you're able to read as a standard user processes of the memory of other processes. So, um, QNX, back until 6.6, I guess, was a big problem. And I think this might have to do with it because compliance means that you really have to, um, yeah, when you have file permissions, then you have to really give this permission to any user that tries to read it. Now, for QNX 7 and so on, the U mask is the same, but they also have some other authentication methods in place, like more fine granular, not only the read bit is set and you can read. So, this might be a problem. And also, these progress, uh, file systems used for some inter-process communication and stuff like that. So, I think they might have needed this for some features, but I'm not entirely sure at this point. Okay. Yeah, so. Thank you very much.