mirror of
				https://github.com/telekom-security/tpotce.git
				synced 2025-10-30 20:12:53 +00:00 
			
		
		
		
	revert honeypy to alpine
This commit is contained in:
		
							parent
							
								
									a7faafeba9
								
							
						
					
					
						commit
						efa9d991ba
					
				
					 2 changed files with 18 additions and 78 deletions
				
			
		|  | @ -1,20 +1,20 @@ | ||||||
| FROM debian:buster-slim | FROM alpine:3.11 | ||||||
| # | # | ||||||
| # Include dist | # Include dist | ||||||
| ADD dist/ /root/dist/ | ADD dist/ /root/dist/ | ||||||
| # | # | ||||||
| # Install packages | # Install packages | ||||||
| RUN apt-get update -y && \ | RUN sed -i 's/dl-cdn/dl-2/g' /etc/apk/repositories && \ | ||||||
|     apt-get install -y \ |     apk -U --no-cache add \ | ||||||
|             build-essential \ |             build-base \ | ||||||
|             git \ |             git \ | ||||||
|             libcap2-bin \ |             libcap \ | ||||||
|             python2 \ |             python2 \ | ||||||
|             python2-dev \ |             python2-dev \ | ||||||
|             python-pip && \ |             py2-pip && \ | ||||||
| # | # | ||||||
| # Install virtualenv | # Install virtualenv | ||||||
|     pip install --no-cache-dir virtualenv==20.4.7 && \ |     pip install --no-cache-dir virtualenv && \ | ||||||
| # | # | ||||||
| # Clone honeypy from git | # Clone honeypy from git | ||||||
|     git clone https://github.com/foospidy/HoneyPy /opt/honeypy && \ |     git clone https://github.com/foospidy/HoneyPy /opt/honeypy && \ | ||||||
|  | @ -36,20 +36,18 @@ RUN apt-get update -y && \ | ||||||
|     /opt/honeypy/env/bin/pip install -r /opt/honeypy/requirements.txt && \ |     /opt/honeypy/env/bin/pip install -r /opt/honeypy/requirements.txt && \ | ||||||
| # | # | ||||||
| # Setup user, groups and configs | # Setup user, groups and configs | ||||||
|     addgroup --gid 2000 honeypy && \ |     addgroup -g 2000 honeypy && \ | ||||||
|     adduser --system --no-create-home --shell /bin/bash --uid 2000 --disabled-password --disabled-login --gid 2000 honeypy && \ |     adduser -S -H -s /bin/ash -u 2000 -D -g 2000 honeypy && \ | ||||||
|     chown -R honeypy:honeypy /opt/honeypy && \ |     chown -R honeypy:honeypy /opt/honeypy && \ | ||||||
|     setcap cap_net_bind_service=+ep /opt/honeypy/env/bin/python && \ |     setcap cap_net_bind_service=+ep /opt/honeypy/env/bin/python && \ | ||||||
| # | # | ||||||
| # Clean up | # Clean up | ||||||
|     apt-get purge -y \ |     apk del --purge build-base \ | ||||||
|             build-essential \ |  | ||||||
|                     git \ |                     git \ | ||||||
|                     python2-dev \ |                     python2-dev \ | ||||||
| 	    python-pip && \ |                     py2-pip && \ | ||||||
|     apt-get autoremove --purge -y && \ |     rm -rf /root/* && \ | ||||||
|     apt-get clean && \ |     rm -rf /var/cache/apk/* | ||||||
|     rm -rf /root/* /var/lib/apt/lists/* /tmp/* /var/tmp/* |  | ||||||
| # | # | ||||||
| # Set workdir and start honeypy | # Set workdir and start honeypy | ||||||
| USER honeypy:honeypy | USER honeypy:honeypy | ||||||
|  |  | ||||||
|  | @ -1,58 +0,0 @@ | ||||||
| FROM debian:buster-slim |  | ||||||
| # |  | ||||||
| # Install packages |  | ||||||
| RUN apt-get update -y && \ |  | ||||||
|     apt-get install -y \ |  | ||||||
|             autoconf \ |  | ||||||
| 	    automake \ |  | ||||||
|             build-essential \ |  | ||||||
|             git \ |  | ||||||
|             libcap2-bin \ |  | ||||||
| 	    libtool \ |  | ||||||
| 	    python2 \ |  | ||||||
| 	    python2-dev \ |  | ||||||
|             python-pip && \ |  | ||||||
| # |  | ||||||
| # Install libemu     |  | ||||||
|     git clone https://github.com/buffer/libemu /root/libemu/ && \ |  | ||||||
|     cd /root/libemu/ && \ |  | ||||||
|     git checkout e2624361e13588da74a2ce3e1dea0abb59dcf1d0 && \ |  | ||||||
|     autoreconf -vi && \ |  | ||||||
|     ./configure && \ |  | ||||||
|     make && \ |  | ||||||
|     make install && \ |  | ||||||
| # |  | ||||||
| # Install libemu python wrapper |  | ||||||
|     pip install --no-cache-dir \  |  | ||||||
|                         hpfeeds \ |  | ||||||
|                         pylibemu && \  |  | ||||||
| # |  | ||||||
| # Install mailoney from git |  | ||||||
|     git clone https://github.com/t3chn0m4g3/mailoney /opt/mailoney && \ |  | ||||||
|     cd /opt/mailoney && \ |  | ||||||
|     git checkout 85c37649a99e1cec3f8d48d509653c9a8127ea4f && \ |  | ||||||
| # |  | ||||||
| # Setup user, groups and configs |  | ||||||
|     addgroup --gid 2000 mailoney && \ |  | ||||||
|     adduser --system --no-create-home --shell /bin/bash --uid 2000 --disabled-password --disabled-login --gid 2000 mailoney && \ |  | ||||||
|     chown -R mailoney:mailoney /opt/mailoney && \ |  | ||||||
|     setcap cap_net_bind_service=+ep /usr/bin/python2.7 && \ |  | ||||||
| # |  | ||||||
| # Clean up |  | ||||||
|     apt-get purge -y \ |  | ||||||
|             autoconf \ |  | ||||||
| 	    automake \ |  | ||||||
|             build-essential \ |  | ||||||
| 	    git \ |  | ||||||
| 	    libtool \ |  | ||||||
| 	    python2-dev \ |  | ||||||
| 	    python-pip && \ |  | ||||||
|     apt-get autoremove --purge -y && \ |  | ||||||
|     apt-get clean && \ |  | ||||||
|     rm -rf /root/* /var/lib/apt/lists/* /tmp/* /var/tmp/* |  | ||||||
| # |  | ||||||
| # Set workdir and start mailoney |  | ||||||
| STOPSIGNAL SIGINT |  | ||||||
| USER mailoney:mailoney |  | ||||||
| WORKDIR /opt/mailoney/ |  | ||||||
| CMD ["/usr/bin/python2","mailoney.py","-i","0.0.0.0","-p","25","-s","mailrelay.local","-t","schizo_open_relay"] |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 t3chn0m4g3
						t3chn0m4g3