Virtually Pwned Pentesting VMware. Claudio Criscione @paradoxengine c.criscione@securenetwork.it

Similar documents
Pen Testing Methodology Gueststealer TomCat Zero Day Directory Traversal VASTO

How to hack VMware vcenter server in 60 seconds

How to hack VMware vcenter server in 60 seconds

Virtualization System Security

Thinspace deskcloud. Quick Start Guide

MetaXSSploit. Bringing XSS in Pentesting A journey in building a security tool. Claudio

Patch Management. Module VMware Inc. All rights reserved

Still Aren't Doing. Frank Kim

Make a folder named Lab3. We will be using Unix redirection commands to create several output files in that folder.

From Hypervisors to Clouds

How to Backup and Restore a VM using Veeam

Vulnerability Assessment and Penetration Testing

How to scan/exploit a ssl based webserver. by xxradar. mailto:xxradar@radarhack.com. Version 1.

Securing your Virtual Datacenter. Part 1: Preventing, Mitigating Privilege Escalation

IDS and Penetration Testing Lab ISA656 (Attacker)

Citrix XenServer 5.6 OpenSource Xen 2.6 on RHEL 5 OpenSource Xen 3.2 on Debian 5.0(Lenny)

Vulnerability analysis

How to install software on VMware ESXi 4.0/4.1

Getting started with OWASP WebGoat 4.0 and SOAPUI.

Out of the Fire - Adding Layers of Protection When Deploying Oracle EBS to the Internet

1. Building Testing Environment

How to Configure an Initial Installation of the VMware ESXi Hypervisor

JOB ORIENTED VMWARE TRAINING INSTITUTE IN CHENNAI

Table of Contents. Online backup Manager User s Guide

Virtualization. Types of Interfaces

Dell UPS Local Node Manager USER'S GUIDE EXTENSION FOR MICROSOFT VIRTUAL ARCHITECTURES Dellups.com

IS L06 Protect Servers and Defend Against APTs with Symantec Critical System Protection

iscsi Security (Insecure SCSI) Presenter: Himanshu Dwivedi

Tenable Webcast Summary Managing Vulnerabilities in Virtualized and Cloud-based Deployments

VMware vcenter Log Insight Security Guide

Managing Multi-Hypervisor Environments with vcenter Server

Application Discovery Manager User s Guide vcenter Application Discovery Manager 6.2.1

Quick Note 052. Connecting to Digi Remote Manager SM Through Web Proxy

Managing Qualys Scanners

Data Center Connector for vsphere 3.0.0

SevOne NMS Download Installation and Implementation Guide

ArcGIS Server Security Threats & Best Practices David Cordes Michael Young

VMware vsphere 5 Quick Start Guide

How to hack a website with Metasploit

Setting Up Scan to SMB on TaskALFA series MFP s.

3. Broken Account and Session Management. 4. Cross-Site Scripting (XSS) Flaws. Web browsers execute code sent from websites. Account Management

NetBrain Security Guidance

Installing and Configuring vcenter Multi-Hypervisor Manager

Hacking Database for Owning your Data

Keyword: Cloud computing, service model, deployment model, network layer security.

Secret Server Qualys Integration Guide

Equalizer VLB Beta I. Copyright 2008 Equalizer VLB Beta I 1 Coyote Point Systems Inc.

Connection Broker Managing User Connections to Workstations and Blades, OpenStack Clouds, VDI, and more. Security Review

Cedric Rajendran VMware, Inc. Security Hardening vsphere 5.5

McAfee Product Entitlement Definitions

Penetration Testing LAB Setup Guide

This session was presented by Jim Stickley of TraceSecurity on Wednesday, October 23 rd at the Cyber Security Summit.

13.1 Backup virtual machines running on VMware ESXi / ESX Server

Protecting the Irreplacable. November 2013 Athens Ian Whiteside, F-Secure

VMware ESXi in a Cloud-based Lab David Davis, VCP, VCAP, and vexpert

Intelligent Power Protector User manual extension for Microsoft Virtual architectures: Hyper-V 6.0 Manager Hyper-V Server (R1&R2)

Web Application Firewall

Deploying and updating VMware vsphere 5.0 on HP ProLiant Servers

FORBIDDEN - Ethical Hacking Workshop Duration

Getting Started with PRTG Network Monitor 2012 Paessler AG

VMware: Advanced Security

RSA Authentication Manager 8.1 Virtual Appliance Getting Started

Websense Support Webinar: Questions and Answers

PowerPanel Business Edition Installation Guide

About the VM-Series Firewall

Cloud Security:Threats & Mitgations

SCO Virtualization Presentation to Customers

Five Steps to Improve Internal Network Security. Chattanooga Information security Professionals

