一、整体拓扑
宿主机(Win/Linux)
├─ VMware Workstation → Kali Linux(主力攻击机)
└─ Oracle VirtualBox → 各类靶机(VulnHub、本地镜像)
原则是 ova 靶机一律装在 VirtualBox ,若导入后名称是"vm"且网卡无法识别,说明为 VMware 上制作的靶机,此时只能用 VMware 导入。
二、两种网络方案
方案 | 配置要点 | 优点 | 缺点 | 适用场景 |
---|---|---|---|---|
① 隔离模式 | Kali 新增一块桥接至 VirtualBox Host-Only | 靶机网段干净,无外部干扰 | 靶机无法访问互联网 | 离线漏洞演练、CTF 复盘 |
② 直通模式 | VMware & VirtualBox 均桥接到物理网卡 | 靶机可联网,更新方便 | 易受物理网络影响,可能出现 IP 冲突、广播风暴 | 需要在线拉取 payload、模拟真实攻防 |
方案一配置:
vmware:
kali设置静态ip:
bash
└─# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.111.5
netmask 255.255.255.0
gateway 192.168.111.2
auto eth1
iface eth1 inet static
address 192.168.56.5
netmask 255.255.255.0
gateway 192.168.56.2
其中eth0为nat网卡,eth1为vbox桥接网卡
virtualbox:
注:VirtualBox 默认 Host-Only 网段为
192.168.56.0/24
三、快速排错
- 无法获取 IP ➜ 确认 DHCP 服务已开启(VMware/VBox 网络编辑器)