This commit is contained in:
Marco Ochse 2018-05-09 14:29:06 +00:00
parent 94af9493b1
commit 731e18d083
3 changed files with 11 additions and 7 deletions

View file

@ -7,8 +7,12 @@ ADD dist/ /root/dist/
RUN apk -U upgrade && \ RUN apk -U upgrade && \
apk add build-base \ apk add build-base \
git \ git \
libcap \
libffi \
libffi-dev \ libffi-dev \
openssl \
openssl-dev \ openssl-dev \
python3 \
python3-dev && \ python3-dev && \
# Setup user # Setup user
@ -20,23 +24,23 @@ RUN apk -U upgrade && \
cd /opt/ && \ cd /opt/ && \
git clone https://github.com/cymmetria/ciscoasa_honeypot && \ git clone https://github.com/cymmetria/ciscoasa_honeypot && \
cd ciscoasa_honeypot && \ cd ciscoasa_honeypot && \
pip3 install --no-cache-dir --upgrade pip && \
pip3 install --no-cache-dir -r requirements.txt && \ pip3 install --no-cache-dir -r requirements.txt && \
cp /root/dist/asa_server.py /opt/ciscoasa_honeypot && \ cp /root/dist/asa_server.py /opt/ciscoasa_honeypot && \
chown -R ciscoasa:ciscoasa /opt/ciscoasa_honeypot && \ chown -R ciscoasa:ciscoasa /opt/ciscoasa_honeypot && \
setcap cap_net_bind_service=+ep /usr/bin/python3.6 && \
# Clean up # Clean up
apk del --purge build-base \ apk del --purge build-base \
git \ git \
libcap \
libffi-dev \ libffi-dev \
openssl-dev \ openssl-dev \
python3-dev && \ python3-dev && \
apk add libffi \
openssl \
python3 && \
rm -rf /root/* && \ rm -rf /root/* && \
rm -rf /var/cache/apk/* rm -rf /var/cache/apk/*
# Start ciscoasa # Start ciscoasa
WORKDIR /tmp/ciscoasa/ WORKDIR /tmp/ciscoasa/
USER ciscoasa:ciscoasa USER ciscoasa:ciscoasa
CMD cp -R /opt/ciscoasa_honeypot/* /tmp/ciscoasa && exec python3 asa_server.py --enable_ssl --verbose >> /var/log/ciscoasa/ciscoasa.log 2>&1 CMD cp -R /opt/ciscoasa_honeypot/* /tmp/ciscoasa && exec python3 asa_server.py --ike-port 500 --enable_ssl --port 443 --verbose >> /var/log/ciscoasa/ciscoasa.log 2>&1

View file

@ -150,7 +150,7 @@ class WebLogicHandler(SimpleHTTPRequestHandler):
def log_message(self, format, *args): def log_message(self, format, *args):
self.logger.debug("{'timestamp': '%s', 'src_ip': '%s', 'payload_printable': '%s'}" % self.logger.debug("{'timestamp': '%s', 'src_ip': '%s', 'payload_printable': '%s'}" %
(datetime.datetime.utcnow().isoformat(), (datetime.datetime.now().isoformat(),
self.client_address[0], self.client_address[0],
format % args)) format % args))

View file

@ -16,8 +16,8 @@ services:
networks: networks:
- ciscoasa_local - ciscoasa_local
ports: ports:
- "5000:5000" - "5000:500"
- "8443:8443" - "8443:443"
image: "dtagdevsec/ciscoasa:1804" image: "dtagdevsec/ciscoasa:1804"
read_only: true read_only: true
volumes: volumes: