WEBVTT

00:00.000 --> 00:03.280
Today I will talk about the EV charging points.

00:03.480 --> 00:09.980
Basically I will just explain a specific one that I find in Europe.

00:10.240 --> 00:14.820
So, and basically you can use it everywhere in Europe.

00:14.820 --> 00:17.280
I will also show the map, then you can imagine.

00:18.140 --> 00:20.840
I'm John Kurnas from KPMG Netherlands.

00:21.060 --> 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.

00:35.250 --> 00:37.870
Okay, alright.

00:39.110 --> 00:40.450
Great, great.

00:40.550 --> 00:42.390
Okay, this is my contact info.

00:42.390 --> 00:47.970
If you want to ask something or discuss about something on IOT or ICS, please don't hesitate.

00:48.870 --> 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.

01:02.230 --> 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.

01:12.290 --> 01:13.550
Please help me.

01:13.850 --> 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.

01:29.510 --> 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.

01:36.770 --> 01:41.930
This is a basic small module but you can use it.

01:42.210 --> 01:43.950
So let's start.

01:43.950 --> 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.

01:55.230 --> 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.

02:08.410 --> 02:19.230
So basically electric vehicle charging point is a device that you can supply electric energy to recharge your electric vehicle.

02:19.410 --> 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.

02:32.370 --> 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.

02:49.610 --> 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 .

03:05.390 --> 03:14.190
So based on these previous researches and also mine, we are considering the security maturity is quite major on these devices.

03:15.330 --> 03:22.690
So basically I completed an engagement for these devices last year actually.

03:22.790 --> 03:27.930
When I was writing the report, I just wanted to check if I write the name correctly.

03:27.930 --> 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.

03:36.330 --> 03:38.750
Then I said, what?

03:39.670 --> 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?

03:48.490 --> 03:51.710
So let's discuss about the threats.

03:52.330 --> 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.

04:08.290 --> 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.

04:19.150 --> 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.

04:34.330 --> 04:36.890
So now this is a new one.

04:37.350 --> 04:41.010
They are appearing on the US also now.

04:41.470 --> 04:46.610
Maybe, I don't know, at the end of this year or next year, you can also do it in here.

04:47.490 --> 04:49.430
So the consequences.

04:49.890 --> 04:50.930
So what?

04:51.290 --> 04:56.510
Basically you can compromise a device and you can get root.

04:57.170 --> 05:02.610
So if you want to create your next Mirai by using these devices, you can.

05:03.690 --> 05:05.190
And the details.

05:06.610 --> 05:12.170
So the first vulnerability that I find on this device is authentication bypass with direct request.

05:12.170 --> 05:16.130
So the web applications of these devices mostly are not secure enough.

05:16.150 --> 05:19.350
So it's a quite straightforward vulnerability as you can imagine.

05:19.410 --> 05:21.070
So application was not that good.

05:21.070 --> 05:22.610
It's basically broken.

05:22.690 --> 05:30.450
So the access control was only on the login page and the rest is not that secure.

05:30.450 --> 05:34.230
It wasn't covering by the authentication scheme.

05:34.270 --> 05:36.810
So it can be easily bypassed.

05:36.810 --> 05:42.350
So as you can see in here, there is a login screen over there for the setup.html page.

05:42.350 --> 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.

05:51.290 --> 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.

06:00.190 --> 06:08.410
And yeah, basically by force browsing, you can go to the other pages of the web application.

06:08.410 --> 06:09.950
I will show you later.

06:10.190 --> 06:14.370
Then you can have access on the other pages.

06:14.370 --> 06:18.650
Basically, it will also affect the management interface of that device.

06:19.070 --> 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.

06:41.150 --> 06:47.450
You can also check the logs, but I'm not considering to check that because it's just an information disclosure.

06:48.670 --> 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.

06:58.690 --> 07:00.510
It's in index.html.

07:01.190 --> 07:02.990
So, yeah, it was successful.

07:02.990 --> 07:09.770
So, there, there were no authentication for this page specifically.

07:10.350 --> 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.

07:23.070 --> 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.

07:33.830 --> 07:36.450
So, what can be done with this?

07:36.830 --> 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.

07:44.410 --> 07:52.870
Then attacker may abuse this to, uh, get some, let's say, uh, power from that and also charge the car.

07:53.650 --> 07:57.990
And what if, if they click to remote stop?

07:58.650 --> 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.

08:13.270 --> 08:18.030
And also, you, you have an option that you can disable the plug.

08:18.030 --> 08:23.730
So, basically, if you click to disable, then the charging point will be turned off.

08:23.730 --> 08:25.130
So, it will be disabled.

08:25.130 --> 08:26.870
It's sort of a denial of service.

08:28.910 --> 08:34.830
And, sometimes, it's also another possibility that you can lock the connector.

08:34.970 --> 08:40.110
So, when you lock the connector, it will just stop connecting to the device.

08:40.110 --> 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.

08:52.490 --> 08:57.170
So, if you lock that connector, someone else also would not plug in.

08:59.050 --> 09:05.890
So, as you can see in here, these bolts are now open, quite ready for charging.

09:05.890 --> 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.

09:16.170 --> 09:18.790
And, at the same time, you can also stop it.

09:19.090 --> 09:23.150
So, let's come back to the source code, web application.

09:24.270 --> 09:28.030
Then, you're realizing we have a Java code over there, right?

09:29.290 --> 09:34.610
So, for the, for downloading this Java application, also there is no authentication.

09:34.610 --> 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.

09:48.090 --> 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.

10:02.370 --> 10:07.310
So, you can hack all these devices by using this Java application.

10:08.190 --> 10:16.250
So, yeah, there I am downloading the Java application and I'm just running it.

