安装及开始
-
安装所需的依赖项
pip install pygatt "pygatt[GATTTOOL]"
BlueZ已安装且gatttool
可用
sudo apt install bluez
下载 BlueBunny 的存储库(并切换到正确的文件夹)
git clone https://github.com/90N45-d3v/BlueBunny
cd BlueBunny/C2
启动C2服务器
sudo python c2-server.py
将带有 BlueBunny 负载的 Bash Bunny 插入目标计算机(负载位于:BlueBunny/payload.txt
)。
通过浏览器访问您的 C2 服务器localhost:1472
并连接您的 Bash Bunny(准备配对时,您的 Bash Bunny 会亮起绿色)。
-
远程 shell 访问
-
BLE 渗漏通道
-
改进的连接过程
通过 Python 与 Bash Bunny 手动通信
您可以使用 BlueBunny 的 BLE 后端并手动与 Bash Bunny 进行通信。
示例代码
# Import the backend (BlueBunny/C2/BunnyLE.py)
import BunnyLE
# Define the data to send
data = "QUACK STRING I love my Bash Bunny"
# Define the type of the data to send ("cmd" or "payload") (payload data will be temporary written to a file, to execute multiple commands like in a payload script file)
d_type = "cmd"
# Initialize BunnyLE
BunnyLE.init()
# Connect to your Bash Bunny
bb = BunnyLE.connect()
# Send the data and let it execute
BunnyLE.send(bb, data, d_type)
故障排除
连接 Bash Bunny 不起作用?请尝试以下说明:
-
尝试多连接几次
-
检查您的蓝牙适配器是否可用
-
重新启动您的 C2 服务器正在运行的系统
-
检查您的 Bash Bunny 是否正确运行 BlueBunny 负载
-
你离你的 Bash Bunny 有多远?对于典型的 BLE 连接来说,环境(距离、干扰等)是否仍然可持续?
BlueZ 中的错误
使用的蓝牙堆栈是众所周知的,但也有很多错误。如果无法启动与 Bash Bunny 的连接,则可能是 BlueZ 造成的临时问题。以下是一些可能由临时错误引起的错误。这些通常最晚会在重新启动 C2 操作系统后消失,因此如果它们出现,请不要感到惊讶并冷静下来。
-
5.0 秒后超时
-
扫描 BLE 设备时出现未知错误
原文始发于微信公众号(TtTeam):神兵利器 - 用于 Hak5 的 Bash Bunny 的基于 BLE 的 C2
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论