IntelLabs / kAFL

A fuzzer for full VM kernel/driver targets
https://intellabs.github.io/kAFL/
MIT License
658 stars 92 forks source link

Remote virt-viewer and provisioning #260

Open amonnymouse opened 1 year ago

amonnymouse commented 1 year ago

Hi.

I'm now preparing Cloud Fuzzing Settings with kAFL.

But there is some problem like this. https://github.com/IntelLabs/kafl.targets/blob/075090677a2384dee43d4f5461623f2c6e637e77/windows_x86_64/Makefile#L23

when i provisioning Target Driver, I want to see the Vm with remote access when provisioning stage.

i want to see Vm with GUI.

this command can apply just localhost, but remote can't access the vm...

Have any good idea to see the Windows VM with Provisioned Driver in remote access?

liujf628995 commented 11 months ago

The kafl windows use spice for remote handling,I added this param in the Vagrantfile(kAFL/kafl/examples/windows_x86_64/Vagrantfile):

libvirt.graphics_port = 5900

then you can connect the vm with spice://localhost:5900 The provisioning stage used winrm and I'm not sure it could be viewed in remote window,maybe we can manually operate the command line from this yaml(kAFL/kafl/examples/windows_x86_64/setup_target.yml) in the remote window to debug.

Wenzel commented 10 months ago

Hi,

when i provisioning Target Driver, I want to see the Vm with remote access when provisioning stage.

The VM will be managed by libvirt, so you should be able to update the domain definition in vagrant: https://github.com/IntelLabs/kafl.targets/blob/master/windows_x86_64/Vagrantfile#L24

And update the graphics_ip to be bound to 0.0.0.0, and you should be able to connect with the SPICE protocol. you can also switch to VNC, but it's less reliable (I had erratic mouse mouvments)