hatching / vmcloak

Automated Virtual Machine Generation and Cloaking for Cuckoo Sandbox.
479 stars 118 forks source link

Error taking snapshot #161

Closed gussj closed 4 years ago

gussj commented 4 years ago

I receive this message when I try to create a snapshot:

(cuckoo) cuckoo@csand:~$ vmcloak snapshot w7x64cukoo cuckoo1 192.168.56.101 VBoxManage: error: Cannot change type for medium '/home/cuckoo/.vmcloak/image/w7x64cukoo.vdi': the media type 'MultiAttach' can only be used on media registered with a machine that was created with VirtualBox 4.0 or later VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MediumWrap, interface IMedium, callee nsISupports VBoxManage: error: Context: "COMSETTER(Type)(enmMediumType)" at line 727 of file VBoxManageDisk.cpp ERROR:vmcloak.vm:[-] Error running command: Command '['/usr/bin/VBoxManage', 'modifyhd', u'/home/cuckoo/.vmcloak/image/w7x64cukoo.vdi', '--type', 'multiattach']' returned non-zero exit status 1

gussj commented 4 years ago

Just to clarify I have virtualbox 6: (cuckoo) cuckoo@csand:~$ vboxmanage --version 6.0.12r133076

samwakel commented 4 years ago

Use VBox 5.2

-------- Original message -------- From: Gustavo notifications@github.com Date: 24/09/2019 4:24 AM (GMT+08:00) To: hatching/vmcloak vmcloak@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [hatching/vmcloak] Error taking snapshot (#161)

Just to clarify I have virtualbox 6: (cuckoo) cuckoo@csand:~$ vboxmanage --version 6.0.12r133076

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/hatching/vmcloak/issues/161?email_source=notifications&email_token=AIE2WDHZK7BW3MGTN3W44I3QLEQZBA5CNFSM4IZRLLI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7ME2WY#issuecomment-534269275, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AIE2WDHBNZIAEWKRSR5JJVTQLEQZBANCNFSM4IZRLLIQ.

gussj commented 4 years ago

Worked. Just curious do you know if it's not compatible because of the way of the VM is created?. Thanks,

Use VBox 5.2 -------- Original message -------- From: Gustavo notifications@github.com Date: 24/09/2019 4:24 AM (GMT+08:00) To: hatching/vmcloak vmcloak@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [hatching/vmcloak] Error taking snapshot (#161) Just to clarify I have virtualbox 6: (cuckoo) cuckoo@csand:~$ vboxmanage --version 6.0.12r133076 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub<#161?email_source=notifications&email_token=AIE2WDHZK7BW3MGTN3W44I3QLEQZBA5CNFSM4IZRLLI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7ME2WY#issuecomment-534269275>, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AIE2WDHBNZIAEWKRSR5JJVTQLEQZBANCNFSM4IZRLLIQ.

samwakel commented 4 years ago

It's a known problem with multi-attach virtual disks in Virtualbox 6 not VMCloak. From what I've read, even manually creating the VMs will give us the same errors.

https://www.virtualbox.org/ticket/18296

T0XICITY commented 4 years ago

Creating the virtual machines manually using the virtualbox media manager worked for me. More details can be found here https://t0xicity.com/blog/cuckoo_sandbox/

chirrindul commented 2 years ago

Thanks for the solution T0XICITY !

Does anybody know which commands do I have to use to perform the same steps followed in that blog (https://t0xicity.com/blog/cuckoo_sandbox/) using vboxmanage (or other commands) ? I have an Ubuntu server, not a desktop.

I've tried

vboxmanage createvm --name ParaTirar --ostype Win7x64 --basefolder /home/cuckoo/tmp/
Virtual machine 'ParaTirar' is created.
UUID: dbc93e4a-73a6-4492-9a20-ca1ee4c68418
Settings file: '/home/cuckoo/tmp/ParaTirar/ParaTirar.vbox'

Then I've tried to use the steps at the very end of https://www.virtualbox.org/ticket/18296, but the name used (ParaTirar) is not recognized:

vboxmanage storageattach "ParaTirar" --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium "/home/cuckoo/.vmcloak/image/win7x64cuckoo.vdi" --mtype normal
VBoxManage: error: Could not find a registered machine named 'ParaTirar'

Thanks.

GuilhermeVF commented 2 years ago

@chirrindul you came to a solution? i'm having the same problem with my installation on a ubuntu server. Any help would be apreciated. Thanks in advance

ammar0097 commented 1 year ago

vmcloak snapshot --count 4 win7x64cuckoo 192.168.56.101 VBoxManage: error: Machine settings file '/home/cuckoo/.vmcloak/vms/192.168.56.1011/192.168.56.1011.vbox' already exists VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component MachineWrap, interface IMachine, callee nsISupports VBoxManage: error: Context: "CreateMachine(bstrSettingsFile.raw(), bstrName.raw(), ComSafeArrayAsInParam(groups), bstrOsTypeId.raw(), createFlags.raw(), machine.asOutParam())" at line 276 of file VBoxManageMisc.cpp ERROR:vmcloak.vm:[-] Error running command: Command '['/usr/bin/VBoxManage', 'createvm', '--register', '--name', '192.168.56.1011', '--basefolder', '/home/cuckoo/.vmcloak/vms']' returned non-zero exit status 1 Traceback (most recent call last): File "/home/cuckoo/.virtualenvs/venv/bin/vmcloak", line 8, in sys.exit(main()) File "/home/cuckoo/.virtualenvs/venv/lib/python2.7/site-packages/click/core.py", line 716, in call return self.main(args, kwargs) File "/home/cuckoo/.virtualenvs/venv/lib/python2.7/site-packages/click/core.py", line 696, in main rv = self.invoke(ctx) File "/home/cuckoo/.virtualenvs/venv/lib/python2.7/site-packages/click/core.py", line 1060, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/cuckoo/.virtualenvs/venv/lib/python2.7/site-packages/click/core.py", line 889, in invoke return ctx.invoke(self.callback, ctx.params) File "/home/cuckoo/.virtualenvs/venv/lib/python2.7/site-packages/click/core.py", line 534, in invoke return callback(args, **kwargs) File "/home/cuckoo/.virtualenvs/venv/lib/python2.7/site-packages/vmcloak/main.py", line 584, in snapshot vrde, vrde_port, interactive File "/home/cuckoo/.virtualenvs/venv/lib/python2.7/site-packages/vmcloak/main.py", line 480, in do_snapshot m, h = initvm(image, name=vmname, multi=True, ramsize=ramsize, cpus=cpus) File "/home/cuckoo/.virtualenvs/venv/lib/python2.7/site-packages/vmcloak/main.py", line 57, in initvm m.create_vm() File "/home/cuckoo/.virtualenvs/venv/lib/python2.7/site-packages/vmcloak/vm.py", line 77, in create_vm basefolder=vms_path, register=True) File "/home/cuckoo/.virtualenvs/venv/lib/python2.7/site-packages/vmcloak/vm.py", line 41, in _call raise CommandError vmcloak.exceptions.CommandError

anyone have the solution pls ? T0xicity Blog not working ......