| 
									
										
										
										
											2024-11-19 15:34:04 +00:00
										 |  |  | FROM alpine:3.20 AS builder | 
					
						
							| 
									
										
										
										
											2020-01-15 10:37:48 +00:00
										 |  |  | # | 
					
						
							|  |  |  | # Install packages | 
					
						
							| 
									
										
										
										
											2024-12-05 20:12:18 +00:00
										 |  |  | RUN apk --no-cache -U upgrade && \ | 
					
						
							|  |  |  |     apk --no-cache -U add \ | 
					
						
							| 
									
										
										
										
											2024-11-19 15:34:04 +00:00
										 |  |  |         build-base \ | 
					
						
							| 
									
										
										
										
											2024-02-28 18:07:22 +00:00
										 |  |  | 		git \ | 
					
						
							|  |  |  | 		openssl \ | 
					
						
							|  |  |  | 		py3-pip \ | 
					
						
							|  |  |  | 		python3 && \ | 
					
						
							| 
									
										
										
										
											2024-11-19 15:34:04 +00:00
										 |  |  |     pip3 install --break-system-packages --no-cache-dir \ | 
					
						
							|  |  |  |         pyinstaller \ | 
					
						
							|  |  |  |         python-json-logger | 
					
						
							| 
									
										
										
										
											2020-01-15 10:37:48 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2020-01-15 12:14:23 +00:00
										 |  |  | # Install CitrixHoneypot from GitHub | 
					
						
							| 
									
										
										
										
											2024-11-19 15:34:04 +00:00
										 |  |  | RUN git clone https://github.com/t3chn0m4g3/CitrixHoneypot /opt/citrixhoneypot && \ | 
					
						
							| 
									
										
										
										
											2020-09-02 15:18:32 +00:00
										 |  |  |     cd /opt/citrixhoneypot && \ | 
					
						
							| 
									
										
										
										
											2024-12-05 20:12:18 +00:00
										 |  |  |     git checkout dee32447033a0296d053e8f881bf190f9dd7ad44 && \ | 
					
						
							| 
									
										
										
										
											2020-01-15 10:37:48 +00:00
										 |  |  |     mkdir -p /opt/citrixhoneypot/logs /opt/citrixhoneypot/ssl && \ | 
					
						
							|  |  |  |     openssl req \ | 
					
						
							|  |  |  |           -nodes \ | 
					
						
							|  |  |  |           -x509 \ | 
					
						
							|  |  |  |           -newkey rsa:2048 \ | 
					
						
							|  |  |  |           -keyout "/opt/citrixhoneypot/ssl/key.pem" \ | 
					
						
							|  |  |  |           -out "/opt/citrixhoneypot/ssl/cert.pem" \ | 
					
						
							|  |  |  |           -days 365 \ | 
					
						
							|  |  |  |           -subj '/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd' && \ | 
					
						
							| 
									
										
										
										
											2024-11-19 15:34:04 +00:00
										 |  |  |     chown 2000:2000 -R ssl/ | 
					
						
							| 
									
										
										
										
											2020-01-15 10:37:48 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2024-11-19 15:34:04 +00:00
										 |  |  | WORKDIR /opt/citrixhoneypot | 
					
						
							|  |  |  | RUN pyinstaller CitrixHoneypot.py | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | FROM alpine:3.20 | 
					
						
							| 
									
										
										
										
											2024-12-05 20:12:18 +00:00
										 |  |  | RUN apk --no-cache -U upgrade | 
					
						
							| 
									
										
										
										
											2024-11-19 15:34:04 +00:00
										 |  |  | COPY --from=builder /opt/citrixhoneypot/dist/CitrixHoneypot/ /opt/citrixhoneypot | 
					
						
							|  |  |  | COPY --from=builder /opt/citrixhoneypot/ssl /opt/citrixhoneypot/ssl | 
					
						
							|  |  |  | COPY --from=builder /opt/citrixhoneypot/responses/ /opt/citrixhoneypot/responses | 
					
						
							| 
									
										
										
										
											2020-01-15 10:37:48 +00:00
										 |  |  | # | 
					
						
							|  |  |  | # Set workdir and start citrixhoneypot | 
					
						
							|  |  |  | STOPSIGNAL SIGINT | 
					
						
							| 
									
										
										
										
											2024-11-19 15:34:04 +00:00
										 |  |  | USER 2000:2000 | 
					
						
							| 
									
										
										
										
											2020-01-15 10:37:48 +00:00
										 |  |  | WORKDIR /opt/citrixhoneypot/ | 
					
						
							| 
									
										
										
										
											2024-11-19 15:34:04 +00:00
										 |  |  | CMD nohup ./CitrixHoneypot |