GNU General Public License v3.0

技术解读

以下内容由 GitRead 中文社区 编辑团队基于项目 README 与官方资料整理, 结合中文开发者的常见使用场景补充技术选型建议。具体以项目官方文档为准。

Wi-Fi Challenge Lab Docker 版 —— 无 Wi-Fi 硬件的虚拟化渗透测试环境

项目背景与痛点

“r4ulcl/WiFiChallengeLab-docker” 项目通过 Docker 化方式复现了 Virtualized Wi-Fi Pentesting Laboratory,实现了无需物理 Wi-Fi 网卡即可进行 Wi-Fi 攻击实验。项目改进了原版中的部分挑战,并提高了系统的稳定性。它提供了一个基于 Ubuntu 的虚拟机环境,包含虚拟化网络和客户端,用于在 OPN(开放认证)、WPA2、WPA3 和企业级网络上进行 Wi-Fi 攻击实验。该项目的存在,解决了用户在没有物理 Wi-Fi 硬件的情况下进行 Wi-Fi 攻击测试的需求,也方便了开发和测试人员的环境搭建,降低了硬件成本和配置复杂度。

核心技术揭秘

架构设计

项目的主要技术栈包括 Docker、mac80211_hwsim 软件模拟器以及 Ubuntu 虚拟机环境。mac80211_hwsim 是一种虚拟化 Wi-Fi 器件的内核模块,能在软件层模拟出 Wi-Fi 硬件的能力。这使得在无需实际 Wi-Fi 卡的情况下,仍能进行 Wi-Fi 攻击实验。Ubuntu 提供了一个稳定的操作系统环境,而 Docker 容器化技术则便于环境的快速部署和管理。

数据流

在该项目中,数据流处理的流程如下:

graph TD A[用户访问 Docker 容器] --> B[mac80211_hwsim 虚拟化处理] B --> C[虚拟 Wi-Fi 客户端创建] C --> D[模拟与攻击目标网络] D --> E{"认证与加密类型"} E -->|"WPA2"| F[执行 WPA2 攻击策略] E -->|"WPA3"| G[执行 WPA3 攻击策略] E -->|"OPN"| H[执行开放网络攻击策略] E -->|"企业网络"| I[执行企业网络攻击策略] F --> J[数据捕获与分析] G --> J H --> J I --> J

通过如上流程,用户可以无须物理设备即可体验不同网络类型的攻击实验。

功能亮点与差异

相比同类竞品,此项目有几个明显的优势:

  1. 灵活性:Docker 容器化让环境搭建更加灵活便捷,可以在不同操作系统或云基础设施上快速部署。
  2. 稳定性提升:项目经过了挑战的修改和稳定性改进,使得实验环境更加稳定可靠。
  3. 免费:作为开源项目,用户可以自由使用、修改和分发,没有软件许可费用。
  4. 广泛性:支持多种 Wi-Fi 认证与加密类型,包括 WPA2、WPA3、开放网络以及企业级网络,覆盖了多数常见的 Wi-Fi 场景。

应用场景与落地建议

此项目非常适合:

  • 安全研究人员进行 Wi-Fi 攻击与防御测试。
  • 学术机构进行网络安全教育与实验。
  • 企业信息安全团队进行安全加固与检测。

落地建议:

  1. 硬件资源:尽管无需 Wi-Fi 硬件,但进行 Wi-Fi 攻击实验仍需一定的计算和内存资源。建议在配置较高的机器上运行 Docker 容器。
  2. 网络配置:实验环境中的网络配置与实际生产环境差异较大,务必在实验环境中进行测试。
  3. 社区参与:积极参加 GitHub 项目社区,及时反馈问题或贡献代码,提升项目整体效能和稳定性。

综合评价

“r4ulcl/WiFiChallengeLab-docker” 项目的优势在于其容器化的灵活性、实验环境的便捷性以及广泛的支持范围。不过,其稳健性的部分仍存在提升空间,尤其是在处理复杂企业级网络攻击时。此外,开放性网络实验室意味着在不同硬件环境下的稳定性和兼容性需要进一步优化。整体而言,这无疑是一个非常有潜力和价值的开源项目,尤其是对于安全研究领域来说。

关于

GitHub 原始描述(英文)

Virtualized Wi-Fi pentesting laboratory without the need for physical Wi-Fi cards, using mac80211_hwsim. Docker version of WiFiChallenge Lab with modifications in the challenges and improved stability. Ubuntu virtual machine with virtualized networks and clients to perform Wi-Fi attacks on OPN, WPA2, WPA3 and Enterprise networks.

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
551
价值分
280
活跃状态
活跃

