By default, VMware Player will use Network Address Translation (NAT) to provide your virtual machine (VM) with network connectivity. At a basic level, this means that your VM will share an IP address with your host operating system (OS). Your host will then use the concept of NAT to ensure that responses to traffic emanating from your VM are directed to it accordingly.
Using NAT is fine for the majority of VM usage, however, there are some circumstances where it’s better to have your VM in bridged mode. When bridged, a VM will have its own IP address on your actual network and will act as if it is a physically separate system on the network. From a penetration testing perspective, this is vital as many scanning tools, such as vulnerability scanners, will fail to work properly in a NATed environment. This is because using NAT adds extra processing overhead to any data transmitted to and from the VM, which, when combined with the already large amount of processing required to handle all the data being transmitted in a vulnerability scan, ensures that some data is lost in transit. The scanner then interprets the missing data as a false negative, thus invalidating any scan results. A useful table comparing the differences between the three virtual network card settings (the third is host only) can be viewed here.
To switch to bridged mode in VMware Player, you simply have to select Edit virtual machine settings when the VM is powered off, or, when powered on, right click the Network Adapter icon in the bottom right and then select Settings. You can then select bridged mode and your VM will use DHCP to obtain an IP address from your DHCP server (most likely your router if you’re on a small/home network). Leave Replicate physical connection state unchecked otherwise you may experience issues with the interface going up and down as a real network adapter would.
This will, however, only work if you are on a wired network, i.e. you are physically connected to a network device via something like a Cat-5 cable. This is because VMware Player will, by default, automatically bridge your wired interface. Thus if you are attempting to connect to a wireless network, it will fail as your wireless interface has not been bridged.
It must be noted that, in the vast majority of cases, a wired connection to your network is advantageous as there is considerably less data loss than when connecting wirelessley. However, using wireless is often unavoidable in certain situations, such as due to inconvenient router placement or when needing to be mobile whilst accessing the network.
To bridge our wireless network we need to further edit VMware Player’s network adapter settings. We can achieve this using a tool called vmnetcfg.exe that comes with the VMware Player installer, but unfortunately isn’t installed by default. Therefore, we need to extract it from the VMware player installer.
To begin with, if you’ve deleted your VMware Player installer, you can download it again here. Once you have a copy of it, open up a command prompt and browse to the installer file location. So Start > Run and type in cmd.exe and hit enter. Then browse to the appropriate folder, using cd. For me, I entered cd C:\Users\Dave\Downloads. We now need to run the installer with the /e option, which will extract its contents to a folder of our choosing, as oppose to installing. So the command should be something like, VMware-player-4.0.2-591240.exe /e netcfg.
You can then close the command prompt and then open up the folder you extracted the contents to, which will be in the same directory as the installer. Once in the folder, open up the file called network.cab. You will need decompressing software to do this as it’s a cabinet file; if you do not have any, I highly recommend the free 7-Zip. When opened, select vmnetcfg.exe in 7-Zip then hit extract and enter the location of your VMware player installation. In my case, it was C:\Program Files (x86)\VMware\VMware Player\.
You can then delete the folder containing the extracted contents as we have no further use of them. Next, browse to your VMware Player folder and open up the vmnetcfg.exe tool. You then want to select VMnet0 as this is the default bridged virtual network interface used by VMware player. Ensure Bridged is checked and in the drop down menu select your wireless network card.
You can then press OK and from now on VMware Player will automatically bridge your wireless network card when in bridged mode, thus giving you full wireless connectivity from your VM!