GOAD(game of Activate Directory)本地(ubuntu24.04+virtual box)部署

文章目录

相关资料

安装环境说明

  • os:ubuntu24.04
  • os kernel:6.17.0-19-generic
  • vm:virutalbox

正确安装步骤

  1. 安装virutal box
bash 复制代码
 sudo dpkg -i virtualbox-7.2_7.2.6-172322_Ubuntu_noble_amd64.deb
  1. 安装vargrant和相关插件
bash 复制代码
wget -O - https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(grep -oP '(?<=UBUNTU_CODENAME=).*' /etc/os-release || lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install vagrant
vagrant plugin install vagrant-reload vagrant-vbguest winrm winrm-fs winrm-elevated
  1. 项目下载和安装(无需主动创建虚拟环境,默认路径在/home/用户名/.goad/.venv/lib/python3.11/site-packages ,分析goad.sh文件可知)
bash 复制代码
git clone https://github.com/Orange-Cyberdefense/GOAD.git
cd GOAD
# 安装ansible依赖
cd ansible
# python <3.11
ansible-galaxy install -r requirements.yml
# python => 3.11
ansible-galaxy install -r requirements_311.yml
# 部署靶场
cd ../
./goad.sh -p virtualbox
GOAD/virtualbox/local/192.168.56.X >check
GOAD/virtualbox/local/192.168.56.X > set_lab <lab>  # here choose the lab you want (GOAD/GOAD-Light/NHA/SCCM)
GOAD/virtualbox/local/192.168.56.X > set_ip_range <ip_range>  # here choose the  ip range you want to use ex: 192.168.56
GOAD/virtualbox/local/192.168.56.X > install

问题

virtual box报错问题

  • goad终端命令报错
bash 复制代码
The provider 'virtualbox' that was requested to back the machine
'GOAD-DC01' is reporting that it isn't usable on this system. The
reason is shown below:

VirtualBox is complaining that the kernel module is not loaded. Please
run `VBoxManage --version` or open the VirtualBox GUI to see the error
message which should contain instructions on how to fix this error.
  • virtual box手动开启虚拟机报错
bash 复制代码
Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver is either not loaded or not set up correctly. Please try setting it up again by executing

'/sbin/vboxconfig'

as root.

If your system has EFI Secure Boot enabled you may also need to sign the kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load them. Please see your Linux system's documentation for more information.

where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT.
  • VirtualBox 的 Linux 内核驱动未安装 / 未加载,90% 是内核更新后驱动失效,10% 是开启了 Secure Boot(安全启动) 导致模块无法加载。

原因一:内核驱动问题

  • 重新生成 VirtualBox 内核驱动
bash 复制代码
root@yang-super-pc:~# sudo /sbin/vboxconfig
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
This system is currently not set up to build kernel modules.
Please install the gcc make perl packages from your distribution.
This system is currently not set up to build kernel modules.
Please install the gcc make perl packages from your distribution.

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.  If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.
  • 安装缺失的依赖,重新执行
bash 复制代码
sudo apt update
sudo apt install -y gcc make perl linux-headers-$(uname -r) build-essential dkms
sudo /sbin/vboxconfig
reboot
  • 验证是否修复
bash 复制代码
# 查看驱动是否加载成功
lsmod | grep vbox

原因二:Secure Boot(安全启动)问题

  • 如果第一步执行成功,但依然报错,可能是开启了 EFI Secure Boot,Linux 禁止加载未签名的第三方内核模块。

  • 解决方案 1:关闭 Secure Boot(最简单,推荐),重启电脑,进入 BIOS/UEFI

    找到 Security → Secure Boot,设置为 Disabled(关闭),保存重启,直接解决问题

  • 解决方案 2:给 VirtualBox 模块签名(不关闭安全启动),执行以下命令签名模块(以 Ubuntu 为例)

bash 复制代码
# 安装签名工具
sudo apt install -y mokutil

# 创建密钥
sudo openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=VirtualBox/"

# 给四个核心模块签名
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vboxdrv)
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vboxnetflt)
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vboxnetadp)
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vboxpci)

# 导入密钥到系统
sudo mokutil --import MOK.der

执行后重启电脑,会弹出蓝色的 MOK Management 界面,选择:Enroll MOK → Continue → Yes → 输入你设置的密码,完成即可。

相关推荐
零零信安11 天前
零零信安荣登数世咨询《新质·数字安全专精百强(2026)》暗网情报领域,彰显专业实力与创新引领
安全·网络安全·数据泄露·暗网·零零信安
憧憬成为web高手11 天前
l33t-hoster
学习·web安全·网络安全
HackTwoHub11 天前
Sqli-Scanner SQL注入SKILL自动化挖掘SQL注入,零依赖自动化SQL注入挖掘,赏金猎人
数据库·人工智能·sql·web安全·网络安全·自动化·系统安全
爱网络爱Linux11 天前
网络安全与渗透测试实用工具大全
web安全·网络安全·信息安全·cisp-pte·cisp·cissp
xsc-xyc11 天前
用 Tailscale + Syncthing 实现手机、电脑与 NAS 的跨网络文件同步
linux·网络·网络安全·智能手机·电脑
持敬chijing11 天前
Web渗透之SQL注入-常用sql语句
sql·安全·web安全·网络安全
Chengbei1111 天前
AISec真正拟人化全自动渗透工具!支持浏览器交互全自动化挖掘,SQL注入、XSS、越权等。
sql·安全·web安全·网络安全·自动化·系统安全·xss
X7x511 天前
深度拆解网络安全“闭环”之王——APPDRR模型
网络安全·网络攻击模型·安全威胁分析·安全架构·appdrr模型
Inhand陈工11 天前
污水泵站PLC数据上云实战:西门子PLC + 映翰通IG502 + DM平台全流程
人工智能·物联网·网络安全·阿里云·信息与通信·iot
X7x511 天前
一文讲透PADIMEE模型
网络安全·网络攻击模型·安全威胁分析·安全架构·padimee模型