语言占比

CSS
Dockerfile
JavaScript
Makefile
PHP
Python
Shell

Release

README

WiFiChallengeLab Lab

Latest release License Last commit (main) Last commit (dev) Top language

Stars Forks Open issues Contributors Lines of code

APs Docker image size APs Docker pulls Clients Docker image size Clients Docker pulls nzyme Docker image size nzyme Docker pulls

APs build Clients build nzyme build

APs (dev) build Clients (dev) build nzyme (dev) build

WiFiChallengeLab-docker

Docker version of WiFiChallenge Lab with reworked challenges and improved stability. A Debian virtual machine with virtualized networks and clients to practice WiFi attacks against OPN, WPA2, WPA3 and Enterprise networks.

Table of Contents

Features

  • Runs entirely on Docker, removing the nested VMs of v1.0: the lab and its networks are virtualized with mac80211_hwsim, making it lighter and more stable.
  • Targets the full range of modern WiFi security: OPN, WPA2, WPA3 and Enterprise (MGT) networks.
  • Realistic attack scenarios, including WPA3 bruteforce and downgrade, multiple Enterprise (MGT) APs, real captive-portal evasion (not just MAC filtering), and client phishing with a fake website.
  • Gives the attacker 6 virtual WiFi adapters (wlan0 to wlan5), backed by 71 mac80211_hwsim radios that drive the many simultaneous APs and clients.
  • Built-in monitoring and intrusion detection with the nzyme WIDS.
  • Deploy it your way: download a prebuilt VM, build your own with Vagrant (VirtualBox, VMware or Hyper-V), or run the containers directly on a Linux host or Kali.
  • Works on both x86-64 and ARM hosts, including Apple Silicon (M1, M2, etc.).
  • Guided challenges through the CTFd platform at lab.wifichallenge.com.
  • Prebuilt APs, clients and nzyme images published on Docker Hub to avoid building from scratch.

CTFd Lab

For direct access to download the VM and complete the challenges, go to the CTFd web site:

WiFiChallenge Lab CTFd

Changelog

Highlights of the move from v1.x to v2.x:

  • Remove nested VMs, replaced with Docker.
  • Add new attacks and rework existing ones to be more realistic:
    • WPA3 bruteforce and downgrade
    • Multiple Enterprise (MGT) APs
    • Real captive portal evasion (instead of just MAC filtering)
    • Phishing client with a fake website
  • Rework the WPS PIN attack: removed in v2.0 as outdated and oversimplified, then reintroduced in v2.2 with a custom mac80211_hwsim for a more realistic scenario.
  • Use Ubuntu as the OS instead of Debian (back to Debian in version 2.3).
  • Use Vagrant to build the VM so it is easy to replicate.
  • More virtual WiFi adapters:
    • More APs
    • More clients
  • Monitoring and detection using the nzyme WIDS.

Changes after v2.0 can be found at Changelog.md

Deployment

[!WARNING]
The compose file uses network_mode: host, privileged: true, and mounts /lib/modules, giving the container direct host-network access and full kernel privileges. Run it only inside a VM, never on your physical host.

Pick the method that fits your host:

  • Option 1 - Prebuilt VM: the fastest way to start on x86-64.
  • Option 2 - Build a VM with Vagrant: reproducible VirtualBox, VMware, Hyper-V or QEMU builds.
  • Option 3 - Install on a Debian 12 VM: recommended for Apple Silicon (M1, M2) and other custom VMs.
  • Option 4 - Run the containers directly: for Kali or any Linux host already inside a VM.

Option 1: Prebuilt Virtual Machine (Releases or Proton Drive)

Download the version for your platform:

Boot it, log in with user/user, and continue at lab.wifichallenge.com.

Import the OVA into QEMU / libvirt

Set VERSION to the release you downloaded, then unpack the OVA:

VERSION="v2.5"   # match the file you downloaded
unzip "WiFiChallenge Lab ${VERSION}.VirtualBox.zip" -d wifichallenge-lab
cd wifichallenge-lab
tar -xvf "WiFiChallenge Lab ${VERSION}.ova"

Convert the VirtualBox disk to qcow2. The OVA contains a single compressed, monolithic VMDK; use the disk image explicitly instead of a *.vmdk wildcard:

VMDK="WiFiChallenge Lab ${VERSION}-disk001.vmdk"
QCOW2="$PWD/wifichallenge-lab.qcow2"

