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

Multiple issues when installing on Ubuntu 24.04 #907

Open
pgrenaud opened this issue Nov 6, 2024 · 4 comments
Open

Multiple issues when installing on Ubuntu 24.04 #907

pgrenaud opened this issue Nov 6, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@pgrenaud
Copy link

pgrenaud commented Nov 6, 2024

TL;DR

  • Single apt package with multiple candidates prevent installation of all apt packages
  • Python new Externally Managed Environments feature prevents installation of all tools that rely on pip
  • Muted output during installation prevents troubleshooting

Description

I recently tried to install reconftw on a Ubuntu 24.04 and notice that something was wrong. The install.sh script would report that everything was installed while the reconftw.sh script would report a bunch of tools missing. Running install.sh again wouldn't fix the issue.

Screenshot 2024-11-06 at 14 06 49
Screenshot 2024-11-06 at 14 06 57

Re-enabling output during the install (vars DEBUG_STD and DEBUG_ERROR in reconftw.cfg) allowed me to notice a few problems with the install process.

The installing system packages step failed silently because the package libasound2 is a virtual package with two possible candidates (this is unique to Ubuntu 24.04). The resulting error blocks the installation of all required system packages.

Screenshot 2024-11-06 at 14 11 05

Many python tools rely on PIP to install their requirements, but reconftw do it by running sudo pip3 install -r requirements.txt, which is now blocked by the Externally Managed Environments feature.

Screenshot 2024-11-06 at 14 14 01

There is also a bunch more errors that are probably caused by the missing apt packages and/or the missing python dependencies.

Affected Systems

Expected Results

Cloning the repo and running ./install.sh should install all the required dependencies and tools.

Actual Results

Cloning the repo and running ./install.sh is silently falling and not installing all the dependencies and tools. See screenshots above.

Steps to Reproduce

  • Deploy a new Ubuntu 24.04 LTS machine
  • Clone and install reconftw
    git clone https://github.com/six2dez/reconftw.git
    cd reconftw/
    ./install.sh
  • Run ./reconftw.sh --help
  • reconftw will report several tools missing

Discussion and Proposed Solutions

I've been using reconftw for the past year at work and it has been a great tool to have in my toolbox! I'm ready to put the time and effort to fix the issues highlighted and submit PRs for review. But since there is no contributing guide for this project, I just want to make sure we all agree on the work that need to be done before starting to work on fixes.

I'd like to propose the following changes:

  1. Send all the output of the ./install.sh to a log file by default, like it is already the case with ./reconftw.sh
  2. Fix the list of apt packages to install (not sure yet how to do it in a compatible manner with all the debian-based distributions, would need to look into it)
  3. Install all python tools using pipx, or setup a venv for those who do not support it
  4. Remove the use of sudo when it's not necessary (all tools would be installed for the local user only, like it is the case with the golang tools)
  5. In the long term, validate the exit code of commands, especially for./install.sh, to make the scripts more resilient and detect abnormal states and errors

I can break down this issue in multiple issues if that would make it easier to keep track of the different issues and proposed changes.

See Also

@pgrenaud pgrenaud added the bug Something isn't working label Nov 6, 2024
@bileltechno
Copy link
Collaborator

Thanks for your detailed report!

Some tools installation is already added to the auto installer in the dev branch but not yet merged to the main branch.

adding EmailFinder to auto isntaller

add metaFinder to auto installer

add porch-pirate to auto-install

Add xnLinkFinder to auto installer

add waymore to auto-installer

The remaining issues will be analysed later .

@pgrenaud
Copy link
Author

pgrenaud commented Nov 7, 2024

Some tools installation is already added to the auto installer in the dev branch but not yet merged to the main branch.

I don't think those commits address the problems highlighted in this issues. Unless I missed something, but when running on Ubuntu 22.04 (or Ubuntu 24.04 with some hotfixes to make the install.sh script work), everything is installed and the main reconftw.sh script works properly.

The remaining issues will be analysed later .

Ok, no problem! Please let me know what you think of my diagnostic and proposed solutions. I'm able to put effort into writing and sending PR to fix those issues.

@g1thubcrypton
Copy link

i have the similar problem

@ab2pentest
Copy link
Contributor

ab2pentest commented Dec 11, 2024

The problem is with Python 3.12.X, which now requires the --break-system-packages flag to install packages on the system, unless you create a separate environment for each tool.

If you're using a virtual machine, VPS, or similar setup just for pentesting, you can fix this by editing the install.sh file. Find this line:

eval "$SUDO pip3 install . $DEBUG_STD" &>/dev/null

Change it to this:

eval "$SUDO pip3 install . --break-system-packages $DEBUG_STD" &>/dev/null

Then, run the install.sh script again to install everything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants