[00:00.000 --> 00:08.160] Today I will talk about the EV charging points. Basically I will just explain a specific one [00:08.160 --> 00:15.220] that I find in Europe. So, and basically you can use it everywhere in Europe. I will also [00:15.220 --> 00:21.600] show the map, then you can imagine. I'm John Kurnas from KPMG Netherlands. I'm working [00:21.600 --> 00:25.620] as a senior consultant and mostly doing penetration tests on web applications, infrastructure [00:25.620 --> 00:42.450] and sometimes also IOT and ICS. Okay, alright. Great, great. Okay, this is my contact info. If [00:42.450 --> 00:47.970] you want to ask something or discuss about something on IOT or ICS, please don't hesitate. [00:48.870 --> 00:55.030] For a disclaimer, basically I did this research by myself and my company doesn't involve on [00:55.030 --> 01:03.390] that, so if someone wants to sue me, just sue me, not my company. And I'm a little bit [01:03.390 --> 01:09.810] nervous because this is the first presentation, recorded presentation for mine, so that's why [01:09.810 --> 01:17.950] I feel a little bit nervous. Please help me. So on agenda, we will talk about the introduction [01:17.950 --> 01:23.190] of the EV charging points, then I will try to explain the threat that I find, then the [01:23.190 --> 01:28.390] consequences we will discuss, then we will go into the details and I will explain more [01:28.390 --> 01:34.410] details. Then I will show you just a small metasploit module that you can make a denial of [01:34.410 --> 01:42.750] service of this EV charging point. This is a basic small module but you can use it. So let's [01:42.750 --> 01:49.430] start. So this is a 100% Sunsu free InfoSec talk because probably you have a lot of codes [01:49.430 --> 01:57.330] from Sunsu on this presentation on these days, so I will just skip that. For the introduction, [01:57.330 --> 02:03.350] so it's a little bit confusing because EV charging points, electric vehicle charging points [02:03.350 --> 02:12.770] are in somewhere between IOT and ICS KEDA. So basically electric vehicle charging point is a [02:12.770 --> 02:19.410] device that you can supply electric energy to recharge your electric vehicle. So basically [02:19.430 --> 02:27.830] and nowadays manufacturers are trying to connect these devices to the internet and that makes a [02:27.830 --> 02:37.070] little bit trouble for them and also for the clients. And previous research done for charge [02:37.070 --> 02:44.690] point, it's another let's say manufacturer, this research done by Kaspersky lab and for the [02:44.690 --> 02:50.950] Schneider EV Link positive technology has done a couple of research on that. So basically the [02:50.950 --> 02:58.950] idea, they are relatively new on the field and they are just building to work so security is [02:58.950 --> 03:03.990] not a concern in the beginning but since they are connecting to the internet, now it's a [03:03.990 --> 03:11.010] problem. So based on these previous researches and also mine, we are considering the security [03:11.010 --> 03:19.370] maturity is quite major on these devices. So basically I completed an engagement for these [03:19.370 --> 03:26.490] devices last year actually. When I was writing the report, I just wanted to check if I write the [03:26.490 --> 03:32.730] name correctly. I just googled the name of the device as you can see over there and it showed [03:32.730 --> 03:40.990] up on the first page. Then I said, what? Yeah, basically I just googled the name of the device [03:41.010 --> 03:45.470] and I mean you are not expecting these kind of devices are connected directly to the internet [03:45.470 --> 03:54.150] and indexed by the Google, right? So let's discuss about the threats. So after that I checked [03:54.150 --> 04:03.810] Shodan and I realized with this map, so basically on the beginning of 2018, there were 200 [04:03.810 --> 04:09.570] devices connected directly to the internet and indexed by Shodan. After in the middle of [04:10.170 --> 04:20.150] 2018, it come up 300 and as you can see on the map, it's all around the Europe. So basically if [04:20.150 --> 04:25.070] you create a smart map, you can travel around by using these charging points, you can travel [04:25.070 --> 04:29.950] around freely because basically you can compromise the device on the internet and you can charge [04:29.950 --> 04:39.070] your car and I will also show that later. So now this is a new one. They are appearing on the US [04:39.610 --> 04:45.850] also now. Maybe, I don't know, at the end of this year or next year, you can also do it in [04:45.850 --> 04:56.510] here. So the consequences. So what? Basically you can compromise a device and you can get root. [04:57.170 --> 05:07.470] So if you want to create your next Mirai by using these devices, you can. And the details. So the [05:07.470 --> 05:12.170] first vulnerability that I find on this device is authentication bypass with direct request. So [05:12.170 --> 05:16.650] the web applications of these devices mostly are not secure enough. So it's a quite [05:16.650 --> 05:21.090] straightforward vulnerability as you can imagine. So application was not that good. It's [05:21.090 --> 05:29.590] basically broken. So the access control was only on the login page and the rest is not that [05:29.590 --> 05:37.230] secure. It wasn't covering by the authentication scheme. So it can be easily bypassed. So as you [05:37.230 --> 05:44.070] can see in here, there is a login screen over there for the setup.html page. It's the, let's [05:44.070 --> 05:49.210] say the first page that you, when you try to connect to the device after you find the IP, [05:49.210 --> 05:57.130] you'll see this. So, I mean, you can also guess the password of course, but I decided to take a [05:57.130 --> 06:05.110] look to the source code of the web application. And yeah, basically by force browsing, you can [06:05.110 --> 06:13.050] go to the other pages of the web application. I will show you later. Then you can have access [06:13.050 --> 06:18.650] on the other pages. Basically, it will also affect the management interface of that device. [06:19.070 --> 06:24.050] So when we check the, when we check the source code, we are realizing there are a couple of [06:24.050 --> 06:33.010] pages except setup.html, like index.html, and also there's a java file, appletscale.jar, and [06:33.010 --> 06:41.290] also a couple of, let's say, informational subpages like repository device ID and logs. You [06:41.290 --> 06:46.090] can also check the logs, but I'm not considering to check that because it's just an [06:46.090 --> 06:55.530] information disclosure. So, I tried to, I tried to connect to the management interface by using, as [06:55.530 --> 07:02.990] you can see in here, appletscale client. It's in index.html. So, yeah, it was successful. So, [07:04.410 --> 07:12.250] there, there were no authentication for this page specifically. So, even if the device has some [07:12.250 --> 07:18.430] password for the setup.html page, you can just for, uh, browse the other page, like index.html, [07:18.430 --> 07:24.170] then you can connect to the device and you can control the device. So, basically, if you can [07:24.170 --> 07:31.890] see on the screens, there are two plugs, A and B, and you have the full control of these two [07:31.890 --> 07:39.970] plugs. So, what can be done with this? And, I don't know, you can put it to the remote start, [07:39.970 --> 07:46.110] click to the remote start, then you can charge your car freely. Then attacker may abuse this [07:46.110 --> 07:56.170] to, uh, get some, let's say, uh, power from that and also charge the car. And what if, if they [07:56.170 --> 08:02.410] click to remote stop? Let's, let's think about it, someone is connected to the, uh, EV charging [08:02.410 --> 08:07.470] point and charging their car and you are just clicking remote stop and after he come from his [08:07.470 --> 08:15.950] work, his office, he's realizing his car has not been charged. And also, you, you have an option [08:15.950 --> 08:22.190] that you can disable the plug. So, basically, if you click to disable, then the charging point [08:22.190 --> 08:31.090] will be turned off. So, it will be disabled. It's sort of a denial of service. And, sometimes, [08:31.090 --> 08:37.590] it's also another possibility that you can lock the connector. So, when you lock the connector, [08:37.590 --> 08:43.250] it will just stop connecting to the device. So, basically, it has some sort of a, I don't know [08:43.250 --> 08:49.610] how you call it, hook on the, for the connector that, because someone, we don't want someone [08:49.610 --> 08:55.930] steal the cable when we are charging. So, if you lock that connector, someone else also would [08:55.930 --> 09:06.150] not plug in. So, as you can see in here, these bolts are now open, quite ready for charging. But, [09:06.150 --> 09:14.190] if I click to the remote start, as you can see, it's starting the charging and also locking the [09:14.190 --> 09:22.290] device. And, at the same time, you can also stop it. So, let's come back to the source code, web [09:22.290 --> 09:30.990] application. Then, you're realizing we have a Java code over there, right? So, for the, for [09:30.990 --> 09:35.450] downloading this Java application, also there is no authentication. So, if there is [09:35.450 --> 09:41.330] authentication on the web, web server, web application, you can freely download this [09:41.330 --> 09:49.030] application and then you have control for all these charging stations. You only need to [09:49.030 --> 09:54.310] supply, you only need to provide the IP address of the other charging points because Java [09:54.310 --> 10:00.790] application doesn't have any authentication, it just gets the IP, then you can control the other [10:00.790 --> 10:10.090] devices. So, you can hack all these devices by using this Java application. So, yeah, there I am [10:10.090 --> 10:19.050] downloading the Java application and I'm just running it. Then, it asks me IP address of the [10:19.050 --> 10:27.370] device, then you are connecting any device. And you can freely control it. So, the other [10:27.370 --> 10:32.570] vulnerability that I find on these devices is also quite straightforward. It's OS command [10:32.570 --> 10:38.550] injection on the web application. And the thing is, you need to provide the password for [10:38.550 --> 10:43.670] connecting the setup HTML. I mean, if there is a password and you couldn't get, you couldn't [10:43.670 --> 10:48.990] guess it or you couldn't find it, it doesn't work of course. But, mostly these devices doesn't [10:48.990 --> 10:55.190] have any password. They are not setting this up. So, the pink feature, of course, as you can [10:55.190 --> 11:01.830] imagine, is vulnerable to OS command injection attacks. And the attack surface, as you can see [11:01.830 --> 11:10.410] before, connected ones are already indexed by showdown, by Google. It's really easy to find [11:10.410 --> 11:17.830] these devices basically. So, let's increase the attack surface. Most of the EV charging [11:17.830 --> 11:23.610] stations doesn't have any authentication on the setup page. So, they are not, as I mentioned [11:23.610 --> 11:31.090] before, they are not setting up the passwords mostly. And after accessing this setup HTML [11:31.090 --> 11:37.290] page, somehow, if you provide a password or if you find it without a password, it's really [11:37.290 --> 11:46.770] quite straightforward to exploit it by using the ping IP feature. So, I am just using the [11:46.770 --> 11:54.650] backticks to run my command. I just try to create another page for the web application to see if [11:54.650 --> 12:03.150] my command works. And it works. And I realize I can run commands on these devices basically. I [12:03.150 --> 12:09.190] just use the backticks. As you know, everything you type between the backticks are executed [12:09.190 --> 12:14.450] by the shell just before the main command. So, the main command was the ping, but when you [12:14.450 --> 12:22.670] are writing the backticks, it was running the command that you write over there. So, let's [12:22.670 --> 12:29.330] double the attack surface, increase attack surface. So, using a default password is [12:29.330 --> 12:34.490] encouraged by the vendors because it's written on the vendor's manual that I will show you [12:34.490 --> 12:40.010] later now. Let's check this. It's recommended leaving the default settings according to the [12:40.010 --> 12:52.650] table below. Default password is admin and password is 1, 2, 3, 4. It was in the owner's [12:52.670 --> 13:03.870] manual. And then I see it. It's also possible to find it online. And then I see it. So, let's [13:04.480 --> 13:10.910] give some more details. So, I try to run some commands and I succeed. Then I created my [13:10.910 --> 13:17.730] reverse shell by using MSF Venom. The device was using the ARM processor, so I created it [13:17.730 --> 13:26.610] for ARM. And created the executable Linux file because it was quite easy to run it. Then I [13:26.610 --> 13:31.190] tried a couple of times. Of course, I failed a couple of times before. Then somehow it [13:31.190 --> 13:39.190] worked at some point. And I just also created a Python simple HTTP server to download my [13:39.990 --> 13:47.710] payload to the device. And I also created a listener to get a connection back to me. And [13:47.710 --> 13:55.910] I used curl to download my payload to the device. And, yeah, after a couple of trials, I [13:55.910 --> 14:04.130] succeeded. Then I run the executable Linux file. Then I got the shell. Like that. Quite [14:04.130 --> 14:15.890] smooth. And then I realized it's instantly a root shell. So, yeah, the rest you can imagine. [14:15.890 --> 14:21.990] You can create your own boats by using these devices. Or, I don't know, you can use for [14:21.990 --> 14:32.230] something else. Then I reported that to ICS Search. In the middle of 2018, I reported it took [14:32.830 --> 14:38.050] almost five months to get the response. After this discussion, ICS Search acknowledged and [14:38.050 --> 14:45.550] also discussed with the vendor. They fixed it somehow. They fixed it for, uh, for, uh, for [14:45.550 --> 14:50.610] not, not all the vulnerabilities, not for the remote code execution. Because I think they [14:50.610 --> 14:58.110] couldn't do it. They told me they fixed it. I also tried again with a new firmware. I did it [14:58.110 --> 15:03.270] again. At least I bricked the device again. So, I, I couldn't get the shell back but I just [15:03.270 --> 15:13.910] bricked the device. But they told me they fixed it. I, I already warned them. Yeah. So, the [15:13.910 --> 15:19.290] bonus, as a bonus, uh, I created a Metasploit module for denial of service because denial of [15:19.290 --> 15:26.370] service is quite easy. You just write reboot by using the backticks. That's all. So, yeah, [15:26.370 --> 15:31.210] because I'm quite lazy, I didn't want to create a whole remote code execution, uh, module [15:31.210 --> 15:38.770] for that. So, I just saved my POST request and I created a module by using the POST request. [15:39.170 --> 15:47.770] And that's all. Uh, I'm planning to share the POST module, uh, end of, uh, Defcon. And this is [15:47.770 --> 15:53.870] all what I have. Thank you very much for joining me. And if you have any questions or if you [15:53.870 --> 15:57.130] want to contact me, please don't hesitate. Thank you very much.