1 00:00:00,000 --> 00:00:01,800 Welcome everyone. 2 00:00:01,800 --> 00:00:10,180 My name is Andrew Bellini and I am here today to both convince you and show you that anyone can hack IoT devices. 3 00:00:10,180 --> 00:00:21,100 So in the talk today, I'm hoping to both convince you that and I'm also going to walk you through a methodology that you can go take home, buy a cheap consumer IoT device and hopefully hack it. 4 00:00:21,140 --> 00:00:26,700 Before we get into the actual specifics of that, I actually just want to start with a really quick joke. 5 00:00:26,700 --> 00:00:31,540 And that joke is the S in IoT stands for security. 6 00:00:31,540 --> 00:00:33,660 Has anyone heard that joke before here? 7 00:00:33,660 --> 00:00:34,820 It's one that I hear. 8 00:00:34,820 --> 00:00:36,880 Yeah, I see some people are hearing it. 9 00:00:36,880 --> 00:00:40,840 It's one that I hear tossed around the cybersecurity community. 10 00:00:40,920 --> 00:00:47,780 And usually when I hear that joke, it's actually by folks that don't work specifically in IoT or embedded security. 11 00:00:47,780 --> 00:00:55,940 But as someone who actually has a background working in industrial IoT devices and embedded devices, I won't say I'm not salty about it. 12 00:00:55,940 --> 00:01:01,040 I'll actually put my hand up and be the first to say that it is a well-deserved joke. 13 00:01:02,520 --> 00:01:16,480 So the thing about that joke is, and we can all, you know, have a laugh at IoT devices and their lack of security, but the reality is if you, you know, check out and look at how many estimates for IoT devices there are connected in the world right now, 14 00:01:16,480 --> 00:01:19,480 you'll see greater than 15 billion, you know, estimates. 15 00:01:19,480 --> 00:01:22,440 That's almost two per person of IoT devices. 16 00:01:22,620 --> 00:01:31,980 And in addition to that, we're expecting there to be a big surge of IoT devices because of AI and machine learning, how they're going to be used for edge devices. 17 00:01:32,120 --> 00:01:40,060 And it's estimated looking at the projections, there could be 30 billion by the end of the decade. 18 00:01:40,060 --> 00:01:43,160 So that is a lot of things to secure. 19 00:01:43,260 --> 00:01:44,380 And these are everywhere. 20 00:01:44,380 --> 00:01:49,160 So it's not like they're just in our households from, you know, smart cameras to even smart toilets. 21 00:01:49,200 --> 00:01:52,100 These are also in critical infrastructure. 22 00:01:52,100 --> 00:01:53,400 They're in our cars. 23 00:01:53,400 --> 00:01:55,500 They're essentially everywhere nowadays. 24 00:01:57,000 --> 00:02:04,240 So one of the things that I kind of thought when I was starting to get interested in IoT security is there's so many devices. 25 00:02:04,260 --> 00:02:11,440 And in addition to that, there's this agreed upon kind of thing in the security community that IoT devices are not secure. 26 00:02:11,440 --> 00:02:15,980 So I figured there would be a lot of people doing IoT hacking. 27 00:02:16,060 --> 00:02:19,600 And the cyber criminals are definitely taking advantage of this. 28 00:02:19,600 --> 00:02:26,500 They love finding vulnerabilities in IoT devices and adding them to their botnets or using them for initial access. 29 00:02:26,500 --> 00:02:36,160 But my experience was in the ethical hacking community when I started meeting hackers and things like that and asking them if they hack IoT devices, a lot of times the answer was no. 30 00:02:36,160 --> 00:02:38,140 And that was kind of reaffirmed today too. 31 00:02:38,140 --> 00:02:43,040 I've had a booth here where we've been doing IoT hacking, and I had mostly beginners who had never done it. 32 00:02:43,040 --> 00:02:44,820 And it was awesome to teach them that. 33 00:02:46,220 --> 00:02:54,080 So one of the things that, you know, when I ask people, why aren't you doing IoT hacking, there's a few misconceptions that I hear about it. 34 00:02:54,080 --> 00:02:56,960 And I just want to try and dispel some of those. 35 00:02:56,960 --> 00:02:59,520 So the very first one is that it's too expensive. 36 00:02:59,520 --> 00:03:07,540 So you need to buy expensive gear, you need like, you know, an oscilloscope or like a microscope or expensive tools to get into it. 37 00:03:07,880 --> 00:03:13,660 When you're starting out, and this is a reality, you're probably going to need to buy the devices you want to hack on. 38 00:03:13,900 --> 00:03:18,060 And then addition, there was really a large lack of affordable training. 39 00:03:18,220 --> 00:03:25,000 When I was looking to learn even, you know, five years back, it was like $5,000 for a course, a lot of them were in person. 40 00:03:26,140 --> 00:03:42,500 And then the second misconception I hear is that it's very complicated, you need to like have an engineering degree, you need to know about electronics, you need about hardware, circuits, all of that stuff, you need to know about special protocols, in addition to just the normal things that you need to know about hacking. 41 00:03:43,520 --> 00:03:47,540 And in my opinion, you know, some of these are true, there is some truth to it. 42 00:03:47,540 --> 00:03:56,500 But I actually think there are ways that you can actually learn to hack IoT devices, commercial IoT devices off the shelf, without spending that much money. 43 00:03:56,500 --> 00:04:01,760 And there's a lot of great resources to learn how to do it for free or for very limited amounts of money. 44 00:04:02,840 --> 00:04:10,860 Okay, so I've been chatting for a little bit, I just wanted to give a quick intro to who I am and why I know a little bit about IoT and IoT security. 45 00:04:10,860 --> 00:04:15,660 So my name again is Andrew Bellini, I go by Digital Andrew on the socials. 46 00:04:15,680 --> 00:04:18,680 My background is actually in electrical engineering. 47 00:04:18,680 --> 00:04:25,740 So before I got into cybersecurity, I did a lot of work actually designing embedded devices and industrial IoT devices. 48 00:04:25,740 --> 00:04:33,080 So that's a little bit where I learned about it, not specifically in security, but just actually, you know, designing the devices that we use. 49 00:04:33,520 --> 00:04:37,300 I now work as a content creator at TCM Security. 50 00:04:37,300 --> 00:04:40,360 So there I am the creator of our IoT hacking course. 51 00:04:40,360 --> 00:04:46,480 It's a beginner's IoT hacking course, and I also created our Practical Junior IoT tester certification. 52 00:04:46,800 --> 00:04:54,520 And if you do want to link up with me, you want a copy of these slides, you want to see what I'm working on, I got lots of free blog resources or anything like that, check out my website. 53 00:04:56,460 --> 00:04:59,320 So a little bit of motivation for this talk. 54 00:04:59,320 --> 00:05:10,800 I have one specific goal, and that is to provide you with a methodology, specific tools, and knowledge to find vulnerabilities, aka hack, in commercial IoT devices. 55 00:05:11,080 --> 00:05:17,980 And I have a couple messages here from some of my previous students, just to give you some motivation and also proof that this methodology works. 56 00:05:17,980 --> 00:05:23,280 So I had one student, he actually just messaged me a couple weeks before DefCon, and I was super excited to see this. 57 00:05:23,540 --> 00:05:28,380 I didn't know him before, but he said, I took your course, and he had, you know, chatting with him. 58 00:05:28,380 --> 00:05:30,260 He had never done any IoT hacking. 59 00:05:30,380 --> 00:05:40,100 He took my suggestion, he went and got a cheap smart camera off Amazon, and he actually was able to find three vulnerabilities in it, got in touch with the vendor, and he's got three CVs coming. 60 00:05:40,100 --> 00:05:41,840 So super excited for him about that. 61 00:05:42,140 --> 00:05:54,380 And then there's another message, this person didn't want me to put their name up, but he took my course as well, and then he bought a cheap router, and he found a remote code execution vulnerability in it, and I just was chatting with him about how he could submit that to a CNA, 62 00:05:54,380 --> 00:05:58,260 because the vendor didn't want to talk to him about it, but how he found a vulnerability. 63 00:05:59,980 --> 00:06:02,520 So this chat is for everyone, of course, if you're here. 64 00:06:02,520 --> 00:06:03,780 I'm glad you're here. 65 00:06:03,780 --> 00:06:18,980 If you are, if you're new to IoT, or you're IoT curious, as I say, this talk is specifically catered to people who are new or just curious about IoT, and it's going to assume you have limited or no experience with IoT or embedded systems. 66 00:06:20,020 --> 00:06:22,660 So just a really quick agenda of what we're in for today. 67 00:06:22,660 --> 00:06:26,600 We'll start with some, really quickly, and legal considerations. 68 00:06:26,920 --> 00:06:31,100 We'll then talk about what device you should actually pick if you're getting started on. 69 00:06:31,380 --> 00:06:36,320 So if you want to go home and buy something off Amazon, what you should look for, if you're going to go dumpster diving, for example. 70 00:06:36,760 --> 00:06:44,380 We'll then talk about how you can build out an affordable toolkit, and what stuff you should buy, or what stuff you should avoid, and how to not, you know, break the bank doing this. 71 00:06:44,960 --> 00:06:49,460 Then I'm going to take a look at locating, using, and abusing hardware interfaces. 72 00:06:49,460 --> 00:06:53,780 We'll then talk about acquiring firmware, and then after that we get our hands on the firmware. 73 00:06:53,780 --> 00:06:56,400 We'll talk about analyzing and reversing engineering it. 74 00:06:56,720 --> 00:06:59,000 So just a really quick staying out of trouble. 75 00:06:59,000 --> 00:07:01,800 This is kind of like the golden rule of ethical hacking, in my opinion. 76 00:07:01,800 --> 00:07:04,260 Only test devices that you're authorized to. 77 00:07:04,360 --> 00:07:16,680 And then this is my personal suggestion, since I am giving a talk about potentially how to go out and find CVs and IoT devices, but I always recommend being ethical and following responsible disclosure if you do find things. 78 00:07:16,860 --> 00:07:26,800 Unfortunately for a lot of IoT devices, they don't have bug bounty programs, but they do have responsible disclosure, so you can at least report it, get some credit, and get a CV that way or something. 79 00:07:26,800 --> 00:07:31,260 So last one's up to you, but you know, I would implore you to go that route if you find something. 80 00:07:32,360 --> 00:07:44,780 Okay, so I did want to just give a little chat about staying safe, because sometimes I give workshops or things like that, and I teach people about IoT and hardware hacking, and they're a little bit nervous about opening up a device and working on the hardware of it. 81 00:07:44,780 --> 00:07:51,020 So the first thing I will say is IoT hacking is in itself very inherently safe. 82 00:07:51,020 --> 00:07:57,820 So hardware hacking on commercial IoT devices, and that's really if you just only follow one basic rule, you'll be fine. 83 00:07:57,960 --> 00:08:00,840 And that rule is that you should never work on anything high voltage. 84 00:08:00,840 --> 00:08:08,420 So when you open up the device, you're working on it, most of these devices are going to be like 12 volts, 9 volts, 3.3 volts, 5 volts operating voltage. 85 00:08:08,480 --> 00:08:11,100 All of those are, for the most part, safe to work on. 86 00:08:11,100 --> 00:08:12,800 You won't even feel it if you touch it. 87 00:08:12,800 --> 00:08:16,740 The voltage from our walls and our house and stuff, that stuff can really hurt you. 88 00:08:16,740 --> 00:08:18,660 So just stay away from that stuff. 89 00:08:18,660 --> 00:08:20,820 Just work inside your device, you'll be fine. 90 00:08:21,080 --> 00:08:29,280 Never use any damaged or modified power supplies, because that's how we can accidentally introduce those higher voltages into the device, damage our device ourselves. 91 00:08:29,560 --> 00:08:33,260 And then this last one is more about keeping your devices safe. 92 00:08:33,260 --> 00:08:36,180 But when I give workshops, I see people doing this all the time. 93 00:08:36,180 --> 00:08:38,780 And this is the most common way to brick or fry your device. 94 00:08:38,780 --> 00:08:44,620 But if you have it open and you're working on it, then that's not how the manufacturer intended you to be using it. 95 00:08:44,700 --> 00:08:51,840 And if you're plugging in clips or wires or things like that, if you have it powered on, it's easy to bridge something and do a short circuit. 96 00:08:51,840 --> 00:08:54,840 And that's the easiest way that I see people who are learning fry their device. 97 00:08:55,060 --> 00:08:56,320 So it's just really good practice. 98 00:08:56,320 --> 00:09:01,520 If you're not using it, turn it off, plug anything in you need, then turn it on when you're done. 99 00:09:01,520 --> 00:09:03,920 And if you need to unclip it, you power it off, then you work on it. 100 00:09:03,920 --> 00:09:04,820 And it's easy to forget. 101 00:09:04,820 --> 00:09:08,060 I'm always walking around in the workshops warning people of that. 102 00:09:08,680 --> 00:09:14,980 Last thing I just want to give a really quick shout out to because people have gotten seriously injured from this or hurt doing this. 103 00:09:14,980 --> 00:09:17,000 You aren't really going to counter these IoT devices. 104 00:09:17,000 --> 00:09:28,020 But if you take your hardware hacking skills that you learn from this to other things that have larger power supplies, is watch out for large capacitors because these can actually pack a punch as far as the amount of energy they store. 105 00:09:28,020 --> 00:09:34,300 And also some people don't realize but when you unplug these devices or capacitors from the wall, they can hold their charge for quite a while. 106 00:09:34,300 --> 00:09:36,780 So you may think you're safe, but they can zap you. 107 00:09:36,780 --> 00:09:39,420 This is not common in pretty much all IoT devices. 108 00:09:39,420 --> 00:09:43,700 But I just say this because a lot of people have this misconception if it's unplugged, it's safe. 109 00:09:43,700 --> 00:09:46,300 But if there's large capacitors, that's not the case. 110 00:09:47,520 --> 00:09:57,780 Okay, so now that we've got all of the preamble and everything out of the way, we can get on to, you know, kind of my methodology for how you can go home, get a cheap consumer IoT device and hack it. 111 00:09:57,780 --> 00:10:01,880 So the first thing to do is actually to pick the right target if you're learning. 112 00:10:02,700 --> 00:10:06,660 So I always suggest the cheaper the better when you're starting to learn. 113 00:10:06,660 --> 00:10:08,340 And there's a couple reasons for this. 114 00:10:08,340 --> 00:10:16,220 The first one is, and this isn't always the case, but usually you get what you pay for in terms of security and also hardware security. 115 00:10:16,220 --> 00:10:24,460 So on cheaper devices, you generally won't run into limitations on the hardware where the debug ports are locked down or the firmware is encrypted. 116 00:10:25,040 --> 00:10:32,720 And then the second one, which kind of goes with my second point here, is I never hack anything that I don't mind bricking or destroying. 117 00:10:33,040 --> 00:10:36,860 And if it's a cheap device, then you're not going to be as concerned or upset if you fry it. 118 00:10:37,120 --> 00:10:40,760 And, you know, I'll raise my hand and say I still, you know, fry or brick devices. 119 00:10:40,760 --> 00:10:41,280 It happens. 120 00:10:41,280 --> 00:10:43,620 I've been hardware hacking for a long time and it still happens. 121 00:10:43,900 --> 00:10:50,740 And if you're a follower of Joe Grand, for example, probably one of the most famous hardware hackers, he gave a talk a few DEF CONs ago. 122 00:10:50,780 --> 00:10:55,860 He literally just talked about all of the devices that he had bricked over the years. 123 00:10:55,860 --> 00:10:57,500 So it happens to all of us. 124 00:10:57,500 --> 00:11:03,680 If you're looking for a specific type of device, my suggestion is to go with cheap routers or cheap smart cameras. 125 00:11:03,780 --> 00:11:05,120 They're great to start on. 126 00:11:05,120 --> 00:11:07,120 They usually have vulnerabilities that you can find. 127 00:11:07,120 --> 00:11:21,320 And also, more importantly, they almost always run embedded Linux, which in my opinion is a much easier type of device to hack on when you're learning than something with a microcontroller like ESP32 or STM32 that's going to be running RTOS. 128 00:11:21,320 --> 00:11:24,620 Those are a little bit more advanced or harder when you're getting started. 129 00:11:24,800 --> 00:11:27,380 And I will give another shout out to dumpster diving. 130 00:11:27,380 --> 00:11:33,520 So on this picture here, this is one of many bins I have at my house that are just full of old devices. 131 00:11:33,700 --> 00:11:40,240 And I just kind of put it out into the universe, like my friends and family know that I'm this dude that likes hacking weird electronic stuff. 132 00:11:40,240 --> 00:11:47,380 So if they're throwing away their router or camera, then they ask me, or I find them in like disposal bins or whatever, I can't resist. 133 00:11:47,380 --> 00:11:50,480 So it's a great way to learn though, because usually these devices work fine. 134 00:11:50,480 --> 00:11:54,580 People are just, they're obsolete or whatever, but they don't have to worry about bricking them or anything. 135 00:11:56,160 --> 00:12:03,300 Okay, so once we've got a device, hopefully it's a smart camera or a router or something, we've got to acquire a little bit of gear to go along with this methodology. 136 00:12:04,860 --> 00:12:06,240 So I've got a couple of rules for that . 137 00:12:06,240 --> 00:12:08,520 The first one is we don't want to break the bank when we're starting out. 138 00:12:08,520 --> 00:12:10,600 You might not know if you want to do it or not. 139 00:12:10,600 --> 00:12:12,700 We don't want this to be a limitation. 140 00:12:13,280 --> 00:12:18,720 I also generally find that gear for IoT hacking follows the 80-20 rule. 141 00:12:18,740 --> 00:12:29,720 So if you're not familiar with this rule, it's kind of the idea that for any given input, that 20% of the inputs are responsible actually for 80% of the outputs. 142 00:12:29,760 --> 00:12:32,320 And I find that to be true with IoT hacking tools. 143 00:12:32,320 --> 00:12:35,240 You'll need to get a few of them and they'll do most of the heavy lifting. 144 00:12:35,380 --> 00:12:40,040 And then you'll need to acquire the more specialized expensive tools for specific tasks. 145 00:12:41,380 --> 00:12:45,720 Sure, at this point, everyone's seen a lot of the meme of this Turkish shooter guy. 146 00:12:45,800 --> 00:12:47,520 And I just wanted to demonstrate this. 147 00:12:47,520 --> 00:12:53,040 I was kind of poking fun last week in the IoT and hardware hacking community about how we all like to acquire gear. 148 00:12:53,180 --> 00:12:55,500 And I'll be the first one to say I'm addicted to buying gear. 149 00:12:55,500 --> 00:12:58,240 I've got all the stuff in the left-hand side of this picture. 150 00:12:58,420 --> 00:13:03,220 But really, when you're starting out with cheaper devices, you can probably get away with literally two things and spend $10. 151 00:13:06,400 --> 00:13:11,520 Okay, so the first piece of equipment that you should get if you don't have one already is a digital multimeter. 152 00:13:11,520 --> 00:13:14,360 This is like the Swiss RB knife of electronics. 153 00:13:14,360 --> 00:13:19,540 It can do things like measuring voltage, current, resistance, do continuity testing. 154 00:13:19,560 --> 00:13:22,680 Mostly, we will use this for verifying voltage levels. 155 00:13:22,680 --> 00:13:26,540 And also, we can actually use it to find a lot of common debug ports. 156 00:13:26,540 --> 00:13:33,360 Without special equipment, we can actually, you know, ID those and then do further investigation into those ports. 157 00:13:33,500 --> 00:13:35,580 You can literally spend $5 on this. 158 00:13:35,580 --> 00:13:37,660 This yellow one on here, that's $5. 159 00:13:37,660 --> 00:13:39,180 I got this off AliExpress. 160 00:13:39,200 --> 00:13:41,460 I've used it in my workshops before. 161 00:13:41,460 --> 00:13:44,360 I mean, I wouldn't use it for like commercial QA testing or anything. 162 00:13:44,360 --> 00:13:48,060 But as far as learning IoT hacking, getting started, it's not bad. 163 00:13:48,180 --> 00:13:50,400 I have $5 to $100 listed here. 164 00:13:50,400 --> 00:13:53,060 I wouldn't recommend spending more than $100, but you can. 165 00:13:53,060 --> 00:13:55,780 But your $5 one, honestly, it's not that bad. 166 00:13:57,240 --> 00:14:01,560 The second piece of equipment you'll need is a USB to X adapter. 167 00:14:01,560 --> 00:14:07,820 And by X, I mean the protocols that our IoT devices are going to be talking at the hardware level. 168 00:14:07,840 --> 00:14:11,080 So these are where those like debug and test ports come into play. 169 00:14:11,180 --> 00:14:18,900 The most common ones are UART, SPI, or sometimes you're referred to as SPI, I2C, JTAG, and SWD. 170 00:14:19,060 --> 00:14:23,720 The most common one you'll actually see and what we're going to be focusing on is UART. 171 00:14:23,720 --> 00:14:28,200 So you can just go and get this $2 one, and that will work for this methodology. 172 00:14:28,220 --> 00:14:33,560 You get these off AliExpress, Amazon, sometimes it's coming like a pack of four for $10, you get them $2.50. 173 00:14:34,280 --> 00:14:37,900 So if you just want to go the cheap route, you just buy this $2 one, you'll be fine. 174 00:14:37,980 --> 00:14:43,820 If you kind of want a future proof, and you actually want a tool to work into, I always recommend the Tigard board. 175 00:14:43,820 --> 00:14:48,340 I really like their board, and they have good training that's free that goes along with how to use it. 176 00:14:48,340 --> 00:14:50,700 And it's going to talk all of these common protocols, actually. 177 00:14:50,700 --> 00:14:51,900 So it'll do UART for you. 178 00:14:51,900 --> 00:14:58,540 And then when, you know, if you need to jump up to something JTAG, SWD, or I2C, then you can use this as well. 179 00:14:59,720 --> 00:15:04,160 Okay, so the last, this is the last thing that's going to be in our toolkit is some sort of flash programmer. 180 00:15:04,160 --> 00:15:09,340 You can get these in all varying different levels, but this is a cheap one for $10. 181 00:15:09,480 --> 00:15:15,820 And we will use these to mainly extract the firmware off the device if we can't get it from other methods. 182 00:15:15,980 --> 00:15:25,960 So most of the cheap IoT devices I see, and why I'm suggesting these routers and cameras, they all use the same like standard SPI flash chip eight pin. 183 00:15:25,960 --> 00:15:29,380 So you can use a flash programmer generic one like this to read it. 184 00:15:29,380 --> 00:15:34,780 If you did get the Tigard, you don't even need to get one of these, you can just use the SPI connection on that. 185 00:15:34,900 --> 00:15:36,560 And honestly, you might not even need this. 186 00:15:36,560 --> 00:15:42,480 So it might mean before you're seeing us, we get the firmware from the vendor, then you don't even need a flash programmer, you can just download it. 187 00:15:44,240 --> 00:15:48,600 Alright, so we got all our stuff, we picked the device, we've got our gear, we're ready to start hacking. 188 00:15:48,600 --> 00:15:53,460 The first thing we're going to take a look at is abusing debug ports and hardware interfaces. 189 00:15:54,620 --> 00:16:03,400 So for the most part, IoT and embedded devices, they don't have any keyboard or mouse input, they don't have a monitor, they just kind of do something. 190 00:16:03,400 --> 00:16:16,960 And if they're not doing that thing right, then when you're designing it, and as a designer, your debug and test interfaces, these are like your only link to that device to see what's going on, what's going wrong, what's happening, making sure things are going properly. 191 00:16:17,460 --> 00:16:30,220 So what happens in R&D of the cheap devices a lot of times is they will use these throughout the R&D design process, we'll get to the end, device will be ready to go and they don't want to do another revision of hardware and things like that, or maybe firmware. 192 00:16:30,280 --> 00:16:34,020 So they'll just leave these on the board open like they were when they were testing. 193 00:16:34,460 --> 00:16:44,440 In addition, a lot of times they're actually used in production devices for things like debugging, doing logging, QA testing, possibly even flashing memory or things like that. 194 00:16:44,520 --> 00:16:47,960 The most two common ones I see are UART and JTAG. 195 00:16:47,960 --> 00:16:58,460 We're just going to be focusing on UART because on the majority of cheap consumer IoT devices, that's the most present one and I almost always see UART that you can use and abuse. 196 00:16:59,500 --> 00:17:08,820 So this talk is like the no BS, no filler version of it, so I'm not even going to really teach you about what the UART protocol is, only the things that you need to know to hack it. 197 00:17:08,880 --> 00:17:12,160 It stands for Universal Asynchronous Receiver Transmitter. 198 00:17:12,160 --> 00:17:18,680 That just basically means there's no clock and there's two lines, one for receiving and one for transmitting on. 199 00:17:18,680 --> 00:17:22,620 It's a very old and common protocol for electrical communication. 200 00:17:22,620 --> 00:17:34,540 It's a little bit more complicated than this, but the basics of it is it literally just talks binary with voltage, so it sends plus 3.3 volts or 5 volts for a 1, 0 volts for a 0. 201 00:17:34,980 --> 00:17:42,600 And I got a little picture here of a capture if you're curious, but that's literally all you need to know about it as far as hacking on it. 202 00:17:43,880 --> 00:17:46,840 So getting a connection to a device is UART. 203 00:17:46,840 --> 00:17:53,940 If you're doing like a pen test or something, that would be a finding, but for the most part, manufacturers don't actually care specifically about that. 204 00:17:54,240 --> 00:18:03,800 However, actually getting access to the UART will make it a lot easier for us to be able to find vulnerabilities like something that could be exploited from the web. 205 00:18:03,800 --> 00:18:06,480 It's going to make us a lot easier to find those. 206 00:18:06,660 --> 00:18:12,240 And the reason for that is we can view the device as logging, so that's probably the most important thing. 207 00:18:12,340 --> 00:18:21,040 In embedded devices, there's usually not a lot of storage and there'll maybe almost no actual writable storage that we have, so there's no place to store logs. 208 00:18:21,080 --> 00:18:24,040 So instead, we're just going to dump that all out to UART. 209 00:18:24,720 --> 00:18:31,800 In addition, if we are encountering embedded Linux, then usually we can actually use the UART connection to get a shell into the device. 210 00:18:31,800 --> 00:18:33,960 We can do further enumeration that way. 211 00:18:34,220 --> 00:18:38,220 Sometimes we can access the bootloader, which is responsible for it actually brings up the device. 212 00:18:38,220 --> 00:18:42,760 And if we can get into the bootloader, we can do things like dump the firmware, see environment variables. 213 00:18:42,760 --> 00:18:47,060 And so yeah, getting UART is a great thing, especially for the logging. 214 00:18:47,400 --> 00:18:54,780 You can see in the picture here, I'm just looking at some of the boot logs, and there's actually quite a bit of detailed versioning information that we can see already. 215 00:18:56,700 --> 00:19:03,240 So once you start using UART, and this happens to me, like when I see a board, it's very, very easy to start picking them out. 216 00:19:03,240 --> 00:19:08,660 Like whenever I see a PCB now, just subconsciously, I'm like, oh, that's UART, I can see it. 217 00:19:08,660 --> 00:19:10,240 So I start looking for them. 218 00:19:10,240 --> 00:19:14,660 And once you start noticing a few characteristics, you'll be able to ID them. 219 00:19:14,940 --> 00:19:25,200 So generally for full duplex UART, so this means that you've got two devices, your IoT device, and then maybe your computer that has the UART adapter they're talking to, they're both talking to each other. 220 00:19:25,200 --> 00:19:32,700 That means there's going to be a transmit line, which you'll see abbreviated always as TX, a receive line abbreviated as RX, and a ground. 221 00:19:32,840 --> 00:19:39,260 Sometimes you'll see a VCC, and I'm just calling that out because if you see four pins, for our hacking purposes, you can just ignore the VCC. 222 00:19:39,260 --> 00:19:41,100 We don't even need to use it. 223 00:19:42,220 --> 00:19:46,400 So unfortunately, they won't always make it as easy like in this example here. 224 00:19:46,580 --> 00:19:52,040 They've gone so nice as to label them for us and all the hardware hackers, but they won't always make it this easy. 225 00:19:52,060 --> 00:19:57,200 Sometimes you'll have test pads like the ones here on this black circle PCB. 226 00:19:57,200 --> 00:19:59,100 This is a camera that I was hacking. 227 00:19:59,200 --> 00:20:01,120 And you'll notice there's only two pins together. 228 00:20:01,120 --> 00:20:05,940 But seeing those two pins together and close to the processor, I thought that they might be UART. 229 00:20:05,940 --> 00:20:08,060 And then I just picked up a ground elsewhere. 230 00:20:08,220 --> 00:20:12,660 And then we've got another router here where they've got a connector here for UART. 231 00:20:12,660 --> 00:20:19,040 And it's not labeled, but as soon as you see those pins together like that, it's a good indication that it's some sort of test interface. 232 00:20:20,000 --> 00:20:25,840 So this is where we're going to pull out our DMM, and we can use our $5 DMM to actually pick up UART. 233 00:20:25,940 --> 00:20:31,960 So what we're going to do is we're going to take advantage of the fact that UART is extremely chatty on boot up. 234 00:20:31,960 --> 00:20:42,680 So if you've ever booted up your Linux computer, even or some Windows ones, and you see all the stuff coming scrolling through the screen, telling you all those boot log information, well, embedded Linux is the same. 235 00:20:42,680 --> 00:20:45,040 And that's going to happen on the UART as well. 236 00:20:45,040 --> 00:20:46,600 And we can take advantage of that. 237 00:20:46,600 --> 00:20:52,620 So what we can do is use our multimeter, put it on the volts DC setting, and measure the pins of interest. 238 00:20:52,620 --> 00:20:59,760 So if we think there might be a UART pin, we'll just measure that from that connector, whatever it is, to ground. 239 00:20:59,840 --> 00:21:02,000 And then after we're doing that, we'll power on the device. 240 00:21:02,000 --> 00:21:05,760 So I always like to have a power bar in my workstation that has a button, it makes it a lot easier. 241 00:21:06,720 --> 00:21:10,320 And what you're looking for is a fluctuating voltage after that boot up. 242 00:21:10,320 --> 00:21:19,400 It'll usually be like a couple seconds after, take a second for like the initial boot loader to load things up, and then you'll start to see a bunch of voltage hopping up and down. 243 00:21:19,880 --> 00:21:26,560 You won't see it go like 0 to 3.3 volts or 0 to 5 volts, because it's going to be too fast for our multimeter to read that. 244 00:21:26,560 --> 00:21:31,000 So instead, what you'll see is more of an average voltage kind of moving around. 245 00:21:31,020 --> 00:21:37,540 A lot of times these devices operate at 3.3 volts, so you'll see like 1.5 to 2.7 volts, and you'll see that moving up and down. 246 00:21:37,820 --> 00:21:43,300 So if you see that, that's a really indication I should look further at this port, it's probably transmitting something. 247 00:21:43,640 --> 00:21:53,240 If you just power on the device and do this, you probably won't see anything, because it's not going to be as chatty, it'll maybe just send a couple messages, and it'll be really hard to even see those blips of voltage. 248 00:21:53,240 --> 00:21:54,640 You got to do it right at startup. 249 00:21:55,880 --> 00:22:03,100 Okay, so we've found this port, we've identified it, the next thing we're going to do is we can it's as easy as we can just plug it into our computer, basically. 250 00:22:03,100 --> 00:22:07,100 We use our UART to USB bridge adapter, plug that into our computer. 251 00:22:07,360 --> 00:22:12,140 The only thing you need to keep in mind for it is it's really easy to put like names together. 252 00:22:12,140 --> 00:22:18,600 So you want to put TX to TX, but the way that it works is one device's TX goes to the other one's RX, and vice versa. 253 00:22:18,640 --> 00:22:23,720 So you just need to cross those lines, grounds go to ground, ignore the VCC, you're all good. 254 00:22:24,120 --> 00:22:29,480 So just for reference, I got a little picture here if you're looking at the slides later, but that's the pinout that you would usually take. 255 00:22:30,900 --> 00:22:33,280 So unfortunately, sometimes they won't make it that easy. 256 00:22:33,280 --> 00:22:35,820 They won't put the header pin on, there won't be through-hole connectors. 257 00:22:35,820 --> 00:22:37,580 So what do we do in that scenario? 258 00:22:37,720 --> 00:22:39,280 Your best option is to solder. 259 00:22:39,280 --> 00:22:42,440 So hopefully you're hanging out at the soldering skill station. 260 00:22:42,440 --> 00:22:45,460 But if not, there's ways we can get around that. 261 00:22:45,460 --> 00:22:54,600 So if you are lucky enough to have through-hole connectors like we did, I showed in the one router, the best way to do that is to actually attach some header pins to it. 262 00:22:54,600 --> 00:23:02,300 And if you don't have those, there's lots of clips, adapters, and things like that where you can buy more specific to your device. 263 00:23:02,300 --> 00:23:04,480 Google is your friend here and they're really not that expensive. 264 00:23:04,480 --> 00:23:07,340 So just go out and take a look at your different options. 265 00:23:07,640 --> 00:23:13,980 And just to show you if you don't want to do soldering, here's two things I've done in a pinch and shown in classes where you can get away with. 266 00:23:14,400 --> 00:23:19,660 Generally with through-hole connectors, they'll actually be like connectivity that goes through the actual pin. 267 00:23:19,720 --> 00:23:26,200 So if you put a little pressure on what you're putting through it, so kind of lean to the left or right, that'll be to get good contact. 268 00:23:26,200 --> 00:23:29,780 And I did it here with a twist tie or that's some sticky tack. 269 00:23:29,780 --> 00:23:36,720 And obviously, soldering is your best option, but I don't want that to be a barrier to, you know, hacking IoT if you don't have a soldering iron or to solder. 270 00:23:36,720 --> 00:23:38,060 So this can be done in a pinch. 271 00:23:38,980 --> 00:23:45,520 If you're running on a Linux host, I mostly just included these commands here for people that are going to be taking these slides afterwards. 272 00:23:45,520 --> 00:23:54,520 But all we need to do to actually get a shell or connect to the device is we need to just check and see what the device ID is for our USB UART adapter. 273 00:23:54,520 --> 00:23:58,060 So we can do that with this command, and you'll get the device ID back. 274 00:23:58,060 --> 00:24:01,620 It'll most likely be TTY USB 0, but it could be 1, 2, 3. 275 00:24:01,840 --> 00:24:06,780 And then we can just launch a terminal emulator and use that to get a UART connection. 276 00:24:06,900 --> 00:24:10,400 When you're starting out, I suggest using screen because it's the easiest one. 277 00:24:10,400 --> 00:24:15,320 There's lots of other ones, picocom, minicom, putty if you're on Windows, they're all fine. 278 00:24:15,340 --> 00:24:17,680 But screen, in my opinion, is the easiest one. 279 00:24:17,680 --> 00:24:19,080 It requires very little setup. 280 00:24:19,840 --> 00:24:24,420 The only two arguments you need is that USB device ID that I showed before. 281 00:24:24,500 --> 00:24:28,480 And then you'll notice the last thing here, I've got a number 115,200. 282 00:24:28,700 --> 00:24:32,640 That is the baud rate or speed that the UART is communicating at. 283 00:24:32,680 --> 00:24:37,540 And since this is no BS, no filler talk, I'm not even gonna explain what baud rate is. 284 00:24:37,540 --> 00:24:42,100 On 99% of IoT devices I see, it is 115,200. 285 00:24:42,100 --> 00:24:43,300 So you can just use that. 286 00:24:43,300 --> 00:24:45,100 If it's not, it's probably 9600. 287 00:24:45,320 --> 00:24:47,500 And if it's not that, you're probably doing something wrong. 288 00:24:47,500 --> 00:24:55,560 There is also a very common list on Wikipedia you can look at of other ones, but it's pretty much going to be 115,200. 289 00:24:57,560 --> 00:25:08,000 Okay, so if everything worked with your connection, you got screen running, you power on device, you should start to actually now see those boot logs that we saw with our multimeter actually start streaming through. 290 00:25:08,380 --> 00:25:14,080 And do not discount the importance of actually reading through those boot logs and seeing what they are telling you. 291 00:25:14,080 --> 00:25:26,980 They're going to give you lots of versioning information that could be enough to even find a vulnerability on its own, seeing that it's using underlying libraries or things like that that are outdated and someone's already done the leg work and found a vulnerability in those. 292 00:25:26,980 --> 00:25:35,300 We'll also give you details in this one, for example, near the bottom, showing all of the partition details about the flash EEPROM that's on it. 293 00:25:35,300 --> 00:25:39,740 And that's going to make it a lot easier for us later to identify the different parts of the firmware. 294 00:25:40,640 --> 00:25:45,140 After the boot loader goes through and it's done streaming through the text, you can hit enter. 295 00:25:45,140 --> 00:25:51,000 And a lot of times on cheap IoT devices, that can be enough to just get a shell, they don't lock them down with a password or anything. 296 00:25:51,000 --> 00:25:52,840 So then we'll be in a root shell. 297 00:25:53,020 --> 00:25:59,200 Generally in embedded Linux, everything just runs as root, there's no like least privileges or anything, you'll just get a root shell. 298 00:25:59,480 --> 00:26:03,720 Again, like in the manufacturers, they're not as concerned about this as being a specific vulnerability. 299 00:26:03,720 --> 00:26:09,300 So I wouldn't recommend reporting this or anything, because they already know about it, they just don't necessarily care. 300 00:26:09,300 --> 00:26:12,480 But we're going to abuse that to find something that you care about. 301 00:26:12,780 --> 00:26:16,140 The majority of the routers and smart cameras, they're running embedded Linux. 302 00:26:16,140 --> 00:26:18,520 So that's where it's gonna make it easier to get that shell. 303 00:26:19,940 --> 00:26:26,140 Okay, so I always mentioned this, because you know, in cybersecurity, I feel like we all want to get a shell, everyone loves getting shells. 304 00:26:26,140 --> 00:26:33,360 And sometimes that's like, the end all of what we're doing, if we're doing like web app, or you know, other different types of network pen testing. 305 00:26:33,440 --> 00:26:42,540 But for us, actually, connecting to the UART, it's more important for us to see the logging, that's actually what we're more we're more interested in, or at least I am. 306 00:26:42,700 --> 00:26:47,300 So if you don't get a shell, that's okay, if you're not able to get in, that's fine. 307 00:26:47,300 --> 00:26:53,680 So sometimes there'll be a password, if there is, there's ways around that, we can maybe get the hash from the firmware, or Google it. 308 00:26:53,680 --> 00:26:55,580 But even if you can't get a shell, that's okay. 309 00:26:55,580 --> 00:27:07,860 The way that UART works is like, you don't need to authenticate or log in, it's a very like low level protocol, it's just going to stream those logging bits out to you, no matter what, you don't need to log in, or anything like that, you can still see the logging, 310 00:27:07,860 --> 00:27:11,980 unless the device like syncs or tanks the UART, which most don't. 311 00:27:12,780 --> 00:27:22,200 So I just got some pictures here showing some interesting things I see in logs, one of them here is just showing the location of RSA keys as it's setting up DropBear, it's common SSH protocol. 312 00:27:22,200 --> 00:27:37,560 And then the other two ones are interesting logging details about when I was actually interacting with the device and showing what could potentially be command injection, or one is just showing how it sets up and saves the pre-shared keys and SSIDs for a router. 313 00:27:38,580 --> 00:27:43,680 So if you are lucky enough to get a shell, I mean I was saying it's not as important, but it is always nice to get one. 314 00:27:44,260 --> 00:27:48,820 We'll be good hackers then and do our enumeration, so start poking around. 315 00:27:48,820 --> 00:27:58,040 Best places to actually start looking are the Etsy folders and the VAR folders, those are probably some of the places where you'll find like interesting configuration details and things like that. 316 00:27:58,400 --> 00:28:08,740 Some really quick wins are things I look for, their passwords, hard-coded keys, is there endpoints that maybe they don't want to expose or that we could see that's reaching out into the back end. 317 00:28:08,800 --> 00:28:18,840 And of course a lot of times you'll have like things like PS or Netstat, so you can see what processes are running and what network connections are going out, so that can give us a little bit of a lay of the land around the device. 318 00:28:21,040 --> 00:28:27,920 Okay, so at this point you know we've got our device, we've got our equipment, we use our equipment to find our debug interface. 319 00:28:27,980 --> 00:28:28,980 What's the next step? 320 00:28:29,100 --> 00:28:37,840 That's going to be to get our hands on the firmware and in my opinion this is where my favorite part starts and where we can start having some fun and find some vulnerabilities. 321 00:28:39,380 --> 00:28:52,840 If you're not familiar with what firmware is, this is essentially the software that is running on the device and we kind of call it firmware and differentiate it from software in that it's kind of designed specifically for that device so that that device can fulfill one function. 322 00:28:52,840 --> 00:28:59,700 It's not really changing, you're not going to like install any software or anything on your router or smart camera, you just get that one piece of firmware. 323 00:29:00,260 --> 00:29:06,300 In embedded Linux that we're talking about today, the firmware is generally comprised of four main parts. 324 00:29:06,300 --> 00:29:11,780 We've got the boot loader that's responsible for actually like bringing up the device on boot up, loading up the kernel. 325 00:29:11,820 --> 00:29:15,260 We've then got the Linux kernel itself, that's going to be one partition. 326 00:29:15,540 --> 00:29:22,180 We've then got the root file system, so that's actually where all of the interesting stuff is make the device do what it's going to do. 327 00:29:22,180 --> 00:29:30,000 All of the binary scripts, configuration documents, all that stuff is going to be in the root file system. 328 00:29:30,040 --> 00:29:35,200 We'll then possibly also have some sort of partition where we can store a little bit of writable data. 329 00:29:35,380 --> 00:29:44,820 So we'll generally want to hunt for this as well because that's where you're going to find things like passwords that users configured or like the maybe pre-shared key for their wireless or all that kind of stuff. 330 00:29:44,820 --> 00:29:48,660 So a lot of times you'll see that at the end of the flash memory. 331 00:29:49,240 --> 00:29:54,000 The root file system has the most goodies though by far, so that's all we're going to focus on today. 332 00:29:54,020 --> 00:30:04,520 You can find vulnerabilities in the other places in the boot loader and kernel, but when you're starting out we'll just look at the root file system and its contents and that's honestly where you'll find the majority of vulnerabilities anyway. 333 00:30:06,900 --> 00:30:10,080 So there's three main ways that I usually get my hands on the firmware. 334 00:30:10,080 --> 00:30:18,260 There are a few other ones that are more complicated, but the easiest one is a lot of cheap IoT manufacturers. 335 00:30:18,460 --> 00:30:23,100 They just put their firmware available on the internet from the vendor to download. 336 00:30:23,140 --> 00:30:37,980 The reason for this is that unfortunately they don't put any type of update mechanisms into their device, so they kind of pass that responsibility down on to the end users if there is security patching or things like that to go and, hey, make sure you go to our website, 337 00:30:37,980 --> 00:30:45,520 check it every day, download the firmware, and then put it on the device yourself, which I think unfortunately I'd say like 99% of users don't do. 338 00:30:45,580 --> 00:30:55,160 But to fulfill that obligation they put the firmware on their website on the support page and you can just google and find it and I love that because it's super easy to get our hands on the firmware. 339 00:30:55,480 --> 00:30:58,240 And if you do that then you can even do IoT hacking for free. 340 00:30:58,240 --> 00:31:00,420 You don't even need any gear, you just download the firmware. 341 00:31:01,400 --> 00:31:10,680 The second way is if you did get a UART shell, I would say 90% of the devices I see they have TFTP on them, so that's Trivial File Transfer Protocol. 342 00:31:10,820 --> 00:31:16,580 This is there because it's actually baked into the functionality of a lot of those update mechanisms. 343 00:31:16,580 --> 00:31:37,220 So if you have a web app or a browser or something and it allows you to do a firmware update through that, in the backend it uses TFTP, but we can abuse that or borrow it to set up our own TFTP server and then we can just bring back files of interest or if we're patient enough we can just bring the whole root file system back to our device over that and then we don't even really need to worry about dumping the firmware. 344 00:31:37,440 --> 00:31:42,260 And then the last one which sometimes you'll need to do is you'll just dump the firmware off of the device. 345 00:31:42,480 --> 00:32:05,640 So in these cheap commercial IoT devices I'm suggesting getting started on, they almost always use an 8-pin SPI flash chip and these always follow the same pinout and we can use our flash reader that I suggested getting or the TiGuard to really do a really quick read of these and we don't even need to usually take them off of the device, 346 00:32:05,640 --> 00:32:08,580 you can just read them in-device, in-circuit. 347 00:32:08,880 --> 00:32:17,000 And the way to do that is I generally recommend using FlashROM's free open source software that's great for interacting with flash chips. 348 00:32:17,180 --> 00:32:31,460 So again, command here for reference if you're just wanting to follow along later, but if you get a CH341A programmer which is that $10 one that I recommended from the start, you can just run this command after you put the clip on and it's as easy as that. 349 00:32:31,460 --> 00:32:35,780 There's also other test clips you can do to use it, but it's pretty straightforward. 350 00:32:35,780 --> 00:32:39,000 It lists the different pins that match the pins on the chip. 351 00:32:39,060 --> 00:32:43,320 You can just google standard SPI 8-pin flash and you'll see all of the pins. 352 00:32:43,320 --> 00:32:45,940 There's six of them that you need to use out of the eight pins. 353 00:32:46,300 --> 00:32:49,820 Just a heads up, so if you did get the TiGuard, you can do this with the TiGuard. 354 00:32:53,870 --> 00:33:11,710 Okay, so we've all this, basically everything we've been doing up until this point now has been to set us up for successful reverse engineering of the internals of the device to figure out what's going on and to hopefully find some vulnerabilities. 355 00:33:12,770 --> 00:33:15,310 So that's what we're going to be taking a look at now. 356 00:33:15,310 --> 00:33:27,670 And so one thing you can do too, if you don't want to spend any money, is you just can go and find the firmware for download and then you can do the majority of these steps as well and then you haven't even spent a dollar. 357 00:33:27,790 --> 00:33:30,750 Or you could also try and emulate the firmware as well. 358 00:33:30,750 --> 00:33:34,130 It's not something we're going into today, but I just want to give that a call out. 359 00:33:34,150 --> 00:33:39,330 Like if you can't get your hands on a device, you don't want to spend any money, you just kind of want to get started, you can do it for free. 360 00:33:39,330 --> 00:33:43,790 Just get your firmware, try and reverse engineer it, and emulation is your friend. 361 00:33:46,690 --> 00:33:52,210 Okay, so the first thing we do once we get our hands on the firmware is it's generally going to be in like a kind of like a blob format. 362 00:33:52,210 --> 00:34:02,110 So generally it's going to be in like a .bin file or binary file or maybe a hex file, possibly a .img, but it's not going to be probably readable for us at that point. 363 00:34:02,110 --> 00:34:10,970 So we need to go ahead and actually unpack that firmware into the different sections and files that are actually in there that we'll be able to interact with better. 364 00:34:11,270 --> 00:34:14,950 So the very first thing we're going to do is cross our fingers that it's not encrypted. 365 00:34:15,110 --> 00:34:35,870 So again, this is why I'm recommending when you're starting out, go for those cheaper devices, because most likely they're not going to use encryption for their firmware because it costs money both in software development and R&D, but also you're most likely going to need to spend a little bit more on hardware to actually rely on that to handle that decryption at the startup. 366 00:34:36,410 --> 00:34:44,530 If you do come across encrypted firmware and you're just getting started, my suggestion would be just save that device for later down the road. 367 00:34:44,530 --> 00:34:46,550 It's not like it can't be defeated. 368 00:34:46,550 --> 00:34:59,690 There's lots of attacks and things like that that we can do to try and defeat the encryption and find the keys obviously when it's booting up, it's going to need to actually do that decryption and we can possibly read the keys, but it's a little bit more of an advanced topic. 369 00:34:59,690 --> 00:35:06,410 So I'd save that for down the road after you've done a few and go and find another device and see if you can make sure that its device is not encrypted. 370 00:35:06,570 --> 00:35:10,870 So how do we check if it's encrypted and also how do we get the contents of that? 371 00:35:10,970 --> 00:35:13,330 We will use a utility called Binwalk. 372 00:35:13,330 --> 00:35:22,530 So there's a bunch of tools to do this and various ones and you can take a manual approach, but the easiest way is to just go ahead and use Binwalk. 373 00:35:22,570 --> 00:35:39,930 If we pass it two options, the capital M and the E, it will just recursively go through and anything it identifies that it can pick up as a file type that it knows, it will try and uncompress that or unzip it or whatever until it gets down to the actual it knows the file types, 374 00:35:39,930 --> 00:35:43,850 whether that's a binary file, a shared object, XML, whatever. 375 00:35:44,750 --> 00:35:47,490 And the E is telling us to extract it actually. 376 00:35:47,490 --> 00:35:50,850 So if you just run Binwalk without any commands, it'll actually just tell you what it sees. 377 00:35:50,850 --> 00:35:54,610 And then if you pass in the E, it'll go ahead and try and actually break those down. 378 00:35:54,610 --> 00:35:56,050 So awesome tool. 379 00:35:56,050 --> 00:35:58,130 It does a lot of the legwork for us. 380 00:35:58,330 --> 00:36:03,290 Alternatively, we saw that we had those different partitions already actually listed out for us in the boot log. 381 00:36:03,290 --> 00:36:07,270 So you can use DD as well if you want a manual approach just to carve it up. 382 00:36:07,270 --> 00:36:09,730 And sometimes you have to, but Binwalk is your friend. 383 00:36:09,730 --> 00:36:12,170 It works most of the time. 384 00:36:14,270 --> 00:36:17,070 Okay, so this is where the fun starts. 385 00:36:17,070 --> 00:36:24,170 So now that we've got the firmware, we're going to go and actually focus on the root file system and see what we can find. 386 00:36:24,170 --> 00:36:32,050 So some really low-hanging fruit is just to look for the configuration files and poke through those, see if we can find anything that shouldn't be in there. 387 00:36:32,910 --> 00:36:43,170 So a lot of times when I'm teaching IoT hacking, people are surprised to see, but the best tools I think are just some of the really easy basic Linux tools like Find, Strings, and Grep. 388 00:36:43,170 --> 00:36:46,110 They go a long way with IoT hacking. 389 00:36:46,110 --> 00:36:52,470 And we can use Find with the dash name argument and I like to just do like star dot extension. 390 00:36:52,470 --> 00:36:59,510 So I'll do star dot xml, star dot text, star dot json, and I'll just go through that and read through those documents. 391 00:36:59,510 --> 00:37:02,770 A lot of times see xml and sometimes they have interesting details in there. 392 00:37:02,770 --> 00:37:04,350 That's some low-hanging fruits. 393 00:37:04,470 --> 00:37:05,690 We can also use Strings. 394 00:37:05,690 --> 00:37:07,330 So this is a tip that I teach. 395 00:37:07,330 --> 00:37:14,550 If you use Strings with the dash f, the dash f tack on it, it'll bring back the file name that's attached to that string. 396 00:37:14,550 --> 00:37:18,850 And then we can run Strings over like a whole file system or a whole group of files. 397 00:37:19,290 --> 00:37:25,330 And then we can pipe that into Grep and look for things like password, API, key, all of those things. 398 00:37:25,330 --> 00:37:31,650 Sometimes I'll look for like .com, for example, or various TLDs just to see if we can find any endpoints. 399 00:37:31,790 --> 00:37:35,510 And that can just be an easy win as well using Strings and piping it into Grep. 400 00:37:35,510 --> 00:37:38,930 It's one of my favorite tricks when IoT hacking is to do that. 401 00:37:41,980 --> 00:37:47,140 The next thing we'll take a look at that is pretty easy because same with the readable files. 402 00:37:47,140 --> 00:37:52,220 All of the scripts, so a lot of times since it's embedded Linux, it's going to be Bash or SH scripts. 403 00:37:52,240 --> 00:37:53,980 You don't need to decompile them. 404 00:37:53,980 --> 00:37:56,220 You can just take a look at them, read through them. 405 00:37:56,220 --> 00:38:03,140 A lot of times the developers will put really nice comments in there telling you what they're doing because they're being good developers and putting comments and things like that. 406 00:38:03,140 --> 00:38:09,980 It's funny, I've seen even things like people's emails or like, you know, if you find a problem with this, email me at this email or things like that. 407 00:38:10,660 --> 00:38:18,080 But the one scripts that I always suggest that you should look at right when you're getting started with a device and looking at it are the RCS scripts. 408 00:38:18,240 --> 00:38:28,040 So most IoT devices use a tool called BusyBox, which is a way to actually combine all of the binaries into one binary to shrink them down. 409 00:38:28,040 --> 00:38:30,360 And then they use their init process. 410 00:38:30,860 --> 00:38:37,960 And the way that BusyBox works is it runs all of the RCS scripts in Etsy slash init.d. 411 00:38:37,960 --> 00:38:42,880 So after the bootloader is finished and Linux is done, it hands off to the BusyBox init system. 412 00:38:42,940 --> 00:38:46,360 And then it calls all of the scripts in there that start with RCS. 413 00:38:46,480 --> 00:38:48,180 And it does them in alphanumeric order. 414 00:38:48,180 --> 00:38:54,180 So it'll go like RCS one, two, or if you have like sometimes you see like one and it tells you what they're doing. 415 00:38:54,740 --> 00:39:00,240 And these scripts are great because they're responsible for actually setting up the device past Linux for what it actually does. 416 00:39:00,240 --> 00:39:07,020 So if it's a camera, or router, then it's probably going to, you know, bring up binaries or things like that, to actually do what the device does. 417 00:39:07,020 --> 00:39:13,400 Or sometimes they'll even reach out to like, back end infra or cloud infra to let it know what's up or pass back information. 418 00:39:13,520 --> 00:39:16,000 And again, these are human readable, like they're just bash scripts. 419 00:39:16,000 --> 00:39:18,580 So no decompiling, no real reverse engineering. 420 00:39:19,020 --> 00:39:25,920 And another tip too, is if you're not familiar with bash, like, honestly, chat GPT is really great at breaking down what bash scripts are. 421 00:39:25,920 --> 00:39:33,180 So you can just copy and paste these directly as firmware into our friend chat GPT, and it can help you out and tell you what's going on as well. 422 00:39:33,800 --> 00:39:36,240 Yeah, I frequently don't really find specific vulnerabilities in here. 423 00:39:36,240 --> 00:39:38,020 Sometimes you'll find things that shouldn't be in there. 424 00:39:38,020 --> 00:39:41,000 But most of the reason is just to get a lay of the land. 425 00:39:41,000 --> 00:39:45,720 And it'll tell you about like, what's going on, what binaries are being executed, things like that. 426 00:39:48,340 --> 00:39:51,260 Okay, so now we're at, in my opinion, the most fun part. 427 00:39:51,260 --> 00:40:01,780 And kind of like everything, even the other stuff before that has been leading up to setting ourselves up to be successful at reverse engineering the binaries and libraries that are on the device. 428 00:40:01,780 --> 00:40:07,920 So this is where you're honestly most likely to find some sort of vulnerability that you're going to report. 429 00:40:08,400 --> 00:40:13,760 And the one complicated or thing that I see people get stuck with on this is, where do we actually start? 430 00:40:13,760 --> 00:40:20,380 It's quite possible there's dozens to hundreds to maybe a thousand different libraries and binaries on the device. 431 00:40:20,380 --> 00:40:23,760 It takes a lot of time to reverse engineer and understand these. 432 00:40:23,760 --> 00:40:25,180 So which one do we pick? 433 00:40:25,200 --> 00:40:26,640 And how do we start? 434 00:40:28,000 --> 00:40:35,180 So the easiest way to actually do this is to avoid a needle in a haystack situation is to go with like a forward down approach. 435 00:40:35,180 --> 00:40:38,580 And this is what I teach or the methodology I teach when people are starting. 436 00:40:38,580 --> 00:40:44,060 And that is to start with the custom binaries and libraries that are actually unique to the device. 437 00:40:44,060 --> 00:40:47,560 So a lot of the libraries and binaries are going to be Linux stuff. 438 00:40:47,580 --> 00:40:52,020 So if you're familiar with using Linux, you might be able to just discount quite a few of these. 439 00:40:52,280 --> 00:40:59,820 But if you're not, or sometimes it could be hard to tell, especially with libraries, are these open source Linux things that do Linux or C stuff? 440 00:40:59,820 --> 00:41:03,640 Or are these ones that the designers of this device have actually created? 441 00:41:04,060 --> 00:41:06,820 So then we run into the problem is, how do we know they're custom? 442 00:41:06,960 --> 00:41:12,340 And after you start to do this for quite a while, you will start to pick out the names and stuff and go like, oh yeah, that's a custom one. 443 00:41:12,800 --> 00:41:24,700 But if we don't, then the thing that I suggest to do is to interact with the device and then follow that logging and trace that logging down to the underlying binaries and functions. 444 00:41:24,700 --> 00:41:29,600 And this is, in my opinion, the easiest way when you're starting to actually find vulnerabilities. 445 00:41:31,020 --> 00:41:33,120 So here in this picture, I've got an example. 446 00:41:33,120 --> 00:41:37,840 So this is a common router here that I like to hack on. 447 00:41:37,840 --> 00:41:39,380 And I went to the web browser of it. 448 00:41:39,380 --> 00:41:50,960 So just like most routers, it's got a web browser where you can go on, do lots of stuff, set the pre-shared key, set what type of... if it's WPA2 WAP or whatever, you know, set all that stuff. 449 00:41:50,960 --> 00:41:52,160 It's got a bunch of utilities. 450 00:41:52,160 --> 00:41:54,060 For some reason, it's got a ping test thing. 451 00:41:54,060 --> 00:41:56,000 You can make the router ping other stuff. 452 00:41:56,420 --> 00:42:03,780 So in this example, I'm just playing around with that because I kind of suspected that it might be, you know, doing bad things when we try and ping stuff. 453 00:42:04,180 --> 00:42:10,720 And so I wanted to find the underlying binary or function or library that's actually responsible for that. 454 00:42:10,820 --> 00:42:13,640 So what I do is I just go and play with all the functionality. 455 00:42:13,640 --> 00:42:18,460 If there's something that you can do on the device to make it do something, I do that. 456 00:42:18,460 --> 00:42:21,160 And I don't specifically do that, like trying injections or anything. 457 00:42:21,160 --> 00:42:25,120 I just, when I'm starting out, just use the device how it's supposed to be used. 458 00:42:25,760 --> 00:42:27,860 And I'll take a look at the logging. 459 00:42:27,860 --> 00:42:32,960 And a lot of times the logging will be very verbose in IoT devices when you're interacting with things. 460 00:42:33,000 --> 00:42:38,280 And then we can actually trace that logging back then to the underlying binaries or libraries. 461 00:42:38,620 --> 00:42:50,400 So in this device, and I actually see this in a decent amount of IoT devices, they were nice enough to even just put the function that's actually being called when you try and run this ping test. 462 00:42:50,400 --> 00:42:51,680 They put it in square brackets. 463 00:42:51,680 --> 00:42:55,200 That's their like logging nomenclature or whatever. 464 00:42:55,200 --> 00:42:57,960 So it was called util underscore exec system. 465 00:42:57,960 --> 00:43:05,320 So when I saw this immediately, and if you're familiar with like, you know, web pen testing or something like that, immediately looked like it was making a system call to me. 466 00:43:05,380 --> 00:43:10,240 And then they put a bunch of details in it, like they actually give us how the command is being formatted. 467 00:43:10,240 --> 00:43:13,040 So I didn't get to put the whole thing because I was running out of room. 468 00:43:13,040 --> 00:43:19,700 But if you can't see it, it literally says, OAL start ping, command is IP ping dash C, and it gives the whole details. 469 00:43:19,700 --> 00:43:23,400 And in that, you can actually see the IP address that we put in. 470 00:43:23,460 --> 00:43:29,420 So it definitely is kind of like giving us a hint that there's possible command injection or something we should look at deeper there. 471 00:43:30,520 --> 00:43:30,960 Okay. 472 00:43:31,560 --> 00:43:36,860 So now we have an idea that that function, that util underscore exec system is of interest to us. 473 00:43:36,860 --> 00:43:39,000 It could be a potential injection point. 474 00:43:39,280 --> 00:43:50,560 And what we should do is, you know, on the past page or like when we're doing that, like I will interact with everything I can and take a note of where all the logging is happening, what binaries and functions that logging is coming from. 475 00:43:50,840 --> 00:43:56,620 We'll just go back to our good friend strings piping into grep, one of my favorite tools for IoT hacking. 476 00:43:56,700 --> 00:43:59,000 And we can grep on that function name. 477 00:43:59,100 --> 00:44:03,440 So a lot of times in less expensive IoT devices, again, they're making it easier for us. 478 00:44:03,440 --> 00:44:05,720 They don't strip binaries and things like that. 479 00:44:05,720 --> 00:44:10,120 So the function names will just end up in the compiled binaries and libraries. 480 00:44:10,260 --> 00:44:13,880 So we can just pipe that into grep and put the function name in. 481 00:44:13,880 --> 00:44:17,160 So in this example here, I did that for util exec system. 482 00:44:17,160 --> 00:44:18,620 However, what if they do strip it? 483 00:44:18,620 --> 00:44:22,100 Well, if we just go back one page here, you can see the printout here. 484 00:44:22,100 --> 00:44:23,340 It kind of follows a format. 485 00:44:23,340 --> 00:44:27,060 It says OAL start ping command is and then gives the command. 486 00:44:27,420 --> 00:44:30,000 So that's a string that's actually in there too. 487 00:44:30,000 --> 00:44:32,480 And they're probably not going to obfuscate it because it's not malware. 488 00:44:32,480 --> 00:44:37,140 So we can also just pipe common strings that we see. 489 00:44:37,140 --> 00:44:41,280 So in this example, I kind of thought it was using like a print app or sprint app or something like that. 490 00:44:41,280 --> 00:44:43,900 So we look for a command is and we get the same hit. 491 00:44:43,900 --> 00:44:49,780 You can see here that actual string, how it is in that binary is %s command is %s. 492 00:44:49,780 --> 00:44:51,240 So it's using that formatting. 493 00:44:51,380 --> 00:44:57,020 So even if they do strip the function names, there's still ways to get around it and find those underlying binaries and libraries. 494 00:44:59,660 --> 00:45:05,640 Okay, so now that we've got our function name, we know that it's in that. 495 00:45:05,640 --> 00:45:08,980 So if I just go back in this one, for example, we see the hit because we use dash F. 496 00:45:09,000 --> 00:45:11,200 It's in this libcmm.so. 497 00:45:11,200 --> 00:45:20,380 So that is a custom library that the makers of this router in this example wrote that has the majority of the functionality of that router baked into it. 498 00:45:20,500 --> 00:45:24,340 We can pop that into Ghidra and start decompiling it. 499 00:45:25,200 --> 00:45:35,280 So one of the things that I find when I'm teaching IoT hacking or in my workshops is like this is the point where people usually get a little bit overwhelmed if they're not familiar with reverse engineering. 500 00:45:35,280 --> 00:45:40,060 And it starts to look quite complicated because the output of Ghidra can be very verbose. 501 00:45:40,060 --> 00:45:45,780 When it decompiles it, it is, in my opinion, a little bit more complex than just looking at regular C code. 502 00:45:45,940 --> 00:45:48,160 So it can be a little like discouraging. 503 00:45:48,160 --> 00:45:49,940 And I see some people are like, okay, I can't do this. 504 00:45:49,940 --> 00:45:51,000 I'm intimidated by it. 505 00:45:51,000 --> 00:46:02,480 But I have a few tips that I think can make it a lot easier for you to understand and read the output in here and still find vulnerabilities, even if you don't understand what the heck is going on and most of it doesn't make sense. 506 00:46:03,080 --> 00:46:12,640 So the very first thing I always say is because people who are in cybersecurity and have had a little bit of an intro to Ghidra or reverse engineering is it's usually looking at malware. 507 00:46:12,860 --> 00:46:14,240 And this is not malware. 508 00:46:14,360 --> 00:46:21,880 So with malware, usually good malware authors or majority of them are going to try and obfuscate what they're doing, make it confusing for reverse engineering. 509 00:46:21,880 --> 00:46:23,300 They're not going to use print statements. 510 00:46:23,300 --> 00:46:27,340 If they have strings, they're going to obfuscate those strings that are very hard to see. 511 00:46:27,520 --> 00:46:38,400 Instead, for IoT devices, we have developers who are trying to be good, helpful developers and write very clean, readable code so that it's easy for someone else to pick up after them. 512 00:46:38,400 --> 00:46:44,700 If someone's reading their code, it's going to be testable, debuggable, doing all those good things that developers do. 513 00:46:44,720 --> 00:46:56,260 And also in IoT devices, we do a lot of printing out to UART to tell what's going on so that we can actually do almost debugging through print statements in a production device, which is nice. 514 00:46:56,260 --> 00:47:00,440 It makes it really easy for us to then go and trace those back. 515 00:47:01,100 --> 00:47:09,180 So one of the first things that I always suggest with that in mind is to take a look at the print statements and let those guide you to what is going on. 516 00:47:09,300 --> 00:47:11,880 Of course, you can't always trust print statements. 517 00:47:11,880 --> 00:47:15,460 If you're a programmer, you know that it's not the best to always trust comments or print statements. 518 00:47:15,460 --> 00:47:18,180 But when you're getting started reverse engineering, I think it's okay. 519 00:47:18,180 --> 00:47:19,420 Just read the print statements. 520 00:47:19,580 --> 00:47:24,960 The very first one that I have here that's in red, it's just actually that print statement that we saw in the logging. 521 00:47:24,960 --> 00:47:27,820 So it helps us confirm that we're in the right spot. 522 00:47:28,000 --> 00:47:34,840 And then if you look down at line 32, it might be a little hard to read, but essentially what it's saying there is it's just saying system fork failed. 523 00:47:34,940 --> 00:47:36,420 And this, we don't care about that. 524 00:47:36,420 --> 00:47:37,400 It's not important to us. 525 00:47:37,400 --> 00:47:43,040 But if you look at the program flow and the if statements, well, now you know what that program flow does. 526 00:47:43,040 --> 00:47:44,740 It just checks if a system fork failed. 527 00:47:44,740 --> 00:47:50,720 Because before that, it says, you know, if local 234 equals FFFFFFF. 528 00:47:50,960 --> 00:47:52,960 Well, if I saw that, I have no idea what it was. 529 00:47:52,960 --> 00:47:54,460 Is it integral to the thing? 530 00:47:54,500 --> 00:47:56,800 Well, if you look at the print statement, it tells you exactly what it is. 531 00:47:56,800 --> 00:47:58,020 And you can just ignore that. 532 00:47:58,580 --> 00:48:05,500 The second thing you can do with print statements that makes your life a lot easier is a lot of times they'll be like printfs or sprintfs. 533 00:48:05,500 --> 00:48:12,920 And if you're not familiar with how those work, essentially we have a slot holder for a variable that we're going to pass into that print statement. 534 00:48:12,920 --> 00:48:16,740 And then the print statement basically tells you what that variable is. 535 00:48:16,740 --> 00:48:21,440 So in this top example here, we have the percent command is percent. 536 00:48:21,440 --> 00:48:24,820 And then we have two variables passed in that, you know, we wouldn't know what they were. 537 00:48:24,960 --> 00:48:27,780 One's param1 and one's underscore underscore S. 538 00:48:27,780 --> 00:48:30,720 Well, if we look and, you know, we just go back a couple to that print statement. 539 00:48:30,720 --> 00:48:35,100 Well, the first one, this is that identifier OAL underscore start pin command. 540 00:48:35,100 --> 00:48:37,080 So we know maybe that's like some sort of identifier. 541 00:48:37,120 --> 00:48:40,820 And then the second one, though, now we know of our interest. 542 00:48:40,820 --> 00:48:45,860 Well, that's the actual string that we manipulate, that we can pass the IP address in. 543 00:48:45,900 --> 00:48:51,740 And because of that sprintf or that printf function, well, now we know that underscore underscore S variable. 544 00:48:51,740 --> 00:48:52,420 We know what it is. 545 00:48:52,420 --> 00:48:54,920 And that's just through those print commands. 546 00:48:55,700 --> 00:49:05,060 The next thing I'll call out, or that's kind of like the final thing that we've been working towards, is to just start getting used to seeing unsafe things being done. 547 00:49:05,140 --> 00:49:09,620 So the easiest one to actually find is system command. 548 00:49:09,620 --> 00:49:11,860 So you can see that's in the second square there. 549 00:49:11,860 --> 00:49:13,400 We have a system command. 550 00:49:13,440 --> 00:49:21,840 And if you're not familiar with that when you're programming C, essentially, that's a way for you to just pass down to Linux to say like, hey, I want you to run this shell command. 551 00:49:21,960 --> 00:49:28,860 So it's essentially the same as if you're at the terminal and you type in, if you have a shell, whatever you pass into the system, it's the same way. 552 00:49:28,860 --> 00:49:39,360 So if you're not already thinking this, this is an extremely dangerous thing to do in your programming if you're using user variables, and especially if you're not going to be sanitizing those variables. 553 00:49:39,660 --> 00:49:48,980 So in this one, for example, this util underscore exec system function that they've written to make it easier to do system calls, it does no sanitization or checking. 554 00:49:48,980 --> 00:49:58,900 However, in this example, the caller of that, that actually initially takes in that IP address, well, it does do the sanitization. 555 00:49:58,900 --> 00:50:06,820 But if you look on this device, for example, there are about 500 calls to this util underscore exec system. 556 00:50:06,920 --> 00:50:16,420 And the person that wrote that function, this util underscore exec system that knows, okay, I need to sanitize my inputs further down the chain, they might not be the same ones writing the code. 557 00:50:16,420 --> 00:50:22,540 So you can actually see how it can happen to slip through where user-supplied input gets into a system call. 558 00:50:22,540 --> 00:50:32,780 So that's one of the easiest things when you're starting out is to just go interact with the device, chase down the inputs that you do because you know, and see where do they end up in the code. 559 00:50:32,780 --> 00:50:39,400 And if they end up in a system call, then I really need to look into this deeper and see if there's a way that I can do some sort of command injection. 560 00:50:41,080 --> 00:50:43,220 So of course, what's next after we know this? 561 00:50:43,220 --> 00:50:48,120 Well, we keep interacting with the device and tracing the logging back to binaries or libraries. 562 00:50:48,120 --> 00:50:50,060 So of course, there's other ways to approach this. 563 00:50:50,060 --> 00:50:53,340 You could just start with the library and look at all the system calls and go backwards. 564 00:50:53,340 --> 00:51:02,080 But when you're getting started, I think it's a lot easier to understand and conceptualize and not get lost in Kedra to try and start at the source, which is how we interact with it. 565 00:51:02,080 --> 00:51:08,640 And we know that there's like an injection point there, and then see if that actually filters down to something. 566 00:51:08,720 --> 00:51:14,980 So don't just use web browsers, like a lot of IoT apps, they have a mobile or IoT devices, a mobile app. 567 00:51:15,000 --> 00:51:26,360 So we can go use that mobile app, like do everything in the mobile app, do all the setup, check all of that, because it's going to be like a lot of times one of those lesser used places where there's some obscure setting or something you can set. 568 00:51:26,360 --> 00:51:31,040 Do all of that and see what logging you can get and trace that back and see where it goes. 569 00:51:31,040 --> 00:51:35,200 Like one example I found where I was able to crash a device is it was a camera. 570 00:51:35,200 --> 00:51:41,660 And if you wanted to pair it to your mobile app, you put the QR code up to the camera, and you compare it to the mobile app. 571 00:51:41,660 --> 00:51:48,800 And I was never able to like get any buffer overflow or anything, but I was able to crash the camera by doing like a malformed QR code. 572 00:51:48,800 --> 00:51:49,960 So just be creative. 573 00:51:49,960 --> 00:51:55,440 If there's cloud, like somewhere you can sign up in the cloud and then interact with your device, do that. 574 00:51:55,440 --> 00:51:57,720 Like usually there's a free 30 days or something. 575 00:51:57,880 --> 00:52:06,840 And you know, we're not actually pen testing the cloud thing, we don't want to be like trying to break that, but just interact with it how you're supposed to, and see how that filters down into the device. 576 00:52:07,160 --> 00:52:12,280 And then what we're looking for is when you're starting out, there's two main things I suggest to look for. 577 00:52:12,280 --> 00:52:14,480 So the first one is what we already looked at. 578 00:52:14,480 --> 00:52:19,560 Does it end up in an unvalidated or unsanitized system call? 579 00:52:19,840 --> 00:52:29,180 And like if you look at this router and go back and look at the CVs for this one I'm showing, or lots of IoT devices, you'll see lots of command injections being done. 580 00:52:29,180 --> 00:52:33,820 Because in cheap IoT devices, they want to save money, they don't want to write their own functionality. 581 00:52:33,840 --> 00:52:39,460 It's way easier to just use the built-in stuff in Linux and just hand it off to a system call. 582 00:52:39,680 --> 00:52:42,400 So it's not like these don't exist, you can definitely find them. 583 00:52:42,600 --> 00:52:54,040 The second one that's probably a little bit more common, but a little bit harder to find and abuse, is if your user input gets put into an unsafe C function. 584 00:52:54,360 --> 00:53:01,840 So there's a few examples of those are memcopy, stringcopy, stringcat, printf, that next one's supposed to be sprintf, getscanf. 585 00:53:01,840 --> 00:53:06,140 So essentially what these are doing though is they're going to be copying your data into some sort of buffer. 586 00:53:06,160 --> 00:53:12,560 And again, memory is limited on IoT devices, so we're always trying to be kind of stingy with our buffers. 587 00:53:12,560 --> 00:53:26,460 And a lot of times, if you're not sanitizing or validating those inputs, then it can end up in a buffer where we can overflow it and, you know, at the worst case, buffer overflow, or maybe just crash the device and have some sort of denial of service. 588 00:53:26,600 --> 00:53:34,540 So I could give a whole other talk then about where to go from here and how to actually then abuse these or actually exploit buffer overflows. 589 00:53:34,540 --> 00:53:44,860 But if you do get this far and you find this and like you'll be able to maybe crash the device or get some segfaults or something, then send me a message or just go out and do some further research. 590 00:53:44,860 --> 00:53:49,120 And there's a lot of great resources then for how to identify these buffer overflows. 591 00:53:50,380 --> 00:53:51,800 So that's where I'll end today. 592 00:53:51,800 --> 00:53:53,180 I just want to wrap up with a thank you. 593 00:53:53,180 --> 00:53:54,880 Thanks everyone for coming. 594 00:53:54,880 --> 00:53:55,720 I hope you learned something. 595 00:53:55,720 --> 00:54:00,080 I hope you go home and go buy a cheap IoT device when you get home. 596 00:54:00,300 --> 00:54:00,900 Hack it. 597 00:54:00,900 --> 00:54:02,000 If you do, let me know. 598 00:54:02,000 --> 00:54:03,740 I love to hear when people hack it. 599 00:54:03,840 --> 00:54:06,520 And if you want a copy of these slides, stay in touch with me. 600 00:54:06,520 --> 00:54:08,240 Link up, resources, anything. 601 00:54:08,380 --> 00:54:10,140 You can reach me at andrewbellini.com. 602 00:54:10,140 --> 00:54:11,000 Thanks everyone.