e-m-b-a / embark

EMBArk - The firmware security scanning environment
https://www.securefirmware.de
MIT License
321 stars 46 forks source link

Emba installation “Error: for emba ‘ContainerConfig’ #218

Closed secsonthebeach closed 1 month ago

secsonthebeach commented 1 month ago

Hello. I am attempting to install Embark. Running on Kali 2024.3. I was able to install and execute EMBA successfully.

But when I attempt to execute the Embark installer the installation of EMBA fails with “Error: for emba ‘ContainerConfig’.

If I simply switch directories to the earlier clone of just EMBA, I am still able to successfully run the installer.

I thought perhaps the submodule update could be pulling a version of EMBA that is broken, so have checked out master (I build the recent 1.4.2 release tag of EMBA initially). The master branch fails with the same error when trying to build EMBA. However, I added some logic to the Embark installer, the install_emba function, to checkout the latest release for install, but it still failed:

…
cd emba
git fetch  —tags
LatestTag=$(git describe —tags “$(git rev-list —tags —max-count=1)”)
git checkout $LatestTag
./installer.sh -d …

Separately, at one point I thought I was hitting a rate limit on DockerHub and tried another registry using the -c option. In the process I ran into some new errors. I think you may need to add export CVE_SEARCH=0 and export DOCKER_SETUP=1 to the container argument switch case in installer.sh

I see that this error is related to the docker-compose transition. Does that mean I need to drop the kali docker packages and add the docker repo as noted in #216 ?

github-actions[bot] commented 1 month ago

Thank you for contributing an issue!

Welcome to the EMBA firmware analysis community!

We are glad you are here and appreciate your contribution. Please keep in mind our contributing guidelines here and here. Also, please check existing open issues and consider to open a discussion in the dedicated discussion area. Additionally, we have collected a lot of details around EMBArk, the installation and the usage of EMBArk in our Wiki.

If you like EMBA you have the chance to support us by becoming a Sponsor or buying some beer here.

This is an automatic message. Allow for time for the EMBA community to be able to read the issue and comment on it.

BenediktMKuehne commented 1 month ago

In short: Yes you are 100% correct, switch to the compose plugin.

Longer: for EMBA within EMBArk we use a alias for docker-compose to docker compose so we are able to run it. This also means you would have an issue on your system if the old docker-compose binary still exists. On EMBA side we like to keep kali-package versions where possible.

secsonthebeach commented 1 month ago

Hello, thank you for your response! This worked to resolve the docker-compose issue. However, I am now running into other issue that seem to be related to using Kali vs. Ubuntu. Below is just a dump of what I’m seeing. I‘ll follow up as I make better sense of it.

Generally, should I be able to get this working on Kali?

Specifically: I notice Kali does not have MySQL-client-core-8.0 in the repo, and suggests mariadb-server and mariadb-client-core

Also, my Kali is using python 3.12, but 3.10 is called by the installer script. Only 3.11 and 3.12 are available through APT.

Since python on Kali is externally managed, I installed pipenv with APT and created a symbolic link to try to point python3.10 to the installed 3.12, but that seems to have caused errors as well.

I’m currently trying to change the installer to see if it will run with 3.12, but I doubt it with so many Pip depends set to == 3.10

I see an Embark image on DockerHub, but it’s 3 years old. Has there been an attempt to containerize the whole Embark UI before? That seems like it’d be nice solution to dependency problems.

BenediktMKuehne commented 1 month ago

Currently we only support ubuntu for embark. Sorry about that

The docker image is outdated and there is currently no plans for containerization

secsonthebeach commented 1 month ago

Okay, no worries. I’ve made the switch to Ubuntu 22.04, and have been working through the install and various configs needed for my env. I am now running into: docker: ‘compose’ is not a docker command. from the Embark installer. I see that the Emba installer performs a check for ‘docker-compose’ vs ‘docker compose’. Should this check be added to the Embark installer? My docker version reports 24.0.7 and my docker-compose version returns 1.29.2.

How should I proceed?

secsonthebeach commented 1 month ago

Changing to docker-compose in installer.sh didn’t work. I was missing some of the packages from the Docker repo. It’s up and running now.