Actually, this already works using VirtualBox’s NAT networking mode in your guest. What doesn’t work is resolving domain names from the guest that are only known in the VPN network.
So if you have a a domain like w3.mycompany.com that only resolves using the VPN’s DNS, you can resolve that name from your host (which is connected to the VPN), but not from your guest by default. You won’t be able to ping w3.mycompany.com from the guest. However, if you try to ping the IP address from your guest, that works.
To solve this, VirtualBox has a nice feature to allow you to set the Host DNS resolver as the DNS proxy of a VirtualBox VM. To configure this, you first need to figure out the id of your VirtualBox VM:
$ VBoxManage list vms