2024-02-27 19:11:16 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								FROM alpine:3.19
							 | 
						
					
						
							
								
									
										
										
										
											2019-08-28 13:59:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#
							 | 
						
					
						
							
								
									
										
										
										
											2018-04-27 23:10:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# Include dist
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-05 00:50:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								COPY dist/ /root/dist/
							 | 
						
					
						
							
								
									
										
										
										
											2019-08-28 13:59:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-20 17:40:34 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# Setup env and apt
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-05 00:50:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								RUN apk --no-cache -U upgrade && \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    apk --no-cache add build-base \
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-28 18:07:22 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										git \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										libffi \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										libffi-dev \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										openssl \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										openssl-dev \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										py3-cryptography \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										py3-pip \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										python3 \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										python3-dev && \
							 | 
						
					
						
							
								
									
										
										
										
											2019-08-28 13:59:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#
							 | 
						
					
						
							
								
									
										
										
										
											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 && \
							 | 
						
					
						
							
								
									
										
										
										
											2019-08-28 13:59:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-20 17:40:34 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# Get and install packages
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    mkdir -p /opt/ && \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    cd /opt/ && \
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-02 15:18:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    git clone https://github.com/cymmetria/ciscoasa_honeypot && \
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-20 17:40:34 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    cd ciscoasa_honeypot && \
							 | 
						
					
						
							
								
									
										
										
										
											2020-09-02 15:18:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    git checkout d6e91f1aab7fe6fc01fabf2046e76b68dd6dc9e2 && \
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-24 17:54:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    sed -i "s/git+git/git+https/g" requirements.txt && \
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-27 19:11:16 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    pip3 install --break-system-packages --no-cache-dir -r requirements.txt && \
							 | 
						
					
						
							
								
									
										
										
										
											2018-04-27 23:10:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    cp /root/dist/asa_server.py /opt/ciscoasa_honeypot && \
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-26 17:55:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    chown -R ciscoasa:ciscoasa /opt/ciscoasa_honeypot && \
							 | 
						
					
						
							
								
									
										
										
										
											2019-08-28 13:59:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#
							 | 
						
					
						
							
								
									
										
										
										
											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/* && \
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-05 00:50:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    rm -rf /opt/ciscoasa_honeypot/.git && \
							 | 
						
					
						
							
								
									
										
										
										
											2018-05-04 16:29:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    rm -rf /var/cache/apk/*
							 | 
						
					
						
							
								
									
										
										
										
											2019-08-28 13:59:41 +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
							 |