2018-02-20 17:40:34 +00:00
|
|
|
FROM alpine
|
|
|
|
|
2018-04-27 23:10:45 +00:00
|
|
|
# Include dist
|
|
|
|
ADD dist/ /root/dist/
|
|
|
|
|
2018-02-20 17:40:34 +00:00
|
|
|
# Setup env and apt
|
|
|
|
RUN apk -U upgrade && \
|
2018-05-04 16:29:55 +00:00
|
|
|
apk add build-base \
|
2018-03-25 18:35:32 +00:00
|
|
|
git \
|
2018-05-09 14:29:06 +00:00
|
|
|
libffi \
|
2018-03-25 18:35:32 +00:00
|
|
|
libffi-dev \
|
2018-05-09 14:29:06 +00:00
|
|
|
openssl \
|
2018-03-25 18:35:32 +00:00
|
|
|
openssl-dev \
|
2018-05-09 14:29:06 +00:00
|
|
|
python3 \
|
2018-05-04 16:29:55 +00:00
|
|
|
python3-dev && \
|
2018-02-20 17:40:34 +00:00
|
|
|
|
|
|
|
# Setup user
|
|
|
|
addgroup -g 2000 ciscoasa && \
|
|
|
|
adduser -S -s /bin/bash -u 2000 -D -g 2000 ciscoasa && \
|
|
|
|
|
|
|
|
# Get and install packages
|
|
|
|
mkdir -p /opt/ && \
|
|
|
|
cd /opt/ && \
|
2018-06-05 13:50:37 +00:00
|
|
|
git clone --depth=1 https://github.com/cymmetria/ciscoasa_honeypot && \
|
2018-02-20 17:40:34 +00:00
|
|
|
cd ciscoasa_honeypot && \
|
2018-05-09 14:29:06 +00:00
|
|
|
pip3 install --no-cache-dir --upgrade pip && \
|
2018-04-27 23:10:45 +00:00
|
|
|
pip3 install --no-cache-dir -r requirements.txt && \
|
|
|
|
cp /root/dist/asa_server.py /opt/ciscoasa_honeypot && \
|
2018-02-26 17:55:56 +00:00
|
|
|
chown -R ciscoasa:ciscoasa /opt/ciscoasa_honeypot && \
|
2018-02-20 17:40:34 +00:00
|
|
|
|
|
|
|
# Clean up
|
2018-03-30 21:47:59 +00:00
|
|
|
apk del --purge build-base \
|
|
|
|
git \
|
|
|
|
libffi-dev \
|
|
|
|
openssl-dev \
|
|
|
|
python3-dev && \
|
2018-05-04 16:29:55 +00:00
|
|
|
rm -rf /root/* && \
|
|
|
|
rm -rf /var/cache/apk/*
|
2018-02-20 17:40:34 +00:00
|
|
|
|
2018-05-04 16:29:55 +00:00
|
|
|
# Start ciscoasa
|
2018-09-11 12:19:26 +00:00
|
|
|
STOPSIGNAL SIGINT
|
2018-04-27 23:10:45 +00:00
|
|
|
WORKDIR /tmp/ciscoasa/
|
2018-03-30 21:47:59 +00:00
|
|
|
USER ciscoasa:ciscoasa
|
2018-05-09 16:43:37 +00:00
|
|
|
CMD cp -R /opt/ciscoasa_honeypot/* /tmp/ciscoasa && exec python3 asa_server.py --ike-port 5000 --enable_ssl --port 8443 --verbose >> /var/log/ciscoasa/ciscoasa.log 2>&1
|