Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing running silentbridge in Kali Linux 2024 #9

Open
Ab4y98 opened this issue Nov 25, 2024 · 1 comment
Open

Fixing running silentbridge in Kali Linux 2024 #9

Ab4y98 opened this issue Nov 25, 2024 · 1 comment

Comments

@Ab4y98
Copy link

Ab4y98 commented Nov 25, 2024

Hi,

I’m opening this issue because after using the tool SilentBridge during a recent engagement, I encountered some dependency issues when running it with Python 3. It’s possible these issues stem from the tool being around 6 years old and possibly originally written for Python 2.7. Regardless, I’ve written a small script to address some of the headaches I faced with the tool, and I’d like to share it in case it’s helpful to others.

After updating Kali and downloading the tool we can see the following error:

image

And I've tries so many approaches to fix it.. and came up with this solution:

wget https://bootstrap.pypa.io/pip/2.7/get-pip.py sudo python2.7 get-pip.py pip install virtualenv==20.21.1 --break-system-packages --ignore-installed virtualenv -p $(which python2) venv2 source venv2/bin/activate git clone https://github.com/s0lst1c3/silentbridge.git pip install scapy==2.4.3 --ignore-installed pip install netifaces pip install nanpy cd silentbridge python2 ./silentbridge

I'll let ChatGPT do the rest of the talking :)

Here's a brief explanation of the commands:

  1. Install pip for Python 2.7:

    wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
    sudo python2.7 get-pip.py

    Downloads and installs pip for Python 2.7.

  2. Install specific version of virtualenv:

    pip install virtualenv==20.21.1 --break-system-packages --ignore-installed

    Installs virtualenv version 20.21.1 while bypassing system package conflicts.

  3. Create a virtual environment with Python 2.7:

    virtualenv -p $(which python2) venv2
    source venv2/bin/activate

    Creates and activates a virtual environment using Python 2.7.

  4. Clone SilentBridge repository and install dependencies:

    git clone https://github.com/s0lst1c3/silentbridge.git
    pip install scapy==2.4.3 --ignore-installed
    pip install netifaces
    pip install nanpy

    Clones the SilentBridge repository and installs required dependencies (scapy, netifaces, and nanpy).

  5. Run SilentBridge:

    cd silentbridge
    python2 ./silentbridge

    Navigates to the SilentBridge directory and runs the tool with Python 2.7.


In short, these commands set up a Python 2.7 environment, install dependencies, and run the SilentBridge tool.

image

@joshuanutt
Copy link

joshuanutt commented Dec 4, 2024

Ran into this error when installing netifaces:

netifaces.c:1:10: fatal error: Python.h: No such file or directory
      1 | #include <Python.h>
        |          ^~~~~~~~~~
  compilation terminated.

Fixed with:
sudo apt-get install python2-dev

After that, this worked fine on Kali

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants