-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Summary
Add a Python demo/tool that uses vmnet-helper to provide an interactive Scapy REPL for vmnet networks. This allows sending and receiving raw Ethernet frames to/from any VM or external host.
Motivation
Normally, raw Ethernet access requires root privileges. vmnet-helper provides unprivileged access to vmnet networks via a file descriptor, making it possible to:
- Debug VM networking - see what's on the wire
- Learn networking - craft packets interactively
- Test connectivity between VMs
- Security testing - inject traffic into VM network
Example usage
from scapy.all import *
import vmnet_helper
# Get file descriptor for the shared network
fd = vmnet_helper.acquire("shared")
# Sniff traffic
sniff(fd=fd, count=5)
# Send ARP request
sendp(Ether()/ARP(pdst="192.168.105.2"), fd=fd)
# Ping external host via vmnet gateway
sendp(Ether()/IP(dst="8.8.8.8")/ICMP(), fd=fd)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels