Problem with rdate command and virtualbox Kali VM

I had quite a problem few past days to get the rdate command work, and at the suggestion of some slack community member i will expose this problem and a solution here.

First of all i will expose the setup that i am using, you will see this is relevant. I run the kali linux image for virtualbox that can be found on the oscp website. It is up to date with extensions tools installed. My hosting machine run an up to date kubuntu version.

Now the problem. I needed to use the command rdate to sync myself with a DC in the optic to get a golden ticket. I will not tell more about the machine, my goal here is not to spoil. When i runned the rdate command inside the virtualbox vm, the time would reverse after 5 sec anytime and i was not able to get my ticket because i was offsync with the DC. First i was thinking that the VPN tunnel with HTB was the problem because i saw the tunnel connection restarted every time. But it was not.

I created a new kali vm inside virtualbox virgin without tools and anything. Then i tried as suggested to use rdate to sync myself with The same problem was occurring, the time kept reverse back to the host time. I had found that VirtualBox automatically sync the time of the VM with the time of the host. I searched on the internet and there is no easy way to stop that (or i did not find it).

So the workaround. You need to run your vpn htb ‘connection pack’ to your host machine. Then connect to HTB and make an rdate of the server/DC you want to sync with. Your host will now have the good date/time. After you do it on your virtualbox VM (i am not sure if it is required as the host sync with VM) and this solve the problem as the date/time will be good enough to get what you want.

Hope this help some with the same issue because virtualbox is widely used.

nice, though I didn’t have any problems with it inside virtualbox

Hey, friends! There is simple solution :wink:

To disable this setting, just follow below steps while VM is shutdown:

1. Open Command Prompt and navigate to folder where you have installed Oracle Virtual Box. For me it was “C:\Program Files\Oracle\VirtualBox”
2. Run this command: `VBoxManage setextradata "[VM name]" "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1`
3. [VM name] is the VM name in Oracle VM VirtualBox Manager
4. Now run your VM and profit

Credit: Disable Time Sync for VirtualBox Virtual Machines – straight to the core