1 00:00:00,000 --> 00:00:08,060 Imagine you have a gun and your home modem loaded and facing global security. 2 00:00:08,060 --> 00:00:10,540 Gateways to chaos, Stephen Miu. 3 00:00:10,540 --> 00:00:12,040 Give him a big hand, everybody. 4 00:00:17,340 --> 00:00:19,480 Hello, everyone. 5 00:00:19,580 --> 00:00:22,480 I'm very excited to share this topic with you today. 6 00:00:22,480 --> 00:00:23,860 Gateway to chaos. 7 00:00:23,860 --> 00:00:29,080 How we prove that the modems are the ticking time bomb that hacker chaos is everywhere. 8 00:00:29,080 --> 00:00:34,620 In this talk, we will share about many real-world vulnerability and cases. 9 00:00:34,760 --> 00:00:38,280 This weakness could be happening in your own home. 10 00:00:39,600 --> 00:00:41,820 Let me quickly introduce myself. 11 00:00:41,820 --> 00:00:45,480 My name is You Zhao-Lin, but you can call me Stephen Miu. 12 00:00:45,480 --> 00:00:51,180 I'm currently as a senior researcher at Trend Micro Rating in Taiwan. 13 00:00:51,180 --> 00:00:55,840 I have several certifications, including OSC-3. 14 00:00:55,840 --> 00:01:03,080 I have also received several CVE from a big company like the VMware and D-Link and Zycel. 15 00:01:03,120 --> 00:01:11,000 I have given talk at event like the B-Side Tokyo, Hikon Bunty House and the CyberSec conference in Taiwan. 16 00:01:11,040 --> 00:01:14,080 This year I'm also the Hikon training speaker. 17 00:01:14,340 --> 00:01:17,420 At this DEF CON, in fact, I have three talks. 18 00:01:17,420 --> 00:01:24,220 One is this one in the main stage and the other are the car hacking village and the IOT village. 19 00:01:24,500 --> 00:01:29,760 Okay, so what do we find during the research? 20 00:01:30,020 --> 00:01:33,600 Yes, we report several CVE in this research. 21 00:01:33,600 --> 00:01:39,960 And more CVE and even more CVE still in the reporting process. 22 00:01:40,080 --> 00:01:45,980 Okay, last year we found some critical vulnerability in D-Link devices. 23 00:01:45,980 --> 00:01:53,020 Sadly, D-Link say these are end of life device and they will not patch or fix the issue. 24 00:01:53,900 --> 00:02:00,960 Also, in Taiwan, modem or the residential gateway are provided by ISP. 25 00:02:00,960 --> 00:02:04,100 User cannot change them by ourselves. 26 00:02:04,660 --> 00:02:10,520 At that time, there were about 60,000 of this device in the world. 27 00:02:10,520 --> 00:02:17,020 The vendor refused to patch and the ISP refused to replace that with the new one. 28 00:02:18,360 --> 00:02:20,640 Here's the something interesting. 29 00:02:20,900 --> 00:02:29,580 Even though we know the device is vulnerable, both the ISP and the vendor refuse to fix or replace it. 30 00:02:29,580 --> 00:02:36,360 Oh, you might think, maybe we can just disable some vulnerable service from the setting page, right? 31 00:02:36,360 --> 00:02:40,480 But sadly, the control panel doesn't actually work. 32 00:02:40,480 --> 00:02:45,700 Even if we disable the service from the console, they are still available. 33 00:02:45,740 --> 00:02:48,540 The control panel is pretty much useless. 34 00:02:49,600 --> 00:02:54,320 Okay, also we found some hardcore password in the device. 35 00:02:54,320 --> 00:02:58,380 This device is widely used by ISP in the United States. 36 00:02:58,380 --> 00:03:01,300 For example, the Mark Twain communications. 37 00:03:01,980 --> 00:03:09,360 We also found a critical vulnerability that can let attacker control the device all over the world. 38 00:03:09,360 --> 00:03:14,320 For example, in Europe, Asia and the U.S. 39 00:03:14,900 --> 00:03:18,720 Okay, here is our agenda today. 40 00:03:18,720 --> 00:03:25,380 First, I will introduce the agenda and the six different methods about the devices. 41 00:03:26,200 --> 00:03:35,140 Our first story is about changing several vulnerabilities together to achieve the remote code execution about 60,000 devices. 42 00:03:35,360 --> 00:03:39,960 The second story starts from a free Wi-Fi network on a bus. 43 00:03:40,080 --> 00:03:52,860 We would find a vulnerability there and discover the same bug could be used on even a water company in the United States and many large ISP worldwide. 44 00:03:53,180 --> 00:04:00,520 We even found a backdoor in this product, which means attacker can use it to control the device around the world. 45 00:04:01,440 --> 00:04:04,040 The third story is about Zycel. 46 00:04:04,040 --> 00:04:09,040 Even though there are many problems with Zycel and CNA, they still not handle the problem well. 47 00:04:09,220 --> 00:04:14,060 Next, I will introduce a modern security scanner we developed. 48 00:04:14,060 --> 00:04:18,400 This tool can detect all the vulnerability we share with you today. 49 00:04:18,500 --> 00:04:23,680 And finally, I will share a summary conclusion and the main takeaways. 50 00:04:24,240 --> 00:04:26,520 Okay, let's get started. 51 00:04:27,700 --> 00:04:32,060 Generally, how do we connect a device to the internet? 52 00:04:32,060 --> 00:04:35,800 First, our laptop connect to a wireless router. 53 00:04:35,800 --> 00:04:42,940 Then the router connect to a modem with maybe PPPoE and finally connect to the internet. 54 00:04:43,460 --> 00:04:47,060 So, how do we prevent the cyber threat? 55 00:04:47,200 --> 00:04:53,760 Most of time, we install the anti-virus or maybe some EDR to stop the virus, right? 56 00:04:53,760 --> 00:04:58,400 But almost no one care about the modem or the router. 57 00:04:58,540 --> 00:05:02,700 Usually, the router and the modem are the embedded system. 58 00:05:02,700 --> 00:05:06,720 It's hard to install the anti-virus software on them. 59 00:05:07,300 --> 00:05:12,680 So, besides home environment, what about the critical infrastructure? 60 00:05:12,680 --> 00:05:20,220 Things like the water planet, the smart city, and even the rocket system usually connect the internet through a router. 61 00:05:20,580 --> 00:05:26,100 The router is placed behind the firewall, then connect to a modem. 62 00:05:26,100 --> 00:05:28,840 And finally, to the internet. 63 00:05:29,960 --> 00:05:36,600 So, we can say that the every device behind the firewall is relative secure. 64 00:05:36,600 --> 00:05:41,320 But any device in front of the firewall is at risk. 65 00:05:41,920 --> 00:05:46,160 Just like this, we secure all the device that we can control. 66 00:05:46,160 --> 00:05:50,380 We can use all kind of security method inside the intranet. 67 00:05:50,380 --> 00:05:56,420 But for the gateway or the modem, it's much harder to install these protections. 68 00:05:57,400 --> 00:05:59,500 So, what is a modem? 69 00:05:59,500 --> 00:06:03,840 A modem is like a bridge that connect you to the internet. 70 00:06:03,840 --> 00:06:11,840 There are many types like the cable, fiber, phone line, and even 4G LTE or 5G secure network. 71 00:06:12,020 --> 00:06:14,420 Modem are used in many place. 72 00:06:14,420 --> 00:06:18,860 At home, at business, and in the critical infrastructure. 73 00:06:19,000 --> 00:06:23,640 Basically, if you need to use the internet, you need a modem. 74 00:06:23,900 --> 00:06:32,960 During our research and the threat intelligence work, we found that many critical infrastructure are using the vulnerable devices. 75 00:06:33,300 --> 00:06:38,140 Hacker can directly break into their intranet and control these devices. 76 00:06:38,400 --> 00:06:42,740 For example, we saw this in a water planet in the U.S. 77 00:06:42,740 --> 00:06:48,080 and some smart grid, oil and gas system, and even the ATM network. 78 00:06:48,420 --> 00:06:54,680 We also found that some vehicle management system and using this kind of devices. 79 00:06:55,420 --> 00:07:04,700 If you want to know more about vehicle, I have another talk at the car hacking village just next 30 minutes after this talk. 80 00:07:04,700 --> 00:07:12,180 We have even found some government, military, and police system using these vulnerable devices. 81 00:07:13,200 --> 00:07:22,520 In February this year in Taiwan, a home modem was used by a scam group to commit fraud worth about 60,000 U.S. 82 00:07:22,520 --> 00:07:23,580 dollar. 83 00:07:23,620 --> 00:07:29,520 This incident forced the ISP to replace the old modem with the latest one. 84 00:07:30,200 --> 00:07:33,640 So, we are just an ordinary people. 85 00:07:33,640 --> 00:07:37,500 Why do we the threat actor want to hack to our devices? 86 00:07:37,800 --> 00:07:43,200 It's because of the underground business called the residential proxy. 87 00:07:43,300 --> 00:07:52,180 For example, when we use the credit card to shop online, sometimes we will receive a verification OTP code, right? 88 00:07:52,180 --> 00:07:57,600 But sometimes we don't receive just to swap the card and it's okay. 89 00:07:57,760 --> 00:08:04,220 It's because the 3D secure verification system check for the abnormal user behavior. 90 00:08:04,340 --> 00:08:13,880 For example, if a user always shop online from New York, but suddenly the IP is from Las Vegas, it might trigger an alert. 91 00:08:14,080 --> 00:08:22,080 Hacker want to get more different IP address from the different place to bypass the 3D secure check. 92 00:08:22,080 --> 00:08:24,340 It called a residential proxy. 93 00:08:25,160 --> 00:08:32,040 Many ISP in different country force user to use modem and router that ISP provided. 94 00:08:32,160 --> 00:08:35,020 User cannot use their own devices. 95 00:08:35,080 --> 00:08:40,580 This is done to reduce the support cost and for the ISP business model. 96 00:08:40,580 --> 00:08:45,680 They also say, maybe it's for the security reason, but they don't maintain it. 97 00:08:45,680 --> 00:08:47,200 It's ridiculous. 98 00:08:47,560 --> 00:08:56,740 Recently, Europe has start to promote the router freedom, which means user can bring their own device to connect to the ISP network. 99 00:08:57,140 --> 00:09:02,060 Okay, let's share some more technical detail for our first case. 100 00:09:02,780 --> 00:09:09,060 Last year, I moved to a new house and asked my ISP to install the internet service. 101 00:09:09,060 --> 00:09:15,340 And as a hacker, I always test all my device for the security before I using them. 102 00:09:15,380 --> 00:09:26,140 So, I test my modem provided by the ISP and discover more than 10 different vulnerable service in these devices. 103 00:09:26,480 --> 00:09:33,500 I believe it's a textbook level example for even an IOT penetration for a beginner. 104 00:09:33,640 --> 00:09:42,220 Okay, so when we get an IOT devices, the first step is to evaluate a possible attack path. 105 00:09:42,540 --> 00:09:48,840 For example, we can check the network access for both the WAN and the LAN side. 106 00:09:49,140 --> 00:09:52,000 We can also analyze the Wi-Fi signal. 107 00:09:52,000 --> 00:09:56,980 And we can try a physical intrusion by disassembling the casing. 108 00:09:56,980 --> 00:10:02,880 Okay, so here is a web logging page for our target devices. 109 00:10:03,320 --> 00:10:06,280 So first, what would you want to do? 110 00:10:06,600 --> 00:10:07,920 Admin, admin? 111 00:10:08,200 --> 00:10:10,360 No, it doesn't work. 112 00:10:10,360 --> 00:10:13,840 But we define some clue in the documentation. 113 00:10:14,240 --> 00:10:20,340 After analyzing the devices, we found a several predictable credential on it. 114 00:10:20,340 --> 00:10:26,160 Also, there is a WAN side password that is not shown in the user interface. 115 00:10:26,160 --> 00:10:31,140 This is an ISP defined it better for the maintenance purpose. 116 00:10:32,680 --> 00:10:41,600 And interesting is that the password for both the Wi-Fi and the web console is created using the device MAC address. 117 00:10:41,760 --> 00:10:51,560 As we all know, we can get a MAC address from the Wi-Fi BSSID or connecting to the WAN LAN and checking the ARP packet, right? 118 00:10:51,940 --> 00:10:58,800 Also, we can access the physical device and maybe we can see the MAC address just on its label. 119 00:10:59,220 --> 00:11:07,460 Finally, if we can find a way to bypass the web authentication, we might also be able to retrieve the MAC address. 120 00:11:07,580 --> 00:11:10,160 Yes, we actually found a way to do this. 121 00:11:10,160 --> 00:11:12,660 And I will share more detail later. 122 00:11:14,380 --> 00:11:18,320 Also, we found some strange default setting . 123 00:11:18,320 --> 00:11:24,520 SSH and telnet are enabled from the WAN side and disabled from the LAN side. 124 00:11:24,520 --> 00:11:25,260 Why? 125 00:11:25,260 --> 00:11:27,320 Okay , is this reasonable? 126 00:11:27,580 --> 00:11:29,460 I don't think so. 127 00:11:29,580 --> 00:11:32,140 Maybe it's for the maintenance purpose. 128 00:11:32,340 --> 00:11:36,640 The web portal is also provide a remote access control wireless. 129 00:11:36,680 --> 00:11:42,960 This probably means to let only the certain ISP network segment to access the service. 130 00:11:42,960 --> 00:11:47,720 But sadly, as I mentioned before, this feature is broken. 131 00:11:47,720 --> 00:11:51,960 Any user from the WAN side can access the, all the WAN service. 132 00:11:54,020 --> 00:11:55,300 Okay. 133 00:11:56,020 --> 00:11:57,760 And, sorry. 134 00:11:58,320 --> 00:12:02,080 There is a low privilege user account in the devices. 135 00:12:02,080 --> 00:12:05,620 The user name and the password is both user. 136 00:12:05,760 --> 00:12:13,080 This low privilege account can only change the Wi-Fi SSID, Wi-Fi password and their own password. 137 00:12:13,320 --> 00:12:16,900 The high privilege account is not for the normal user. 138 00:12:17,120 --> 00:12:22,500 It is only for the ISP engineer to set up the advanced function. 139 00:12:22,760 --> 00:12:31,460 When we change the low privilege user's password from the web console, we can see the request shown on before, above. 140 00:12:31,460 --> 00:12:35,280 In this example, we set the user 2 name to user. 141 00:12:35,280 --> 00:12:38,260 And the user 2's password to user. 142 00:12:38,260 --> 00:12:39,060 Okay. 143 00:12:39,780 --> 00:12:43,140 Yes, we can use the Burp suite to change the request. 144 00:12:43,140 --> 00:12:45,580 The low privilege user's ID is 2. 145 00:12:45,580 --> 00:12:47,700 We can change the ID to 1. 146 00:12:47,700 --> 00:12:52,860 And then use the low privilege station to change the high privilege user's password. 147 00:12:52,860 --> 00:12:56,380 In this way, you can achieve the privilege escalation. 148 00:12:57,600 --> 00:12:58,720 Okay. 149 00:12:59,260 --> 00:13:04,280 Next, we can check the SSH and the telnet service. 150 00:13:04,400 --> 00:13:12,580 Since we used the default low privilege account to get the high privilege password, now we can log in with the high privilege user. 151 00:13:13,140 --> 00:13:15,660 Yes, we found something interesting. 152 00:13:16,280 --> 00:13:22,500 The interesting function are things like the ping test, trace route test and other testing tool. 153 00:13:22,800 --> 00:13:28,940 You guess that this feature are implemented using some simple string concatenation. 154 00:13:29,020 --> 00:13:32,620 This make them vulnerable to the command ingestion. 155 00:13:32,620 --> 00:13:33,280 Yeah. 156 00:13:33,500 --> 00:13:37,700 Yes, all of this function have the command ingestion vulnerability. 157 00:13:37,760 --> 00:13:41,000 And then we receive 5 different CVE for that. 158 00:13:41,000 --> 00:13:43,160 Yeah, very very easy, right? 159 00:13:43,880 --> 00:13:50,200 After getting the remote code execution, we can bring our own tool to extract the firmware. 160 00:13:50,240 --> 00:13:57,040 For example, we can use the like busy box, netcast or the TCP dump to do more analysis. 161 00:13:57,140 --> 00:14:01,660 We can also check the partition and dump data from the device. 162 00:14:02,160 --> 00:14:09,140 For the password issue, we also found that the plain text chip secret store in the devices. 163 00:14:09,740 --> 00:14:15,280 We can write a simple deep code function to get any password or secret from the devices. 164 00:14:16,400 --> 00:14:21,340 After dumping the firmware from the device, we can do more reverse engineering. 165 00:14:21,340 --> 00:14:27,360 For example, we found several XGI paths in the THTTP binary. 166 00:14:28,000 --> 00:14:32,400 One interesting path is config dot XGI. 167 00:14:32,460 --> 00:14:36,000 This path does not require any authentication. 168 00:14:36,400 --> 00:14:41,920 Any user can use the config dot XGI to dump the device configuration. 169 00:14:42,000 --> 00:14:45,420 For example, we can get a MAC address from the device. 170 00:14:45,420 --> 00:14:50,380 And as we all know, the admin password is made from the MAC address. 171 00:14:50,380 --> 00:14:53,740 And one of the hard code password cannot be changed. 172 00:14:53,880 --> 00:14:58,280 So, we can use this function to get a root credential. 173 00:14:59,580 --> 00:15:05,180 We also found another path called DELT file dot XGI. 174 00:15:05,640 --> 00:15:12,800 This XGI path take a perimeter and is vulnerable to the path reversal. 175 00:15:12,860 --> 00:15:17,440 With the path reversal, we can read a system configuration file. 176 00:15:17,440 --> 00:15:27,320 For example, by using the path slash S Y S class net E T H zero address, this path, we can get a MAC address. 177 00:15:27,320 --> 00:15:27,740 Yeah. 178 00:15:27,740 --> 00:15:33,280 Once we have the MAC address, we can calculate the root password again. 179 00:15:34,000 --> 00:15:36,960 Okay, next is the interesting part. 180 00:15:36,960 --> 00:15:51,300 For the previous password change vulnerability, the key point is to changing the set S Y S user password perimeter from the MT underscore the admin dot XGI path. 181 00:15:51,300 --> 00:16:00,960 And for the previous authentication bypass, we all know that the DELT file dot XGI does not need any authentication. 182 00:16:01,780 --> 00:16:10,680 What if we change the perimeter set S Y S user password within the DELT file dot XGI? 183 00:16:10,680 --> 00:16:13,980 After testing, the answer is yes. 184 00:16:13,980 --> 00:16:22,980 We can use the DELT file function to send the change password perimeter and change the root password without any authentication. 185 00:16:24,020 --> 00:16:28,920 Okay, let's go back to the change password API. 186 00:16:29,020 --> 00:16:35,060 Now that we have the firmware, we can do reverse engineering and review the some code. 187 00:16:35,060 --> 00:16:43,500 To understand all the perimeter, for example, this does uh, EXE equal to CHT log. 188 00:16:43,500 --> 00:16:45,120 What is it mean? 189 00:16:45,780 --> 00:16:53,920 After checking, the EXE perimeter will eventually be passed to a EXE shell function. 190 00:16:54,780 --> 00:17:03,260 And about CHT log, CHT stand for uh, Chung Hua Telecom, which is uh, ISP in Taiwan. 191 00:17:03,260 --> 00:17:07,320 CHT log is an executable script. 192 00:17:08,000 --> 00:17:14,540 Yes, we can also find another communication remote execution in the web portal again. 193 00:17:14,540 --> 00:17:15,480 Okay. 194 00:17:15,480 --> 00:17:19,660 We also found another interesting vulnerability. 195 00:17:19,660 --> 00:17:22,500 Insecure user station handling. 196 00:17:22,860 --> 00:17:29,240 If one user is logging, another person can just access the device without any authentication. 197 00:17:29,660 --> 00:17:31,500 I believe it's ridiculous. 198 00:17:31,500 --> 00:17:37,240 The station is stored on the server and no any user cookie is needed in these devices. 199 00:17:38,060 --> 00:17:41,160 Here's a summary of the attack path. 200 00:17:41,160 --> 00:17:48,000 Once we get a web access, we can use the authentication bypass to retrieve the password. 201 00:17:48,120 --> 00:17:52,260 And even change the root password and log in to the console. 202 00:17:52,700 --> 00:18:04,500 After logging, both the web portal and the SSH or telnet console is vulnerable to the communication so we can do the remote execution on it. 203 00:18:04,500 --> 00:18:09,300 It's very easy to combine this vulnerability into a full attack chain. 204 00:18:09,920 --> 00:18:14,740 About this case report, it's very, very interesting. 205 00:18:14,820 --> 00:18:28,480 When we report this vulnerability to the Taiwan server, the TW server CC, we also mention that this is very, very, very critical because we found many vulnerable device in the Taiwan government networks. 206 00:18:28,960 --> 00:18:38,580 But the TW server CC replied that, oh this device is end of support so the vendor will not provide any help for this case. 207 00:18:38,580 --> 00:18:42,020 This report will be disclosed early. 208 00:18:42,120 --> 00:18:46,360 They did not work with the Taiwan government to handle the issue. 209 00:18:46,360 --> 00:18:54,800 Also the Taiwan ISP like the Chunghwa Telecom was not willing to replace the vulnerable devices for it. 210 00:18:55,300 --> 00:19:03,740 And in November last year, D-Link market value dropped by the 30 million USD in just one day because of this case. 211 00:19:03,760 --> 00:19:08,740 Yeah, maybe I should consider shutting the stock before reporting the vulnerability. 212 00:19:10,060 --> 00:19:14,320 Online news like the briefing computer report on this case. 213 00:19:14,320 --> 00:19:15,200 Okay. 214 00:19:15,560 --> 00:19:23,180 Three months later, we discover another modem model called DSL7740C. 215 00:19:23,180 --> 00:19:29,560 It's very similar to the previous mention, DSL6740C. 216 00:19:29,560 --> 00:19:32,900 And all the vulnerability are identical. 217 00:19:32,900 --> 00:19:40,740 It's very disappointing that the vendor does not disclose this existing of the twin model. 218 00:19:41,500 --> 00:19:50,540 By using the O-Sync tool, we found about 60,000 vulnerable device online when the vulnerability were disclosed. 219 00:19:50,980 --> 00:19:59,440 And by July this year, about eight months later, there are still more than 20,000 vulnerable device in the world. 220 00:19:59,440 --> 00:20:03,080 Maybe today still there are 20,000 vulnerable devices. 221 00:20:03,080 --> 00:20:06,080 You can just use the payload and I'll see that. 222 00:20:06,660 --> 00:20:11,120 Okay, here's a quick summary of the issue. 223 00:20:11,120 --> 00:20:15,420 First, the device should not use the predictable password. 224 00:20:15,420 --> 00:20:18,220 The mask address is not a secret, right? 225 00:20:18,220 --> 00:20:26,180 For the privilege management, low privilege users should not be able to access the high privilege function. 226 00:20:26,180 --> 00:20:30,900 Also, the default setting on the website are not secure. 227 00:20:31,420 --> 00:20:38,560 For the management level, it is also a problem that the vendor is not willing to fix the vulnerability. 228 00:20:39,000 --> 00:20:42,180 They did not disclose the related device model. 229 00:20:42,180 --> 00:20:49,540 As a researcher, we do not have enough visibility to find and buy all the device to check the issue. 230 00:20:49,600 --> 00:20:53,320 ISP also have the responsibility for that. 231 00:20:53,320 --> 00:20:58,580 ISP refusing to replace a vulnerable device is a big problem. 232 00:20:58,580 --> 00:21:04,080 They provide the device but they do not have responsible for maintaining that. 233 00:21:04,080 --> 00:21:05,160 Okay. 234 00:21:06,340 --> 00:21:08,480 Just drink of water. 235 00:21:10,000 --> 00:21:10,000 Okay. 236 00:21:10,000 --> 00:21:10,020 So, this is the first case . 237 00:21:10,200 --> 00:21:14,660 Next, let me to introduce our second case. 238 00:21:14,660 --> 00:21:18,860 This story is also quite expected. 239 00:21:18,880 --> 00:21:25,080 We start from a single bus and end up to reaching the entire transportation company. 240 00:21:25,580 --> 00:21:28,100 Here's how the story goes. 241 00:21:28,160 --> 00:21:32,720 One time I was taking a bus and connected to its free wifi. 242 00:21:32,720 --> 00:21:38,820 It just happened to be during the priority when I was researching the modem. 243 00:21:38,820 --> 00:21:44,420 So, I start to look into how the bus wifi system is designed. 244 00:21:45,000 --> 00:21:52,100 First, when we connect to a device, I always check the port which are open. 245 00:21:52,100 --> 00:21:57,260 What really caught my eyes in this time was the two strange port. 246 00:21:57,260 --> 00:22:00,260 Especially in the port 5555. 247 00:22:01,300 --> 00:22:09,260 Looking closer at the port 5555, it seems to be a running UPNP service. 248 00:22:09,680 --> 00:22:11,020 That's right. 249 00:22:11,020 --> 00:22:15,100 This device has a UPNP service enabled by default. 250 00:22:15,100 --> 00:22:27,320 Without any authentication, we can use UPNP to change device SSID, reboot the device or even restore it to the factory setting by sending the UPNP packet. 251 00:22:27,480 --> 00:22:38,100 For example, we could simply ask chat GPT to write a POC code that use the UPNP to change the device wifi SSID. 252 00:22:38,100 --> 00:22:38,940 Yeah. 253 00:22:39,240 --> 00:22:45,760 After checking out the UPNP port, let's take a look at the port 80. 254 00:22:45,840 --> 00:22:51,660 Actually, port 80 require a user name and password for the authentication. 255 00:22:52,140 --> 00:23:00,880 But if we take a closer look at the server header, we can see that it's running a BOA server. 256 00:23:01,420 --> 00:23:06,220 So we try to searching any pass vulnerability in BOA. 257 00:23:06,220 --> 00:23:12,920 We found that in 2022, that was a authentication bypass vulnerability in BOA. 258 00:23:12,980 --> 00:23:14,860 Okay, let me try it. 259 00:23:15,320 --> 00:23:20,580 We decide to give it a try by sending just a HAT request with a curl. 260 00:23:20,580 --> 00:23:24,020 We were able to bypass the authentication restriction. 261 00:23:24,020 --> 00:23:26,620 Yeah, just it's simple. 262 00:23:27,080 --> 00:23:34,500 After the OS bypass, the next step was to look the interesting thing on the setting page. 263 00:23:34,660 --> 00:23:37,980 The change password feature caught my attention. 264 00:23:38,360 --> 00:23:43,740 We remove the type equal to password attribute from the HTML tag. 265 00:23:43,760 --> 00:23:49,100 And sure enough, we were able to directly see and get the password from the devices. 266 00:23:49,280 --> 00:23:51,700 Yes, we are F12 hacker. 267 00:23:52,380 --> 00:23:59,080 If you know how to use the F12, the device per tool, you can easily to get a user's password. 268 00:23:59,180 --> 00:24:00,140 Okay. 269 00:24:00,640 --> 00:24:07,040 We can also combine the authentication bypass and the password retrieval step. 270 00:24:07,080 --> 00:24:10,820 In this way, we can get a device password in one go. 271 00:24:10,820 --> 00:24:14,160 And then log into the system normally. 272 00:24:14,160 --> 00:24:14,900 Yeah. 273 00:24:15,900 --> 00:24:19,780 Yes, that's how we successfully get into the system. 274 00:24:20,500 --> 00:24:25,400 Of course, the SSH is also enabled in this device. 275 00:24:25,400 --> 00:24:29,400 We could use the SSH to access the device console. 276 00:24:30,080 --> 00:24:33,580 And next, SSH console has a ping function. 277 00:24:33,580 --> 00:24:35,400 And yes, you get it. 278 00:24:35,400 --> 00:24:40,060 We found another, another communication vulnerability in the ping function. 279 00:24:40,840 --> 00:24:49,000 After getting a reverse shell, we notice something strange in the ETC password file. 280 00:24:49,000 --> 00:24:51,960 There was a user called Xin Dian. 281 00:24:52,460 --> 00:24:54,800 So what is Xin Dian? 282 00:24:54,800 --> 00:25:01,280 Xin Dian is a place in Taiwan which is also the vendor's headquarter are located. 283 00:25:01,440 --> 00:25:07,680 There's a strange to see a hidden account in the user name after this place. 284 00:25:08,460 --> 00:25:14,820 Unfortunately, we could not brute force the password using the word list like the Roku. 285 00:25:14,820 --> 00:25:18,440 So we try to find some code in the firmware instead. 286 00:25:18,800 --> 00:25:24,680 After analyzing the firmware, we actually found the plain text password for this account. 287 00:25:24,680 --> 00:25:29,920 Just use several if and the equal equal to concatenate that. 288 00:25:30,780 --> 00:25:37,180 Yes, we are able to use this password to SSH into the system. 289 00:25:37,180 --> 00:25:42,180 Within this account, we got the direct access to the shell. 290 00:25:42,180 --> 00:25:45,560 Not just a limited configuration console. 291 00:25:46,600 --> 00:25:52,520 After entering the system, we start to do further testing and research inside. 292 00:25:53,360 --> 00:25:59,680 We found an interesting process called the MQTT sub running in the system. 293 00:25:59,680 --> 00:26:09,000 It will start from the command line with the certificate, IP address, and the credential all shown directly in the command. 294 00:26:09,680 --> 00:26:16,300 The CA related file are also stored directly in the system's temp folder. 295 00:26:17,520 --> 00:26:23,760 Next, we try to connect to the system using like the MQTT client. 296 00:26:24,280 --> 00:26:31,500 We found that we could subscribe all topic and see the status report from the device all over the world. 297 00:26:31,500 --> 00:26:37,180 It look like this MQTT feature also has the remote command execution capability. 298 00:26:37,180 --> 00:26:41,480 So we can control the device all over the world just by the MQTT. 299 00:26:42,340 --> 00:26:47,660 Also, some of these device even have the GPS tracking feature. 300 00:26:47,760 --> 00:26:54,360 By checking one of the GPS location, we were able to find a bus company's parking lot. 301 00:26:55,000 --> 00:26:58,800 Next, we analyze the data even further. 302 00:26:58,800 --> 00:27:03,400 We had found that the wind side and the land side open the same port. 303 00:27:03,400 --> 00:27:06,640 All the device can apply from the both side. 304 00:27:06,900 --> 00:27:12,720 We discovered that many important critical infrastructure were using this system. 305 00:27:12,860 --> 00:27:16,240 Including the water panel in United States. 306 00:27:16,240 --> 00:27:24,980 Even more surprising, we found that the most of this router installed by ISP were still using the default password. 307 00:27:25,400 --> 00:27:32,980 This mean we could access this device either through the MQTT or by using the hard-coded password. 308 00:27:34,280 --> 00:27:40,060 We could also see the related impact list on the product's official website. 309 00:27:40,060 --> 00:27:47,580 For example, the SCADA and this also include a virus component of the smart city system. 310 00:27:47,580 --> 00:27:54,600 It also include a power transmission line and even more communication inside the operating room. 311 00:27:54,740 --> 00:27:57,680 And also virus the ATM systems. 312 00:27:58,340 --> 00:28:00,980 Finally, there were the energy sector. 313 00:28:00,980 --> 00:28:04,140 For example, the oil and the gas industry. 314 00:28:04,140 --> 00:28:10,260 Many factory automation device use this device as their router. 315 00:28:10,800 --> 00:28:14,080 Okay, let's quick sum up this case. 316 00:28:14,080 --> 00:28:20,460 We can abuse the UPNP to change device setting without any restriction. 317 00:28:20,480 --> 00:28:28,040 We also use the web authentication bypass to get the plan task password from the device. 318 00:28:28,440 --> 00:28:37,180 After getting the password, we can access the backdoor through the SSH or use the hard-code backdoor password to get a shell. 319 00:28:37,220 --> 00:28:41,880 We can even use the MQTT to control thousands of devices. 320 00:28:42,900 --> 00:28:49,580 As soon as I discover this vulnerability, I report them to the TW cert CC again. 321 00:28:49,580 --> 00:28:53,660 This include the five different CVE number we collected. 322 00:28:54,220 --> 00:29:04,900 After this CVE was published, we saw that the vendor honestly disclosed the other related product and had the same issue. 323 00:29:04,920 --> 00:29:10,740 They also provide a fix for all of that, which is something we should encourage. 324 00:29:11,100 --> 00:29:13,720 But we also found something interesting . 325 00:29:13,800 --> 00:29:19,000 This product is actually passed the Taiwan IOT cyber security certification. 326 00:29:19,360 --> 00:29:23,800 This show us that we cannot fully trust this kind of certification, right? 327 00:29:24,520 --> 00:29:29,540 And after some time, a familiar story happen again. 328 00:29:29,540 --> 00:29:32,940 We found about main company in this case, BDN. 329 00:29:32,940 --> 00:29:37,120 And he has a BEC branch in the United States. 330 00:29:37,120 --> 00:29:39,280 It's a subordinary. 331 00:29:39,280 --> 00:29:44,780 This branch also has a many vulnerable model. 332 00:29:44,800 --> 00:29:49,820 But the vendor does not disclose this model in earlier CVE report. 333 00:29:50,520 --> 00:29:55,700 So we report this related vulnerability to the ZDI again. 334 00:29:55,700 --> 00:29:59,420 But this time, the vendor didn't respond at all. 335 00:29:59,420 --> 00:30:04,660 After waiting four months, this vulnerability were eventually disclosed public. 336 00:30:06,000 --> 00:30:10,360 Let's quick sum up the key point of this case. 337 00:30:10,400 --> 00:30:13,640 First, they are insecure default setting. 338 00:30:13,640 --> 00:30:19,460 For example, the WAN access to the web and the SSH interface by default. 339 00:30:19,460 --> 00:30:24,140 And authentication user being able to use UPNP. 340 00:30:24,200 --> 00:30:30,640 Another serious issue was storing password in plain text and the backdoor password, right? 341 00:30:30,640 --> 00:30:38,100 And this system is also had outdated component, which made authentication bypass possible. 342 00:30:38,400 --> 00:30:41,700 There were hidden backdoor that were not disclosed. 343 00:30:41,700 --> 00:30:45,900 And all device share the same NQTT credential. 344 00:30:45,900 --> 00:30:51,160 Finally, the vendor did not fully disclose all the affected models. 345 00:30:51,500 --> 00:30:56,100 Next, let me to quick share our third case. 346 00:30:56,580 --> 00:31:04,640 Because of the previous case, I start to take the BOA authentication bypass issue even more seriously. 347 00:31:04,800 --> 00:31:11,280 Through the open source intelligence, we found that the Zycell device had this same problem. 348 00:31:11,540 --> 00:31:15,600 We report this to the TWCC right away. 349 00:31:15,600 --> 00:31:23,120 Since the Zycell is NCNA, which means they have their right to issue their own CVE. 350 00:31:23,140 --> 00:31:26,600 So, we forward our finding to the Zycell. 351 00:31:26,840 --> 00:31:32,320 Zycell only replied that, oh, this device is EOL end of life. 352 00:31:32,820 --> 00:31:37,340 Next, we forward this email to information to the MITRE. 353 00:31:37,540 --> 00:31:42,940 MITRE mentioned that sometimes CNA will refuse to provide a CVE like this. 354 00:31:42,940 --> 00:31:49,560 But MITRE can sometimes escalate to case to just remind them about it. 355 00:31:49,680 --> 00:31:50,740 Okay. 356 00:31:50,760 --> 00:31:56,800 And in this then, a month , we successfully receive a CVE number for this case. 357 00:31:56,940 --> 00:32:08,320 This story show us that if CNA does not want to handle the EOL issue, we can just ask MITRE to help and put some pressure on them. 358 00:32:09,400 --> 00:32:13,160 There's a few example and also quite interesting. 359 00:32:13,160 --> 00:32:18,580 They include a product from like the Nokia, Dashan and the Hytron. 360 00:32:18,580 --> 00:32:23,400 This model are still very widely used in the home across Taiwan. 361 00:32:23,940 --> 00:32:32,420 First, we found a Nokia device that allow you to access the system log without any log, logging or the authentication. 362 00:32:32,580 --> 00:32:34,940 The syslog contain the MAC address. 363 00:32:34,940 --> 00:32:38,860 And the default password is just a combination of MAC address. 364 00:32:38,860 --> 00:32:40,700 Just like our first case. 365 00:32:40,700 --> 00:32:44,740 So if we get a MAC address, we can log into the root console. 366 00:32:45,480 --> 00:32:49,180 And what interesting is the Nokia P3's response. 367 00:32:49,180 --> 00:32:53,300 They say, we do not treat this weakness as a vulnerability. 368 00:32:53,300 --> 00:32:59,040 We kindly ask you not to disclose any information about this publicly. 369 00:32:59,040 --> 00:33:04,120 But if it's not a vulnerability, then why shouldn't we share it? 370 00:33:04,120 --> 00:33:06,840 The logic doesn't make sense at all, right? 371 00:33:07,660 --> 00:33:11,840 And the fifth example is from the Dashan. 372 00:33:11,840 --> 00:33:15,220 Their product have the same UPNP problem. 373 00:33:15,220 --> 00:33:19,180 UPNP can be accessed directly from the website. 374 00:33:19,180 --> 00:33:24,600 And there is also an issue where the MAC address can be neglected. 375 00:33:25,560 --> 00:33:32,900 We also report this related case to both the VDI and MITRE. 376 00:33:33,160 --> 00:33:43,880 For the HITRON device, after connecting to the system using like the telnet, we saw a console management for the system setting. 377 00:33:44,180 --> 00:33:47,260 There was also an telnet function inside. 378 00:33:47,260 --> 00:33:54,260 And once again, we were able to find the command injection vulnerability through this feature. 379 00:33:54,680 --> 00:34:01,540 We also report this case to MITRE in the March of this year. 380 00:34:02,100 --> 00:34:09,400 Because of this, we realize there are so many of the overlooked vulnerability out there. 381 00:34:09,640 --> 00:34:13,940 So, I developed a modern vulnerability scanner. 382 00:34:14,000 --> 00:34:19,320 For user who don't need to know anything about the vulnerability or the device model. 383 00:34:19,320 --> 00:34:23,220 They just need to visit the website and click the scan. 384 00:34:23,400 --> 00:34:26,980 The idea behind this tool is actually very simple. 385 00:34:27,020 --> 00:34:36,380 We record the unique characteristic of all the vulnerability and we use the banner grabbing to quickly to find a possible threat. 386 00:34:36,480 --> 00:34:40,080 Now, let's take a quick look about a demo video. 387 00:34:40,080 --> 00:34:44,480 On this page, user just need to click a start scan. 388 00:34:44,480 --> 00:34:47,800 After that, simply wait a few second. 389 00:34:47,840 --> 00:34:56,240 Our system will check then check all the signature against the source IP and then you know if there is any vulnerabilities. 390 00:34:57,840 --> 00:35:02,760 While running this tool, we also found some interesting result. 391 00:35:03,360 --> 00:35:12,840 Some device seems to match the vulnerable feature but they, their server hater shows like the Apache or the Python instead. 392 00:35:12,840 --> 00:35:16,560 It looks like someone is trying to research my research. 393 00:35:17,760 --> 00:35:23,200 Okay, finally let me, let's move on to the conclusion of this talk. 394 00:35:23,860 --> 00:35:29,780 Across more than ten different device model, we found over thirty vulnerability. 395 00:35:29,780 --> 00:35:35,860 This issue cover ADSL, GPON, ONU, and the 4G, 5G router. 396 00:35:35,860 --> 00:35:45,100 Not only the home user but also the business factory or the critical infrastructures are affected. 397 00:35:45,320 --> 00:35:49,220 We discover many pre-auth RCE and the hidden backdoor. 398 00:35:49,220 --> 00:35:55,980 Also, a lot of these product are the end of support but they are still widely used. 399 00:35:56,440 --> 00:36:00,920 Especially for the EOL end of support issue. 400 00:36:00,920 --> 00:36:12,340 We believe vendors should clearly define an EOS timeline instead of sadly marking the device as the end of support just because the vulnerability is reported. 401 00:36:12,580 --> 00:36:18,780 It's common for the user to keep using the EOS devices for a long time. 402 00:36:19,160 --> 00:36:25,700 Vulnerability platform should not refuse to accept the report about the EOS, EOL product. 403 00:36:26,360 --> 00:36:32,760 This talk also show the most IOT vulnerability are inherent problem. 404 00:36:32,860 --> 00:36:36,160 Device often use the same code base. 405 00:36:36,160 --> 00:36:42,880 As a security researcher, we usually cannot fully find out all the affected model. 406 00:36:42,880 --> 00:36:47,720 For this, vendors should take more responsibility for that. 407 00:36:48,380 --> 00:36:58,400 For all that software service, like the BOHS, vendors should keep a complete recall of all the component they use. 408 00:36:58,400 --> 00:37:10,500 For example, they should manage and monitor with the BOA and to monitor with the like the SBOM, for example the software building material. 409 00:37:10,500 --> 00:37:11,360 Okay. 410 00:37:11,560 --> 00:37:16,020 Vendors should also evacuate the attack service of their product. 411 00:37:16,020 --> 00:37:19,820 Especially when it's come to insecure default setting. 412 00:37:20,340 --> 00:37:27,260 Unfortunately, many vendor don't even know the service they are running on their own product. 413 00:37:27,360 --> 00:37:40,400 For example, TP-Links customer service, once they form that, their product doesn't support the telnet service and it's just a channel for the app to communicate. 414 00:37:40,600 --> 00:37:44,840 However, no more user can actually connect to it directly. 415 00:37:44,840 --> 00:37:48,340 This is a really ridiculous example. 416 00:37:48,340 --> 00:37:49,180 Yeah. 417 00:37:49,660 --> 00:37:53,380 Next is the issue of the backdoor. 418 00:37:53,380 --> 00:37:59,780 There is more and more evidence shows that the vendor like to keep the backdoor in their product. 419 00:37:59,780 --> 00:38:02,660 Sometimes it's for the maintenance purpose. 420 00:38:02,660 --> 00:38:08,260 And sometimes it's done on the purpose for the government or the company. 421 00:38:08,360 --> 00:38:11,740 We believe all of this backdoor should be disclosed. 422 00:38:12,060 --> 00:38:18,600 For ISP, we believe it's important to promote the router freedom. 423 00:38:18,960 --> 00:38:23,420 Users should be allowed to change their own devices. 424 00:38:23,480 --> 00:38:31,080 ISP should also closely monitor product and replace them before reach out the end of support. 425 00:38:31,880 --> 00:38:37,940 If there is a security incident, user must to be notified right away. 426 00:38:38,320 --> 00:38:43,560 For user, don't assume that the product from our ISP are always safe. 427 00:38:43,560 --> 00:38:47,760 Don't fully trust the cyber security certification either. 428 00:38:47,880 --> 00:38:56,420 Don't trust of the product from any brand and trade your modem or the router as a tier zero critical device. 429 00:38:56,920 --> 00:39:00,340 Here are some final action item and the takeaway. 430 00:39:00,640 --> 00:39:06,320 Try your best to identify your modem and the IOT device model. 431 00:39:06,320 --> 00:39:13,780 Check if there are already end of life EOL or have any known vulnerabilities. 432 00:39:14,000 --> 00:39:17,180 ISP will not tell you about this issue. 433 00:39:17,180 --> 00:39:22,500 So keep track all of your device and manage them careful. 434 00:39:22,500 --> 00:39:25,120 Don't trust every setting. 435 00:39:25,120 --> 00:39:28,560 Always use the pulse scan to check or confirm. 436 00:39:28,560 --> 00:39:34,380 If possible, closely monitor all the network traffic to detect unknown trade. 437 00:39:34,680 --> 00:39:37,080 Okay, this is all my sharing today. 438 00:39:37,080 --> 00:39:38,320 Thank you everyone. 439 00:39:38,880 --> 00:39:40,860 And let me take a selfie. 440 00:39:40,860 --> 00:39:41,720 Thank you.