qemu-img info -f vmdk "$VMDK"
qemu-img check -f vmdk "$VMDK"
qemu-img convert -p -m 1 -f vmdk -O qcow2 "$VMDK" "$QCOW2"

Only after qemu-img convert completes successfully, validate the new image:

qemu-img check -f qcow2 "$QCOW2"

You can keep the QCOW2 in the current directory. The qemu:///system connection must be able to read it; if QEMU reports a permission error, either move it to /var/lib/libvirt/images/ or grant the QEMU user access to the containing directories and file.

If you prefer the standard libvirt images folder:

sudo mv "$QCOW2" /var/lib/libvirt/images/
QCOW2="/var/lib/libvirt/images/wifichallenge-lab.qcow2"

If the host supports TUN/TAP, make sure the default libvirt network is running:

sudo modprobe tun 2>/dev/null || true
sudo virsh --connect qemu:///system net-list --all
sudo virsh --connect qemu:///system net-start default 2>/dev/null || true
sudo virsh --connect qemu:///system net-autostart default

Import and start the VM:

virt-install \
  --connect qemu:///system \
  --name wifichallenge-lab \
  --memory 4096 \
  --vcpus 2 \
  --disk path="$QCOW2",format=qcow2,bus=sata \
  --import \
  --os-variant debian12 \
  --network network=default,model=e1000 \
  --graphics spice \
  --noautoconsole

If the host has no usable TUN/TAP support and virt-install reports Unable to open /dev/net/tun, omit the network interface:

virt-install \
  --connect qemu:///system \
  --name wifichallenge-lab \
  --memory 4096 \
  --vcpus 2 \
  --disk path="$QCOW2",format=qcow2,bus=sata \
  --import \
  --os-variant debian12 \
  --network none \
  --graphics spice \
  --noautoconsole

Option 2: Build the VM with Vagrant

Requirements:

  • A host with at least 4 CPU cores and 4 GB of RAM.
  • Vagrant.
  • VirtualBox, VMware or Hyper-V.

Clone the repository and open the vagrant folder:

git clone https://github.com/r4ulcl/WiFiChallengeLab-docker
cd WiFiChallengeLab-docker/vagrant

Edit the Vagrantfile to set the memory and CPU to your needs:

nano vagrantfile

Then bring up the VM for your provider:

vagrant up vmware_vm                      # VMware
vagrant up virtualbox_vm                  # VirtualBox
vagrant up hyper-v_vm --provider=hyperv   # Hyper-V (run in an admin console)
vagrant up qemu_vm --provider=qemu        # QEMU/KVM (Linux; requires vagrant-qemu)

On Apple Silicon (M1, M2) and other hosts without Vagrant support, create a Debian 12 VM yourself (for example with UTM) and run the installer as root:

cd /var/
git clone https://github.com/r4ulcl/WiFiChallengeLab-docker
bash /var/WiFiChallengeLab-docker/vagrant/install.sh

Reboot, log in with user/user, and continue at lab.wifichallenge.com.

Option 4: Run the containers directly (Kali or any Linux VM)

If you are already inside a Linux VM such as Kali, start the APs, clients and nzyme with Docker Compose:

git clone https://github.com/r4ulcl/WiFiChallengeLab-docker
cd WiFiChallengeLab-docker
docker compose --file docker-compose.yml up -d

Usage

Attack from Debian VM

  • The tools are installed and can be found in the tools folder of the root home.
  • There are 6 antennas available for the attacker, wlan0 to wlan5.
  • Do Not Disturb mode can be disabled when you want the APs and clients to start transmitting.

Attack from Host

  • Start the docker-compose.yml file and use the virtual WLAN.
  • Use your own tools and configurations to attack.

Customization

Modify config files

To modify the configuration, download the repository and edit the APs and clients files (in the VM the path is /var/WiFiChallengeLab-docker). The files are divided into APs, Clients, and Nzyme.

Recompile Docker

To rebuild the images with your changes, edit docker-compose.yml, commenting out the image: line for each service and uncommenting its build: line. Then run docker compose build to create a new version.

Open Source References

See OPEN_SOURCE_REFERENCES.md for the upstream projects, repositories, and licenses used in the lab. Update it when adding tools or changing install scripts.

Support this project

Certified WiFiChallenge Professional (CWP)

Collaborators

  • Raúl Sampedro (@rsrdesarrollo) - Update the Nzyme Docker configuration to support ARM architecture

  • Oscar Alfonso (OscarAkaElvis / v1s1t0r, airgeddon author) - Collaboration in testing and script improvement

License

GNU General Public License v3.0

评论

暂无评论