Quick Start Guide for VMware and Windows 7

Locking down a Hitachi ID Suite server

Sharp Remote Device Manager (SRDM) Server Software Setup Guide

IBM Security QRadar Vulnerability Manager Version User Guide

SECURITY TRENDS & VULNERABILITIES REVIEW 2015

POD INSTALLATION AND CONFIGURATION GUIDE. EMC CIS Series 1

Management of VMware ESXi. on HP ProLiant Servers

Web Application Report

VMware vsphere-6.0 Administration Training

Security Solution Architecture for VDI

Evading Infrastructure Security Mohamed Bedewi Penetration Testing Consultant

IceWarp to IceWarp Server Migration

Secure Web Development Teaching Modules 1. Security Testing. 1.1 Security Practices for Software Verification

Learn Ethical Hacking, Become a Pentester

In order to upload a VM you need to have a VM image in one of the following formats:

HelpSystems Web Server User Guide

Xerox Mobile Print Cloud

Ethical Hacking and Information Security. Foundation of Information Security. Detailed Module. Duration. Lecture with Hands On Session: 90 Hours

Virtualization System Vulnerability Discovery Framework. Speaker: Qinghao Tang Title:360 Marvel Team Leader

Conducting Web Application Pentests. From Scoping to Report For Education Purposes Only

I. Create Windows 2012 R2 VMware Template for Guest Customization

VMware Identity Manager Connector Installation and Configuration

Jentu - The VDI Alternative

ESX System Analyzer Version 1.0 Installation Guide

Mitigating Information Security Risks of Virtualization Technologies

Building a Penetration Testing Virtual Computer Laboratory

Security. Environments. Dave Shackleford. John Wiley &. Sons, Inc. s j}! '**»* t i j. l:i. in: i««;

Penetration Testing Report Client: Business Solutions June 15 th 2015

PTSv2 in pills: The Best First for Beginners who want to become Penetration Testers. Self-paced, online, flexible access

Transcription:

Virtually Pwned Pentesting VMware Claudio Criscione @paradoxengine c.criscione@securenetwork.it

/me Claudio Criscione

The need for security

Breaking virtualization means hacking the underlying layer accessing systems locally bypassing access and network controls hitting multiple targets at once...likely being able to find old vulnerabilities 96% of the Fortune 1000 * Small number of different solutions deployed * http://www.vmware.com/company/customers/

The elephant in the room

Escaping the VM Yes, it can be done Yes, exploiting is usually hard Yes, it can be patched Yes, it will happen again No, it is not something you can easily audit We re going to attack virtualization infrastructure

Tools Of The Trade

No Tool was Available

VASTO The Virtualization ASsessment TOolkit It is an exploit pack for Metasploit focusing on virtualization and cloud security. Beta 0.4 will be released shortly after HITB. Tnx to Luca Carettoni, Paolo Canaletti, drk1wi for helping with modules!

VMware.zip Desktop Products: Workstation, Player. Not interesting during PenTest (for now ;) ) Server Products: ESX, ESXi (now Hypervisor), Server The hypervisor layer Management Node: Virtual Center (vcenter), running on Windows Server Client: binary, running on Windows

The Plan

Easy enough, Hannibal would be proud

How do you notice?

Recon Local are you in a VM? Easy Check MAC address, processes Not so easy Hardware access Thanks to Nahuel Grisolia's memory-based detection tool, it's easy as well Remote where s Virtualization? Fingerprinting network services Helpful to discover hidden virtualization installations

vmware_version Handy SOAP API to call Works on most VMware products Module leverages standard Metasploit scanner features (e.g. IP range scanning) [ ] <RetrieveServiceContent xmlns=\"urn:internalvim25\"> <_this type=\"serviceinstance\"> ServiceInstance </_this> </RetrieveServiceContent> [ ]

Every little bit* helps :-) *now with more raw arrays and less parsing

A multi layered attack

In the beginning was the command line We used to have binary clients Then everyone moved to web applications Now, back to binary clients, like XEN Center, or VMware VI client Can we exploit these clients? Let s see

VI Client Auto Update feature

clients.xml <ConfigRoot> <clientconnection id="0000"> <authdport>902</authdport> <version>3</version> <patchversion>3.0.0</patchversion> <apiversion>3.1.0</apiversion> <downloadurl>https://*/client/vmwareviclient.exe</downloadurl> </clientconnection> </ConfigRoot>

vmware_vilurker The VIlurker module can perform user-assisted code execution provided you can do MITM on a client. Almost no one is using trusted certificates. No code signing on updates, but user gets a certificate warning. BONUS INFO: no SSL check on VMware Server

Direct Hit

