1 00:00:00,000 --> 00:00:04,520 So, hello. Thank you for coming to our presentation. We're going to talk about 2 00:00:04,520 --> 00:00:09,700 exploiting the IoT Hub, which includes attacking the smart home by compromising 3 00:00:09,700 --> 00:00:15,040 IoT Hub devices and some counter measures for this attack. And I know that the IoT 4 00:00:15,040 --> 00:00:18,960 Village is also running GeoJet track and Cydia track, and maybe this talk is 5 00:00:18,960 --> 00:00:25,300 helpful for those who are participating in the tracks. So, my name is Hyun Lee and I'm 6 00:00:25,300 --> 00:00:30,840 a graduate student of HL Lab at Korea University, and I like to play CDF, and I'm 7 00:00:30,840 --> 00:00:35,780 currently participating in Defcon CDF Final as Defcon Routine. And I've been 8 00:00:35,780 --> 00:00:39,260 researching on open-source software targeted fuzzing and contributing to 9 00:00:39,700 --> 00:00:45,280 software security by reporting the found bugs and I got some CVs. And I'm also 10 00:00:45,280 --> 00:00:50,800 interested in embedded security such as IoT and SCADA and so forth. And we're also 11 00:00:50,800 --> 00:00:55,200 a mentee of Best of the Best, also known as B.O.B. program, which is 12 00:00:55,300 --> 00:00:58,040 a cyber security expert educating platform in Korea. 13 00:00:59,940 --> 00:01:06,100 Hello. My name is Chang Hyun. I'm working in a cyber security consulting team at the 14 00:01:06,100 --> 00:01:12,580 company UI Korea. I'm a graduate student of Sungkyunkwan University, and I'm so 15 00:01:12,580 --> 00:01:19,240 excited, but also a little nervous, giving my first overseas presentation. Thank you. 16 00:01:21,280 --> 00:01:22,720 Thank you. 17 00:01:23,920 --> 00:01:25,280 So, now we're going to talk about the 18 00:01:25,280 --> 00:01:29,360 We'll introduce our agenda of this presentation, and we'll briefly explain the 19 00:01:29,360 --> 00:01:35,880 structure of Smart Home after the introduction of this overall talk. And we'll analyze real-world 20 00:01:35,880 --> 00:01:41,320 case study of threats that may arise in the Smart Home environment. Next, we'll conduct 21 00:01:41,320 --> 00:01:47,540 vulnerability analysis for different IoT devices. We found 20 vulnerabilities, and 22 00:01:47,540 --> 00:01:53,220 we'll describe their types. And we'll suggest feasible tech scenarios by training these 23 00:01:53,220 --> 00:01:53,800 vulnerabilities. 24 00:01:53,800 --> 00:01:59,620 Then, we'll briefly outline the countermeasures required to prevent these attacks and conclude 25 00:01:59,620 --> 00:02:00,080 this talk. 26 00:02:00,660 --> 00:02:07,320 So, now let's get started. In 2016, there were minor infections targeting IP cameras 27 00:02:07,320 --> 00:02:11,860 and home routers. The attack targeted against a large number of internet-connected devices 28 00:02:12,380 --> 00:02:17,780 to form a bot network, which was used for large-scale DDoS attack. In fact, the vulnerability 29 00:02:17,780 --> 00:02:23,340 used for this attack is quite simple, but fairly critical. Attackers can easily compromise 30 00:02:23,340 --> 00:02:29,240 those devices just by pre-forcing the password for teleth, which means that there was no 31 00:02:29,240 --> 00:02:37,180 secretive consideration in IoT devices. In 2017, a new internet-themed bot network called 32 00:02:37,180 --> 00:02:44,000 PerseRai has been discovered, targeting over 1,000 IP camera models. The use for this attack 33 00:02:44,000 --> 00:02:50,700 was command injection with authentication bypass, and approximately 120,000 IP cameras were 34 00:02:50,700 --> 00:02:51,340 found vulnerable. 35 00:02:52,540 --> 00:02:52,880 However, 36 00:02:53,340 --> 00:02:58,320 the worst is, many of these vulnerable users didn't recognize that their IP cameras were 37 00:02:58,320 --> 00:02:59,140 exposed to the internet. 38 00:03:00,820 --> 00:03:05,080 There are also cases of attacks on Zip-on routers, which are used widely in the world. 39 00:03:05,580 --> 00:03:10,100 Even the exploit codes were released on the exploitative website. This attack consists 40 00:03:10,100 --> 00:03:16,220 of only two vulnerabilities as well. Command injection and authentication bypass were needed 41 00:03:16,220 --> 00:03:21,860 to compromise the routers. Likewise, attackers can download and execute a model on the device, 42 00:03:21,860 --> 00:03:26,120 and build a sensible network to fully take control of the devices remotely. 43 00:03:28,140 --> 00:03:33,780 So, now let's focus on the security of smart home. You know, the IoT hub, which connects 44 00:03:33,780 --> 00:03:38,900 all the smart things with the same network area and communicate with remote servers for 45 00:03:38,900 --> 00:03:45,420 management, is considered a vital element in the smart home environment. The hub device 46 00:03:45,420 --> 00:03:50,480 is also connected to the internet, which means, it can be attacked, as there are previous 47 00:03:50,480 --> 00:03:51,480 IoT exploit cases. 48 00:03:51,480 --> 00:03:53,660 if an externally accessible port is open, 49 00:03:53,920 --> 00:03:56,420 or attackers can access the same network area. 50 00:03:57,900 --> 00:03:59,760 In fact, Cisco Tower's intelligence 51 00:04:00,260 --> 00:04:02,760 recently released vulnerability analysis results 52 00:04:02,760 --> 00:04:05,240 on Samsung's SmartThings Hub device. 53 00:04:06,120 --> 00:04:08,640 The found vulnerabilities include command ejection, 54 00:04:08,780 --> 00:04:10,380 buffer flow, information leakage. 55 00:04:11,540 --> 00:04:13,740 And these vulnerabilities can be chained together 56 00:04:13,740 --> 00:04:16,880 to form a fully split code compromising the Hub device. 57 00:04:18,120 --> 00:04:20,900 So as you know, the IoT threats are still ongoing, 58 00:04:20,900 --> 00:04:22,960 and countermeasures for these threats 59 00:04:22,960 --> 00:04:25,580 should be considered urgently, I think. 60 00:04:27,000 --> 00:04:28,920 So we have conducted threat analysis 61 00:04:28,920 --> 00:04:32,380 and found many vulnerabilities for the Hub devices 62 00:04:32,380 --> 00:04:34,860 made from different manufacturers, 63 00:04:35,520 --> 00:04:37,820 and we want to share the results from now on. 64 00:04:40,620 --> 00:04:44,260 Yes, next I will talk about the structure of a smart home. 65 00:04:46,140 --> 00:04:47,380 According to this diagram, 66 00:04:47,800 --> 00:04:50,000 smart home services can be broken down 67 00:04:50,000 --> 00:04:50,880 into apps, 68 00:04:50,880 --> 00:04:51,360 application, 69 00:04:51,960 --> 00:04:52,660 platform server, 70 00:04:53,000 --> 00:04:53,940 IoT Hub, 71 00:04:54,160 --> 00:04:55,040 IoT Things. 72 00:04:55,420 --> 00:04:59,600 There are times when there is no need for an IoT Hub, 73 00:05:00,000 --> 00:05:03,200 but it is present in most smart homes. 74 00:05:04,540 --> 00:05:08,980 I will now explain more about the IoT Hub in detail. 75 00:05:09,820 --> 00:05:14,100 IoT Hub manages small devices in the smart home. 76 00:05:14,300 --> 00:05:18,300 It supports wireless protocol like the C-Wave, 77 00:05:18,520 --> 00:05:19,260 C-Guby, 78 00:05:19,260 --> 00:05:20,580 Wi-Fi, 79 00:05:20,900 --> 00:05:21,500 Bluetooth, 80 00:05:21,980 --> 00:05:22,840 and Cera. 81 00:05:23,240 --> 00:05:26,020 Also, to connect to a platform server, 82 00:05:26,360 --> 00:05:29,040 it uses diverse provisioning protocols. 83 00:05:29,540 --> 00:05:32,960 These protocols include DRO69, 84 00:05:33,460 --> 00:05:34,340 MQTT, 85 00:05:34,780 --> 00:05:35,820 COAP, 86 00:05:36,340 --> 00:05:37,060 HTTP, 87 00:05:37,920 --> 00:05:38,720 1M2M, 88 00:05:38,920 --> 00:05:40,200 and custom protocols. 89 00:05:41,740 --> 00:05:45,080 Next is the process of IoT Hub. 90 00:05:45,560 --> 00:05:49,020 The IoT Hub process is composed of four steps, 91 00:05:49,020 --> 00:05:55,220 First, the smart home service app will register the IoT hub with the server. 92 00:05:55,420 --> 00:06:00,860 And second, the IoT hub performs a user authentication through the server. 93 00:06:01,420 --> 00:06:07,120 Third, the IoT hub and the things go through the process of pairing. 94 00:06:07,780 --> 00:06:13,580 Finally, the user is able to access the things through the application. 95 00:06:14,800 --> 00:06:22,620 So far, we have covered the functions of the IoT hub in smart homes, and now we will explain 96 00:06:22,980 --> 00:06:25,960 why we chose the IoT hub as our target. 97 00:06:26,960 --> 00:06:34,460 Our first lesson is that once the IoT hub is taken over, it is very possible to take 98 00:06:34,460 --> 00:06:37,360 over everything connected to the IoT hub. 99 00:06:38,120 --> 00:06:43,100 Because of this, there would be many possible scenarios. 100 00:06:45,640 --> 00:06:52,480 For the more, we imagine that through the exploitation of the IoT hub, we would be 101 00:06:52,480 --> 00:06:57,060 able to hack difficult wireless protocols, such as the Z-Wave. 102 00:06:57,800 --> 00:07:08,600 Lastly, our most important reason for choosing our target as the IoT hub was for money, and 103 00:07:08,600 --> 00:07:09,240 we are both. 104 00:07:10,860 --> 00:07:13,080 Now, we will find out more about the IoT hub. 105 00:07:19,420 --> 00:07:24,580 This picture shows a threat that exists in smart home services. 106 00:07:24,820 --> 00:07:33,000 I have separated the threat into two graphs, the external part, which is outside the home, 107 00:07:33,160 --> 00:07:36,860 and the internal part, which is inside the home. 108 00:07:37,520 --> 00:07:41,940 I have only included points that were important in my opinion. 109 00:07:42,340 --> 00:07:43,060 So, let's start. 110 00:07:43,060 --> 00:07:49,980 In the external section, the primary threat, the supply chain attack of the firmware server, 111 00:07:50,240 --> 00:07:53,700 and the user us-bypass, and man-in-the-middle. 112 00:07:54,700 --> 00:08:02,640 And the internal section, there are memory corruption, command injection, LPE, man-in-the-middle, 113 00:08:02,800 --> 00:08:08,060 and a very important threat is remote control of things. 114 00:08:08,740 --> 00:08:13,040 And now we will consider a real example of a threat. 115 00:08:13,040 --> 00:08:22,340 In each section, this case is a mobile application, an example of a threat that can occur outside 116 00:08:22,340 --> 00:08:23,660 the home. 117 00:08:24,080 --> 00:08:30,580 One is able to control another device using one's own application. 118 00:08:32,700 --> 00:08:35,880 There are two examples in the internal section. 119 00:08:36,520 --> 00:08:40,680 We will first examine the one concerning the IoT hub. 120 00:08:43,040 --> 00:08:48,000 Many vulnerabilities have been discovered in the Samsung IoT hub. 121 00:08:48,840 --> 00:08:55,780 This including threat is RCE, DAS, information disclosure, and injection. 122 00:08:57,500 --> 00:09:03,140 This one was discovered in the Z-Wave which is a wireless protocol. 123 00:09:04,420 --> 00:09:07,480 It is using the default encryption key. 124 00:09:07,880 --> 00:09:11,240 Man-in-the-middle attack was possible. 125 00:09:11,240 --> 00:09:13,980 and now the first has been patched. 126 00:09:16,420 --> 00:09:20,660 Let us take a closer look at the IoT hub 127 00:09:21,420 --> 00:09:23,460 to run more precisely and carefully 128 00:09:23,460 --> 00:09:26,260 into potential thread of the IoT hub. 129 00:09:26,880 --> 00:09:30,300 We drew a thread model based on slides. 130 00:09:30,780 --> 00:09:33,120 As you can see in the flow diagram, 131 00:09:33,400 --> 00:09:37,300 the IoT hub indicated by red dot line 132 00:09:38,140 --> 00:09:39,640 is connected to the other section, 133 00:09:39,640 --> 00:09:44,400 including the platform server and things. 134 00:09:45,180 --> 00:09:49,380 The IoT hub was many processes and flows. 135 00:09:49,680 --> 00:09:54,340 Process is a circle, just line is flows. 136 00:09:55,540 --> 00:10:00,880 A lot of thread and other vectors exist because of this. 137 00:10:02,840 --> 00:10:06,620 Yes, in the table below, which thread is explained, 138 00:10:07,220 --> 00:10:08,880 now we will talk about 139 00:10:08,880 --> 00:10:10,540 all of these in detail. 140 00:10:11,360 --> 00:10:16,680 Thread number 32 is the potential lack of info validation 141 00:10:17,060 --> 00:10:18,460 or poor pairing. 142 00:10:18,640 --> 00:10:23,180 We will now present a specific example of an instance 143 00:10:23,700 --> 00:10:26,080 when this thread was properly exploited. 144 00:10:27,680 --> 00:10:31,320 My partner, Huion, will take it from here. 145 00:10:33,060 --> 00:10:34,920 Yeah, so from now on, 146 00:10:35,020 --> 00:10:38,380 I'm gonna talk about vulnerability analysis for IoT hub. 147 00:10:39,480 --> 00:10:41,620 We analyzed total four products. 148 00:10:41,820 --> 00:10:44,020 For each product, the MCU architecture 149 00:10:44,020 --> 00:10:46,480 is classified as ARM and MIPS. 150 00:10:46,840 --> 00:10:50,100 Also, a JetWave, Wi-Fi, Bluetooth, and RF 151 00:10:50,100 --> 00:10:51,320 are used for wireless communication 152 00:10:51,320 --> 00:10:53,140 between IoT hub and smart devices. 153 00:10:53,840 --> 00:10:57,440 And the IoT hub transmits the status information 154 00:10:57,770 --> 00:11:00,960 of the device, such as form information, certificates, 155 00:11:01,500 --> 00:11:05,920 and secret keys and so on to the server via provisioning 156 00:11:05,920 --> 00:11:08,480 so that the remote server can't manage the device, 157 00:11:08,480 --> 00:11:11,520 such as automatic update, device registration, 158 00:11:12,000 --> 00:11:14,380 connection, and communication with mobile application. 159 00:11:15,500 --> 00:11:20,540 So, company A uses TR-069 as provisioning, 160 00:11:20,560 --> 00:11:22,640 that is, customer premises equipment, 161 00:11:23,060 --> 00:11:24,960 wide area network management protocol, 162 00:11:25,260 --> 00:11:26,540 also known as CWMP. 163 00:11:27,040 --> 00:11:30,760 And this will be explained in more detail later on 164 00:11:30,760 --> 00:11:31,900 on our slide. 165 00:11:32,180 --> 00:11:35,760 And company C uses the MQTT protocol. 166 00:11:36,240 --> 00:11:38,460 MQTT is a machine-tested protocol. 167 00:11:38,480 --> 00:11:43,480 It was designed as an extremely lightweight, 168 00:11:43,820 --> 00:11:45,580 publicly-subscribed messaging transport. 169 00:11:47,440 --> 00:11:50,760 To manage IoT hub devices, there are management services 170 00:11:50,760 --> 00:11:53,320 in the form of web application or something else. 171 00:11:54,000 --> 00:11:56,900 And web applications are usually developed 172 00:11:56,900 --> 00:12:01,000 based on open source, such as Go Ahead for web server 173 00:12:01,340 --> 00:12:02,540 and Light Edge TPD. 174 00:12:02,780 --> 00:12:06,060 But nowadays, it seems to be a trend to customize the source 175 00:12:06,060 --> 00:12:08,460 or develop the server. 176 00:12:08,460 --> 00:12:09,800 So, it's a very popular service directly from the manufacturer. 177 00:12:11,520 --> 00:12:13,820 In addition, we confirmed whether we can access 178 00:12:13,820 --> 00:12:17,380 to the debugging shell for remote or UART serial debugging port. 179 00:12:17,760 --> 00:12:21,060 As you can see, we can get a debugging shell by UART 180 00:12:21,060 --> 00:12:22,340 for all of the target devices. 181 00:12:24,600 --> 00:12:27,840 So, there are six steps to analyze IoT devices. 182 00:12:28,460 --> 00:12:30,160 First of all, extract the firmware. 183 00:12:30,740 --> 00:12:33,540 Because the functions that need to be analyzed 184 00:12:33,540 --> 00:12:34,900 are usually embedded in the firmware. 185 00:12:35,620 --> 00:12:38,340 Second, acquire a command shell for debugging. 186 00:12:38,460 --> 00:12:41,300 When you access the shell, you will notice 187 00:12:41,300 --> 00:12:43,120 which processes are running as a key role. 188 00:12:44,120 --> 00:12:46,000 Nozio mainly handles lots of requests. 189 00:12:46,400 --> 00:12:48,240 Once the main binary is extracted, 190 00:12:48,580 --> 00:12:52,560 we can analyze the vulnerabilities and finally exploit them. 191 00:12:54,700 --> 00:12:57,340 There are roughly three ways to extract the firmware. 192 00:12:57,820 --> 00:13:01,120 Through the provisioning, the remote server checks 193 00:13:01,120 --> 00:13:02,800 the firmware version of the hub device 194 00:13:03,360 --> 00:13:06,440 and performs automatic update when the version is not up to date. 195 00:13:07,100 --> 00:13:08,340 At the same time, 196 00:13:08,460 --> 00:13:11,040 the updated firmware URL information can be obtained 197 00:13:11,760 --> 00:13:13,300 and the firmware can be downloaded. 198 00:13:14,580 --> 00:13:18,140 Another way to get the firmware is using the UART debugging port. 199 00:13:18,760 --> 00:13:20,900 As you can run all commands in the debugging shell, 200 00:13:21,640 --> 00:13:24,540 we can extract the desired binary through commands like 201 00:13:24,540 --> 00:13:27,660 tftp, ftpget, curlnc, and so on. 202 00:13:28,240 --> 00:13:31,260 Also, we can use jtag instead of the UART, 203 00:13:31,300 --> 00:13:33,560 but we'll skip it because it's too expensive. 204 00:13:34,480 --> 00:13:36,960 So, if both methods are impossible, 205 00:13:36,960 --> 00:13:40,040 there is a way to dump the flash memory directly. 206 00:13:40,780 --> 00:13:43,560 There are many ways to dumping the flash memory, 207 00:13:43,740 --> 00:13:47,100 but in our case, we used Arduino Uno equipment. 208 00:13:48,460 --> 00:13:53,000 In addition, we can also remove the flash memory chip 209 00:13:53,000 --> 00:13:55,160 through the disordering for memory dump. 210 00:13:57,460 --> 00:14:00,280 Next, we need to acquire a debugging shell, 211 00:14:00,500 --> 00:14:02,120 usually using the UART method. 212 00:14:02,520 --> 00:14:06,740 Sometimes, it's easy to get a shell if telnet or ss-14, 213 00:14:06,960 --> 00:14:10,760 is open, and it's set as a default account, 214 00:14:11,500 --> 00:14:12,460 which can be easily cracked, 215 00:14:13,220 --> 00:14:16,200 and the VRI attack exploits this type of vulnerability. 216 00:14:19,020 --> 00:14:21,960 Usually, a login account is required, as you know, 217 00:14:22,060 --> 00:14:24,160 when accessing via UART or telnet. 218 00:14:24,580 --> 00:14:26,220 Then, how to log into the shell? 219 00:14:27,460 --> 00:14:29,360 Let's suppose the firmware is extracted, 220 00:14:30,140 --> 00:14:32,380 already obtained in a different way. 221 00:14:32,580 --> 00:14:34,940 Then, we can search the hard-coded password 222 00:14:34,940 --> 00:14:36,440 or check the password routine. 223 00:14:36,960 --> 00:14:38,740 By reversing the relevant binary 224 00:14:38,740 --> 00:14:40,740 containing the login-related functions, 225 00:14:41,500 --> 00:14:44,340 sometimes the password is written in the config file, 226 00:14:44,540 --> 00:14:46,220 and we can find it easily. 227 00:14:48,280 --> 00:14:50,980 Now, what if we cannot get the firmware, 228 00:14:51,180 --> 00:14:52,520 or do not know the password? 229 00:14:52,980 --> 00:14:54,420 Easier way to log in, 230 00:14:54,480 --> 00:14:56,920 even if U-Boot's boot delay option is set to zero? 231 00:14:57,440 --> 00:14:59,520 You know, U-Boot is a bootloader, 232 00:14:59,520 --> 00:15:02,580 handling lots of tasks such as system initialization, 233 00:15:03,080 --> 00:15:04,620 current loading, and execution. 234 00:15:05,900 --> 00:15:06,460 Normally, 235 00:15:06,460 --> 00:15:08,400 Normally if the boot delay option is set to enough, 236 00:15:08,680 --> 00:15:10,560 we can get it to bootload prompt 237 00:15:10,980 --> 00:15:13,100 and change the kernel image booting option. 238 00:15:14,020 --> 00:15:17,140 But otherwise, we'll have to short the NAND flash chip. 239 00:15:18,260 --> 00:15:20,900 It's the principle that connection between ground pin 240 00:15:20,900 --> 00:15:22,760 and the particular pin of the NAND chip 241 00:15:22,760 --> 00:15:24,600 causes kernel loading error 242 00:15:25,280 --> 00:15:26,820 and can lead to bootload prompt. 243 00:15:28,560 --> 00:15:30,100 After entering bootload prompt, 244 00:15:30,600 --> 00:15:32,940 we can set boot ARGS options 245 00:15:32,940 --> 00:15:36,340 by adding init equal pin as a string and then reboot. 246 00:15:37,080 --> 00:15:39,860 Then we can get the UR debugging shell 247 00:15:40,780 --> 00:15:41,500 with the root account. 248 00:15:43,780 --> 00:15:46,080 Next, identify main process. 249 00:15:46,460 --> 00:15:48,040 Since the program startup commands 250 00:15:48,040 --> 00:15:50,260 are usually defined in the startup script file, 251 00:15:50,420 --> 00:15:52,660 we can easily find the main process. 252 00:15:53,460 --> 00:15:55,280 The network status check command 253 00:15:55,700 --> 00:15:57,200 tells you which ports are open 254 00:15:57,580 --> 00:15:59,100 and which processes are running. 255 00:16:01,160 --> 00:16:02,380 There are five categories 256 00:16:02,380 --> 00:16:04,480 of vulnerabilities we have found. 257 00:16:05,200 --> 00:16:07,040 Let's take a closer look at each one. 258 00:16:09,700 --> 00:16:12,340 When sending a payload to a web application, 259 00:16:12,720 --> 00:16:15,200 it usually validates the session value 260 00:16:15,700 --> 00:16:17,260 and we can bypass the authentication 261 00:16:17,780 --> 00:16:18,960 with a simple URL tree. 262 00:16:20,100 --> 00:16:26,140 As you can see, if the request URL ends in .css, .grf, 263 00:16:26,380 --> 00:16:27,900 .jpg, and et cetera, 264 00:16:28,180 --> 00:16:31,400 the function of validation for a session is not called, 265 00:16:31,400 --> 00:16:34,400 which means we can bypass authentication routine. 266 00:16:35,760 --> 00:16:37,840 In some cases, the program itself 267 00:16:37,840 --> 00:16:40,840 creates a session value with non-random. 268 00:16:41,560 --> 00:16:43,860 In this case, we can bypass the authentication 269 00:16:44,220 --> 00:16:46,100 by generating a forced session value. 270 00:16:48,880 --> 00:16:50,860 In fact, this is one of the vulnerabilities 271 00:16:51,200 --> 00:16:54,000 using the recently released JIP and router exploit. 272 00:16:54,720 --> 00:16:56,560 As you can see, the first vulnerability 273 00:16:56,780 --> 00:16:58,100 is authentication bypass. 274 00:16:59,160 --> 00:17:01,280 This was done by putting question mark image, 275 00:17:01,280 --> 00:17:02,880 strings at the end of the URL. 276 00:17:03,860 --> 00:17:06,560 Attackers could easily bypass authentication 277 00:17:07,090 --> 00:17:09,660 by inserting certain keywords into the end of the URL 278 00:17:10,250 --> 00:17:11,940 and succeed in remote code execution 279 00:17:11,940 --> 00:17:14,060 with a second vulnerability, command injection. 280 00:17:16,710 --> 00:17:20,380 The most common but fatal vulnerability is command injection. 281 00:17:20,920 --> 00:17:23,520 The vulnerabilities could be implemented literally 282 00:17:23,520 --> 00:17:25,780 by inserting arbitrary commands 283 00:17:25,780 --> 00:17:27,660 into certain headers or parameters. 284 00:17:28,180 --> 00:17:31,200 This can reliably execute attack code, 285 00:17:31,200 --> 00:17:34,020 without the need for bypassing mitigations 286 00:17:34,020 --> 00:17:35,960 like DP and AS at all. 287 00:17:36,860 --> 00:17:38,140 As you can see in the image, 288 00:17:38,340 --> 00:17:40,480 if you inject a command into a certain parameter, 289 00:17:40,860 --> 00:17:43,340 it passes an argument of the system function 290 00:17:43,340 --> 00:17:47,120 without sanitization, the resulting command injection. 291 00:17:49,380 --> 00:17:51,880 So, as you can see, one simple command injection 292 00:17:52,220 --> 00:17:55,660 makes it possible to access to the system remotely. 293 00:17:56,940 --> 00:17:59,200 This is the most attractive vulnerability for attackers. 294 00:18:01,960 --> 00:18:04,880 Now, this is the very typical vulnerability, 295 00:18:05,360 --> 00:18:06,020 birth-forward flow. 296 00:18:06,680 --> 00:18:10,400 In fact, many of the IT devices we had analyzed 297 00:18:10,400 --> 00:18:11,780 didn't have secure coding applied. 298 00:18:12,360 --> 00:18:14,520 So, we focused on the vulnerable functions 299 00:18:14,520 --> 00:18:18,180 like searching copy, S3 Intel, memcpy, and so on, 300 00:18:18,260 --> 00:18:19,640 to find birth-forward flow. 301 00:18:20,100 --> 00:18:22,200 As can be seen from the image below, 302 00:18:22,520 --> 00:18:24,380 the functions are used quite a lot. 303 00:18:26,820 --> 00:18:29,620 Now, on some devices, we could find functions 304 00:18:29,620 --> 00:18:31,100 that simply execute commands. 305 00:18:31,100 --> 00:18:34,120 This function is assumed to be used for debugging 306 00:18:34,120 --> 00:18:36,040 from the perspective of developer. 307 00:18:36,580 --> 00:18:38,700 However, it is considered as a backdoor 308 00:18:38,700 --> 00:18:39,920 from attacker's point of view. 309 00:18:41,080 --> 00:18:44,200 Unlike most cases, in this picture, 310 00:18:44,300 --> 00:18:45,980 the name of the function is too clear 311 00:18:45,980 --> 00:18:47,000 that it is a backdoor. 312 00:18:47,340 --> 00:18:49,900 However, the function is usually hidden, 313 00:18:50,080 --> 00:18:52,740 and some constraints should be met to execute commands. 314 00:18:55,260 --> 00:18:57,340 Likewise, you can control the device very easily. 315 00:18:57,600 --> 00:19:00,720 As you can see, we inserted command creating directory, 316 00:19:01,100 --> 00:19:02,740 on command parameter, 317 00:19:03,420 --> 00:19:05,720 and we can create the directory successfully. 318 00:19:08,680 --> 00:19:12,260 Lastly, local privilege escalation vulnerability. 319 00:19:12,800 --> 00:19:14,700 There are many ways to elevate privileges 320 00:19:14,700 --> 00:19:16,020 on Linux embedded systems. 321 00:19:16,540 --> 00:19:18,360 Sometimes, in an embedded system, 322 00:19:18,680 --> 00:19:21,780 the privileges are separated as root and user, 323 00:19:21,960 --> 00:19:24,700 so that certain processes run with normal user account. 324 00:19:26,000 --> 00:19:28,480 In the account accessed through Telet, 325 00:19:28,580 --> 00:19:30,840 is a normal user account. 326 00:19:31,100 --> 00:19:33,560 Elevation of privilege is required 327 00:19:33,560 --> 00:19:34,620 to execute more commands. 328 00:19:36,180 --> 00:19:37,860 Instead of Linux current exploitation, 329 00:19:38,400 --> 00:19:40,600 we'll show you privilege escalation 330 00:19:40,600 --> 00:19:41,880 by using a logical bug, 331 00:19:42,180 --> 00:19:45,220 which is user-owned script file executed as root account. 332 00:19:48,440 --> 00:19:51,480 As you can see, the user account is linear, 333 00:19:51,620 --> 00:19:52,480 it's a normal account. 334 00:19:53,040 --> 00:19:55,820 And the rc.local file is a startup script 335 00:19:55,820 --> 00:19:57,620 that is executed with root permission, 336 00:19:58,200 --> 00:20:00,820 and it executes serial.sh, 337 00:20:01,100 --> 00:20:01,960 file as a command. 338 00:20:02,960 --> 00:20:06,540 However, the serial.sh is a user-owned file, 339 00:20:06,800 --> 00:20:08,600 and can be modified as normal user account. 340 00:20:10,070 --> 00:20:12,220 If we insert a command to change the password 341 00:20:12,220 --> 00:20:16,240 of the root account into the serial.sh file, 342 00:20:16,990 --> 00:20:18,540 then we can access to the system 343 00:20:18,540 --> 00:20:20,640 with root account successfully. 344 00:20:23,500 --> 00:20:25,740 Based on the found vulnerabilities, 345 00:20:26,280 --> 00:20:28,400 we can develop a final exploit. 346 00:20:29,140 --> 00:20:32,360 Profile flow can be exploited to remote code execution. 347 00:20:33,200 --> 00:20:36,800 To do this, our and shellcode development are needed. 348 00:20:37,300 --> 00:20:40,520 So, you can run shellcode by chaining three gussets 349 00:20:40,520 --> 00:20:42,780 that control specific registers, 350 00:20:43,320 --> 00:20:45,480 get the address of the shellcode on the stack, 351 00:20:45,680 --> 00:20:47,160 and jump to the shellcode. 352 00:20:48,260 --> 00:20:51,000 This code is a reverse TCP connection shellcode 353 00:20:51,000 --> 00:20:52,520 for MISP's architecture, 354 00:20:52,720 --> 00:20:54,640 that allows you to execute commands 355 00:20:55,280 --> 00:20:57,100 from a remotely connected server. 356 00:20:58,980 --> 00:21:01,900 So, we have developed a complete exploit 357 00:21:01,900 --> 00:21:03,720 for a Company A hub product, 358 00:21:04,580 --> 00:21:07,320 and we will demonstrate that we can fully take control 359 00:21:07,320 --> 00:21:11,080 of the hub device by combining the authentication bypass 360 00:21:11,680 --> 00:21:12,900 with buffer flow. 361 00:21:15,280 --> 00:21:19,980 So, in first demo, we'll show you the Company A's 362 00:21:19,980 --> 00:21:22,400 hub device fully compromised by buffer flow 363 00:21:22,400 --> 00:21:24,040 and authentication bypass. 364 00:21:28,400 --> 00:21:30,460 The left side is attacker side. 365 00:21:30,680 --> 00:21:33,020 So, we have to open the port, 366 00:21:33,160 --> 00:21:36,720 a listening port, from remote reverse TCP connection. 367 00:21:39,380 --> 00:21:41,200 And the right side is a tele-session 368 00:21:41,540 --> 00:21:45,120 for checking the our exploit is success. 369 00:21:46,680 --> 00:21:49,520 And this is the UART debugging shell, 370 00:21:50,740 --> 00:21:53,140 also checking the exploit's accessibility. 371 00:21:54,460 --> 00:21:57,580 And the middle side is the attacker side, 372 00:21:58,400 --> 00:22:01,200 and executing the exploit code by setting target IP. 373 00:22:01,520 --> 00:22:06,040 The target IP is a web service of the hub device, 374 00:22:06,720 --> 00:22:09,200 and we can get a remote shell. 375 00:22:10,280 --> 00:22:13,220 For proof of concept, we create a flag file 376 00:22:13,720 --> 00:22:15,040 as contents pwned. 377 00:22:15,760 --> 00:22:20,440 And as you can see, the flag file is created successfully, 378 00:22:21,200 --> 00:22:22,900 and the content is the same. 379 00:22:24,800 --> 00:22:26,740 And also in the UART debugging shell. 380 00:22:28,720 --> 00:22:34,220 So, as you can see, we can execute any commands as we want. 381 00:22:34,460 --> 00:22:38,720 So, we compromised the hub device successfully. 382 00:22:41,420 --> 00:22:44,100 So, now let's look at which attack scenarios 383 00:22:44,100 --> 00:22:48,120 by scenarios are possible with the identified vulnerabilities. 384 00:22:50,960 --> 00:22:54,000 First, it is the scenario that controls the themes. 385 00:22:54,840 --> 00:22:57,280 If an attacker gains control of the hub device, 386 00:22:58,400 --> 00:23:00,800 the IoT devices connected to the hub can be controlled. 387 00:23:01,960 --> 00:23:04,900 Usually, hubs and devices communicate wirelessly 388 00:23:04,900 --> 00:23:07,240 by JetWave, JigBee, and RF, 389 00:23:07,540 --> 00:23:09,580 but there is no authentication between them. 390 00:23:10,420 --> 00:23:13,420 So, we can leverage these points to manipulate 391 00:23:13,980 --> 00:23:16,000 command packets to control devices, 392 00:23:16,600 --> 00:23:18,000 or for status information. 393 00:23:20,320 --> 00:23:22,940 As you can see, the hub device recognizes 394 00:23:22,940 --> 00:23:26,160 the specific byte of the packet as control code. 395 00:23:26,460 --> 00:23:28,380 And based on this, we can control it. 396 00:23:28,380 --> 00:23:30,860 It gives a certain command to the relevant devices. 397 00:23:32,020 --> 00:23:34,980 Also, if the main process is implemented 398 00:23:34,980 --> 00:23:38,240 as Java application, you can see that the payload 399 00:23:38,240 --> 00:23:39,920 is also sent in a specific format. 400 00:23:40,540 --> 00:23:43,320 So, by delivering packets based on this format, 401 00:23:44,020 --> 00:23:45,900 we can control the devices as we want. 402 00:23:47,980 --> 00:23:49,580 So, this is a second demo. 403 00:23:50,200 --> 00:23:51,600 This is a door open sensor. 404 00:23:52,580 --> 00:23:54,860 In this demo, we will show that we can forward 405 00:23:54,860 --> 00:23:58,280 status information of the smart things, and it can 406 00:23:58,380 --> 00:24:00,680 lead to false information on mobile application. 407 00:24:05,260 --> 00:24:09,520 Because the company only service for Korean customers, 408 00:24:09,800 --> 00:24:12,400 so the mobile application supports only Korean. 409 00:24:12,660 --> 00:24:14,180 So, please understand that. 410 00:24:14,340 --> 00:24:15,860 And we have subtitle as English. 411 00:24:17,180 --> 00:24:19,820 So, as you can see, the application tells 412 00:24:19,820 --> 00:24:21,360 the door open sensor is open. 413 00:24:21,840 --> 00:24:25,260 However, if we send the packet that includes 414 00:24:26,660 --> 00:24:28,260 closed information for the sensor, 415 00:24:28,380 --> 00:24:31,020 then you can see that the application status 416 00:24:31,020 --> 00:24:33,440 information is just forced. 417 00:24:33,880 --> 00:24:36,700 But still, the door open sensor is open. 418 00:24:40,360 --> 00:24:44,100 And the next demo, we can disconnect the smart things 419 00:24:44,640 --> 00:24:47,000 by sending this connection packet to the hub device. 420 00:24:51,760 --> 00:24:58,360 So, yeah, as before demo, we can disconnect the device 421 00:25:00,100 --> 00:25:03,060 and we can also control the smart bulbs. 422 00:25:03,320 --> 00:25:06,460 It's the Phillips Hue Bridge and the smart light. 423 00:25:07,020 --> 00:25:08,540 If you compromise the hub device, 424 00:25:08,800 --> 00:25:10,780 you can analyze many command packets 425 00:25:11,420 --> 00:25:15,560 and send counter packet to the connected smart things. 426 00:25:16,500 --> 00:25:20,320 For the proof of concept, we developed a Python script, 427 00:25:22,240 --> 00:25:24,440 yeah, to control the light bulb. 428 00:25:25,860 --> 00:25:28,360 At first, we can turn on the light bulb. 429 00:25:31,600 --> 00:25:36,160 And also, we can adjust the brightness of the light bulb. 430 00:25:38,040 --> 00:25:42,380 So, if you set, oh, sorry, sorry. 431 00:25:46,780 --> 00:25:48,840 If you set the brightness as middle, 432 00:25:49,840 --> 00:25:51,420 the brightness will be dim. 433 00:25:52,020 --> 00:25:53,720 And also, we can turn off the light. 434 00:25:54,640 --> 00:25:56,820 And you can flash the light bulb also. 435 00:25:57,240 --> 00:25:58,300 So, this means. 436 00:25:58,300 --> 00:26:02,820 we can control the device as you want if you compromise the hub device. 437 00:26:04,980 --> 00:26:10,340 Then let's look at the cases of encrypted communication between the server and the hub. 438 00:26:11,060 --> 00:26:17,040 Since the up-to-date devices are communicating with servers as encrypted as SSL or TLS, 439 00:26:17,300 --> 00:26:21,540 there is no useful information to be extracted in the case of man-in-the-middle. 440 00:26:21,540 --> 00:26:28,780 However, one of the devices we have analyzed uses a scheme that the IoT hub itself generates 441 00:26:28,780 --> 00:26:31,800 and stores the encryption key in the device, 442 00:26:32,000 --> 00:26:37,000 which means that the packet can be decrypted if the hub is compromised. 443 00:26:38,400 --> 00:26:45,000 So we analyzed the encryption algorithm and found that it is ACE 128 ECB mode. 444 00:26:45,200 --> 00:26:51,140 This is a symmetric key cipher, so the server and the hub share the same key. 445 00:26:53,040 --> 00:26:57,580 Coincidentally, there was a buffer for vulnerability in the hub device, 446 00:26:57,780 --> 00:27:02,100 which we could take over the system and extract the 16-byte encryption key. 447 00:27:03,740 --> 00:27:07,480 So as you can see, the data area of the packet is encrypted. 448 00:27:08,260 --> 00:27:16,800 For proof of concept, ACE AES-128 ECB mode encryption algorithm was written in C code. 449 00:27:17,560 --> 00:27:21,460 And the corresponding message is decrypted by entering the extracted key, 450 00:27:21,460 --> 00:27:21,760 which is the key values. 451 00:27:22,760 --> 00:27:28,720 This can be used as a scenario for disconnecting a hub device by sending first information 452 00:27:28,720 --> 00:27:29,440 to the server. 453 00:27:30,300 --> 00:27:33,620 So my partner, Chang-Yan, will talk continuously. 454 00:27:36,060 --> 00:27:37,360 Hi, I'm back. 455 00:27:37,840 --> 00:27:40,340 This scenario is the man-in-the-middle. 456 00:27:40,460 --> 00:27:47,240 Some IoT hubs uses TR-069 protocol for provisioning with the server. 457 00:27:47,560 --> 00:27:51,300 When the server and IoT hub communicate, 458 00:27:51,460 --> 00:27:58,360 the HTTP response message is changed and exposing the hub's critical information. 459 00:27:58,720 --> 00:28:03,400 We will show the admin web password in the next demo. 460 00:28:06,960 --> 00:28:08,080 Let's see. 461 00:28:08,220 --> 00:28:09,040 Wait a minute. 462 00:28:12,880 --> 00:28:14,140 Oh, sorry. 463 00:28:18,300 --> 00:28:19,220 Yeah. 464 00:28:19,560 --> 00:28:20,700 Wait a minute. 465 00:28:20,740 --> 00:28:21,440 Okay. 466 00:28:21,460 --> 00:28:29,280 The TR-069 protocol is authenticated via two HTTP requests with the server. 467 00:28:29,480 --> 00:28:33,800 After authentication, change the HTTP response. 468 00:28:34,120 --> 00:28:40,700 This point, yeah, change. 469 00:28:41,080 --> 00:28:48,960 Just as the server asks for information, this hub is disclosed. 470 00:28:48,960 --> 00:29:02,020 The admin web password and the string is more, sorry, this is the web admin password 471 00:29:02,910 --> 00:29:05,280 and we drop the packet. 472 00:29:05,600 --> 00:29:07,860 It's so simple man-in-the-middle demo. 473 00:29:08,980 --> 00:29:16,360 These vulnerabilities may be used in .net because its IoT devices are connected to 474 00:29:16,360 --> 00:29:16,760 internet, 475 00:29:17,040 --> 00:29:18,940 which means that those capabilities may be used in .net because its IoT devices are 476 00:29:18,940 --> 00:29:20,320 connected to internet. 477 00:29:20,460 --> 00:29:24,800 A lot of .net have a code since the Mirai.net case. 478 00:29:25,680 --> 00:29:26,420 Yes. 479 00:29:26,600 --> 00:29:30,380 Let me take a closer look at the IoT .net in detail. 480 00:29:30,680 --> 00:29:33,560 First, IoT .net is increasing. 481 00:29:34,260 --> 00:29:39,440 .net such as Mirai, Hajime, and the Moon continue to be found. 482 00:29:39,720 --> 00:29:43,560 Last year, many IoT malware were discovered. 483 00:29:44,040 --> 00:29:48,920 Second, the IoT attack methods includes .net, .net, and .net. 484 00:29:48,920 --> 00:29:54,640 One day on the admin web, one day on the open source, and misconfiguration like the 485 00:29:54,640 --> 00:30:00,480 same password, default password, and so the attack purpose is evolving. 486 00:30:00,960 --> 00:30:09,900 In the beginning, IoT .net used the DOS, but today used as PDOS, ransomware, and mining 487 00:30:09,900 --> 00:30:10,100 pool. 488 00:30:10,640 --> 00:30:15,900 Finally, many countries are causing damage like the Mirai .net. 489 00:30:16,220 --> 00:30:18,540 So how about the IoT hub? 490 00:30:18,540 --> 00:30:23,860 We found, we searched, we researched through Shodan. 491 00:30:24,470 --> 00:30:31,260 We haven't found much, but 70,000 devices has been exposed. 492 00:30:33,440 --> 00:30:39,820 Also, the vulnerabilities of IoT hub can be used as a mining pool. 493 00:30:40,200 --> 00:30:45,520 There are cases where Bitcoin was mined through OpenWrt firmware. 494 00:30:45,920 --> 00:30:48,420 Of course, you need hardware support. 495 00:30:48,420 --> 00:30:52,380 For mining, it is just one of the many scenario. 496 00:30:54,280 --> 00:30:57,900 Two weeks ago, the article came out. 497 00:30:58,100 --> 00:31:01,040 It was mining through micro-thick devices. 498 00:31:01,640 --> 00:31:09,160 According to this article, there was a mining code on the admin web page of micro-thick 499 00:31:09,160 --> 00:31:09,480 devices. 500 00:31:10,200 --> 00:31:15,860 Like this example, mining pools can damage devices or users. 501 00:31:16,280 --> 00:31:18,400 Maybe the IoT hub. 502 00:31:21,220 --> 00:31:27,080 The final part of our presentation will be IoT security. 503 00:31:28,400 --> 00:31:31,120 How should we secure IoT? 504 00:31:31,460 --> 00:31:35,860 I think, just I think, there are three necessary steps to follow. 505 00:31:36,140 --> 00:31:41,580 Device security, compliance, and detect of anomalies and threats. 506 00:31:43,540 --> 00:31:45,860 The first is device security. 507 00:31:46,340 --> 00:31:47,620 Each device. 508 00:31:47,760 --> 00:31:48,380 This is the first step. 509 00:31:48,400 --> 00:31:48,520 And, it is according to this rule, it is the most important. 510 00:31:48,520 --> 00:31:50,720 For each device, we need each unique password. 511 00:31:51,020 --> 00:31:54,160 Share, admin web and the Wi-Fi password. 512 00:31:55,040 --> 00:31:58,500 Most all, we different each following password rules. 513 00:31:58,920 --> 00:32:03,100 Debugging port like UART, JTAG must be disabled. 514 00:32:03,620 --> 00:32:11,160 For codes developed individually, secure coding is absolutely necessary. 515 00:32:11,560 --> 00:32:17,300 And, if we have an open source it must always be updated too. 516 00:32:17,460 --> 00:32:18,380 It should be. 517 00:32:18,380 --> 00:32:27,460 latest version. We are able to easily carry out our analysis because 3 out of the 4 corporations 518 00:32:27,460 --> 00:32:35,040 had not encrypted in their respective formulas. Then, even if the hacker obtains the formula, 519 00:32:35,520 --> 00:32:45,460 the file system will not easily be obtained. Second, about compliance, IoT security guideline 520 00:32:45,460 --> 00:32:51,540 made by international organizations must be followed. It is good to keep this guideline 521 00:32:51,800 --> 00:33:01,000 as a reference because they explain the security of the IoT ecosystem. A good guideline to 522 00:33:01,000 --> 00:33:11,460 follow is NIST, I-R-A-2-O-O, made by NIST. But we should not stop here. The guidelines 523 00:33:11,820 --> 00:33:13,000 are minimal. 524 00:33:13,360 --> 00:33:14,440 And security 525 00:33:14,440 --> 00:33:25,460 must constantly be maintained. Third, one must be ready to deal with anomalies and threat 526 00:33:25,460 --> 00:33:33,500 detection. To detect anomalies and threats, one must do the following data collection, 527 00:33:33,740 --> 00:33:42,800 intelligence analysis, automated response and visualization. So is conclusion of our 528 00:33:42,800 --> 00:33:43,620 target – 529 00:33:43,620 --> 00:33:44,120 U- 530 00:33:44,120 --> 00:33:44,260 R- 531 00:33:44,260 --> 00:33:44,420 S- 532 00:33:44,420 --> 00:34:03,760 Our talk, sorry, our talk, to wrap up our presentation, we found many different threats at the IoT hub and smart home services increasing due to technology like the voice recognition, AI, and machine learning. 533 00:34:04,280 --> 00:34:11,100 Furthermore, the IoT hub is evolving to the forms of AI speakers and WordPath. 534 00:34:11,440 --> 00:34:13,460 This is good news for us. 535 00:34:13,460 --> 00:34:18,460 We have plenty of research to do in the IoT security. 536 00:34:19,570 --> 00:34:25,620 We will threaten more findings and research about security in the future. 537 00:34:27,660 --> 00:34:34,420 Here are the references, and special thanks to Anastra, Sengi, Mongi, and Moonbum Park. 538 00:34:36,600 --> 00:34:39,980 Thank you for listening to our presentation. 539 00:34:40,400 --> 00:34:43,380 If you have any questions, we are happy. 540 00:34:43,460 --> 00:34:43,940 We are happy to take them. 541 00:34:44,100 --> 00:34:48,700 When you come to us, please, we are always open. 542 00:34:48,880 --> 00:34:49,640 Thank you. 543 00:34:50,700 --> 00:34:51,780 Thank you. 544 00:34:51,780 --> 00:34:52,840 Thank you.