Subscribe to Blog via Email



Kali Linux, Penetration Testing

Post Exploitation in VMware Files with Meterpreter

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


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

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

From the given image you can perceive I have seized 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 a .vmx file in the actual operating system in order to create a new virtual image.

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

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

Using cat command you can read the content of the file as these file simple text document which contains 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 the vmdk file of Windows Server 2012.

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

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.


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

Leave a Reply

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