hatching / vmcloak

Automated Virtual Machine Generation and Cloaking for Cuckoo Sandbox.
483 stars 120 forks source link

virtualbox reverts vboxnet0 to default in some cases #83

Closed razuz closed 5 years ago

razuz commented 8 years ago

Gents,

whoever comes across an issue where while running vmcloak vboxnet0 (and using non-default IP addesses for vm-s) gets reverted back to default 192.168.56.1. The solution is running following command under user where vmcloak/cuckoo hosts are being deployed: VBoxManage setextradata global "HostOnly/vboxnet0/IPAddress" _GATEWAY_ after that - reboot (to be safe however it's probably not necessary)

it would be nice to know if anyone bumps into this issue to understand if it makes sense to integrate this "fix" into vmcloak

0xThiebaut commented 5 years ago

I encountered the exact same problem.

I'd furthermore add that any configuration done through VBoxManage hostonlyif and VBoxManage dhcpserver gets reset when the first VM boots. Your fix can thus further be extended to also define the network mask.

VBoxManage setextradata global "HostOnly/vboxnet0/IPAddress" "$IPADDR"
VBoxManage setextradata global "HostOnly/vboxnet0/NetworkMask" "$NETMASK"

This typically renders the vmcloak-vboxnet0 command useless unless patched with the above lines which can be appended at the end of the vmcloak-vboxnet0 script.