1 00:00:00,000 --> 00:00:03,280 Today I will talk about the EV charging points. 2 00:00:03,480 --> 00:00:09,980 Basically I will just explain a specific one that I find in Europe. 3 00:00:10,240 --> 00:00:14,820 So, and basically you can use it everywhere in Europe. 4 00:00:14,820 --> 00:00:17,280 I will also show the map, then you can imagine. 5 00:00:18,140 --> 00:00:20,840 I'm John Kurnas from KPMG Netherlands. 6 00:00:21,060 --> 00:00:28,960 I'm working as a senior consultant and mostly doing penetration tests on web applications, infrastructure and sometimes also IOT and ICS. 7 00:00:35,250 --> 00:00:37,870 Okay, alright. 8 00:00:39,110 --> 00:00:40,450 Great, great. 9 00:00:40,550 --> 00:00:42,390 Okay, this is my contact info. 10 00:00:42,390 --> 00:00:47,970 If you want to ask something or discuss about something on IOT or ICS, please don't hesitate. 11 00:00:48,870 --> 00:00:59,450 For a disclaimer, basically I did this research by myself and my company doesn't involve on that, so if someone wants to sue me, just sue me, not my company. 12 00:01:02,230 --> 00:01:11,630 And I'm a little bit nervous because this is the first presentation, recorded presentation for mine, so that's why I feel a little bit nervous. 13 00:01:12,290 --> 00:01:13,550 Please help me. 14 00:01:13,850 --> 00:01:29,410 So on agenda, we will talk about the introduction of the EV charging points, then I will try to explain the threat that I find, then the consequences we will discuss, then we will go into the details and I will explain more details. 15 00:01:29,510 --> 00:01:36,490 Then I will show you just a small metasploit module that you can make a denial of service of this EV charging point. 16 00:01:36,770 --> 00:01:41,930 This is a basic small module but you can use it. 17 00:01:42,210 --> 00:01:43,950 So let's start. 18 00:01:43,950 --> 00:01:54,770 So this is a 100% Sunsu free InfoSec talk because probably you have a lot of codes from Sunsu on this presentation on these days, so I will just skip that. 19 00:01:55,230 --> 00:02:07,450 For the introduction, so it's a little bit confusing because EV charging points, electric vehicle charging points are in somewhere between IOT and ICS KEDA. 20 00:02:08,410 --> 00:02:19,230 So basically electric vehicle charging point is a device that you can supply electric energy to recharge your electric vehicle. 21 00:02:19,410 --> 00:02:31,150 So basically and nowadays manufacturers are trying to connect these devices to the internet and that makes a little bit trouble for them and also for the clients. 22 00:02:32,370 --> 00:02:49,570 And previous research done for charge point , it's another let's say manufacturer, this research done by Kaspersky lab and for the Schneider EV Link positive technology has done a couple of research on that. 23 00:02:49,610 --> 00:03:04,630 So basically the idea, they are relatively new on the field and they are just building to work so security is not a concern in the beginning but since they are connecting to the internet, now it's a problem . 24 00:03:05,390 --> 00:03:14,190 So based on these previous researches and also mine, we are considering the security maturity is quite major on these devices. 25 00:03:15,330 --> 00:03:22,690 So basically I completed an engagement for these devices last year actually. 26 00:03:22,790 --> 00:03:27,930 When I was writing the report, I just wanted to check if I write the name correctly. 27 00:03:27,930 --> 00:03:34,350 I just googled the name of the device as you can see over there and it showed up on the first page. 28 00:03:36,330 --> 00:03:38,750 Then I said, what? 29 00:03:39,670 --> 00:03:47,610 Yeah, basically I just googled the name of the device and I mean you are not expecting these kind of devices are connected directly to the internet and indexed by the Google, right? 30 00:03:48,490 --> 00:03:51,710 So let's discuss about the threats. 31 00:03:52,330 --> 00:04:08,090 So after that I checked Shodan and I realized with this map, so basically on the beginning of 2018, there were 200 devices connected directly to the internet and indexed by Shodan. 32 00:04:08,290 --> 00:04:19,070 After in the middle of 2018, it come up 300 and as you can see on the map, it's all around the Europe. 33 00:04:19,150 --> 00:04:33,730 So basically if you create a smart map, you can travel around by using these charging points, you can travel around freely because basically you can compromise the device on the internet and you can charge your car and I will also show that later. 34 00:04:34,330 --> 00:04:36,890 So now this is a new one. 35 00:04:37,350 --> 00:04:41,010 They are appearing on the US also now. 36 00:04:41,470 --> 00:04:46,610 Maybe, I don't know, at the end of this year or next year, you can also do it in here. 37 00:04:47,490 --> 00:04:49,430 So the consequences. 38 00:04:49,890 --> 00:04:50,930 So what? 39 00:04:51,290 --> 00:04:56,510 Basically you can compromise a device and you can get root. 40 00:04:57,170 --> 00:05:02,610 So if you want to create your next Mirai by using these devices, you can. 41 00:05:03,690 --> 00:05:05,190 And the details. 42 00:05:06,610 --> 00:05:12,170 So the first vulnerability that I find on this device is authentication bypass with direct request. 43 00:05:12,170 --> 00:05:16,130 So the web applications of these devices mostly are not secure enough. 44 00:05:16,150 --> 00:05:19,350 So it's a quite straightforward vulnerability as you can imagine. 45 00:05:19,410 --> 00:05:21,070 So application was not that good. 46 00:05:21,070 --> 00:05:22,610 It's basically broken. 47 00:05:22,690 --> 00:05:30,450 So the access control was only on the login page and the rest is not that secure. 48 00:05:30,450 --> 00:05:34,230 It wasn't covering by the authentication scheme. 49 00:05:34,270 --> 00:05:36,810 So it can be easily bypassed. 50 00:05:36,810 --> 00:05:42,350 So as you can see in here, there is a login screen over there for the setup.html page. 51 00:05:42,350 --> 00:05:50,510 It's the, let's say the first page that you, when you try to connect to the device after you find the IP, you'll see this. 52 00:05:51,290 --> 00:05:59,150 So, I mean, you can also guess the password of course, but I decided to take a look to the source code of the web application. 53 00:06:00,190 --> 00:06:08,410 And yeah, basically by force browsing, you can go to the other pages of the web application. 54 00:06:08,410 --> 00:06:09,950 I will show you later. 55 00:06:10,190 --> 00:06:14,370 Then you can have access on the other pages. 56 00:06:14,370 --> 00:06:18,650 Basically, it will also affect the management interface of that device. 57 00:06:19,070 --> 00:06:40,850 So when we check the, when we check the source code, we are realizing there are a couple of pages except setup.html, like index.html, and also there's a java file, appletscale.jar, and also a couple of, let's say, informational subpages like repository device ID and logs. 58 00:06:41,150 --> 00:06:47,450 You can also check the logs, but I'm not considering to check that because it's just an information disclosure. 59 00:06:48,670 --> 00:06:58,690 So, I tried to, I tried to connect to the management interface by using, as you can see in here, appletscale client. 60 00:06:58,690 --> 00:07:00,510 It's in index.html. 61 00:07:01,190 --> 00:07:02,990 So, yeah, it was successful. 62 00:07:02,990 --> 00:07:09,770 So, there, there were no authentication for this page specifically. 63 00:07:10,350 --> 00:07:22,490 So, even if the device has some password for the setup.html page, you can just for, uh, browse the other page, like index.html, then you can connect to the device and you can control the device. 64 00:07:23,070 --> 00:07:32,710 So, basically, if you can see on the screens, there are two plugs, A and B, and you have the full control of these two plugs. 65 00:07:33,830 --> 00:07:36,450 So, what can be done with this? 66 00:07:36,830 --> 00:07:43,690 And, I don't know, you can put it to the remote start, click to the remote start, then you can charge your car freely. 67 00:07:44,410 --> 00:07:52,870 Then attacker may abuse this to, uh, get some, let's say, uh, power from that and also charge the car. 68 00:07:53,650 --> 00:07:57,990 And what if, if they click to remote stop? 69 00:07:58,650 --> 00:08:11,930 Let's, let's think about it, someone is connected to the, uh, EV charging point and charging their car and you are just clicking remote stop and after he come from his work, his office, he's realizing his car has not been charged. 70 00:08:13,270 --> 00:08:18,030 And also, you, you have an option that you can disable the plug. 71 00:08:18,030 --> 00:08:23,730 So, basically, if you click to disable, then the charging point will be turned off. 72 00:08:23,730 --> 00:08:25,130 So, it will be disabled. 73 00:08:25,130 --> 00:08:26,870 It's sort of a denial of service. 74 00:08:28,910 --> 00:08:34,830 And, sometimes, it's also another possibility that you can lock the connector. 75 00:08:34,970 --> 00:08:40,110 So, when you lock the connector, it will just stop connecting to the device. 76 00:08:40,110 --> 00:08:52,410 So, basically, it has some sort of a, I don't know how you call it, hook on the, for the connector that, because someone, we don't want someone steal the cable when we are charging. 77 00:08:52,490 --> 00:08:57,170 So, if you lock that connector, someone else also would not plug in. 78 00:08:59,050 --> 00:09:05,890 So, as you can see in here, these bolts are now open, quite ready for charging. 79 00:09:05,890 --> 00:09:15,130 But, if I click to the remote start, as you can see, it's starting the charging and also locking the device. 80 00:09:16,170 --> 00:09:18,790 And, at the same time, you can also stop it. 81 00:09:19,090 --> 00:09:23,150 So, let's come back to the source code, web application. 82 00:09:24,270 --> 00:09:28,030 Then, you're realizing we have a Java code over there, right? 83 00:09:29,290 --> 00:09:34,610 So, for the, for downloading this Java application, also there is no authentication. 84 00:09:34,610 --> 00:09:47,390 So, if there is authentication on the web, web server, web application, you can freely download this application and then you have control for all these charging stations. 85 00:09:48,090 --> 00:10:01,950 You only need to supply, you only need to provide the IP address of the other charging points because Java application doesn't have any authentication, it just gets the IP, then you can control the other devices. 86 00:10:02,370 --> 00:10:07,310 So, you can hack all these devices by using this Java application. 87 00:10:08,190 --> 00:10:16,250 So, yeah, there I am downloading the Java application and I'm just running it. 88 00:10:16,250 --> 00:10:22,330 Then, it asks me IP address of the device, then you are connecting any device. 89 00:10:22,650 --> 00:10:25,490 And you can freely control it. 90 00:10:26,590 --> 00:10:31,890 So, the other vulnerability that I find on these devices is also quite straightforward. 91 00:10:31,890 --> 00:10:34,610 It's OS command injection on the web application. 92 00:10:35,030 --> 00:10:40,150 And the thing is, you need to provide the password for connecting the setup HTML. 93 00:10:40,150 --> 00:10:46,230 I mean, if there is a password and you couldn't get, you couldn't guess it or you couldn't find it, it doesn't work of course. 94 00:10:46,230 --> 00:10:50,290 But, mostly these devices doesn't have any password. 95 00:10:50,290 --> 00:10:51,810 They are not setting this up. 96 00:10:52,970 --> 00:10:58,470 So, the pink feature, of course, as you can imagine, is vulnerable to OS command injection attacks. 97 00:10:59,190 --> 00:11:07,650 And the attack surface, as you can see before, connected ones are already indexed by showdown, by Google. 98 00:11:08,830 --> 00:11:12,130 It's really easy to find these devices basically. 99 00:11:13,010 --> 00:11:16,210 So, let's increase the attack surface. 100 00:11:16,310 --> 00:11:21,470 Most of the EV charging stations doesn't have any authentication on the setup page. 101 00:11:21,470 --> 00:11:27,110 So, they are not, as I mentioned before, they are not setting up the passwords mostly. 102 00:11:28,630 --> 00:11:42,490 And after accessing this setup HTML page, somehow, if you provide a password or if you find it without a password, it's really quite straightforward to exploit it by using the ping IP feature. 103 00:11:44,610 --> 00:11:50,350 So, I am just using the backticks to run my command. 104 00:11:50,350 --> 00:11:56,050 I just try to create another page for the web application to see if my command works. 105 00:11:56,050 --> 00:11:57,410 And it works. 106 00:11:58,050 --> 00:12:02,310 And I realize I can run commands on these devices basically. 107 00:12:02,830 --> 00:12:04,850 I just use the backticks. 108 00:12:05,010 --> 00:12:11,750 As you know, everything you type between the backticks are executed by the shell just before the main command. 109 00:12:11,750 --> 00:12:20,930 So, the main command was the ping, but when you are writing the backticks, it was running the command that you write over there. 110 00:12:21,630 --> 00:12:26,770 So, let's double the attack surface, increase attack surface. 111 00:12:26,910 --> 00:12:35,590 So, using a default password is encouraged by the vendors because it's written on the vendor's manual that I will show you later now. 112 00:12:35,590 --> 00:12:36,890 Let's check this. 113 00:12:37,050 --> 00:12:41,430 It's recommended leaving the default settings according to the table below. 114 00:12:42,230 --> 00:12:48,530 Default password is admin and password is 1, 2, 3, 4. 115 00:12:50,210 --> 00:12:53,490 It was in the owner's manual. 116 00:12:54,430 --> 00:12:55,930 And then I see it. 117 00:12:55,930 --> 00:12:58,750 It's also possible to find it online. 118 00:12:59,050 --> 00:13:00,190 And then I see it. 119 00:13:02,070 --> 00:13:05,950 So, let's give some more details. 120 00:13:06,630 --> 00:13:09,770 So, I try to run some commands and I succeed. 121 00:13:09,810 --> 00:13:14,530 Then I created my reverse shell by using MSF Venom. 122 00:13:14,530 --> 00:13:18,870 The device was using the ARM processor, so I created it for ARM. 123 00:13:19,090 --> 00:13:25,890 And created the executable Linux file because it was quite easy to run it. 124 00:13:26,230 --> 00:13:27,990 Then I tried a couple of times. 125 00:13:27,990 --> 00:13:30,190 Of course, I failed a couple of times before. 126 00:13:30,190 --> 00:13:32,810 Then somehow it worked at some point. 127 00:13:33,370 --> 00:13:41,770 And I just also created a Python simple HTTP server to download my payload to the device. 128 00:13:42,610 --> 00:13:46,450 And I also created a listener to get a connection back to me. 129 00:13:47,350 --> 00:13:52,670 And I used curl to download my payload to the device. 130 00:13:53,110 --> 00:13:56,790 And, yeah, after a couple of trials, I succeeded. 131 00:13:56,790 --> 00:14:00,010 Then I run the executable Linux file. 132 00:14:00,010 --> 00:14:01,770 Then I got the shell. 133 00:14:01,770 --> 00:14:03,490 Like that. 134 00:14:03,730 --> 00:14:05,230 Quite smooth. 135 00:14:06,270 --> 00:14:11,030 And then I realized it's instantly a root shell. 136 00:14:12,190 --> 00:14:15,890 So, yeah, the rest you can imagine. 137 00:14:15,890 --> 00:14:20,050 You can create your own boats by using these devices. 138 00:14:20,330 --> 00:14:23,290 Or, I don't know, you can use for something else. 139 00:14:24,150 --> 00:14:27,690 Then I reported that to ICS Search. 140 00:14:28,010 --> 00:14:35,050 In the middle of 2018, I reported it took almost five months to get the response. 141 00:14:35,050 --> 00:14:39,710 After this discussion, ICS Search acknowledged and also discussed with the vendor. 142 00:14:39,790 --> 00:14:41,450 They fixed it somehow. 143 00:14:41,450 --> 00:14:49,290 They fixed it for, uh, for, uh, for not, not all the vulnerabilities, not for the remote code execution. 144 00:14:49,310 --> 00:14:52,590 Because I think they couldn't do it. 145 00:14:52,750 --> 00:14:54,690 They told me they fixed it. 146 00:14:54,690 --> 00:14:57,530 I also tried again with a new firmware. 147 00:14:57,610 --> 00:14:58,550 I did it again. 148 00:14:58,550 --> 00:15:00,510 At least I bricked the device again. 149 00:15:00,510 --> 00:15:04,490 So, I, I couldn't get the shell back but I just bricked the device. 150 00:15:04,910 --> 00:15:06,870 But they told me they fixed it. 151 00:15:08,530 --> 00:15:10,490 I, I already warned them. 152 00:15:12,130 --> 00:15:12,810 Yeah. 153 00:15:13,470 --> 00:15:20,590 So, the bonus, as a bonus, uh, I created a Metasploit module for denial of service because denial of service is quite easy. 154 00:15:20,590 --> 00:15:23,970 You just write reboot by using the backticks. 155 00:15:23,970 --> 00:15:24,930 That's all. 156 00:15:25,650 --> 00:15:32,230 So, yeah, because I'm quite lazy, I didn't want to create a whole remote code execution, uh, module for that. 157 00:15:32,270 --> 00:15:38,770 So, I just saved my POST request and I created a module by using the POST request. 158 00:15:39,170 --> 00:15:40,290 And that's all. 159 00:15:40,290 --> 00:15:45,590 Uh, I'm planning to share the POST module, uh, end of, uh, Defcon. 160 00:15:46,710 --> 00:15:48,770 And this is all what I have. 161 00:15:48,770 --> 00:15:50,750 Thank you very much for joining me. 162 00:15:50,990 --> 00:15:55,950 And if you have any questions or if you want to contact me, please don't hesitate. 163 00:15:55,950 --> 00:15:57,130 Thank you very much.