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

I can't use the EMBA in Docker. #519

Closed
dragosmanolea opened this issue Mar 10, 2023 · 18 comments
Closed

I can't use the EMBA in Docker. #519

dragosmanolea opened this issue Mar 10, 2023 · 18 comments
Labels
Installation Installation issues question Further information is requested

Comments

@dragosmanolea
Copy link

Describe the bug
Hello! I cloned the the EMBA repository and I cloned run the docker-compose run command, as mentioned in the Wiki section.
The build is ok, but when i run the emba binary, it fails when it checks the necessary utils on system:
Wrong mongodb config - check your installation
RE-run instalation - bindIp should be set on 172.36.0.1
... etc (more details in Screenshot)

To Reproduce
Steps to reproduce the behavior:

  1. Clone the repo
  2. Run docker-compose build
  3. Run the docker image like in Wiki example
  4. Run the emba binary: emba -f /firmware -l /log
  5. See the errors

Expected behavior
I am expected to run the binary because i use a docker container.

Screenshots
image

Desktop (please complete the following information):

  • OS: Ubuntu Server 20 VM
  • EMBA version: v1.2.1
  • Installation method: default with up to date docker image

Additional context
Add any other context about the problem here.

@m-1-k-3
Copy link
Member

m-1-k-3 commented Mar 10, 2023

You need to run the installer command before using EMBA:

cd EMBA-directory
sudo ./installer.sh -d

@m-1-k-3 m-1-k-3 added question Further information is requested Installation Installation issues labels Mar 10, 2023
@dragosmanolea
Copy link
Author

When i try to install it, i have installation problems.

@dragosmanolea
Copy link
Author

I mention that i used the docker image from dockerhub and had the same issue.

@m-1-k-3
Copy link
Member

m-1-k-3 commented Mar 10, 2023

your installation is lacking multiple components. Checked the https://github.com/e-m-b-a/emba/wiki/Installation#prerequisites ?

@dragosmanolea
Copy link
Author

I will try to build the docker image on Ubuntu:jammy and i will come with updates.
Thank

@m-1-k-3
Copy link
Member

m-1-k-3 commented Mar 10, 2023

I recommend using the latest master branch of EMBA and the docker image which is used by the installer for your first try.

@dragosmanolea
Copy link
Author

So, i will clone the latest master branch of EMBA and run the docker-compose build and then docker-compose run on a VM that runs Ubuntu22.04.
Is there any requirement or other operation that i need to do?

@m-1-k-3
Copy link
Member

m-1-k-3 commented Mar 10, 2023

You can find the installation instructions here: https://github.com/e-m-b-a/emba#installation

@dragosmanolea
Copy link
Author

I read them. But i use the Docker. I think that when i build the docker image, using docker compose, the installation part will be done in the docker image.
After this, i will run the container and start using the EMBA, with no more other operations.
Am i right?

@m-1-k-3
Copy link
Member

m-1-k-3 commented Mar 10, 2023

EMBA has a pre-build docker image for the main analysis. Additionally there are some components needed outside the docker container. If you are going to build the docker container by yourself this is fine but you need the outside components installed somehow. You can do this by running the installer in -d mode first, then build your own container and you should be good to go. Nevertheless, you could also just run installer.sh -d and everything should be ready to run afterwards ;)

@dragosmanolea
Copy link
Author

I don't want necessarily to build it again. I want to run the binary, but i'm confused from the documentation what i am doing wrong.

@dragosmanolea
Copy link
Author

dragosmanolea commented Mar 10, 2023

I followed this steps on a fresh Ubuntu VM 22.04:

  1. Cloned the latest version from the repo
  2. Inside emba directory, run: docker-compose build
  3. The build was successfully
  4. Run the docker: EMBA="." FIRMWARE=/absolute/path/to/firmware LOG=/home/n/firmware_log/ docker-compose run emba, with the correct path.
  5. ./emba -f /firmware -l /log

Results:
image

What am i doing wrong?
Thanks

@dragosmanolea
Copy link
Author

dragosmanolea commented Mar 10, 2023

Also, i pulled manually the docker image from docker hub and run docker-compose run command and the behaviour is the same.

@m-1-k-3
Copy link
Member

m-1-k-3 commented Mar 10, 2023

you need to start EMBA without any docker-compose command ... just do something like this from the EMBA directory on your host:

sudo ./emba -f ~/PATH_TO_YOUR_FIRMWARE -l ~/log-dir -p ./scan-profiles/default-scan.emba

@dragosmanolea
Copy link
Author

i want to use it in a docker container

@m-1-k-3
Copy link
Member

m-1-k-3 commented Mar 10, 2023

The testing is running inside of the container. Other mode is not supported.

This was referenced Mar 10, 2023
@dragosmanolea
Copy link
Author

i managed to run everything inside one container.

@m-1-k-3
Copy link
Member

m-1-k-3 commented Mar 14, 2023

thanks for the update. Have phun with EMBA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Installation Installation issues question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants