Moved some python packages to pipx and fixed some issues
This commit is contained in:
40
Dockerfile
40
Dockerfile
@@ -27,26 +27,26 @@ RUN apt-get update && apt-get install -y \
|
|||||||
pdftk \
|
pdftk \
|
||||||
pev \
|
pev \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
|
pipx \
|
||||||
python3 \
|
python3 \
|
||||||
python3-lxml \
|
python3-lxml \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
ruby \
|
ruby \
|
||||||
unoconv \
|
|
||||||
unrtf \
|
unrtf \
|
||||||
unzip \
|
unzip \
|
||||||
wget \
|
wget \
|
||||||
; \
|
; \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Configure PIP
|
# Configure PIP´y
|
||||||
ENV PYTHONDONTWRITEBYTECODE=1
|
ENV PYTHONDONTWRITEBYTECODE=1
|
||||||
ADD pip.conf /etc/pip.conf
|
ADD pip.conf /etc/pip.conf
|
||||||
|
|
||||||
# OLETOOLS & DIDIERSTEVENS
|
# OLETOOLS & DIDIERSTEVENS
|
||||||
RUN git clone https://github.com/DidierStevens/DidierStevensSuite /opt/didierstevenssuite
|
RUN git clone https://github.com/DidierStevens/DidierStevensSuite /opt/didierstevenssuite
|
||||||
RUN chmod +x /opt/didierstevenssuite/*py
|
RUN chmod +x /opt/didierstevenssuite/*py
|
||||||
RUN python3 -m pip install --upgrade pip
|
RUN python3 -m pip install --break-system-packages --upgrade pip ; true
|
||||||
RUN python3 -m pip install psutil unotools oletools
|
RUN python3 -m pip install --break-system-packages psutil oletools ; true
|
||||||
|
|
||||||
# PDF
|
# PDF
|
||||||
RUN gem install origami
|
RUN gem install origami
|
||||||
@@ -58,6 +58,7 @@ ADD files/README /opt/README
|
|||||||
ADD files/command_help /opt/command_help
|
ADD files/command_help /opt/command_help
|
||||||
RUN echo 'cat /opt/README' >> /etc/bash.bashrc
|
RUN echo 'cat /opt/README' >> /etc/bash.bashrc
|
||||||
|
|
||||||
|
|
||||||
### VIPERMONKEY
|
### VIPERMONKEY
|
||||||
## install pypy
|
## install pypy
|
||||||
RUN wget -O- https://downloads.python.org/pypy/pypy2.7-v7.3.5-linux64.tar.bz2 | tar -C /opt/ -xvj
|
RUN wget -O- https://downloads.python.org/pypy/pypy2.7-v7.3.5-linux64.tar.bz2 | tar -C /opt/ -xvj
|
||||||
@@ -65,40 +66,51 @@ RUN ln -s $(which pypy) /usr/local/bin/python
|
|||||||
## install and upgrade pip
|
## install and upgrade pip
|
||||||
RUN pypy -m ensurepip
|
RUN pypy -m ensurepip
|
||||||
RUN pypy -m pip install -U pip
|
RUN pypy -m pip install -U pip
|
||||||
RUN pypy -m pip install -U peepdf
|
#RUN pypy -m pip install -U peepdf
|
||||||
#RUN pypy -m pip install -U https://github.com/decalage2/ViperMonkey/archive/master.zip
|
#RUN pypy -m pip install -U https://github.com/decalage2/ViperMonkey/archive/master.zip
|
||||||
#RUN ln -s /opt/pypy2.7-v7.3.5-linux64/site-packages/vipermonkey/vmonkey.py /usr/local/bin/vmonkey
|
#RUN ln -s /opt/pypy2.7-v7.3.5-linux64/site-packages/vipermonkey/vmonkey.py /usr/local/bin/vmonkey
|
||||||
#RUN chmod +x /usr/local/bin/vmonkey
|
#RUN chmod +x /usr/local/bin/vmonkey
|
||||||
RUN wget -O- https://github.com/mandiant/capa/releases/download/v3.1.0/capa-v3.1.0-linux.zip | busybox unzip -d /usr/bin -
|
RUN wget -O- https://github.com/mandiant/capa/releases/download/v7.4.0/capa-v7.4.0-linux.zip | busybox unzip -d /usr/bin -
|
||||||
RUN chmod +x /usr/bin/capa
|
RUN chmod +x /usr/bin/capa
|
||||||
|
|
||||||
### JS Sandbox
|
### JS Sandbox
|
||||||
RUN npm install box-js --global --production
|
RUN npm install box-js --global --production
|
||||||
|
|
||||||
### Install Unfurl
|
### Update flask
|
||||||
RUN pip install dfir-unfurl
|
RUN pip uninstall -y --break-system-packages flask-restx && pip install --break-system-packages flask-restx
|
||||||
RUN pip uninstall -y flask-restx && pip install flask-restx
|
|
||||||
|
|
||||||
### LATER
|
### LATER TODO
|
||||||
#RUN git clone https://github.com/buffer/pyv8.git ; cd pyv8 ; python setup.py build && python setup.py install && cd .. && rm -rf pyv8
|
#RUN git clone https://github.com/buffer/pyv8.git ; cd pyv8 ; python setup.py build && python setup.py install && cd .. && rm -rf pyv8
|
||||||
#RUN git clone https://github.com/buffer/libemu.git ; cd libemu ; autoreconf -v -i && ./configure --prefix=/opt/libemu && make install && cd .. && rm -rf libemu2
|
#RUN git clone https://github.com/buffer/libemu.git ; cd libemu ; autoreconf -v -i && ./configure --prefix=/opt/libemu && make install && cd .. && rm -rf libemu2
|
||||||
|
|
||||||
|
### Create User
|
||||||
RUN groupadd -g 1000 -r user && \
|
RUN groupadd -g 1000 -r user && \
|
||||||
useradd -u 1000 -r -g user -d /home/user -s /sbin/nologin -c "Nonroot User" user && \
|
useradd -u 1000 -r -g user -d /home/user -s /sbin/nologin -c "Nonroot User" user && \
|
||||||
mkdir /home/user && \
|
mkdir /home/user && \
|
||||||
cp /root/.bashrc /home/user/ && \
|
cp /root/.bashrc /home/user/ && \
|
||||||
chown -R user:user /home/user
|
chown -R user:user /home/user
|
||||||
|
|
||||||
|
### Create nonroot
|
||||||
RUN groupadd -g 1001 -r nonroot && \
|
RUN groupadd -g 1001 -r nonroot && \
|
||||||
useradd -u 1001 -r -g nonroot -d /home/nonroot -s /sbin/nologin -c "Nonroot User" nonroot && \
|
useradd -u 1001 -r -g nonroot -d /home/nonroot -s /sbin/nologin -c "Nonroot User" nonroot && \
|
||||||
mkdir /home/nonroot && \
|
mkdir /home/nonroot && \
|
||||||
cp /root/.bashrc /home/nonroot/ && \
|
cp /root/.bashrc /home/nonroot/ && \
|
||||||
chown -R nonroot:nonroot /home/nonroot
|
chown -R nonroot:nonroot /home/nonroot
|
||||||
|
|
||||||
|
### Set UP Environment
|
||||||
ENV LANG de_DE.UTF-8
|
|
||||||
USER nonroot
|
USER nonroot
|
||||||
|
ENV LANG de_DE.UTF-8
|
||||||
|
ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/didierstevenssuite/:/opt/pypy2.7-v7.3.5-linux64/bin:/home/nonroot/.local/bin
|
||||||
WORKDIR /data
|
WORKDIR /data
|
||||||
|
|
||||||
|
### Install unfurl & dependencies
|
||||||
|
RUN pipx install --include-deps dfir-unfurl
|
||||||
|
RUN pipx inject dfir-unfurl requests six maclookup
|
||||||
|
|
||||||
|
### Install visidata
|
||||||
|
RUN pipx install --include-deps visidata
|
||||||
|
|
||||||
|
### Install oletools
|
||||||
|
RUN pipx install --include-deps oletools
|
||||||
|
|
||||||
CMD /bin/bash
|
CMD /bin/bash
|
||||||
|
|||||||
Reference in New Issue
Block a user