Skip to content

Installation

b0rdst31n edited this page Nov 15, 2024 · 19 revisions

There is a shell script provided that installs all dependencies, but it depends on apt (used by Debian-based Linux operating systems) and an available Python2.7 distribution (which isn't supported in Debian >= 12). So if you have a running Linux System and it is Debian-based and < Debian 12, you can use the script without further installations. Otherwise you have to install another Linux distribution (e.g. kali-linux), get a VM or use the provided container image.

The container image can be run with tools like Podman or Docker. Please note that the sbleedy CLI tool relies on connected USB hardware, so you should be able to pass the devices through (e.g., with podman run -it --device /dev/ttyACM0 <image>). Please refer to the section "Using the container image (without a VM)" for more instructions.

⚠️ Attention: When using Windows and your PC is routing all traffic through a Proxy/Firewall, trying to pass the USB devices to wsl (when running the tool directly or in a container in a Linux subsystem) can be an uphill battle, due to reasons like blocked TCP connections. In this case, it may be easier to use a VM and either run the container in there or run the install script in the VM. Whether on Linux or Windows, if your proxy requires a certificate, some additional work will be necessary.

⚠️ Attention (again): You may think "My main system is Windows, but I can install a Linux subsystem pretty easily with wsl". Ha! Sadly it's not that easy. The sbleedy CLI tool relies on connected USB hardware, and although it's possible to share devices with usbipd-win, Bluetooth support is missing in the default WSL kernel. So if you don't want to mess around with recompiling it with some additional drivers, I recommend using a VM.

Using the shell script in a (appropriate) Linux System The shell script installs Python3.10 and Python2.7, creates virtual environments for both versions, and installs the required submodules and pip packages. After the installation, you should be able to activate the venv for Python3.10 and run the CLI tool.

⚠️ If using a Linux distribution that doesn't use apt (non-Debian systems) or lacks an available Python2.7 package, you will need to edit the script accordingly. Please avoid changing the name of venv2, or you'll have to adapt the variable VENV2_PATH in sbleedyCLI/constants.py.

  • git clone https://github.com/b0rdst31n/SbleedyGonzales.git --recurse submodules
  • cd SbleedyGonzales
  • helpers/sbleedy_installer.sh or when behind a Proxy: helpers/sbleedy_installer.sh --http_proxy "http://whatever.net:0000/" --https_proxy "http://whatever.net:0000/" --no_proxy "localhost,etc.int" --pip_proxy "http://whatever.net:0000/" --pip_cert "$HOME/Desktop/my_cert.crt"
  • Have some patience
  • If everything got installed correctly, there should now be a venv2 and venv3 folder in Sbleedy Gonzales. Then you can activate the venv3, where the sbleedy CLI tool is installed in with source venv3/bin/activate
  • Test the installation with sbleedy -h #should print usage info
Using the container image (without a VM)
  • Install a container tool of your choice (Docker, Podman, etc.)
  • ⚠️ When behind a Proxy: You may have to add the certificate to the container machine. Please refer to the documentation of the tool you chose (e.g., this for Podman).
  • Get the container image from the GitHub registry [WILL BE PROVIDED].
  • Run the container and pass the connected hardware (e.g., podman run -it --device /dev/ttyACM0 <image>). When behind a proxy, you may also have to add the proxy settings like this: podman run -it -e http_proxy=http://whatever.net:0000 -e https_proxy=http://whatever.net:0000 -e no_proxy=localhost,etc.int your-image-name
  • Activate the venv3 (source venv3/bin/activate).
  • Test the installation of the CLI tool by running sbleedy -h #should print usage info.
  • Test the connected hardware by running hciconfig and lsusb and confirm that your connected devices are found.
Using a VM
  1. Setup the VM:
    • Install a virtual machine of your choice (e.g., VirtualBox).
    • Download a pre-built VM for your machine (e.g., Kali Linux) and start it.
    • ⚠️ When behind a Proxy: Configure the VM to use the certificate by copying the certificate as root to /usr/local/share/ca-certificates, then update the settings with sudo update-ca-certificates --verbose.
    • ⚠️ Some virtual machines require an extension to be able to use the hardware that is connected through USB (e.g. VirtualBox Extension Pack)

Choose one of the following methods to proceed:

Option 1: Run the Container Option 2: Run the Shell Script
See "Using the container image" for build and run instructions See "Using the shell script" for install instructions
  1. Test the installation:
    • Activate the venv3 (source venv3/bin/activate).
    • Test the installation of the CLI tool by running sbleedy -h #should print usage info. You may need to run pip install . again after activating the venv3.
    • Test the connected hardware by running hciconfig and lsusb and confirm that your connected devices are found.
Clone this wiki locally