We would like to say, first of all, thanks to everybody that made it possible to be here. To the DEF CON staff, the Baidu, everybody. This is a dream. Thank you very much. Well, we both are a big bag of nerves, so we will try to do our best. Well, presentations. My partner, my colleague, he comes from Argentina. He's one of the members in the red team in ASEC Auditors. We work together. And he is a bug bounty hunter since a long time ago. Well, this is his Twitter account. And me. I am Gonzalo Sanchez. I come from Spain. I'm the red team leader in ASEC Auditors. And well, this is my LinkedIn account, in case anybody wants to contact. Yeah. Hello, DEF CON. Today we present how to use Google with different compression formats. Well, what we are going to talk. We bring to the account a vulnerability in Google Earth. Why Google Earth? Well, because Google is a challenge. A very huge company with fantastic products, with a very good reputation, with reliable levels of security in their products. Many people use Google products. 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. Very huge, very big. So in this case, for malware application, it's perfect. Nice Kilombo. This is the name of the account. Nice Kilombo. Kilombo is a very popular phrase in Argentina, which refers to have one or more problems. Confusion, problem, mess. This is Kilombo. Well, the attack vector, KML files. What is a KML file? It's a file with a very similar format to XML, with graphical information inside. This is the key import table in Google Earth. We are going to work with the description file of the KML file. We are going to show an example of a file. Please guys, can you connect the screen? We are going to show a file, an example of KML file with a location that is this hotel. Wow. Easy. It's a very similar format comparing to, sorry, with XML file. The key here is that we have field files with the location of the hotel, name, swap, and here the magic, the description file. This is the file that we are going to use in the next vulnerabilities. Another kind of file for attack vectors came in set. It's the same of KML file, but compressed with zip format. If you take the same file that we have seen, you compress it in zip file and you import it in Google Earth. Google Earth renders the file and shows the location. Easy. There is no need to waste time. 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. They are not suspicious files. We are familiar with executable files talking about malware, but probably if you see a KML file, you don't suspect about this file. This is an advantage for us. It's obfuscated because it's compressed and it's very common in Internet. We can find a lot of files in Internet. Where can we find this kind of files? Forums, for example, Pokemon Go, sites of bicycles routes, official sites with geographical information, airquakes, fires. This is an example of NASA. There's a lot of sites sharing information in this kind of formats. This is the victim and host with Google Earth. The victim imports a KML file and into this file comes the downloader. 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. And after that, the connection directly with the attacker. We have detected this problem with the current versions of Google Earth for Windows and Linux. In this presentation, we are focused on the Windows version. Summary. Location. The vulnerability is present into the JavaScript core of Google Earth. And we are talking about a null pointer and also an injection of JavaScript. We are going to see this in detail. Well, we bring three impacts to show. A remote cell and a Google cookie takeover using the null pointer vulnerability and a Monero mining using the JavaScript injection. This is a virtual machine that will be the attacker. And the victim is my computer. And my computer is Windows. Okay. And this is the virtual machine with the real attacker. Well, the victim has Google Earth and he has imported a site with an arbitrary name that is in this case is Google One. Well, we have to start the server. The server is the intermediate server. In order to make easy the presentation, the intermediate server and the attacker will be the same machine. This one. Okay? The intermediate server is the attacker. Okay. This is the intermediate server. The victim has imported and clicked on the site and the connection has received into the intermediate server. So, we have it. And we are going to show the remote cell. The impact one. Okay. First of all, basic execution. We will show and we will show the exploit. Um, well, Defcon has the exploit and probably will show when Google fix this, this problem. But, uh, this is a help to, to use it. Um, we are going to execute the command. Remote command. Basic operation like, uh, sample and it's received. And now we can access to files in the victim. The file is downloaded and we have it into the attacker machine. We have access to the victim's file. The file is downloaded and we can check it. Bingo. Okay. This is for the impact one. Remote cell and file access into the victim's file. Okay. Um, okay. Um, guys, please return to presentation. Impact two. We are going to use the victim's computer to mine Monero. 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. Here we are not exploiting, uh, the null pointer vulnerability. Uh, here we are injecting JavaScript code into, um, description file. What we are doing here is connect with coin hive and downloading the JavaScript code for the Monero mining. Um, when you import this file in Google Earth, machine starts mining and resources collapse and what? You have a problem with your, with your computer. 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. So we can continue with the presentation. And the last impact is the Google account hijacking. Um, what we are going to do is to take over the cookies of the victims. 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. What do we need in this case? 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. With this, uh, file with the, the credentials inside. 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. Now we go to our browser. 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. We delete any cookie in the attacker's browser. Import the file. Again, we have the cookies file. We are going to export information in CSV, CSV format. And once it's exported, we are going to import. We are using CSV format in order to make easy the transport between, between files. To repeat, in this case, sorry, we are a little bit nervous. Um, this is the server. Uh, start from the beginning. The victim clicks on the malicious, uh, site. Oops. Victim clicks. Something is wrong. Uh, what? Something is going wrong. Uh, better. If you can see this, this is a virtual machine. Windows of the victim. The victim has opened Firefox. Now we are starting the server. Same that we did some seconds ago. And the victim clicks on the malicious file. Here the connection is received. And now we execute with the get cookie option. Here we have exported the, the file. And here we are export in CSV format. Select all from the Mozilla cookies table. This is the cookies file of the Mozilla Firefox of the attacker. We are going to drop the table with the cookies of the attacker. And we are going to import here the victim's cookies. Drop the current table of Mozilla cookies and import with the file generated. And open Firefox. And we have the session of the victim. Please excuse that we didn't achieve this in live show, but it's so difficult to achieve it. So, these are the three paths that we wanted to, to show. It's a short description in order when they've conserved the, the, the exploit to everybody. The malicious game file we have seen so many times this morning. This is the server, the internet server that receives the communications from the victim. And this is the attacker. This is the, the Python that has mainly all the functionality. Everything is developed in Python. And well, this is uh, the structure of the exploit. And well, many thanks for everything. 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. So thank you very much for everybody, especially for the guys that helped us in the last hour. Hector Paulino, uh, well, a lot of people. Raiko. And thank you everybody to be here and give us the opportunity to tell this and show this. I hope to, you enjoy with the material. Thanks.