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

Having difficulties with the exfiltration-server pull #10

Open
relder251 opened this issue Mar 7, 2024 · 5 comments
Open

Having difficulties with the exfiltration-server pull #10

relder251 opened this issue Mar 7, 2024 · 5 comments

Comments

@relder251
Copy link

After updating the requirements.txt document for the initial install / setup of shennina, I attempted to start the exfiltration-server, following the below steps:
cd ./exfiltration-server
./run-server.sh

I am having the following issue pop up:
"
=> ERROR [ 5/11] RUN pip3 install flask 1.4s

[ 5/11] RUN pip3 install flask:
1.087 error: externally-managed-environment
1.087
1.087 × This environment is externally managed
1.087 ╰─>
1.087 The system-wide python installation should be maintained using the system
1.087 package manager (apk) only.
1.087
1.087 If the package in question is not packaged already (and hence installable via
1.087 "apk add py3-somepackage"), please consider installing it inside a virtual
1.087 environment, e.g.:
1.087
1.087 python3 -m venv /path/to/venv
1.087 . /path/to/venv/bin/activate
1.087 pip install mypackage
1.087
1.087 To exit the virtual environment, run:
1.087
1.087 deactivate
1.087
1.087 The virtual environment is not deleted, and can be re-entered by re-sourcing
1.087 the activate file.
1.087
1.087 To automatically manage virtual environments, consider using pipx (from the
1.087 pipx package).
1.087
1.087 note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
1.087 hint: See PEP 668 for the detailed specification.


Dockerfile:7

5 | RUN apk add py-pip
6 |
7 | >>> RUN pip3 install flask
8 |
9 | WORKDIR /app

ERROR: failed to solve: process "/bin/sh -c pip3 install flask" did not complete successfully: exit code: 1
Unable to find image 'exfiltration-server:latest' locally
docker: Error response from daemon: pull access denied for exfiltration-server, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
"

Any ideas on how I might solve this issue?

@relder251
Copy link
Author

Found the issue. The latest Alpine (v3.19) doesn't have the py-pip package. My workaround is to update the Dockerfile line 1 to:
USING Alpine:3.18

@fvkd
Copy link

fvkd commented Mar 8, 2024

I'm getting an instruction error after changing line 1. Would you mind posting your Dockerfile contents please?

@forme9
Copy link

forme9 commented Apr 1, 2024

Hi, I also encountered that access to pull docker was denied. Did you solve it?

@fuzmik
Copy link

fuzmik commented Jun 13, 2024

`FROM python:3.7.17-slim-bullseye

RUN apt update
RUN apt install -y nmap bash
WORKDIR /app

COPY requirements.txt .
RUN ls -ah1l
RUN pip3 install -U pip wheels setuptools
RUN pip3 install -r requirements.txt
COPY . .

EXPOSE 8040:8040
CMD python3 exfiltration-server/server.py
`

@fuzmik
Copy link

fuzmik commented Jun 13, 2024

install a python 3.7.17 works for me. easy way is using pyenv. as for alpine. this dockerfile works for me.
`FROM alpine

RUN apk update
RUN apk add python3
RUN apk add py3-pip
RUN apk add py3-flask

#RUN pip install flask

WORKDIR /app

COPY server.py .
COPY agent.sh .
COPY agent.ps1 .
COPY ransomware-simulation.sh .
COPY ransomware-simulation.ps1 .

USER nobody

CMD python3 server.py
`

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

4 participants