10:16.250 --> 10:22.330
Then, it asks me IP address of the device, then you are connecting any device.

10:22.650 --> 10:25.490
And you can freely control it.

10:26.590 --> 10:31.890
So, the other vulnerability that I find on these devices is also quite straightforward.

10:31.890 --> 10:34.610
It's OS command injection on the web application.

10:35.030 --> 10:40.150
And the thing is, you need to provide the password for connecting the setup HTML.

10:40.150 --> 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.

10:46.230 --> 10:50.290
But, mostly these devices doesn't have any password.

10:50.290 --> 10:51.810
They are not setting this up.

10:52.970 --> 10:58.470
So, the pink feature, of course, as you can imagine, is vulnerable to OS command injection attacks.

10:59.190 --> 11:07.650
And the attack surface, as you can see before, connected ones are already indexed by showdown, by Google.

11:08.830 --> 11:12.130
It's really easy to find these devices basically.

11:13.010 --> 11:16.210
So, let's increase the attack surface.

11:16.310 --> 11:21.470
Most of the EV charging stations doesn't have any authentication on the setup page.

11:21.470 --> 11:27.110
So, they are not, as I mentioned before, they are not setting up the passwords mostly.

11:28.630 --> 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.

11:44.610 --> 11:50.350
So, I am just using the backticks to run my command.

11:50.350 --> 11:56.050
I just try to create another page for the web application to see if my command works.

11:56.050 --> 11:57.410
And it works.

11:58.050 --> 12:02.310
And I realize I can run commands on these devices basically.

12:02.830 --> 12:04.850
I just use the backticks.

12:05.010 --> 12:11.750
As you know, everything you type between the backticks are executed by the shell just before the main command.

12:11.750 --> 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.

12:21.630 --> 12:26.770
So, let's double the attack surface, increase attack surface.

12:26.910 --> 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.

12:35.590 --> 12:36.890
Let's check this.

12:37.050 --> 12:41.430
It's recommended leaving the default settings according to the table below.

12:42.230 --> 12:48.530
Default password is admin and password is 1, 2, 3, 4.

12:50.210 --> 12:53.490
It was in the owner's manual.

12:54.430 --> 12:55.930
And then I see it.

12:55.930 --> 12:58.750
It's also possible to find it online.

12:59.050 --> 13:00.190
And then I see it.

13:02.070 --> 13:05.950
So, let's give some more details.

13:06.630 --> 13:09.770
So, I try to run some commands and I succeed.

13:09.810 --> 13:14.530
Then I created my reverse shell by using MSF Venom.

13:14.530 --> 13:18.870
The device was using the ARM processor, so I created it for ARM.

13:19.090 --> 13:25.890
And created the executable Linux file because it was quite easy to run it.

13:26.230 --> 13:27.990
Then I tried a couple of times.

13:27.990 --> 13:30.190
Of course, I failed a couple of times before.

13:30.190 --> 13:32.810
Then somehow it worked at some point.

13:33.370 --> 13:41.770
And I just also created a Python simple HTTP server to download my payload to the device.

13:42.610 --> 13:46.450
And I also created a listener to get a connection back to me.

13:47.350 --> 13:52.670
And I used curl to download my payload to the device.

13:53.110 --> 13:56.790
And, yeah, after a couple of trials, I succeeded.

13:56.790 --> 14:00.010
Then I run the executable Linux file.

14:00.010 --> 14:01.770
Then I got the shell.

14:01.770 --> 14:03.490
Like that.

14:03.730 --> 14:05.230
Quite smooth.

14:06.270 --> 14:11.030
And then I realized it's instantly a root shell.

14:12.190 --> 14:15.890
So, yeah, the rest you can imagine.

14:15.890 --> 14:20.050
You can create your own boats by using these devices.

14:20.330 --> 14:23.290
Or, I don't know, you can use for something else.

14:24.150 --> 14:27.690
Then I reported that to ICS Search.

14:28.010 --> 14:35.050
In the middle of 2018, I reported it took almost five months to get the response.

14:35.050 --> 14:39.710
After this discussion, ICS Search acknowledged and also discussed with the vendor.

14:39.790 --> 14:41.450
They fixed it somehow.

14:41.450 --> 14:49.290
They fixed it for, uh, for, uh, for not, not all the vulnerabilities, not for the remote code execution.

14:49.310 --> 14:52.590
Because I think they couldn't do it.

14:52.750 --> 14:54.690
They told me they fixed it.

14:54.690 --> 14:57.530
I also tried again with a new firmware.

14:57.610 --> 14:58.550
I did it again.

14:58.550 --> 15:00.510
At least I bricked the device again.

15:00.510 --> 15:04.490
So, I, I couldn't get the shell back but I just bricked the device.

15:04.910 --> 15:06.870
But they told me they fixed it.

15:08.530 --> 15:10.490
I, I already warned them.

15:12.130 --> 15:12.810
Yeah.

15:13.470 --> 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.

15:20.590 --> 15:23.970
You just write reboot by using the backticks.

15:23.970 --> 15:24.930
That's all.

15:25.650 --> 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.

15:32.270 --> 15:38.770
So, I just saved my POST request and I created a module by using the POST request.

15:39.170 --> 15:40.290
And that's all.

15:40.290 --> 15:45.590
Uh, I'm planning to share the POST module, uh, end of, uh, Defcon.

15:46.710 --> 15:48.770
And this is all what I have.

15:48.770 --> 15:50.750
Thank you very much for joining me.

15:50.990 --> 15:55.950
And if you have any questions or if you want to contact me, please don't hesitate.

15:55.950 --> 15:57.130
Thank you very much.

