Hello everyone. Before we start, if you have empty seat near you, raise your hand. It's okay. Okay, let's start. Hello everyone. My name is Alexander Nershenko. This talk is how to hack VMware with Android server. In this talk I will discuss some ways to gain control over vCenter, which means to the whole network. I will describe few non-dangerous bugs. There were zero days when we found them. But if you can use all of them together, we can hack vCenter. So, just about me. I work as penetration testing at RPSCAN company. We do some business security, research, and testing. Also, I'm one of the organizers of DEF CON group in Russia and Zero Nights Conference. Also, I'd like to play sometimes CTF. And this talk was prepared with Alexey Sinsov. So, thanks to him for ideas and support. Unfortunately, he couldn't attend DEF CON. But we will do it. Before we start talking about VMware, I would like to talk about pentest in general. So, the main goal of pentest is to show weak elements in infrastructure, how to hack system, why we can hack it, and show how we can hack it. We have usually large number of targets, different types. And unfortunately, we didn't have usually not much information. So, we couldn't use all bug-hunting methods like source code review because it's usually a lot of time and we need source reverse engineering. The same reason we could use a little bit of phasing if we have web or binary. Anyway, usually we can use logic, looking for logic flow. And searching bugs and public research. I would like to show that using public research like old bugs, old research, old information, and little bit analysis, we can find new bugs. So, one day we have network, big network. And all infrastructure was built on VMware ESXi host and vSphere. So, all seems pretty secure. All patched up with latest updates. There was no default password or anything stupid. So, we decided to try to attack vCenter server. Because vCenter is a solution to manage vSphere. So, if you can hack vCenter, we can hack all VM, machine, and all infrastructure. So, we have vCenter version 4.1 update 1. There are a lot of services on vCenter like update manager, orchestrator, chargeback. And each service has a web server. And usually use Java technology. So, first thing we found in a public source. It's old Directed Arousal discovered by Claudio Crestoni. It's classic Directed Arousal, I think. But it was fixed in our version. So, it's bad. But Alexey Sensov didn't trust any fix of patch. And after few minutes, he found another Directed Arousal. So, it's bad. But it's almost in the same place. Now, there are Metasploit module for this Directed Arousal. So, we can read any file. But what file to read? Claudio proposed to read a file with a GSD profile. It's a log file. And vCenter uses SOAP protocol. And this log file contains SOAP request with session ID. So, if we replace our session ID with session ID file, we can get admin access. He also developed a tool called Vasta. It has collection of Metasploit modules. And also has a local proxy for this task. But unfortunately, it also was fixed in our version. But it contains IP addresses of administrators. It contains IP addresses of admins. We can try use classic attack. Like make IP poisoning. Spoof SSL certificate. And sniff traffic. But administrators of this network was really clever. And they add certificate to trust it. And didn't clear knock button. So, it doesn't work. So, we find another way. We just steal key with Directed Arousal. And make IP address. Make IP Poisoning. Decrypt traffic. But what if IP spoofing doesn't work? So, we do little bit analysis. And found vCenter Orchestrator. It's a software for automatic configuration and management vCenter. It's instant by default with vCenter. It has interesting files. Like gate etc. Password properties. It contains md5 hash without assault. So, nowadays like I know it's not very secure. So, we've caused brute forces and gain control. So, we get in. And this is interface of Orchestrator configurations. Like you can see there are a lot of plugins and pages. Interesting like database, LDAP, mail, SSL. All that pages. Almost all have password field in them. So, we think that it will be cool if we can read without password fields. And actually there wasn't just plain text. Yeah, just like that. Pretty easy for hackers. It's a job. So, we also find interesting files. Like vs. xml. And vml properties. This file looks like this. It has something like. It looks like a hash. But actually it didn't hash. Because it has odd length. So, definitely not hash. So, I encoded few passwords. And as you can see. The first read by password. So, I encoded few passwords. And it looks like a length. Green bytes was always constant. And they was in ASCII range. And black bytes. When you encode other passwords. Or the same password. They was every time different. And also I would like to say. That now there are knowledge base. Article from VMware. About this issue. So, I decompile application. And found that. It has pretty simple algorithm. It just generates 60 random string. Then take password. Password symbol. Add position of this password. And that's all. I think not very clever decision. To store password in this format. So, I write simple decoder. And ruby. So, it's another way. To hack a system. But there was. Another way. We didn't find that bug. During our penetration testing. But I think it's very interesting bug. It was discovered. By guys from digital defense. And they found out. That vCentral orchestrator. Has old strats library. And that library. Has remote code execution bug. Discovered by Mideq. Do you believe? It was bug. In handling. OJNL expression. OJNL expression is language. For setting and getting. Java properties. And each CCP parameter. Is as. OJNL expression. So, you could just. Bypass. This unicode. Hash sign. And execute any java code. So, it's this example of exploit. You just. Insert this code. And get request. And get remote code execution. So, I think that's. Often. During penetration testing. We have like a big system. Big applications. Which has a lot of library. And dependency. So, I think that's maybe cool. To have some tool. To find fast. So, I write this. This tool. It just get library name. Gets its version. And search. And so we have the base. Now it use. Standard. But in future. I would like to make my own. Database of mobility. So, there are four vectors. To attack the center. We find out. Dict traversal. And IRP poisoning. Dict traversal. And password decoding. And remote execution. Using strats bug. Also. V center infrastructure products. There are a lot of products. With V center. Like operation management suite. Capacity configuration. Management. They all have some sort of credentials. For. There are maybe another. Vulnerabilities in the system. So, if you have one. You may think about. How make it more like. Secure. So, for hardening. I recommend to update. Of course. Virtual. Filter administration services. And configurations. Such like. Usual user. Didn't have access to this. Documents. It has a lot of tips. Which may prevent. From zero days vulnerability. Like. To make permission. On SSL certificate. And passwords. Something like that. So, conclusion. That patch. Not always fix bug properly. And. If pin tester. Can get more profit. If he tries to research. Something. And few simple bugs. And we can own. All infrastructure. So, I think that's all. I think. We have time. Any questions?