Port Forwarding for Reverse Shells🔗
If you use your vm as NAT network "Shared with My Mac" You can forward a port to your host macOS machine.
The network configuration files are stored their respective folders within the VMware Fusion preferences folder.
In order to find the right network config you can inspect the dhcpd.conf inside of vmnet* folders.
After you found the correct network it should contain a nat.conf file Edit the (with sudo privileges) nat.conf, For UDP protocol edit the section [incomingudp] for TCP protocol edit the [incomingtcp]
In the next example we will forward port 4444 from VM to the 4444 port on the host. You can foreword any port to any port as you like.
After you saved the configuration nat.conf file you must restart VMware's network services
You do NOT need to restart the Virtual Machine
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --stop sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --start
If you want to test the port forwarding is working as it should here's an example of running simple python webserver on the vm on port 4444 we configured before:
python -m SimpleHTTPServer 4444