Post Exploitation in VMware Files with Meterpreter

Hello friends!! Today you will learn How to exploit any Operation System running inside a virtual machine.

Requirements

  • Attacker: Kali Linux
  • Target: VM image windows server 2012

First the attacker needs to exploit actual operating system of victim PC and attain the meterpreter session with admin privileges.

From given image you can perceive I have seize a windows 10 meterpreter session and also gained its admin privileges. 

When you install any operating system in your vmware workstation, all of its hardware and network setting get stored as .vmx file in actual operating system in order to create new virtual image.

Type following for making search of .vmx file stored in it

From given image you can perceive that it has dump the all location where .vmx files are stored.

Using cat command you can read the content of file as these file simple text document which contain vmware setting information.

Here from given below image you can read the details of this file which is describing network and hardware setting.

This module mounts a .vmdk file (Virtual Machine Disk) on a drive provided by the user by taking advantage of the vstor2 device driver (VMware). First, it executes the binary vixDiskMountServer.exe to access the device and then it sends certain control code via DeviceIoControl to mount it. Use the write mode with extreme care. You should only open a disk file in writable mode if you know for sure that no snapshots or clones are linked from the file.

Great!! We have successfully mount vmdk file of Windows Server 2012.

Now from given below image you can read the information of each drives.

Now using given below command I will upload an exe backdoor in L: drive which will give us reverse connection of windows server 2012 when it will be running inside vm workstation.

Awesome!! We have successfully exploited Windows Server 2012 virtual machine and gained its meterpreter session.

Source: http://www.shelliscoming.com/2017/05/post-exploitation-mounting-vmdk-files.html

Author: Sanjeet Kumar is a Information Security Analyst | Pentester | Researcher  Contact Here

Leave a Reply

Your email address will not be published. Required fields are marked *