w1ld3r/Raspi_Hackbox

GitHub: w1ld3r/Raspi_Hackbox

该项目提供基于 Debian Trixie 的树莓派4镜像构建工具,预装面向 IoT、OT、汽车及射频安全测试的完整攻防工具链。

Stars: 4 | Forks: 1

# Raspi Hackbox **Raspi Hackbox** 是一个基于 Debian 的树莓派镜像,可以将你的树莓派变成一个便携的黑客实验室。 它预装了以下内容: - 轻量级的 **i3 桌面环境** - 高效的 **zsh** shell - 精选的**网络安全攻防工具**集 该工具包专为**IoT**、**OT**和**汽车黑客**领域量身定制,非常适合想要一个随时可用的黑客环境的渗透测试人员、研究人员和爱好者。 ## 🧰 包含的工具 除了 i3 + zsh 桌面之外,该镜像还内置了一套精选的网络安全攻防工具包: | 类别 | 工具 | |----------|-------| | **Radio & SDR** | GNU Radio, Gqrx, HackRF, RTL-SDR, `rtl_433`, Universal Radio Hacker (URH) | | **Wi-Fi & Bluetooth** | Kismet, Aircrack-ng, Wifite, bettercap, hostapd, dnsmasq, BlueZ, `rtl8812au` 监听/注入驱动 | | **RFID / NFC** | Proxmark3 | | **Automotive & hardware** | can-utils, python-can, OpenOCD, UrJTAG, flashrom, dfu-util, Arduino IDE | | **Reverse engineering & firmware** | radare2, binwalk | | **Forensics** | Volatility 3, The Sleuth Kit, Guymager | | **Network, web & cracking** | Nmap, Wireshark, dirb, Hydra, Hashcat, John the Ripper, Scapy | ## 🚀 构建镜像 克隆此仓库: ``` git clone --recursive https://github.com/w1ld3r/Raspi_Hackbox cd Raspi_Hackbox ``` ### 依赖项 确保你正在运行 **Debian Trixie (13)** 或更高版本。安装所需的软件包: ``` sudo apt install -y \ vmdb2 dosfstools qemu-utils qemu-user-static debootstrap \ binfmt-support time kpartx bmap-tools python3 ansible-core \ fakemachine ``` 安装 Ansible collections: ``` ansible-galaxy collection install community.general ``` 👉 如果 `debootstrap` 失败并提示 `exec format error`,请尝试: ``` sudo dpkg-reconfigure qemu-user-static ``` 这会使用 `binfmt-support` 重新注册格式处理程序。 ### 使用 Makefile 构建 此仓库包含一个构建配方:[rpi4_trixie.yaml](rpi4_trixie.yaml),它定义了预装的环境和黑客工具。 使用 `Makefile` 自动化构建过程: ``` sudo make rpi4_trixie.img ``` - 底层使用 `vmdb2` + `ansible` - 如果 `fakemachine` 可用,则可以非特权运行 - 否则需要 `sudo` 权限 📖 有关更多详情,请阅读 [vmdb2 文档](https://vmdb2.liw.fi/documentation/)。 ### 🐳 在容器中构建 如果你偏好使用 Docker,请确保你的容器至少具有: - **8 GB 内存** - **60 GB 磁盘空间** 安装所需的软件包(带有 Compose v2 插件的 Docker Engine): ``` sudo apt install -y binfmt-support qemu-system-common qemu-user-static docker.io docker-compose-v2 ``` 构建并运行容器(它会在一个特权容器内运行 `make rpi4_trixie.img` —— `vmdb2` 需要 `privileged` 权限和 `/dev` 挂载): ``` sudo docker compose up --build ``` 镜像将被写入仓库目录(已挂载到容器中)。 ## 💾 将镜像安装到 SD 卡 插入你的 SD 卡(⚠️ 这将擦除所有数据)。 假设设备路径为 /dev/sdb,请刷入镜像: ### 使用 `bmap-tools`(速度更快,推荐) ``` bmaptool copy rpi4_trixie.img.xz /dev/sdb ``` ### 使用 `dd` 刷入压缩镜像 ``` xzcat rpi4_trixie.img.xz | dd of=/dev/sdb bs=64k oflag=dsync status=progress ``` ### 使用 `dd` 刷入未压缩镜像 ``` dd if=rpi4_trixie.img of=/dev/sdb bs=64k oflag=dsync status=progress ``` ## 🛠️ 安装后设置 该镜像包含: - **Partition 1** → `RASPIFIRM`(启动固件 + kernel) - **Partition 2** → `RASPIROOT`(Debian 系统) 你应该扩展 root 分区并创建一个 swap 分区 ``` sudo parted /dev/sdb (parted) help (parted) print (parted) mkpart primary linux-swap -4096 -0 (parted) resizepart 2 -4096 (parted) quit sudo mkswap -L RASPSWAP /dev/sdb3 sudo e2fsck -f /dev/sdb2 sudo resize2fs /dev/sdb2 ``` Swap 已经在 `/etc/fstab` 中配置好了。使用以下命令验证: ``` free -h ``` ## 🔌 首次启动 - 默认 hostname:`rpi4-YYYYMMDD` - 默认用户名:`user` - 默认密码:`user` 插入 SD 卡,给你的树莓派通电,你就可以开始了。 ⚡ 负责任地进行黑客活动——能力越大,责任越大。
标签:Ansible, PKINIT, 域环境安全, 射频安全, 工控安全, 物联网安全, 系统提示词, 系统镜像构建, 请求拦截, 逆向工具, 防御绕过