WEBVTT

00:08.410 --> 00:16.950
We would like to say, first of all, thanks to everybody that made it possible to be here.

00:16.950 --> 00:21.790
To the DEF CON staff, the Baidu, everybody.

00:21.790 --> 00:23.010
This is a dream.

00:23.010 --> 00:24.270
Thank you very much.

00:24.610 --> 00:34.370
Well, we both are a big bag of nerves, so we will try to do our best.

00:34.370 --> 00:37.070
Well, presentations.

00:37.970 --> 00:44.750
My partner, my colleague, he comes from Argentina.

00:45.330 --> 00:51.690
He's one of the members in the red team in ASEC Auditors.

00:51.690 --> 00:53.650
We work together.

00:53.650 --> 01:01.370
And he is a bug bounty hunter since a long time ago.

01:01.510 --> 01:04.550
Well, this is his Twitter account.

01:04.610 --> 01:06.830
And me.

01:07.890 --> 01:09.590
I am Gonzalo Sanchez.

01:09.590 --> 01:10.870
I come from Spain.

01:10.870 --> 01:14.030
I'm the red team leader in ASEC Auditors.

01:14.190 --> 01:21.770
And well, this is my LinkedIn account, in case anybody wants to contact.

01:22.770 --> 01:24.230
Yeah.

01:25.010 --> 01:26.990
Hello, DEF CON.

01:26.990 --> 01:37.510
Today we present how to use Google with different compression formats.

01:37.510 --> 01:42.910
Well, what we are going to talk.

01:42.910 --> 01:48.590
We bring to the account a vulnerability in Google Earth.

01:48.590 --> 01:50.270
Why Google Earth?

01:50.270 --> 01:54.070
Well, because Google is a challenge.

01:54.730 --> 02:08.190
A very huge company with fantastic products, with a very good reputation, with reliable levels of security in their products.

02:09.230 --> 02:12.270
Many people use Google products.

02:12.270 --> 02:29.690
And if you are able to have a vulnerability, find a vulnerability, and use it to spread malware, you are using a platform with a spreading potential.

02:29.690 --> 02:32.050
Very huge, very big.

02:32.050 --> 02:39.210
So in this case, for malware application, it's perfect.

02:39.210 --> 02:39.930
Nice Kilombo.

02:39.930 --> 02:44.470
This is the name of the account.

02:45.360 --> 02:46.770
Nice Kilombo.

02:46.770 --> 02:56.990
Kilombo is a very popular phrase in Argentina, which refers to have one or more problems.

02:57.590 --> 02:59.750
Confusion, problem, mess.

02:59.750 --> 03:01.250
This is Kilombo.

03:01.750 --> 03:05.610
Well, the attack vector, KML files.

03:07.550 --> 03:09.970
What is a KML file?

03:09.970 --> 03:19.830
It's a file with a very similar format to XML, with graphical information inside.

03:20.330 --> 03:25.390
This is the key import table in Google Earth.

03:25.390 --> 03:31.390
We are going to work with the description file of the KML file.

03:32.810 --> 03:37.150
We are going to show an example of a file.

03:39.370 --> 03:43.890
Please guys, can you connect the screen?

03:45.830 --> 03:57.410
We are going to show a file, an example of KML file with a location that is this hotel.

03:58.830 --> 03:59.890
Wow.

04:00.210 --> 04:00.950
Easy.

04:00.950 --> 04:06.670
It's a very similar format comparing to, sorry, with XML file.

04:06.670 --> 04:20.030
The key here is that we have field files with the location of the hotel, name, swap, and here the magic, the description file.

04:20.030 --> 04:24.470
This is the file that we are going to use in the next vulnerabilities.

04:24.830 --> 04:29.410
Another kind of file for attack vectors came in set.

04:29.410 --> 04:34.130
It's the same of KML file, but compressed with zip format.

04:34.850 --> 04:43.850
If you take the same file that we have seen, you compress it in zip file and you import it in Google Earth.

04:43.850 --> 04:48.810
Google Earth renders the file and shows the location.

04:48.810 --> 04:49.770
Easy.

04:50.550 --> 04:55.150
There is no need to waste time.

04:55.710 --> 05:12.090
There is an advantage when we talk with KML file, that is the obfuscation because the file is compressed and it complicates to identify the payload of the file.

05:12.090 --> 05:13.550
They are not suspicious files.

05:13.550 --> 05:26.590
We are familiar with executable files talking about malware, but probably if you see a KML file, you don't suspect about this file.

05:26.590 --> 05:28.690
This is an advantage for us.

05:28.690 --> 05:33.330
It's obfuscated because it's compressed and it's very common in Internet.

05:33.330 --> 05:35.890
We can find a lot of files in Internet.

05:37.210 --> 05:44.930
Where can we find this kind of files?

05:46.770 --> 06:02.050
Forums, for example, Pokemon Go, sites of bicycles routes, official sites with geographical information, airquakes, fires.

06:02.430 --> 06:04.770
This is an example of NASA.

