zeus 3 years ago
parent
commit
3cadee345d
  1. 48
      install/usr/share/swarmlab.io/sec/swarmlab-sec

48
install/usr/share/swarmlab.io/sec/swarmlab-sec

@ -142,9 +142,9 @@ if [ -d "$Wdir/project" ]; then
FROM $IMAGE_origin
#
ARG DEF_ALPINE_VERSION=3.11
FROM alpine:${DEF_ALPINE_VERSION} AS builder
FROM alpine:\${DEF_ALPINE_VERSION} AS builder
ARG DEF_USERNAME=root
USER ${DEF_USERNAME}
USER \${DEF_USERNAME}
WORKDIR /tmp/build/
# Fetch the symbols from the Volatility 3 framework
@ -154,7 +154,7 @@ RUN curl -fL https://downloads.volatilityfoundation.org/volatility3/symbols/wind
RUN apk --purge del \
.build
FROM alpine:${DEF_ALPINE_VERSION}
FROM alpine:\${DEF_ALPINE_VERSION}
ARG DEF_USERNAME=root
ARG DEF_INSTALL_PREFIX=/usr
@ -165,9 +165,9 @@ LABEL name="volatility" \
maintainer="sk4la <sk4la.box@gmail.com>" \
status="beta"
USER ${DEF_USERNAME}
USER \${DEF_USERNAME}
WORKDIR ${DEF_INSTALL_PREFIX}/lib
WORKDIR \${DEF_INSTALL_PREFIX}/lib
# Install system dependencies
RUN apk add --no-cache \
@ -175,7 +175,7 @@ RUN apk add --no-cache \
apk add --no-cache --virtual .build \
git
COPY --from=builder --chown="${DEF_USERNAME}:${DEF_USERNAME}" /tmp/build/yara-python yara-python
COPY --from=builder --chown="\${DEF_USERNAME}:\${DEF_USERNAME}" /tmp/build/yara-python yara-python
RUN find . -type d -exec chmod 755 {} \; && \
find . -type f -exec chmod 644 {} \;
@ -184,18 +184,18 @@ RUN find . -type d -exec chmod 755 {} \; && \
RUN git clone https://github.com/volatilityfoundation/volatility3.git && \
cd volatility3 && \
python3 setup.py install && \
ln -sf ${DEF_INSTALL_PREFIX}/bin/vol ${DEF_INSTALL_PREFIX}/bin/volatility
ln -sf \${DEF_INSTALL_PREFIX}/bin/vol \${DEF_INSTALL_PREFIX}/bin/volatility
WORKDIR ${DEF_INSTALL_PREFIX}/lib/yara-python
WORKDIR \${DEF_INSTALL_PREFIX}/lib/yara-python
# Install the Python bindings for YARA
RUN python3 setup.py install
WORKDIR ${DEF_INSTALL_PREFIX}/lib/volatility3/volatility/symbols/
WORKDIR \${DEF_INSTALL_PREFIX}/lib/volatility3/volatility/symbols/
#COPY --from=builder --chown="${DEF_USERNAME}:${DEF_USERNAME}" /tmp/build/linux linux
#COPY --from=builder --chown="${DEF_USERNAME}:${DEF_USERNAME}" /tmp/build/mac mac
COPY --from=builder --chown="${DEF_USERNAME}:${DEF_USERNAME}" /tmp/build/windows windows
#COPY --from=builder --chown="\${DEF_USERNAME}:\${DEF_USERNAME}" /tmp/build/linux linux
#COPY --from=builder --chown="\${DEF_USERNAME}:\${DEF_USERNAME}" /tmp/build/mac mac
COPY --from=builder --chown="\${DEF_USERNAME}:\${DEF_USERNAME}" /tmp/build/windows windows
RUN find . -type d -exec chmod 755 {} \; && \
find . -type f -exec chmod 644 {} \;
@ -305,9 +305,9 @@ if [ "$Wdir" == "$HOME" ]; then
FROM $IMAGE_origin
#
ARG DEF_ALPINE_VERSION=3.11
FROM alpine:${DEF_ALPINE_VERSION} AS builder
FROM alpine:\${DEF_ALPINE_VERSION} AS builder
ARG DEF_USERNAME=root
USER ${DEF_USERNAME}
USER \${DEF_USERNAME}
WORKDIR /tmp/build/
# Fetch the symbols from the Volatility 3 framework
@ -317,7 +317,7 @@ RUN curl -fL https://downloads.volatilityfoundation.org/volatility3/symbols/wind
RUN apk --purge del \
.build
FROM alpine:${DEF_ALPINE_VERSION}
FROM alpine:\${DEF_ALPINE_VERSION}
ARG DEF_USERNAME=root
ARG DEF_INSTALL_PREFIX=/usr
@ -328,9 +328,9 @@ LABEL name="volatility" \
maintainer="sk4la <sk4la.box@gmail.com>" \
status="beta"
USER ${DEF_USERNAME}
USER \${DEF_USERNAME}
WORKDIR ${DEF_INSTALL_PREFIX}/lib
WORKDIR \${DEF_INSTALL_PREFIX}/lib
# Install system dependencies
RUN apk add --no-cache \
@ -338,7 +338,7 @@ RUN apk add --no-cache \
apk add --no-cache --virtual .build \
git
COPY --from=builder --chown="${DEF_USERNAME}:${DEF_USERNAME}" /tmp/build/yara-python yara-python
COPY --from=builder --chown="\${DEF_USERNAME}:\${DEF_USERNAME}" /tmp/build/yara-python yara-python
RUN find . -type d -exec chmod 755 {} \; && \
find . -type f -exec chmod 644 {} \;
@ -347,18 +347,18 @@ RUN find . -type d -exec chmod 755 {} \; && \
RUN git clone https://github.com/volatilityfoundation/volatility3.git && \
cd volatility3 && \
python3 setup.py install && \
ln -sf ${DEF_INSTALL_PREFIX}/bin/vol ${DEF_INSTALL_PREFIX}/bin/volatility
ln -sf \${DEF_INSTALL_PREFIX}/bin/vol \${DEF_INSTALL_PREFIX}/bin/volatility
WORKDIR ${DEF_INSTALL_PREFIX}/lib/yara-python
WORKDIR \${DEF_INSTALL_PREFIX}/lib/yara-python
# Install the Python bindings for YARA
RUN python3 setup.py install
WORKDIR ${DEF_INSTALL_PREFIX}/lib/volatility3/volatility/symbols/
WORKDIR \${DEF_INSTALL_PREFIX}/lib/volatility3/volatility/symbols/
#COPY --from=builder --chown="${DEF_USERNAME}:${DEF_USERNAME}" /tmp/build/linux linux
#COPY --from=builder --chown="${DEF_USERNAME}:${DEF_USERNAME}" /tmp/build/mac mac
COPY --from=builder --chown="${DEF_USERNAME}:${DEF_USERNAME}" /tmp/build/windows windows
#COPY --from=builder --chown="\${DEF_USERNAME}:\${DEF_USERNAME}" /tmp/build/linux linux
#COPY --from=builder --chown="\${DEF_USERNAME}:\${DEF_USERNAME}" /tmp/build/mac mac
COPY --from=builder --chown="\${DEF_USERNAME}:\${DEF_USERNAME}" /tmp/build/windows windows
RUN find . -type d -exec chmod 755 {} \; && \
find . -type f -exec chmod 644 {} \;

Loading…
Cancel
Save