vmware_guest_stealer CVE-2009-3733 This path traversal was discovered by Flick and Morehouse and presented last year. Exploit was released as a perl script and it has been ported to VASTO. It can be used to retrieve any file as the root user, including non-running guests. Works on outdated ESX, ESXi, Server.

vmware_updatemanager_traversal JETTY-1004 VMware Update Manager includes Jetty 6.1.16 Runs on the vcenter (management) Server Jetty 6.1.16 is vulnerable to path traversal (again) Here is the magic string /vci/downloads/health.xml/%3f/../../../../../../../../../$file

Ok, we can read files on the vcenter (Windows) as System. So what? Follow me!

Introducing vpxd-profiler-* It is a debug file written by vcenter. Lots of information inside. Let s go for lowhanging fruits for now. More to come / SessionStats/SessionPool/Session/Id='06B90B CB-A0A4-4B9C-B680FB72656A1DCB'/Username= FakeDomain\Fak euser'/soapsession/id='ad45b176-63f3-4421bbf0-fe1603e543f4'/count/total 1

So where do I write the SOAP ID?

Ask for advice to your monkey.

vmware_session_rider Using the session is non-trivial: VI client has tight timeouts The module acts as a proxy to access vcenter using the stolen session. Will fake the login to the client and can be easily tweaked to act as a password grabber (unlike VIlurker). The last exploits combined : vmware_autopwn

Bonus! Any read-only access to the vcenter file system means vcenter takeover!

The Interface is FUN Web-based & Complex XSS URL Forwarding BONUS: Shutdown keyword has not been changed, can shutdown local Tomcat

vmware_webaccess_portscan CVE-2010-0686 URL Forwarding means performing POST requests on remote hosts. Can be used to exploit IP-based trusts and reach internal networks. Not just portscan!

Management is not just interface vcenter connects to ESX server via SSL [SOAP] Certificates are usually not valid, but stored. Let's do a nice* diagram SSL [Cert1] SSL [CertA] ESXa SSL [CertB] ESXb vcenter *Diagram powered by ORACLE's Open Office I'm sure it will look better with LibreOffice

Attacking it MITM vcenter ESX Connection Broken On reconnection, the vcenter will check the certificate. And fail, usually. SSL MITM Admin gets usual warning Admin agrees password sniffed If you are a Metasploit guru, let's speak about MITM in Metasploit Later

Differences... It seems 4.0 and 4.1 behave differently when it comes to reconnection 4.0 won't reconnect on a different CN Just change the CN to match the right one Word of advice: You really, really, don't want MITM on any VMware component.

If everything else failed

vmware_login If nothing works, you can always bruteforce! Will do standard metasploit bruteforcing Local Windows Administrator is admin of the vcenter by default, and it has no lockout. For ESX, ESXi the local root user has no lockout. [watch out for AD integration though] Which means a lot of bruteforcing fun.

What s different? Multiple local EscalationOfPriv in Virtual Machines Will eventually include these as modules as well Discovered by great researchers Low level attacks, close to the CPU or OS What else?

Our new Attack surface Paravirtualization and support tools

vmware_sfcb_exec CVE-2010-2667 A vulnerability in Virtual Appliance Management Infrastructure resulting in code exec as root Requires authentication OR can be exploited locally without any authentication.

The attack <?xml version="1.0" encoding="utf-8"?> <CIM CIMVERSION="2.0" DTDVERSION="2.0 > <MESSAGE ID="13" PROTOCOLVERSION="1.0 > <SIMPLEREQ><METHODCALL NAME="SetServerName > <LOCALCLASSPATH> <LOCALNAMESPACEPATH> <NAMESPACE NAME="root"/><NAMESPACE NAME="cimv2"/> </LOCALNAMESPACEPATH> <CLASSNAME NAME="VAMI_NetworkSetting"/> </LOCALCLASSPATH> <PARAMVALUE NAME="HostName" PARAMTYPE="string > <VALUE>121;$(echo${IFS}ls${IFS}-l)>/tmp/echo</VALUE> </PARAMVALUE> </METHODCALL> </SIMPLEREQ></MESSAGE></CIM> Kudos to Marsh Ray and others for this Twitter-Powered payload ;-)

External references If you didn't see Brossard yesterday you missed out :-) Go back and see the internal differences!

So, can we attack virtualization?

Summing up You can attack the admin client, sniffing the password or owning the administrator You can attack the hypervisor and its core modules (by path traversal) You can hijack other user s sessions You can attack the administration web interface You can attack supporting services on the virtual machine So, we have a problem!

Questions

What now? Rethink about virtualization security Check what you have Keep on hacking! Claudio Criscione Twitter - @paradoxengine Email - c.criscione@securenetwork.it Blog & Download - vasto.nibblesec.org Work & Virtualization PenTest securenetwork.it