Conversation
|
I was considering enabling libvirt's built-in filtering chains, which would prevent spoofing activities between VMs, if integration with Nix is possible
What do you think about it? |
Would be great to use a generic mechanism, but that would imply running libvirtd? |
|
I haven't done thorough research yet. However, it may require libvrtd to be running on the host. We could merge this PR and investigate libvirtd later. |
|
Tested on Lenovo-X1
|
|
Tested arp spoofing on Orin AGX as below Set up WiFi connection on net-vm Then connected to admin-vm via ssh and sent some http requests, for example: --> bettercap reported: arp spoofing succeeded both with ghaf mainline image and with image built from this PR |
The host network runs on the bridge, so it can by default see all the traffic - no need for arp spoofing. If you run What you could do to test the setup on orin:
In main, you should see in the If you want to dig more into it, you can include the tcpdump package in the build (on-the-fly install will probably not work in admin-vm) and monitor arp traffic on |
I tested again on Orin AGX. Toggling net-vm MAC address shown on ghaf-host works in main but nothing happens with your branch as you explained. For some reason I was not able to see any http request traffic to ghaf-host with (modified) main image when running bettercap on admin-vm. Maybe if I had set up another vm for running http request it would have worked. Anyways, the arp protection works as you described both on x86 and ARM device. |
Enable static ARP in the internal network, to prevent ARP spoofing and subsequent MITM attacks. Changes: - additional firewall (ebtables) rules on tap interfaces, filtering out arp traffic - sysctl settings to configure arp behaviour on bridge and vm internal interfaces - splitting host networking configuration, allowing to later remove host networking without removing the internal bridge - adding static entries for all known hosts - adding flag for external host networking, allowing to not activate interfaces on the host by default and disable internal host nat Signed-off-by: Manuel Bluhm <manuel@ssrc.tii.ae>
|
Changes:
useful command on the host to verify the effectiveness: |
enesoztrk
left a comment
There was a problem hiding this comment.
It looks good. It would be good to test network services after PR's test steps.
|
Tested on Lenovo-X1 again after the latest changes
|
|
Test again also on Orin AGX after the latest changes
|
Description of Changes
Enable static ARP in the internal network, to prevent ARP spoofing and
subsequent MITM attacks.
arp traffic; and required kernel modules
interfaces
networking without removing the internal bridge
interfaces on the host by default and disable internal host nat
Type of Change
Related Issues / Tickets
Checklist
make-checksand it passesTesting Instructions
Applicable Targets
aarch64aarch64x86_64x86_64Installation Method
nixos-rebuild ... switchTest Steps To Verify:
sudo arp net-vmin chrome-vm before and during spoofing to see MAC address changesudo arp net-vmin chrome-vm before and during spoofing to see no MAC address changeInstructions:
Then open chrome browser on desktop, go to a website and observe traffic in zathura-vm.