tetrane / reven-community

Join the REVEN community. Ask questions, talk about reverse engineering, discuss REVEN, and show off your work!
13 stars 1 forks source link

How to configure bridged networking #29

Closed renzhexigua closed 2 years ago

renzhexigua commented 2 years ago

When booting a VM with Enable network, the VM uses the DHCP mode by default. The underlying cli to launch this VM seems like this:

panda-system-x86_64 -m 1024M -hda /home/user/VMs/Windows7_x64.qcow2.snapshots/root2.qcow2 
    -usbdevice tablet -chardev socket,path=/tmp/2022-11-14T173415.896061+0800.sock,server,nowait,id=monsock 
    -monitor chardev:monsock 
    -net nic -net user,id=mynet0,net=10.0.2.0/24,dhcpstart=10.0.2.15 
    -vnc 127.0.0.1:10,password=off

I wonder how to configure the VM in other common networking settings, like bridged networking, so that it can be accessed by other hosts on the same network segment as the REVEN server.

Host Environment

qb1 commented 2 years ago

Hello renzhexigua, On enabling Host -> Guest communication, it depends on what you want to do.

By far the simplest method is to map ports from the host to the guest, so that accessing the host's port will instead point to the guest's:

If you need to go the full bridge route, you will need to create that bridge on the system first. I found that the gist at https://gist.github.com/extremecoders-re/e8fd8a67a515fee0c873dcafc81d811c provides an effective starting point, however if that does not work as-is for your system you will have to dig a bit deeper into debian's documentation.

A few REVEN-specific notes about the above guide:

In both situations, if the VM fails to start, you may have entered invalid options, so check the logs: in the Task & Sessions section, click on see all under Active Sessions, locate the upper-most stopped VM session, and click on the Details button.

Hope this helps.

renzhexigua commented 2 years ago

Thank you for your tips, and I'll give it a try :)