06:06.630 --> 06:11.930
There's a lot of sites sharing information in this kind of formats.

06:11.930 --> 06:17.250
This is the victim and host with Google Earth.

06:17.250 --> 06:25.530
The victim imports a KML file and into this file comes the downloader.

06:25.530 --> 06:44.290
The downloader is executed and communicates with an intermediate server that is communicating with the real attacker, with the real payload that is downloaded by the intermediate server and it's delivered to the victim.

06:44.290 --> 06:48.670
And after that, the connection directly with the attacker.

06:48.810 --> 07:00.330
We have detected this problem with the current versions of Google Earth for Windows and Linux.

07:00.330 --> 07:05.790
In this presentation, we are focused on the Windows version.

07:08.870 --> 07:10.310
Summary.

07:10.410 --> 07:11.750
Location.

07:12.070 --> 07:17.570
The vulnerability is present into the JavaScript core of Google Earth.

07:17.570 --> 07:22.570
And we are talking about a null pointer and also an injection of JavaScript.

07:22.570 --> 07:26.570
We are going to see this in detail.

07:26.570 --> 07:30.710
Well, we bring three impacts to show.

07:30.730 --> 07:40.490
A remote cell and a Google cookie takeover using the null pointer vulnerability and a Monero mining using the JavaScript injection.

07:41.030 --> 07:44.330
This is a virtual machine that will be the attacker.

07:44.330 --> 07:48.630
And the victim is my computer.

07:48.970 --> 07:52.070
And my computer is Windows.

07:52.290 --> 07:53.310
Okay.

07:53.310 --> 08:01.350
And this is the virtual machine with the real attacker.

08:01.350 --> 08:19.430
Well, the victim has Google Earth and he has imported a site with an arbitrary name that is in this case is Google One.

08:19.430 --> 08:22.710
Well, we have to start the server.

08:23.370 --> 08:25.690
The server is the intermediate server.

08:25.690 --> 08:32.910
In order to make easy the presentation, the intermediate server and the attacker will be the same machine.

08:32.910 --> 08:33.590
This one.

08:33.590 --> 08:34.310
Okay?

08:34.730 --> 08:41.870
The intermediate server is the attacker.

08:41.870 --> 08:42.430
Okay.

08:42.430 --> 08:44.090
This is the intermediate server.

08:44.250 --> 08:54.430
The victim has imported and clicked on the site and the connection has received into the intermediate server.

08:54.430 --> 08:58.050
So, we have it.

08:59.390 --> 09:03.010
And we are going to show the remote cell.

09:03.010 --> 09:03.950
The impact one.

09:03.950 --> 09:04.870
Okay.

09:04.870 --> 09:09.090
First of all, basic execution.

09:09.090 --> 09:12.590
We will show and we will show the exploit.

09:13.250 --> 09:21.530
Um, well, Defcon has the exploit and probably will show when Google fix this, this problem.

09:21.530 --> 09:25.750
But, uh, this is a help to, to use it.

09:25.750 --> 09:29.730
Um, we are going to execute the command.

09:31.690 --> 09:33.730
Remote command.

09:35.810 --> 09:42.610
Basic operation like, uh, sample and it's received.

09:42.610 --> 09:46.990
And now we can access to files in the victim.

09:47.970 --> 09:52.330
The file is downloaded and we have it into the attacker machine.

09:52.330 --> 09:55.270
We have access to the victim's file.

09:55.510 --> 09:59.970
The file is downloaded and we can check it.

10:01.250 --> 10:02.010
Bingo.

10:02.010 --> 10:02.830
Okay.

10:03.670 --> 10:05.850
This is for the impact one.

10:05.850 --> 10:11.410
Remote cell and file access into the victim's file.

10:11.730 --> 10:12.930
Okay.

10:12.930 --> 10:14.890
Um, okay.

10:15.890 --> 10:20.130
Um, guys, please return to presentation.

10:20.430 --> 10:21.490
Impact two.

10:21.490 --> 10:27.030
We are going to use the victim's computer to mine Monero.

10:27.030 --> 10:49.530
Um, here we have a problem because, uh, we can not connect to this site with, uh, internet connection, but we can show at least the Kman file.

10:49.650 --> 10:53.750
Here we are not exploiting, uh, the null pointer vulnerability.

10:53.750 --> 11:02.510
Uh, here we are injecting JavaScript code into, um, description file.

11:02.770 --> 11:12.190
What we are doing here is connect with coin hive and downloading the JavaScript code for the Monero mining.

11:12.230 --> 11:21.330
Um, when you import this file in Google Earth, machine starts mining and resources collapse and what?

11:21.330 --> 11:23.950
You have a problem with your, with your computer.

11:23.950 --> 11:35.650
But as I said, uh, we can not solve this, this, this problem because there is a problem with the internet connection in, in, in this case.

11:35.650 --> 11:41.170
So we can continue with the presentation.

11:42.050 --> 11:48.350
And the last impact is the Google account hijacking.

