本地渗透测试靶机环境搭建指南(VMware + VirtualBox)

一、整体拓扑

复制代码
  宿主机(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

三、快速排错

  1. 无法获取 IP ➜ 确认 DHCP 服务已开启(VMware/VBox 网络编辑器)
相关推荐
鹏大师运维21 小时前
统信UOS上使用WPS PDF独立版
linux·运维·windows·pdf·wps·统信uos·wine
user_admin_god1 天前
Windows安装Opencode和Claude Code使用
windows·prompt·aigc·ai编程
春日见1 天前
UniAD的逻辑,与传统自动驾驶的差异
人工智能·windows·git·机器学习·docker·容器·自动驾驶
idolao1 天前
MySQL 8.4安装教程 Windows版:解压+自定义路径+密码设置+命令行客户端快捷方式创建指南
windows
开开心心就好1 天前
免费轻量级PDF阅读器,打开速度快
windows·计算机视觉·visualstudio·pdf·计算机外设·excel·myeclipse
阴暗扭曲实习生1 天前
135编辑器API接口设计与开发指南
windows·编辑器
顶点多余1 天前
使用C/C++实现简易版xshell命令行
linux·运维·windows
xyl8661 天前
OpenClaw Windows 启动与关闭完全指南
windows
小付爱coding1 天前
跟着官网学LangChain【第02章:提示词和消息】
windows·python·langchain
墨染天姬1 天前
【AI】linux-windows即将消亡,未来模型即系统
linux·人工智能·windows