-
Notifications
You must be signed in to change notification settings - Fork 9
Run FIT on Kali Linux
To run FIT on Kali Linux inside Virtualbox (7.0) where python 3.11 was already installed, I did do the following steps.
$ lsb_release -r
No LSB modules are available.
Release: 2023.3
To install Visual Studio Code I followed the steps outlined in this guide as shown below:
$ sudo apt-get install wget gpg
$ sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
$ sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
$ rm -f packages.microsoft.gpg
$ sudo apt install apt-transport-https
$ sudo apt update
$ sudo apt install code
I installed all these packages because at first builds I had the problems with different dependencies (eg. lzma, sqlite, openssl)
$ sudo apt build-dep python3
$ sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python3-openssl git
- Once I've installed all the dependencies I downloaded the source of Python 3.9 version
$ wget https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tgz
- I used below commands to compile python source code.
$ tar xzvf Python-3.9.0.tgz
$ cd Python-3.9.0
$ sudo ./configure --enable-optimizations
$ sudo make altinstall
NB1: --enable-optimizations
find more info here
NB2: make altinstall
is used to prevent replacing the default python binary file /usr/bin/python.
$ git clone https://github.com/fit-project/fit.git
$ cd fit
$ sudo apt-get python3-poetry
$ poetry env use $(which python3.9)
NB: sudo apt-get python3-poetry
I installed Poetry directly with apt-get
$ poetry install
$ poetry shell
$ $(which python) fit.py #Run with user privileges
$ sudo env QTWEBENGINE_DISABLE_SANDBOX=1 $(which python) fit.py #Run with root privileges
NB: If you use sudo
to run FIT you need to set your user "Documents" as Case folder. As shown in the screenshot below.
When I ran FIT for the first time I got this error:
```This application failed to start because it could not find or load the Qt platform plugin "xcb".
Available platform plugins are: linuxfb, minimal, offscreen, xcb.
Reinstalling the application may fix this problem. Aborted (core dumped)
```
Googling this error and I found several solutions.
- The first thing I enabled QT Plugins debugging.
$ export QT_DEBUG_PLUGINS=1
- After that I have tried to install/reinstall these packages at different times
$ sudo apt-get --reinstall install libqt5dbus5 libqt5widgets5 libqt5network5 libqt5gui5 libqt5core5a libxcb-xinerama0 libqt5x11extras5 libqt5x11extras5-dev libxcb-xinput0 libxcb-cursor0
- Finally I also tried to make this symbolic link
$ sudo ln -sf /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/ /usr/bin/
I don't know exactly which of these tests made a solution, but I solved the error. In a future installation I will try to understand better!