11:48.530 --> 11:55.150
Um, what we are going to do is to take over the cookies of the victims.

11:55.150 --> 12:19.210
What we are doing now, because we have access to the files in the victim's computer, we are accessing for, um, for the cookies that SQLite file in the Firefox, uh, folder where the victim stores its own, um, Gmail cookies.

12:19.210 --> 12:22.550
What do we need in this case?

12:22.550 --> 12:35.010
This is a type of social engineering, uh, attack because we need that the victim has opened the Firefox browser with a open session in Gmail.

12:35.010 --> 12:40.070
With this, uh, file with the, the credentials inside.

12:40.070 --> 12:56.690
In this attack, the victim with the browser open, with the, uh, Gmail account opened, imports the KML file in Google Earth and we have access to its cookies file.

12:56.690 --> 12:59.330
Now we go to our browser.

12:59.330 --> 13:14.830
This is the, uh, folder of the attacker because we are going to, uh, open the Firefox browser in the attacker PC, opening the, the cookies of the victim.

13:17.230 --> 13:23.430
We delete any cookie in the attacker's browser.

13:35.790 --> 13:37.510
Import the file.

16:10.320 --> 16:13.820
Again, we have the cookies file.

16:14.780 --> 16:21.660
We are going to export information in CSV, CSV format.

16:37.580 --> 16:42.420
And once it's exported, we are going to import.

16:52.800 --> 17:02.540
We are using CSV format in order to make easy the transport between, between files.

17:05.640 --> 17:06.100
To

18:11.310 --> 18:15.930
repeat, in this case, sorry, we are a little bit nervous.

18:16.170 --> 18:16.370
Um

18:28.010 --> 18:30.550
, this is the server.

18:31.630 --> 18:32.170
Uh

18:36.520 --> 18:39.500
, start from the beginning.

18:47.540 --> 18:52.380
The victim clicks on the malicious, uh, site.

18:52.600 --> 18:54.240
Oops.

19:30.540 --> 19:32.220
Victim clicks.

19:32.440 --> 19:34.880
Something is wrong.

19:35.420 --> 19:36.900
Uh, what?

19:36.900 --> 19:38.660
Something is going wrong.

19:40.580 --> 19:54.740
Uh,

20:03.620 --> 20:04.920
better.

20:07.680 --> 20:13.280
If you can see this, this is a virtual machine.

20:13.280 --> 20:15.720
Windows of the victim.

20:15.720 --> 20:18.700
The victim has opened Firefox.

20:19.080 --> 20:21.740
Now we are starting the server.

20:21.900 --> 20:25.840
Same that we did some seconds ago.

20:25.840 --> 20:30.800
And the victim clicks on the malicious file.

20:30.800 --> 20:34.700
Here the connection is received.

20:35.240 --> 20:40.340
And now we execute with the get cookie option.

20:41.240 --> 20:44.780
Here we have exported the, the file.

20:45.680 --> 20:51.780
And here we are export in CSV format.

20:51.780 --> 20:57.200
Select all from the Mozilla cookies table.

20:59.440 --> 21:06.120
This is the cookies file of the Mozilla Firefox of the attacker.

21:06.500 --> 21:11.780
We are going to drop the table with the cookies of the attacker.

21:11.780 --> 21:16.420
And we are going to import here the victim's cookies.

21:16.420 --> 21:26.720
Drop the current table of Mozilla cookies and import with the file generated.

21:27.260 --> 21:30.320
And open Firefox.

21:30.560 --> 21:35.080
And we have the session of the victim.

21:35.460 --> 21:44.980
Please excuse that we didn't achieve this in live show, but it's so difficult to achieve it.

21:44.980 --> 21:51.380
So, these are the three paths that we wanted to, to show.

21:51.380 --> 21:58.460
It's a short description in order when they've conserved the, the, the exploit to everybody.

21:58.700 --> 22:04.000
The malicious game file we have seen so many times this morning.

22:04.760 --> 22:12.280
This is the server, the internet server that receives the communications from the victim.

22:12.280 --> 22:13.960
And this is the attacker.

22:13.960 --> 22:20.020
This is the, the Python that has mainly all the functionality.

22:20.020 --> 22:22.520
Everything is developed in Python.

22:22.700 --> 22:30.080
And well, this is uh, the structure of the exploit.

22:30.920 --> 22:35.340
And well, many thanks for everything.

22:38.890 --> 22:54.690
Incredible hard two days with a lot of problems with connections and what it was hard for us to, to bring, but at least we could show you this, this material.

22:54.790 --> 23:03.230
So thank you very much for everybody, especially for the guys that helped us in the last hour.

23:03.510 --> 23:07.650
Hector Paulino, uh, well, a lot of people.

23:07.690 --> 23:08.810
Raiko.

23:08.850 --> 23:16.150
And thank you everybody to be here and give us the opportunity to tell this and show this.

23:16.150 --> 23:20.330
I hope to, you enjoy with the material.

23:20.330 --> 23:20.850
Thanks.

